-
Notifications
You must be signed in to change notification settings - Fork 2
5. Development Notes
-
Package Layout (recommended):
ICESEE is installed as a standard Python package usingpyproject.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__.pyand 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.tomlunder[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; treatpyproject.tomlas the source of truth.
- Runtime dependencies are declared in
-
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
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
-
Normal package (default):
ICESEE/__init__.pyexists.
→ This is the simplest and most robust option. -
Namespace package (PEP 420):
RemoveICESEE/__init__.pyand do not usepkg_resources.
→ Only use this if ICESEE is split across multiple distributions sharing theICESEE.*namespace.