Skip to content

Convert the flat compliance_checker.py module into a proper package so - #9

Closed
aaschwanden wants to merge 1 commit into
ismip:mainfrom
aaschwanden:main
Closed

Convert the flat compliance_checker.py module into a proper package so#9
aaschwanden wants to merge 1 commit into
ismip:mainfrom
aaschwanden:main

Conversation

@aaschwanden

Copy link
Copy Markdown

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 apyproject.toml files 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.

  • 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.
  • Removed restrictive pinning of modules in isschecker_env.ym.
  • All pytest test pass.

  `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.
Comment thread isschecker_env.yml
Comment on lines 2 to +17
channels:
- conda-forge
dependencies:
- python=3.14
- pip=26.0.1
- python
- pip

# Core scientific python
- numpy=2.4.3
- pandas=3.0.2
- pytest=8.4.2
- tqdm=4.67.3
- numpy
- pandas
- pytest
- tqdm

# Spatial packages
- xarray=2026.4.0
- cftime=1.6.5
- netcdf4=1.7.4
- xarray
- cftime
- netcdf4

@xylar xylar Jul 22, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aaschwanden, the pinning here is deliberate. We don't want differences in versions resulting in different outcomes. This change would require come careful discussion.

Comment thread pyproject.toml
Comment on lines +14 to +19
"numpy",
"pandas",
"xarray",
"cftime",
"netCDF4",
"tqdm",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As in the conda env file, these likely need constrains if not version pins.

@xylar xylar mentioned this pull request Jul 25, 2026
@xylar xylar closed this in #13 Jul 25, 2026
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.

2 participants