Agent SkillsDetachHead/rebased › conda-env-tests

conda-env-tests

GitHub

指导如何更新 Python conda 环境测试中 Miniconda 的固定版本,包括定位配置文件、选择新版本及处理多平台兼容性。

.agents/skills/conda-env-tests/SKILL.md DetachHead/rebased

触发场景

需要升级测试环境的 Miniconda 版本 遇到 conda 安装或兼容性问题

安装

npx skills add DetachHead/rebased --skill conda-env-tests -g -y
更多选项

非标准路径

npx skills add https://github.com/DetachHead/rebased/tree/master/.agents/skills/conda-env-tests -g -y

不安装直接使用

npx skills use DetachHead/rebased@conda-env-tests

指定 Agent (Claude Code)

npx skills add DetachHead/rebased --skill conda-env-tests -a claude-code -g -y

安装 repo 全部 skill

npx skills add DetachHead/rebased --all -g -y

预览 repo 内 skill

npx skills add DetachHead/rebased --list

SKILL.md

Frontmatter
{
    "name": "conda-env-tests",
    "description": "Bump the pinned Miniconda version for the Python conda env tests."
}

Conda env tests

The Python env tests download and install Miniconda. They pin an exact installer version. This skill tells you how to move a pin.

Where the pin lives

One file holds every conda pin:

community/python/python-test-env/common/src/com/intellij/python/test/env/common/PredefinedPyEnvironments.kt

Entry Role
CONDA The default. @PyEnvTestCaseWithConda and LocalCondaRule use it. Keep it on the newest build.
CONDA_24 An old pin. It covers the conda.core.index.get_index branch of the helper script.
CONDA_25 An old pin. It covers the conda.core.subdir_data.SubdirData branch.

There is no second place. The provider builds the download URL from the pin, and it verifies no checksum:

community/python/python-test-env/conda/src/com/intellij/python/test/env/conda/CondaPyEnvironmentProvider.kt

To find every consumer of a pin, search the repository for PredefinedPyEnvironments.CONDA.

The version token

A pin is the installer version token, not a plain conda version. The shape is py<python>_<conda>-<build>, for example py312_26.7.1-1.

The provider expands the token into one of these names:

  • Miniconda3-<token>-Windows-x86_64.exe
  • Miniconda3-<token>-Linux-x86_64.sh
  • Miniconda3-<token>-Linux-aarch64.sh
  • Miniconda3-<token>-MacOSX-arm64.sh

How to pick a new pin

  1. Open https://repo.anaconda.com/miniconda/. The page lists every installer with its date and its sha256.
  2. Take the highest version. Do not use Miniconda3-latest-*. The cache key holds the token, so a floating name breaks reproducibility.
  3. Check that all four names above exist for that token. Anaconda drops a platform from time to time. It stopped the MacOSX-x86_64 builds after py313_25.7.0-2.
  4. Keep the py312 prefix unless you have a reason to change it. The prefix only sets the Python of the base install. Each test environment gets its own Python from the spec.

When to add an entry instead of moving one

CondaPackagingToolHelperTest runs against CONDA_24, CONDA_25, and CONDA. It protects the version branches in community/python/helpers/conda_packaging_tool.py.

  • Move CONDA for a normal bump.
  • Add a new entry when conda ships a major release that changes an API the helper script uses. Add the tag row to ENVIRONMENTS_TO_TAGS in the same file, and add the entry to the @RunOnEnvironments list of that test.
  • Drop an old entry when CONDA reaches the same major. Two entries on one major waste a download.

A move of CONDA can remove coverage without a test failure. CONDA supplies the newest major to CondaPackagingToolHelperTest. A move from conda 26 to conda 27 therefore leaves conda 26 untested, and every test stays green. Before you move CONDA across a major, add a constant for the major you leave behind, and add it to @RunOnEnvironments.

ShortenPathTest holds the literal Miniconda3-py312_24.9.2-0-MacOSX-arm64. It is sample text for a path-shortening assertion, and no code reads the version. Leave it alone.

The download cache

The tests cache in ~/.cache/intellij-python-test-env/:

  • downloads/ holds the installer.
  • conda/Miniconda3-<token>-<os>-<arch>/ holds the install.

