isofit.data.cli.isoplots

Downloads the extra ISOFIT plotting utilities from the repository https://github.com/isofit/isofit-plots

Attributes

CMD

Functions

install([path])

Installs a python package into the current python environment as editable mode

download([path, tag, overwrite])

Downloads the extra ISOFIT plotting utilities from the repository https://github.com/isofit/isofit-plots.

validate([path, checkForUpdate, debug, error])

Validates an isoplots installation

isUpToDate([path, tag, debug, error])

Checks the installed version against the latest release

update([check])

Checks for an update and executes a new download if it is needed

download_cli(**kwargs)

Downloads the extra ISOFIT plotting utilities from the repository https://github.com/isofit/isofit-plots.

validate_cli(**kwargs)

Validates the installation of the ISOFIT extra data files as well as checks for updates

Module Contents

CMD = 'plots'[source]
install(path=None)[source]

Installs a python package into the current python environment as editable mode

Parameters:

path (str | None) – Path to package to install. If None, defaults to the ini path

download(path=None, tag='latest', overwrite=False)[source]

Downloads the extra ISOFIT plotting utilities from the repository https://github.com/isofit/isofit-plots.

Parameters:
  • path (str | None) – Path to output as. If None, defaults to the ini path

  • tag (str) – Release tag to pull from the github

  • overwrite (bool, default=False) – Overwrite an existing installation

validate(path=None, checkForUpdate=True, debug=print, error=print, **_)[source]

Validates an isoplots installation

Parameters:
  • path (str, default=None) – Path to verify. If None, defaults to the ini path

  • checkForUpdate (bool, default=True) – Checks for updates if the path is valid

  • debug (function, default=print) – Print function to use for debug messages, eg. logging.debug

  • error (function, default=print) – Print function to use for error messages, eg. logging.error

  • **_ (dict) – Ignores unused params that may be used by other validate functions. This is to maintain compatibility with env.validate

Returns:

True if valid, False otherwise

Return type:

bool

isUpToDate(path=None, tag='latest', debug=print, error=print, **_)[source]

Checks the installed version against the latest release

Parameters:
  • path (str, default=None) – Path to update. If None, defaults to the ini path

  • debug (function, default=print) – Print function to use for debug messages, eg. logging.debug

  • error (function, default=print) – Print function to use for error messages, eg. logging.error

  • _ (dict) – Ignores unused params that may be used by other validate functions. This is to maintain compatibility with other functions

Returns:

True if the path is up to date, False otherwise

Return type:

bool

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.

update(check=False, **kwargs)[source]

Checks for an update and executes a new download if it is needed

Parameters:
  • check (bool, default=False) – Just check if an update is available, do not download

  • **kwargs (dict) – Additional key-word arguments to pass to download()

download_cli(**kwargs)[source]

Downloads the extra ISOFIT plotting utilities from the repository https://github.com/isofit/isofit-plots. This will install the package into your current environment along with its dependencies.

 Run isofit download paths to see default path locations. There are two ways to specify output directory:

  • isofit –plots /path/plots download plots: Override the ini file. This will save the provided path for future reference.

  • isofit download plots –path /path/plots: 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.

validate_cli(**kwargs)[source]

Validates the installation of the ISOFIT extra data files as well as checks for updates