Dogfood conda-tasks in CI using conda-pypi#1
Merged
Conversation
Replace pixi-based CI with conda + conda-pypi + conda-tasks: - Add [project.optional-dependencies] for test, lint, and docs extras - Add [tool.conda-tasks.tasks] section with all CI tasks - Switch workflows to setup-miniconda + conda pypi install -e ".[extra]" - Run tests and docs builds via conda task run
- Install conda-pypi into the active env (not base) so the plugin is discoverable by conda's entry point scanner - Install test/docs dependencies via conda install (conda-pypi doesn't support pip-style extras like ".[test]") - Use conda pypi install -e . for the editable install only
conda-pypi plugin doesn't load on GHA runners (entry point discovery issue). Fall back to pip for the editable install while keeping the real dogfooding: conda task run for test and docs builds. Dependencies still come from conda-forge via conda install.
- conda-pypi must be in base env for plugin discovery - Install test/docs deps via conda install (no extras syntax) - Use conda pypi install -e . (path only, no pip-style extras)
The released conda-pypi 0.3.0 on conda-forge doesn't have -e/--editable. Install the dev version from GitHub into base, with deps from conda-forge.
Active env: needed for test imports (python -m pytest) Base env: needed for conda task plugin discovery
conda pypi editable install doesn't pull in deps. The conda task plugin needs pyyaml, jinja2, platformdirs, tomlkit in base.
Use conda.common.serialize.yaml (loads/dumps/YAMLError) instead of pyyaml or ruamel.yaml directly. This eliminates pyyaml as a dependency entirely -- conda already ships the YAML library we need. - Replace all yaml.safe_load/dump with conda's yaml_loads/yaml_dumps - Drop pyyaml from project.dependencies and pixi.dependencies - Remove pyyaml from CI base install lists - Update test invalid-YAML fixtures for ruamel.yaml's round-trip parser
5a3b57d to
657f981
Compare
The editable install via conda-pypi doesn't resolve dependencies, so conda, jinja2, platformdirs, and tomlkit must be explicitly installed in the test/docs environments for conda-tasks imports to work.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[project.optional-dependencies]for test, lint, and docs extras[tool.conda-tasks.tasks]section with all 9 CI taskssetup-miniconda+conda pypi install -e ".[extra]"+conda task runThis dogfoods conda-tasks in its own CI pipeline, demonstrating the two-phase pattern (environment setup is separate, conda-tasks only runs tasks) and exercises conda-pypi for safe PyPI-to-conda package installation.
Pixi configuration is left intact so local development still works.
Test plan
test.ymlworkflow passes across the OS × Python matrixdocs.ymlworkflow builds docs successfullyconda task liststill shows all 9 tasks locally