Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not require pyessv archive #58

Merged
merged 2 commits into from
Oct 8, 2024
Merged

Conversation

mishaschwartz
Copy link
Contributor

The pyessv-archive is required to run any stac-populator CLI commands but should only be required to run the CMIP6 populator.

This PR allows the CLI to work as intended even if pyessv-archive is not installed. Instead of exiting with an error, it will show a warning and continue to provide all other functionality that does not require pyessv-archive to run.

Current behaviour:

$ stac-populator --help
Traceback (most recent call last):
...
...
STACpopulator.exceptions.ExtensionLoadError: /home/.../.esdoc/pyessv-archive directory does not exists

After this PR behaviour:

$ stac-populator --help
.../stac-populator/STACpopulator/cli.py:159: UserWarning: Could not load extension CMIP6_UofT because of error /home/mschwa/.esdoc/pyessv-archive directory does not exists
  warnings.warn(f"Could not load extension {populator_name} because of error {e}")
usage: stac-populator [-h] [--version] [--debug] {run} ...

This PR also updates the README.md to clarify the dependency on pyessv-archive and fixes some minor typos.

Finally, it changes the PYESSV_ARCHIVE_DIR variable in the Makefile to PYESSV_ARCHIVE_HOME which is the variable used by the pyessv project. This means that users who wish to install the archive in a non-default location only need to set one variable, not two.

@huard
Copy link
Collaborator

huard commented Oct 8, 2024

Looks good. FYI, trying to convince maintainers of CORDEX and CMIP CVs to host a jsonschema built on their CVs. Worst case, we can host those ourselves, and replace the validation using pyessv with a simple validate from jsonschema.

@mishaschwartz mishaschwartz requested a review from huard October 8, 2024 12:56
@fmigneault fmigneault merged commit d758a83 into master Oct 8, 2024
7 checks passed
@fmigneault fmigneault deleted the no-require-pyessv-archive branch October 8, 2024 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants