Convert the flat compliance_checker.py module into a proper package so#9
Open
aaschwanden wants to merge 1 commit into
Open
Convert the flat compliance_checker.py module into a proper package so#9aaschwanden wants to merge 1 commit into
aaschwanden wants to merge 1 commit into
Conversation
`pip install .` works and the checker runs from any directory.
- Move compliance_checker.py to compliance_checker/__init__.py and add
__main__.py (enables `python -m compliance_checker`).
- Move the runtime CSVs into compliance_checker/data/ as the single
source of truth; load them via importlib.resources instead of paths
relative to the working directory. Drops the workdir arg on
run_checker().
- Add pyproject.toml declaring the package, data files, dependencies,
and the `ismip7-compliance-checker` console script.
- Repoint the test-file generator at the packaged CSV and the top-level
gdfs/ directory; update tests to use the bundled defaults.
- Update READMEs and .gitignore.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We would like to run the compliace checker as part of our automated cloud workflow. This requires converting the checker to a proper python package with a
pyproject.tomlfiles so we can install it within our workflow management environment.Convert the flat compliance_checker.py module into a proper package so
pip install .works and the checker runs from any directory.python -m compliance_checker).ismip7-compliance-checkerconsole script.isschecker_env.ym.pytesttest pass.