The token is part of the directory name. A bump therefore downloads about 150 MB again, and it leaves the old directory on disk. Delete an old directory by hand when you need the space.

Terms of service

Conda 25 added a terms-of-service gate on the default Anaconda channels. The provider runs conda tos accept for pkgs/main and pkgs/r before it creates an environment, and it ignores a failure. An older conda has no tos subcommand. You need no new work here for a bump.

Tests to run

Every command below needs the network, and each conda environment downloads about 150 MB. Run the commands from the monorepo root. In a community checkout, drop the community/ prefix, and skip the intellij.python.junit5Tests commands. That module is ultimate only.

./community/tests.cmd --module intellij.python.test.env.junit5 --test com.intellij.python.test.env.junit5.conda.showcase.PyEnvWithCondaShowCaseTest
./tests.cmd --module intellij.python.junit5Tests --test com.intellij.python.junit5Tests.env.tests.conda.CondaSdkCreatorTest
./tests.cmd --module intellij.python.junit5Tests --test com.intellij.python.junit5Tests.env.tests.packaging.CondaPackagingToolHelperTest

Not this skill

community/python/python-sdk/backend/resources/sdks.json lists the Miniconda builds that the product offers to a user. It needs a sha256 for every artifact, and community/python/build/src/org/jetbrains/intellij/build/pycharm/sdks/CondaUpdater.kt generates it. That file is separate from the env tests.

版本历史

  • 2af32ff 当前 2026-09-22 01:02

同 Skill 集合

.agents/skills/actions/SKILL.md
.agents/skills/bazel-test-migration/SKILL.md
.agents/skills/code-style/SKILL.md
.agents/skills/commits/SKILL.md
.agents/skills/compare-python-typecheckers/SKILL.md
.agents/skills/debugging/SKILL.md
.agents/skills/driver-ui-tests/SKILL.md
.agents/skills/eel/SKILL.md
.agents/skills/extract-module/SKILL.md
.agents/skills/fix-project-leak-from-tc-report/SKILL.md
.agents/skills/icon-resources/SKILL.md
.agents/skills/icons/SKILL.md
.agents/skills/ide-diagnostics-mcp/SKILL.md
.agents/skills/jewel-markdown/SKILL.md
.agents/skills/jewel-pr-preparer/SKILL.md
.agents/skills/jewel-release-helper/SKILL.md
.agents/skills/jna/SKILL.md
.agents/skills/kotlin-ui-dsl/SKILL.md
.agents/skills/kotlin-ui-swing-component-architecture/SKILL.md
.agents/skills/module-dependencies/SKILL.md
.agents/skills/module-set-pluginization/SKILL.md
.agents/skills/notebook-for-experiment/SKILL.md
.agents/skills/platform-coroutines-structured-concurrency/SKILL.md
.agents/skills/plugin-model-analyzer/SKILL.md
.agents/skills/poly-context/SKILL.md
.agents/skills/poly-symbols/SKILL.md
.agents/skills/pseudo-kmp/SKILL.md
.agents/skills/registry/SKILL.md
.agents/skills/remote-dev/SKILL.md
.agents/skills/safe-push/SKILL.md
.agents/skills/ssr/SKILL.md
.agents/skills/symbols-api/SKILL.md
.agents/skills/testing-internals/SKILL.md
.agents/skills/testing/SKILL.md
.agents/skills/treehouse/SKILL.md
.agents/skills/ui-accessibility/SKILL.md
.agents/skills/writing-tests/SKILL.md
.agents/skills/youtrack-community/SKILL.md
.claude/skills/actions/SKILL.md
.claude/skills/bazel-test-migration/SKILL.md
.claude/skills/code-style/SKILL.md
.claude/skills/commits/SKILL.md
.claude/skills/compare-python-typecheckers/SKILL.md
.claude/skills/conda-env-tests/SKILL.md
.claude/skills/debugging/SKILL.md
.claude/skills/driver-ui-tests/SKILL.md
.claude/skills/eel/SKILL.md
.claude/skills/extract-module/SKILL.md
.claude/skills/fix-project-leak-from-tc-report/SKILL.md

元信息

文件数
0
版本
2af32ff
Hash
e32bc4d5
收录时间
2026-09-22 01:02

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-22 10:54
浙ICP备14020137号-1