isofit.data.cli.examples ======================== .. py:module:: isofit.data.cli.examples .. autoapi-nested-parse:: Downloads the ISOFIT examples from the repository https://github.com/isofit/isofit-tutorials Attributes ---------- .. autoapisummary:: isofit.data.cli.examples.CMD isofit.data.cli.examples.NEON_URL Functions --------- .. autoapisummary:: isofit.data.cli.examples.download_neon isofit.data.cli.examples.download isofit.data.cli.examples.validate isofit.data.cli.examples.isUpToDate isofit.data.cli.examples.update isofit.data.cli.examples.download_cli isofit.data.cli.examples.validate_cli Module Contents --------------- .. py:data:: CMD :value: 'examples' .. py:data:: NEON_URL :value: 'https://avng.jpl.nasa.gov/pub/PBrodrick/isofit/tutorials/subset_data.zip' .. py:function:: download_neon(examples) Downloads the NEON dataset from https://avng.jpl.nasa.gov/pub/PBrodrick/isofit/tutorials/subset_data.zip. :param examples: Path to the examples directory :type examples: Path .. py:function:: download(path=None, tag='latest', overwrite=False, **_) Downloads the ISOFIT examples from the repository https://github.com/isofit/isofit-tutorials. :param path: Path to output as. If None, defaults to the ini path :type path: str | None :param tag: Release tag to pull from the github :type tag: str :param overwrite: Overwrite an existing installation :type overwrite: bool, default=False :param \*\*_: Ignores unused params that may be used by other validate functions. This is to maintain compatibility with other functions :type \*\*_: dict .. py:function:: validate(path=None, checkForUpdate=True, debug=print, error=print, **_) Validates an ISOFIT examples installation :param path: Path to verify. If None, defaults to the ini path :type path: str, default=None :param checkForUpdate: Checks for updates if the path is valid :type checkForUpdate: bool, default=True :param debug: Print function to use for debug messages, eg. logging.debug :type debug: function, default=print :param error: Print function to use for error messages, eg. logging.error :type error: function, default=print :param \*\*_: Ignores unused params that may be used by other validate functions. This is to maintain compatibility with env.validate :type \*\*_: dict :returns: True if valid, False otherwise :rtype: bool .. py:function:: isUpToDate(path=None, tag='latest', debug=print, error=print, **_) Checks the installed version against the latest release :param path: Path to update. If None, defaults to the ini path :type path: str, default=None :param debug: Print function to use for debug messages, eg. logging.debug :type debug: function, default=print :param error: Print function to use for error messages, eg. logging.error :type error: function, default=print :param \*\*_: Ignores unused params that may be used by other validate functions. This is to maintain compatibility with other functions :type \*\*_: dict :returns: True if the path is up to date, False otherwise :rtype: bool .. rubric:: Notes The Github workflows watch for the string "[x]" to determine if the cache needs to update the data of this module. If your module does not include this string, the workflows will never detect updates. .. py:function:: update(check=False, **kwargs) Checks for an update and executes a new download if it is needed :param check: Just check if an update is available, do not download :type check: bool, default=False :param \*\*kwargs: Additional key-word arguments to pass to download() :type \*\*kwargs: dict .. py:function:: download_cli(**kwargs) Downloads the ISOFIT examples from the repository https://github.com/isofit/isofit-tutorials.  Run `isofit download paths` to see default path locations. There are two ways to specify output directory: - `isofit --examples /path/examples download examples`: Override the ini file. This will save the provided path for future reference. - `isofit download examples --path /path/examples`: Temporarily set the output location. This will not be saved in the ini and may need to be manually set. It is recommended to use the first style so the download path is remembered in the future. .. py:function:: validate_cli(**kwargs) Validates the installation of the ISOFIT examples as well as checks for updates