Developer guide#

Including a package#

If you want a python package included in Deltaforge, there are the following requirements:

  • The package is released on conda-forge

  • The package has a license which allows us to distribute it freely

  • The package dependency requirements need to be compatible with the already included packages

If this is the case, you can post an issue on our issueboard.

Or you can add it to the construct.yaml file under specs, and open up a pull request. The construct.yaml currently looks like:

construct.yaml#
name: Deltaforge
version: 0.6.0
installer_type: all

channels:
  - https://conda.anaconda.org/conda-forge/
  - https://conda.anaconda.org/bioconda/

write_condarc: True

# keep pkgs for space-saving implications for hardlinks when create new environments
# and keep the same with Miniconda
keep_pkgs: True

specs:
  - python =3.11
  - conda
  - conda-libmamba-solver
  - mamba
  - affine
  - bottleneck
  - cftime >=1
  - contextily >=1
  - cytoolz
  - dask
  - flopy
  - geopandas
  - gistim >=0.5.0
  - graphviz
  - hydromt
  - hydromt_sfincs >=1.0
  - hydromt_wflow
  - hydromt_delwaq
  - imod >=0.15.3
  - ipykernel
  - ipython
  - jinja2
  - jupyter
  - matplotlib-base
  - matplotlib
  - meshzoo
  - miniforge_console_shortcut # [win]
  - netcdf4
  - numba >=0.50
  - numpy
  - pandas
  - pip
  - pooch
  - pymetis
  - python-dateutil
  - python-graphviz
  - pyvista
  - rasterio >=1.0
  - rioxarray
  - scipy
  - scooby
  - seaborn
  - shapely >=2.0
  - bioconda::snakemake # Get only snakemake from bioconda channel
  - spyder
  - ttim =0.6.6
  - timml =6.4.1 # Due to a typo, timml 6.04 is seen as the last version on conda-forge.
  - toolz
  - vtk >=9.0
  - xarray >=2023.8.0
  - xugrid >=0.6.4
  - zarr

license_file: ../LICENSE
company: Deltares

# Images for Windows installer
icon_image: deltaforge_icon.png
header_image: deltares.png
welcome_image: Welcome_Image.png

Building locally#

Building Deltaforge at present is slightly tricky, as constructor is not fully compatible with the latest features of conda yet.

Deltaforge is built with the package constructor. However, Deltaforge has a lot of dependencies to include, for which the standard conda solver is too slow. Luckily for us, the libmamba solver is recently added to conda. However, constructor does not support the plugin structure introduced in conda 20.11 yet. But our way out is using the conda 20.9 installation, which included libmamba as an experimental solver. In addition, constructor hasn’t released a version yet which support experimental solvers, so we have to pip directly from Github.

TL;DR, these are the commandos required to build Deltaforge at present (22-12-2022):

conda deactivate
conda install conda-libmamba-solver conda=20.9
conda config --set experimental_solver libmamba
pip install git+https://github.com/conda/constructor@fd028c8
constuctor .

Signing#

The installers are signed with the Deltares certificate on Deltares servers. At present, these are not pushed back to Github, so the built installers listed on Github under release are unsigned. Windows will throw warnings to users when using unsigned installers.