refactor(NESP): reorganise into per-dataset folders and installable package#50
Open
refactor(NESP): reorganise into per-dataset folders and installable package#50
Conversation
…ackage - Create subdirectories for each dataset: amsa/, seabird/, seagrass/, dugongs/, kelp/, nrmn/ — notebooks and R markdown files moved into their respective folders - Convert util.py into an installable `nesp` package (nesp/__init__.py + nesp/util.py) so notebooks can use `from nesp import util` without path manipulation - Add hatchling build-system to pyproject.toml with explicit package declaration for the nesp wheel - Update all three Python notebooks to replace `import util` with `from nesp import util` - Add a concise README.md to each dataset folder (description, S3 path, notebook table, dataset-specific notes); dugongs/, kelp/, nrmn/ include placeholder stubs for notebooks yet to be written - Rewrite root NESP/README.md to document the full folder structure, Python (uv/pip) and R environment setup, and link to h3.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
Thanks @diodon, I ran the tests and had to update the package Did you run the tests locally as well? I'm wondering if this is just my system working strangely... |
thommodin
approved these changes
Mar 29, 2026
Contributor
thommodin
left a comment
There was a problem hiding this comment.
I had to update the __init__.py but otherwise fine... Was there a particular reason to run this as a package instead of a file import?
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.
Summary
amsa/,seabird/,seagrass/,dugongs/,kelp/,nrmn/: each contains its notebooks (.ipynb+.Rmd) and a dedicatedREADME.mdwith dataset description, S3 path, and notebook index. Folders fordugongs,kelp, andnrmninclude placeholder READMEs ready for future notebooks.nespinstallable package —util.pyconverted into a proper Python package (nesp/util.py+nesp/__init__.py) withhatchlingdeclared as the build backend inpyproject.toml. Notebooks now import viafrom nesp import utiland work from any directory afteruv pip install ..README.mdrewritten — covers folder structure, full dataset table with S3 paths, Python (uv/pip) setup, R package setup, and a link to the H3 reference doc.Test plan
uv pip install .fromNESP/and verify no errorsamsa,seabird,seagrass) and confirmfrom nesp import utilresolves correctlyutil.generate_pydeck_hexagon_layers,util.print_schema_rich_table, andutil.TOOLTIPare accessible via the installed package🤖 Generated with Claude Code