Skip to content

5. Development Notes

Brian Kyanjo edited this page Jan 22, 2026 · 5 revisions

Setup Notes

  • Package Layout (recommended):
    ICESEE is installed as a standard Python package using pyproject.toml (setuptools backend).
    After installation (editable or normal), imports work cleanly, for example:

    from ICESEE.src.run_model_da import ...
  • If you choose to treat ICESEE as a namespace package, use PEP 420 (no pkg_resources) and ensure packaging/discovery is configured accordingly.

  • Otherwise, keep ICESEE/__init__.py and treat ICESEE as a normal package (simplest and most reliable).

  • Makefile:

    • make setup — prepares the development environment (may configure PYTHONPATH for local runs)
    • make install — installs ICESEE (recommended), typically via:
      pip install -e .
  • Dependencies:

    • Runtime dependencies are declared in pyproject.toml under [project].dependencies
    • Optional features (e.g., MPI) are declared in [project.optional-dependencies] and installed via extras:
      pip install -e ".[mpi]"
    • Avoid adding new runtime dependencies to setup.py; treat pyproject.toml as the source of truth.
  • Testing:

    • Test the setup by cloning the repository in a clean environment (e.g., Docker container or fresh virtual environment)
    • Minimal sanity checks:
      python -c "import ICESEE; print(ICESEE.__file__)"
      pytest -q
  • Example run:

    python -m ICESEE.applications.lorenz_model.examples.lorenz96.run_da_lorenz96

Project Structure

ICESEE/
├── applications/
│   ├── icepack_model/
│   │   ├── examples/
│   │   │   ├── synthetic_ice_stream/
│   │   │   └── shallowIce/
│   │   └── icepack_utils/
│   ├── issm_model/
│   │   ├── examples/
│   │   │   └── ISMIP/
│   │   └── issm_utils/
│   ├── flowline_model/
│   └── lorenz-96/
├── src/
│   ├── EnKF/
│   ├── Container/
│   ├── parallelization/
│   ├── run_model_da/
│   ├── tests/
│   └── utils/
├── config/
├── pyproject.toml
├── setup.py
├── Makefile
├── requirements
└── README.md

Packaging Notes (Important)

  • Normal package (default):
    ICESEE/__init__.py exists.
    → This is the simplest and most robust option.

  • Namespace package (PEP 420):
    Remove ICESEE/__init__.py and do not use pkg_resources.
    → Only use this if ICESEE is split across multiple distributions sharing the ICESEE.* namespace.

Clone this wiki locally