Skip to content

Modernize conda/mamba/micromamba instructions#709

Open
maresb wants to merge 9 commits intopymc-labs:mainfrom
maresb:modernize-conda-instructions
Open

Modernize conda/mamba/micromamba instructions#709
maresb wants to merge 9 commits intopymc-labs:mainfrom
maresb:modernize-conda-instructions

Conversation

@maresb
Copy link
Contributor

@maresb maresb commented Feb 13, 2026

Summary

  • Replace hardcoded mambaforge paths and conda activate with tool-agnostic instructions supporting conda, mamba, or micromamba
  • Add a new python-environment skill as the single source of truth for environment setup (tool detection, env creation, editable install, run -n usage)
  • AGENTS.md and .cursor/rules/basic.mdc now link to the skill instead of duplicating instructions
  • CONTRIBUTING.md uses plain conda as a generic placeholder, offers both activate and subshell workflows for interactive development, and includes micromamba install as a fallback
  • Update installation docs and error messages to mention all three tools

Made with Cursor

@read-the-docs-community
Copy link

read-the-docs-community bot commented Feb 13, 2026

Documentation build overview

📚 causalpy | 🛠️ Build #31405116 | 📁 Comparing d260b66 against latest (535f709)


🔍 Preview build

Show files changed (3 files in total): 📝 3 modified | ➕ 0 added | ➖ 0 deleted
File Status
404.html 📝 modified
index.html 📝 modified
_modules/causalpy/pymc_models.html 📝 modified

@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.36%. Comparing base (535f709) to head (d260b66).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #709   +/-   ##
=======================================
  Coverage   94.36%   94.36%           
=======================================
  Files          44       44           
  Lines        7591     7591           
  Branches      461      461           
=======================================
  Hits         7163     7163           
  Misses        264      264           
  Partials      164      164           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

maresb and others added 8 commits February 13, 2026 18:02
Use raw docstrings (r""") for SpikeAndSlabPrior and HorseshoePrior
so LaTeX math markup is not misinterpreted as Python escape sequences.

Co-authored-by: Cursor <cursoragent@cursor.com>
Single source of truth for detecting the conda tool, creating the
CausalPy environment, running commands via `run -n`, and
troubleshooting outdated installations.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace hardcoded mambaforge path and `conda activate` with
tool-agnostic instructions. AGENTS.md now links to the
python-environment skill; .cursor/rules/basic.mdc references
`$CONDA_EXE run -n CausalPy`.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use plain `conda` as a generic placeholder (with a note that mamba
or micromamba can be substituted). Replace `mamba env create` and
`conda activate` with tool-agnostic commands. Offer both activate
and subshell workflows for interactive development. Add micromamba
install instructions as a fallback.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Ensures make is available in the conda environment on all platforms,
including minimal container images.

Co-authored-by: Cursor <cursoragent@cursor.com>
Avoids relying on pip to install pre-commit during make setup.

Co-authored-by: Cursor <cursoragent@cursor.com>
@maresb maresb force-pushed the modernize-conda-instructions branch from 8d07e88 to 6b35d63 Compare February 13, 2026 17:09
@maresb
Copy link
Contributor Author

maresb commented Feb 13, 2026

Please merge #710 first

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request modernizes the conda/mamba/micromamba installation and environment management instructions throughout the repository. It replaces hardcoded mambaforge paths and fragmented setup instructions with a tool-agnostic approach that supports all three package managers. The changes introduce a new python-environment skill file as a single source of truth for environment setup, which is referenced by both AI agent configuration files and contributor documentation.

Changes:

  • Added make and pre-commit to environment.yml dependencies to support the standardized setup workflow
  • Created a new .github/skills/python-environment/SKILL.md skill file with standardized instructions for tool detection, environment creation, and command execution
  • Updated AGENTS.md and .cursor/rules/basic.mdc to reference the skill file instead of duplicating instructions
  • Modernized CONTRIBUTING.md to use generic conda placeholder while supporting all three tools (conda/mamba/micromamba)
  • Updated installation documentation and error messages to mention all three package managers
  • Fixed docstring format in variable_selection_priors.py to use raw strings for LaTeX math

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
environment.yml Added make and pre-commit dependencies to support the development workflow
docs/source/index.md Updated installation instructions to mention conda/mamba/micromamba options
causalpy/variable_selection_priors.py Fixed docstrings to use raw strings (r""") for proper LaTeX rendering
causalpy/pymc_models.py Updated ImportError messages to mention all three package managers
Makefile Updated setup target comment to reference modern environment usage pattern
CONTRIBUTING.md Comprehensive update with tool-agnostic instructions, micromamba installation fallback, and both activation and subshell workflows
AGENTS.md Streamlined to reference the python-environment skill file for setup instructions
.github/skills/python-environment/SKILL.md New centralized skill file with tool detection, environment setup, and troubleshooting
.cursor/rules/basic.mdc Updated to reference AGENTS.md for CONDA_EXE detection

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


## Troubleshooting

If you hit issues with an outdated `mamba` or `micromamba`, you can self-update: `$CONDA_EXE self-update`. As of 2026-02-13, current versions are conda 26.1.0, mamba/micromamba 2.5.0.
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

The self-update command works for mamba and micromamba, but not for conda. If $CONDA_EXE is conda, the correct update command is conda update -n base conda, not conda self-update. Consider adding a conditional instruction or noting that this only applies to mamba/micromamba.

Copilot uses AI. Check for mistakes.
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.

1 participant