|
9 | 9 | is a thin re-export shim (`configure_parser`, `execute`, `generate_parser`). |
10 | 10 |
|
11 | 11 | - Parser implementations use submodules, not subpackages. The canonical |
12 | | - format parsers live at `conda_tasks/parsers/yaml.py` and |
13 | | - `conda_tasks/parsers/toml.py` — plain modules, not directories with |
14 | | - `__init__.py`. Only create a subpackage when there are multiple files |
15 | | - to group. |
| 12 | + format parsers live at `conda_tasks/parsers/toml.py`, |
| 13 | + `conda_tasks/parsers/pixi_toml.py`, `conda_tasks/parsers/pyproject_toml.py`, |
| 14 | + and `conda_tasks/parsers/condarc.py` — plain modules, not directories |
| 15 | + with `__init__.py`. Only create a subpackage when there are multiple |
| 16 | + files to group. |
16 | 17 |
|
17 | 18 | - Tests mirror the source structure. Tests for `conda_tasks/cli/run.py` |
18 | | - live in `tests/cli/test_run.py`, tests for `conda_tasks/parsers/yaml.py` |
19 | | - live in `tests/parsers/test_yaml.py`, etc. Test module names match their |
| 19 | + live in `tests/cli/test_run.py`, tests for `conda_tasks/parsers/toml.py` |
| 20 | + live in `tests/parsers/test_toml.py`, etc. Test module names match their |
20 | 21 | corresponding source module names. |
21 | 22 |
|
22 | 23 | ## Imports |
|
106 | 107 | itself. In docstrings, use `*param*` for parameter names (standard |
107 | 108 | Sphinx convention) but avoid bold elsewhere. |
108 | 109 |
|
109 | | -- Keep `sphinx-design` tab labels short. Use "YAML" / "TOML" instead |
110 | | - of full filenames like "conda-tasks.yml" / "conda-tasks.toml" when |
111 | | - the tab content already identifies the file. This prevents tab |
112 | | - overflow on narrow viewports. |
| 110 | +- Keep `sphinx-design` tab labels short. Use "TOML" / "pyproject.toml" |
| 111 | + instead of full filenames when the tab content already identifies the |
| 112 | + file. This prevents tab overflow on narrow viewports. |
113 | 113 |
|
114 | 114 | - The API reference is split into focused sub-pages by concern (models, |
115 | 115 | parsers, execution, context) rather than a single monolithic page. |
116 | 116 | The index uses `sphinx-design` grid cards for navigation. |
| 117 | + |
| 118 | +## Parser search order |
| 119 | + |
| 120 | +- The parser registry searches for task manifests in this order: |
| 121 | + 1. `pixi.toml` — pixi-native format (task compatibility) |
| 122 | + 2. `conda.toml` — conda-native task manifest |
| 123 | + 3. `pyproject.toml` — embedded under `[tool.conda.tasks]`, |
| 124 | + `[tool.conda-tasks.tasks]` (legacy), or `[tool.pixi.tasks]` |
| 125 | + 4. `.condarc` — tasks defined via conda settings |
| 126 | + |
| 127 | +- All parsers produce task models via the same base interface. |
| 128 | + Parser-specific logic stays in the parser; downstream code only |
| 129 | + depends on the model. |
0 commit comments