Skip to content

environment.yml: the Anaconda channels are defaults - #878

Open
mmcky wants to merge 1 commit into
mainfrom
conda-channel-defaults
Open

mmcky wants to merge 1 commit into
mainfrom
conda-channel-defaults

Conversation

@mmcky

@mmcky mmcky commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

What

environment.yml names the conda channel default:

Before After
channels: - default channels: - defaults

default is the anaconda.org user channel of that name, not Anaconda's own channels, which conda calls defaults. That channel is empty today, so the environment resolves from defaults all the same: conda env update appends defaults to an environment file's channels unless the file lists nodefaults, and the build logs list "Channels: - default - defaults". But conda searches default first, so anything ever uploaded there would take precedence. The review of the lecture monorepo's GPU leg found it, which had copied the line (QuantEcon/lectures#87). All six lecture series have it.

Not changed here. _notebook_repo/environment.yml still names default. It is the environment publish.yml copies into the notebooks repository that Binder uses, and it is out of date in other ways too (python 3.10, anaconda 2023.03), so it needs its own update and a check that Binder still builds. This pull request fixes only the environment the series' own builds use; the others are a separate follow-up.

This is part of reporting fixes upstream to each series, their source of truth (QuantEcon/project-monorepo#77).

Validation

Done on 2026-11-22, a full validation: fresh builds with no cache of this pull request and of main, every lecture executed, both green; the installed packages are identical. The evidence is in the comment below.

This changes the build environment's specification, so it needs a person's review.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WT8bMacV9Lmy1VLUc6XJoL

`channels: - default` names the anaconda.org user channel "default", not
Anaconda's own channels, which conda calls `defaults`. That channel is
empty today, so the environment resolves from `defaults` all the same (the
runner's .condarc adds it after), but conda searches `default` first, so
anything uploaded there would take precedence. Found by the review of the
lecture monorepo's GPU leg, which copied the line (QuantEcon/lectures#87).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WT8bMacV9Lmy1VLUc6XJoL
@netlify

netlify Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for taupe-gaufre-c4e660 ready!

Name Link
🔨 Latest commit 49b7164
🔍 Latest deploy log https://app.netlify.com/projects/taupe-gaufre-c4e660/deploys/6b02c9427f7636fabd9da7b5
😎 Deploy Preview https://deploy-preview-878--taupe-gaufre-c4e660.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

@github-actions
github-actions Bot temporarily deployed to pull request November 22, 2026 10:57 Inactive
@mmcky

mmcky commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Validation: a full validation

Two fresh builds with no cache, each executing all 54 notebooks, -W --keep-going, both green:

Build Run
main at 8db8a99, this branch's base, 2026-11-22 44991424113
this pull request at 49b7164, 2026-11-22 45018125987

The channel. Main's build configured conda with channels: - default; this pull request's with channels: - defaults.

The installed packages are identical. Each build used the same 504 conda packages, every one at the same version and build, and the same pip packages. The package lists are taken from setup-miniconda's own record of the package directories it cached, and from pip's "Successfully installed" lines.

Build logs. The same warning lines on both sides, and no Sphinx warning on either.

Cell outputs. The warnings and errors in the cell outputs are the same on both sides, page by page.

The HTML. 20 of 66 pages differ, and no lecture's prose does. The differences are output noise, the same as between any two builds: unseeded draws, timings, memory addresses and solver printouts, and figures drawn again with new file names. The status page differs too, with its build times.

@mmcky
mmcky marked this pull request as ready for review November 22, 2026 13:00
Copilot AI adaptive review requested due to automatic review settings November 22, 2026 13:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

An active moderate issue remains because the published Binder notebook environment still declares the user channel, so the fix does not cover all affected environments.

1 open issue
What changed in this PR

Updates the root Conda environment to use Anaconda’s official defaults channel instead of the unrelated default user channel. The separately published Binder environment still uses default.

Changes:

  • Replaces default with defaults in the root environment specification.
  • Preserves the existing package and Python constraints.
  • Identifies the notebook environment as still requiring the corresponding channel update.
File Description
environment.yml Changes the root Conda channel from default to Anaconda’s official defaults channel for CI and build workflows.

Review effort: Lite (adaptive)

Comment thread environment.yml
name: quantecon
channels:
- default
- defaults

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right that _notebook_repo/environment.yml still names default; this pull request is scoped to the build environment on purpose, and its description now says so. That file is the environment publish.yml copies into lecture-python-intro.notebooks for Binder, and it is out of date in other ways too (python 3.10 with anaconda 2023.03), so it needs its own update and a check that Binder still builds, rather than a one-word change here. The same holds in the other series' _notebook_repo; it is recorded as a separate follow-up for the notebook environments.

@mmcky

mmcky commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Validation addendum: the 20 pages that differ

The evidence comment above says 20 of 66 pages differ in output noise. Here they are, with what differs on each, so the claim can be checked. No page's prose differs, and every one of them also differed when the same main build was compared with the build of #875, another pull request on the same base.

Page What differs between main's build and this pull request's
ar1_processes figures 6 to 9 of 9, from unseeded draws (ϕ.rvs(n), ψ.rvs(n))
bivariate_dist the progress counter of the cell's pip install, and its last figure, by 0.1% of its pixels, drawn from Yahoo Finance data downloaded at build time
business_cycle figure 10 of 12, by 0.8% of its pixels, drawn from World Bank data downloaded at build time
commod_price figures 2 and 3 of 3, from unseeded draws (beta_dist.rvs)
eigen_I figures 14 and 15 of 19, from the power method's unseeded random starting vector
fitting_distributions the kernel's temporary file number inside a UserWarning; the warning itself is the same on both sides
heavy_tails the printed minimum and maximum of a million unseeded draws, and figures 1, 2 and 5 of 20, from unseeded draws
inequality a printed Gini coefficient and 7 of 15 figures, from unseeded draws (np.random.randn)
inflation_history the kernel's temporary file number inside a Pandas4Warning; the warning itself is the same on both sides
lln_clt_intro printed sample means and all six figures, from unseeded draws
markov_chains_I simulated paths and frequencies from unseeded mc.simulate calls, and %time timings
markov_chains_II figures 3 and 8 of 8, from unseeded mc.simulate paths
monte_carlo %%time timings, the Monte Carlo estimates and its one figure, from unseeded draws
networks figures 5 to 7 of 17, drawn with networkx's random spring layout
observed_distributions figure 15 of 20, by under 0.1% of its pixels, drawn from Yahoo Finance data downloaded at build time, and figure 18, from unseeded draws
schelling figures 3 to 8 of 8, from the second model's unseeded generator; the two figures of the first, seeded simulation are the same
simple_linear_regression a memory address in an object's repr
solow its last figure, from unseeded draws
status the build times
time_series_with_matrices figures 3 to 6 of 9, from unseeded draws

Packages installed inside cells. Five pages run pip install in a cell (bivariate_dist, business_cycle, eigen_II, input_output, inflation_history), which the build log doesn't record. On each one, "Successfully installed" lists the same packages at the same versions on both sides.

This branch was successfully deployed

1 active deployment
pull request — 49b7164c Deployed Nov 22, 2026 by github-actions[bot]
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.

2 participants