| applyTo | requirements.txt,conda-environment.yml |
|---|
Applies to requirements.txt and conda-environment.yml.
Both files must stay in sync: same packages, same pinned versions. Package in one must be in other.
Known exceptions (document inline with comment if they differ):
conda-environment.ymlmay split packages (e.g.nbconvert+nbconvert-webpdfvs.nbconvert[webpdf]in pip)conda-environment.ymlmay usepip:block for packages not on conda-forge
- Pin all versions — no ranges, no
>=, no unpinned entries requirements.txt:==(e.g.pandas==2.2.3)conda-environment.yml:=(e.g.pandas=2.2.3)
- Ask user before introducing new dependencies
- Update both files when changing version
requirements.txt — venv dry-run from .github/workflows/internal-check-python-venv-support.yml:
python -m venv .venv
source ./scripts/activatePythonEnvironment.sh
.venv/bin/pip install --dry-run --quiet --requirement requirements.txt
! .venv/bin/pip install --dry-run --requirement requirements.txt 2>/dev/null | grep -q "Would install"conda-environment.yml — via scripts/activateCondaEnvironment.sh:
source ./scripts/activateCondaEnvironment.shFallback (conda directly):
conda env update --file conda-environment.yml --prune
conda activate codegraph