ioos / compliance-checker

Python tool to check your datasets against compliance standards
http://ioos.github.io/compliance-checker/
Apache License 2.0
108 stars 58 forks source link

Remove pkg_resources and go fully to pyproject.toml #1059

Closed ChrisBarker-NOAA closed 5 months ago

ChrisBarker-NOAA commented 5 months ago

This PR removes the deprecated pkg_resources.

It also updates to a fully pyproject.toml based build / install, building off the work in: #1024

Looking now, it seems that #1039 is in fact pretty much the same thing -- wish I'd noticed that earlier!

Sorry to put two things in one PR -- I had done one, and didn't realize how much. was involved in pkg_resources.

Anyway, it would be great if either this or #1039 could be merged.

ChrisBarker-NOAA commented 5 months ago

Hmm -- test failing, due to bad yaml file:

Invalid workflow file: .github/workflows/default-tests.yml#L24 The workflow is not valid. .github/workflows/default-tests.yml (Line: 24, Col: 22): The expression is not closed. An unescaped ${{ sequence was found, but the closing }} sequence was not found.

I didn't touch that file, so ???

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 65.00000% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 80.69%. Comparing base (c137e28) to head (2f9c5ae). Report is 7 commits behind head on develop.

Files Patch % Lines
compliance_checker/cf/util.py 33.33% 2 Missing :warning:
compliance_checker/suite.py 77.77% 2 Missing :warning:
cchecker.py 0.00% 1 Missing :warning:
compliance_checker/base.py 66.66% 0 Missing and 1 partial :warning:
compliance_checker/cfutil.py 50.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #1059 +/- ## =========================================== - Coverage 82.14% 80.69% -1.46% =========================================== Files 24 25 +1 Lines 5170 5267 +97 Branches 1242 1261 +19 =========================================== + Hits 4247 4250 +3 - Misses 623 716 +93 - Partials 300 301 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jcermauwedu commented 5 months ago

Using importlib.metadata.entry_points(group= forces the minimum python to 3.10. I was struggling in python 3.9. The workflow default-tests.yml may need to drop 3.8 and 3.9. I will wait for this PR to continue with the pytest fixes in #1056.

ChrisBarker-NOAA commented 5 months ago

Now that #1039 has been merged, I'm going to update this. closing for now.

Thanks for the 3.10 hint -- that's where I was testing, but it wasn't clear from the docs which features were added when to the stdlib. I'll use the backported version for older versions.

ChrisBarker-NOAA commented 5 months ago

OK -- here it is: #1060