Skip to content

Fix dependencies resolution for conda installation#10

Open
vijdz wants to merge 7 commits intoCNES:mainfrom
LaTeleScop:dependencies-resolution
Open

Fix dependencies resolution for conda installation#10
vijdz wants to merge 7 commits intoCNES:mainfrom
LaTeleScop:dependencies-resolution

Conversation

@vijdz
Copy link

@vijdz vijdz commented Feb 19, 2026

This PR should fix #9 and address installation issues by providing the correct conda install commands in the docs.
Also added a link to the docs in the README and package metadata.

These new commands were successfully tested to create working conda env (at least for Linux).
Notable changes in the dependencies (should work but may require testing) :

All

  • Moved the dev dependencies to a specific deps group since user does not need pytest to run the program (this an issue with georastertools installation which includes dev dependencies - testing and docs - in the mandatory deps).

NighOsmReg

  • Bump minor gdal version to 3.11.5
  • Use soft fiona requirement
  • Avoid pandas 3

SunMapGen

  • Add missing dep pytz
  • Bump to gdal 3.9.3 which is supported by georastertools
  • Add georastertools dependencies to conda forge available requirements (click geopandas kiwisolver matplotlib fiona scipy pyscaffold, etc.)

DetectOrCult

  • Bump minor gdal version to 3.11.5
  • Bump to latest geopandas < 1.0 (i.e. 0.14)
  • Pin python 3.11 since conda cannot resolve dependencies for python 3.12 (because of pandas<2)
  • Use soft fiona requirement

This is a minimal working PR, but my refac recommendation for this repo would be to separate packages. Thus you could specify max python version and handle versions conflicts more easily, by avoiding the "optional dependencies group" trick to specify 3 conflicting deps list.

Suggested structure :

eolabtools
├── detectorcult
│   ├── environment.yaml
│   ├── pyproject.toml
│   └── src/
├── nightosmreg
│   ├── environment.yaml
│   ├── pyproject.toml
│   └── src/
└── sunmapgen
    ├── environment.yaml
    ├── pyproject.toml
    └── src/

The environment.yaml is a better way to provide the correct specs to initialize a healthy conda env. It allow to specify conda-forge deps vs pip-only deps, e.g. :

name: sunmapgen
channels:
  - conda-forge
dependencies:
  - python=3.12
  - numpy[version='<2']
  - gdal=3.9
  - rasterio
  - timezonefinder
  - ephem
  - pyyaml
  - click
  - geopandas
  - kiwisolver
  - matplotlib
  - fiona
  - scipy
  - pyscaffold
  - tqdm
  - packaging
  - pytz
  - pip
  - pip:
    - georastertools

Same for DetectOrCult (opencv-contrib-python is not available in conda-forge). This would greatly simplify the conda create command :

conda create --name sunmapgen --file environment.yaml

Ideally the docs should also explain how to install without conda (using venv and pip, or even better with uv). With the correct dependencies specification and version limits, a pure pip installation in isolated venv shouldn't generate conflicts and installation issues.

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.

The documentation suggests using conda, but installing the packages with pip

1 participant