Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR renames the project to dsprofile and generalizes the original NetCDF-only implementation into a small framework with pluggable Reader subclasses for NetCDF, GeoTIFF, and ESRI Shapefile, along with CLI integration, tests, and CI.
Changes:
- Introduces
ReaderABC + registry (reader_type_map) and a new subcommand-based CLI (dsprofile {netcdf,geotiff,shape} ...). - Adds concrete readers:
NetCDFReader,GeoTIFFReader,ShapefileReader, plus format-specific tests and sample fixture datasets. - Updates packaging/entrypoint/docs and adds a GitHub Actions CI workflow.
Reviewed changes
Copilot reviewed 18 out of 23 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| setup.py | Renames distribution to dsprofile, updates dependencies, updates console entrypoint |
| README.md | Updates docs for new name + multi-format CLI usage |
| .github/workflows/ci.yml | Adds CI job running pytest + coverage |
| dsprofile/main.py | New CLI entrypoint wiring reader subcommands + output formatting |
| dsprofile/util.py | Refactors utility to focus on file/environment metadata profile |
| dsprofile/lib/reader.py | Adds Reader ABC + subtype auto-registration + make_reader factory |
| dsprofile/lib/init.py | Exports Reader API and imports concrete readers to register them |
| dsprofile/lib/netcdf.py | New NetCDF reader implementation + group-walking helpers |
| dsprofile/lib/tiff.py | New GeoTIFF reader implementation |
| dsprofile/lib/shape.py | New Shapefile reader implementation |
| dsprofile/init.py | Package marker |
| tests/test_setup.py | Expands dependency/version checks for new reader libs |
| tests/test_netcdf.py | Updates tests to new NetCDFReader + shared test data path env var |
| tests/test_geotiff.py | Adds GeoTIFF reader tests |
| tests/test_shapefile.py | Adds Shapefile reader tests |
| tests/data/test.nc | Test NetCDF dataset fixture |
| tests/data/GeogToWGS84GeoKey5.tif | Test GeoTIFF dataset fixture |
| tests/data/SJER_crop2.* | Test Shapefile dataset fixtures (.shp/.shx/.dbf/.prj/.qpj) |
| ncmetadata/reader.py | Removed (old NetCDF-only implementation) |
| ncmetadata/main.py | Removed (old CLI entrypoint) |
Comments suppressed due to low confidence (1)
dsprofile/util.py:23
- This triple-quoted block inside the try is an unused string literal (not a docstring) and will be ignored at runtime; it reads like a comment that was accidentally turned into a string. Convert it to a comment or move it into the function docstring for clarity.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Closes #1
This adds support for multiple dataset types, and renames the package to
dsprofile.The new
Readerabstract base class defines an interface required by all concrete reader types; support is implemented at present for......and basic tests are provided for each of these.