Skip to content

Consolidate dependency files (environment.yml vs requirements.txt vs requirements-build.txt) #6

Description

@mmcky

Summary

There are three overlapping dependency manifests that disagree on the details, and only one of them is actually used. This makes it easy for deps to rot and — more importantly — means a local setup that follows the README can't run the JAX lectures.

The three files

File Contents Used by?
environment.yml python=3.13 + anaconda metapackage + pip: jupyter-book & sphinx stack ✅ the only one CI uses (environment-file: environment.yml)
requirements.txt matplotlib, numpy, jax, numba ❌ referenced nowhere
requirements-build.txt matplotlib, numpy, jax, numba + jupyter-book & sphinx stack ❌ referenced nowhere

grep confirms nothing in .github/, scripts/, or README.md references either requirements*.txt. CI builds the env from environment.yml, then installs JAX out of band via pip install -U jax (ci.yml, publish.yml).

Problems

  1. No single source of truth — three files, two of them orphaned and liable to rot.
  2. Redundancy via the anaconda metapackageanaconda already bundles numpy, matplotlib, and numba, so the explicit lines in the requirements files duplicate it.
  3. numba is listed everywhere but unused (via anaconda + both requirements files) — see Numba is advertised but never used (no Numba lecture/code) #2 (Numba advertised but unused).
  4. Likely channel typoenvironment.yml declares channels: - default (singular); the canonical conda channel is defaults, which the other QuantEcon lecture repos use.

Suggested direction

Pick one source of truth. Two QuantEcon-friendly shapes:

  • Conda-first (matches CI): add jax to environment.yml, drop the unused numba, fix defaults, and delete both requirements*.txt. The separate CI pip install -U jax could then go away.
  • Keep a minimal requirements.txt for the Colab / "just run the notebooks" path (matplotlib, numpy, jax), referenced from notebooks/README.md, and make environment.yml the single build source of truth (remove requirements-build.txt).

Either way: one runtime manifest + at most one build manifest, JAX listed where the README points, and the channel name corrected.

Open question before any consolidation

Related: #2 (numba unused), #5 (GPU runner / RunsOn).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions