Skip to content

Restructure as installable floodpath package#10

Merged
rehsani merged 1 commit into
mainfrom
restructure-as-floodpath
May 4, 2026
Merged

Restructure as installable floodpath package#10
rehsani merged 1 commit into
mainfrom
restructure-as-floodpath

Conversation

@rehsani
Copy link
Copy Markdown
Owner

@rehsani rehsani commented May 4, 2026

Summary

  • Renames the project from flood_inundation to floodpath. The GitHub repo has already been renamed (rehsani/flood_inundationrehsani/floodpath); GitHub auto-redirects old URLs.
  • Moves dem/, hydrology/, exposure/, damage/ under floodpath/. Users now write from floodpath.dem import get_dem instead of from dem import get_dem, which avoids namespace collisions.
  • Adds LICENSE (MIT), README.md (badges, install, quickstart, modules, citations), and full [project] + [build-system] blocks in pyproject.toml so the package is pip install floodpath-ready.
  • Renames the conda env (1c_setup_env.sh) and the GHA micromamba env from flood_inundation to floodpath.
  • Moves per-user caches from ~/.cache/flood_inundation/* to ~/.cache/floodpath/*. (User caches will be re-populated on first call after this PR; old ones can be deleted.)
  • Adds smoke_test.py and .claude/ to .gitignore.

Test plan

  • CI green on Linux runner.
  • Wheel + sdist build (python -m build) — already verified locally; produces floodpath-0.1.0-py3-none-any.whl (~31 KB) and .tar.gz (~25 KB).
  • All 122 tests still pass (offline + integration) after the import rewrites.

Follow-ups (next session)

  • Create PyPI account + API token (your task)
  • twine upload dist/* to TestPyPI, verify install
  • twine upload dist/* to real PyPI
  • Rename the local working directory (flood_inundation/floodpath/)

Renames the project from "flood_inundation" to "floodpath" and prepares
a v0.1.0 release suitable for PyPI:

- Move dem/, hydrology/, exposure/, damage/ under floodpath/ namespace
  so users get safe, project-prefixed imports (no "from dem import ...")
- Rewrite all cross-package imports to floodpath.<pkg>.<module>
- Update tests/conftest.py, fixture generators and the pytest config so
  the same suite runs against the new package
- Add LICENSE (MIT), README.md (badges, install, quickstart, citations),
  and a [project] / [build-system] block in pyproject.toml
- Move per-user caches from ~/.cache/flood_inundation/* to
  ~/.cache/floodpath/* and update OSM User-Agent + GHSL/WorldPop
  docstrings accordingly
- Rename the conda env (1c_setup_env.sh) and the GHA workflow's
  micromamba environment from "flood_inundation" to "floodpath"
- Add smoke_test.py and .claude/ to .gitignore

The GitHub repo has been renamed in parallel (rehsani/flood_inundation
-> rehsani/floodpath); badge and project URLs updated to match.

122 tests still pass (offline + integration).
@rehsani rehsani merged commit cced810 into main May 4, 2026
1 check passed
@rehsani rehsani deleted the restructure-as-floodpath branch May 4, 2026 03:44
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.

1 participant