Thanks to visit codestin.com
Credit goes to github.com

Skip to content

1 support multiple dataset types#3

Open
pmslavin wants to merge 6 commits intomasterfrom
1-support-multiple-dataset-types
Open

1 support multiple dataset types#3
pmslavin wants to merge 6 commits intomasterfrom
1-support-multiple-dataset-types

Conversation

@pmslavin
Copy link
Contributor

Closes #1

This adds support for multiple dataset types, and renames the package to dsprofile.

The new Reader abstract base class defines an interface required by all concrete reader types; support is implemented at present for...

  • NetCDF4
  • GeoTIFF
  • ESRI Shapefile

...and basic tests are provided for each of these.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 Reader ABC + 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.

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.

Support multiple dataset types

2 participants