isofit.data.cli.sixs ==================== .. py:module:: isofit.data.cli.sixs .. autoapi-nested-parse:: Downloads 6S from https://github.com/isofit/6S Attributes ---------- .. autoapisummary:: isofit.data.cli.sixs.CMD isofit.data.cli.sixs.MINGW Functions --------- .. autoapisummary:: isofit.data.cli.sixs.precheck isofit.data.cli.sixs.patch_makefile isofit.data.cli.sixs.make isofit.data.cli.sixs.download_mingw isofit.data.cli.sixs.download isofit.data.cli.sixs.validate isofit.data.cli.sixs.update isofit.data.cli.sixs.download_cli isofit.data.cli.sixs.validate_cli Module Contents --------------- .. py:data:: CMD :value: 'sixs' .. py:data:: MINGW :value: 'https://github.com/brechtsanders/winlibs_mingw/releases/download/15.2.0posix-13.0.0-msvcrt-r2/wi... .. py:function:: precheck() Checks if gfortran is installed before downloading SixS :returns: True if `gfortran --version` returns a valid response, None otherwise :rtype: True or None .. py:function:: patch_makefile(file) Patch the 6S Makefile to: - Add -std=legacy to the EXTRAS (isofit) :param file: Makefile to patch inplace :type file: pathlib.Path .. py:function:: make(directory, stdout=subprocess.PIPE, stderr=subprocess.PIPE, debug=False) Builds a 6S directory via make :param directory: 6S directory to build :type directory: str .. py:function:: download_mingw(path=None, tag='latest', overwrite=False, **_) Downloads MinGW64 for Windows :param output: Path to output as. If None, defaults to the ini path. :type output: str | None :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:: download(path=None, tag='latest', overwrite=False, debug_make=False, **_) Downloads 6S from https://github.com/isofit/6S. :param output: Path to output as. If None, defaults to the ini path. :type output: str | None :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 a 6S 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:: update(check=False, **kwargs) Checks for an update and executes a new download if it is needed Note: Not implemented for this module at this time :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(debug_make, mingw, **kwargs) Downloads 6S from https://github.com/isofit/6S. Only HDF5 versions are supported at this time.  Run `isofit download paths` to see default path locations. There are two ways to specify output directory: - `isofit --sixs /path/sixs download sixs`: Override the ini file. This will save the provided path for future reference. - `isofit download sixs --path /path/sixs`: 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 6S