Repository navigation
Prepares openeo-udp 0.2.0 for publishing on PyPI - #88
firzaariany wants to merge 7 commits into
Conversation
Moves all 38 *.params.py files from notebooks/ into openeo_udp/params/ so
they ship with the package on PyPI. Notebooks keep calling
ParameterManager("<algorithm>.params.py"): a bare file name that does not
exist locally now resolves to the packaged copy, while a local file with
the same name still takes precedence.
- Adds list_parameter_files() to list the packaged parameter files
- Replaces the notebook package-data rule with openeo_udp/params/*.params.py
- Adds tests that every packaged file loads, the local override and missing files
- Updates LICENSING.md, CONTRIBUTING.md, docs and the dNBR README to the new paths
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The forest_fire_dNBR and burned_forest_classification_ml notebooks are self-contained and should not ship with openeo-udp, so their parameter files move back next to their notebooks. They still load through ParameterManager because a local file takes precedence over the packaged lookup. - Adds STANDALONE_NOTEBOOK_DIRS to the packaging tests as the allowed exceptions, and checks their parameter files are not packaged - Restores the forest_fire_dNBR README to its original layout Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Bumps the version to 0.2.0, read by pyproject.toml from openeo_udp.__version__ so the two cannot drift apart - Adds Firza Riany to the authors - Reduces the core dependencies to openeo and ipywidgets, the only third-party packages the package imports - Adds a "notebooks" extra (matplotlib, numpy, Pillow, rioxarray) for the packaged notebooks; the dev group installs it, so uv sync is unchanged for contributors - Moves jupyter and ipykernel to the dev group and drops pip and requests - Moves the ML-only packages (geopandas, scikit-learn, scipy, netcdf4, rasterio, xarray, shapely) into requirements.txt files in the forest_fire_dNBR and burned_forest_classification_ml folders; drops h5netcdf since netcdf4 covers reading the .nc results - Adds a "batch" dependency group with pydantic for scripts/run_batch_job.py Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- print_options() now starts with the loaded parameter file and whether it is packaged or local, and warns when a local file overrides a packaged one of the same name - Adds ParameterManager.is_packaged and describe_source(), with tests - README explains that parameter files ship in openeo_udp/params/ and how to override one with a local copy Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fapar, lava_visualization, ndci_cyanobacteria and urban_areas had no schemas; flood_mapping and multitemporal_burnt_area lacked them on their runtime parameters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I've cleaned up the dependencies. This took some time because I had to evaluate which dependencies were used by a handful of notebooks (e.g. What's left is to separate the doc for the package ( We also want to rename the package into something more descriptive. I was thinking of |
Summary
This PR closes #87 and #82
This PR gets the
openeo_udppackage ready to publish on PyPI. Notebooks will then be able to%pip install openeo-udp, including in APEx JupyterLite. The parameter files now ship inside the package. A local file with the same name still overrides the packaged one.This PR does not change the notebooks. That work is in
feat/notebooks-pypi-install, which is based on this branch and should be merged after it.Changes
Parameter files ship with the package.
*.params.pyfiles fromnotebooks/**intoopeneo_udp/params/and declared them as package data.ParameterManager("<id>.params.py")looks for the file in this order:A path that includes a directory never falls back to the packaged copy.
list_parameter_files(), exported fromopeneo_udp.print_options()now starts with the file it loaded, for exampleParameter file: urban_areas.params.py (packaged with openeo-udp). It warns when a local file overrides a packaged one.Standalone ML notebooks stay out of the package
forest_fire_dNBRandburned_forest_classification_mlstay in their notebook folders.Each of those folders now has a
requirements.txtfor its heavier dependencies (geopandas,scikit-learn,xarrayand others).Packaging metadata
pyproject.tomlreads it fromopeneo_udp.__version__, so it is defined in one place.openeoandipywidgets. Plotting libraries move to a notebooks extra.dev,batch(pydantic) and docs.uv.lockis regenerated.Docs
I updated the parameter file paths in
README.md,CONTRIBUTING.md,LICENSING.mdanddocs/parameter-management.md.Tests
The new
tests/test_packaged_params.pychecks that:FileNotFoundError.*.params.pyfiles are left innotebooks/outside the two ML folders, and those two folders' files are not packaged.describe_source()andprint_options()report where the file came from.Merge order
This PR is the first of two stacked PRs:
feat/pypi-packaging→main): packaging, the parameter files, and the CI workflows (tests, build check, publish).feat/notebooks-pypi-install→feat/pypi-packaging: puts the pinned%pip installcell in every notebook, removes in-notebook registration, and limits the wheel toopeneo_udp/. When this PR merges, retargets the second PR tomain.Please merge this PR with a merge commit or rebase-merge, not a squash. A squash leaves this PR's commits in the second PR, so its branch would need a
git rebase --ontobefore it can merge cleanly.No release until both PRs are merged. Between the two merges, main has a wheel that still contains
algorithm_registration, and notebooks that still callregister(). That intermediate state is safe because:v*tags, so merging it doesn't publish anything.pypienvironment requires a reviewer's approval, so even an accidental tag can't publish on its own.Release, after both PRs are merged:
v0.2.0rc1. This publishes to TestPyPI, where we check the install in APEx JupyterLite.Notes for reviewers