Skip to content

Commit 0fb095f

Browse files
authored
Sprint improvements (#29)
* sync pixi.toml * remove mkdocs files * Integration test a single core * lint main workflow and integration workflow * tell mypy to ignore .pixi and .snakemake folders * Ensure json 2012 draft compatibility * Add example of local file inclusion to main snakefile * Ignore pixi environment folder
1 parent 57f5a16 commit 0fb095f

12 files changed

Lines changed: 18 additions & 111 deletions

File tree

.github/workflows/template-pr-ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ jobs:
2222
continue-on-error: true
2323
- name: Run snakemake linting
2424
id: linting
25-
run: pixi run snakemake --lint
25+
run: |
26+
pixi run snakemake --lint --snakefile workflow/Snakefile
27+
pixi run snakemake --lint --snakefile tests/integration/Snakefile
2628
continue-on-error: true
2729
- name: Save integration logs
2830
if: ${{ always() }}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ We recommend using [`pixi`](https://pixi.sh/) as your package manager. Once inst
4747

4848
## Features
4949

50-
- Standardised layout compliant with the [snakemake workflow catalogue's](https://snakemake.github.io/snakemake-workflow-catalog/#) listing requirements.
50+
- Standardised layout compliant with the [snakemake workflow catalogue's](https://snakemake.github.io/snakemake-workflow-catalog/#) listing requirements, enabling them to be automatically included in their listings once published. Read more about those requirements [here](https://snakemake.github.io/snakemake-workflow-catalog/docs/catalog.html#standardized-usage-workflows).
51+
- Standardised input/output structure across modules:
5152
- `resources/`: files needed for the module's processes.
5253
- `user/`: files that should be provided by users. Document them well!
5354
- `automatic/`: files that the module downloads or prepares in intermediate steps.
@@ -56,7 +57,6 @@ We recommend using [`pixi`](https://pixi.sh/) as your package manager. Once inst
5657
- Continuous Integration (CI) settings, ready for [pre-commit.ci](https://pre-commit.ci/).
5758
- GitHub actions to automate chores during pull requests and releases.
5859
- Premade `pytest` setup.
59-
- Documentation setup, ready for [Read the Docs](https://about.readthedocs.com/) or [Github Pages](https://pages.github.com/).
6060

6161
> [!IMPORTANT]
6262
>

copier.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ _skip_if_exists:
3030
- AUTHORS
3131
- CITATION.cff
3232
- INTERFACE.yaml
33-
- mkdocs.yaml
34-
- pixi.toml
33+
# Special cases: these files should not be user-modified, even though they are in user-modifiable directories
3534
- "!config/README.md"
3635
- "!tests/clio_test.py"
3736
_templates_suffix: .jinja

mypy.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[mypy]
22
disable_error_code = import-untyped
3+
exclude = (^|/)\.(snakemake|pixi)(/|$)

template/.gitignore.jinja

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
__pycache__
1212
*.pyc
1313

14+
### Environments
15+
.pixi/
16+
1417
### Snakemake
1518
.snakemake/
1619
gurobi.log

template/.readthedocs.yaml

Lines changed: 0 additions & 19 deletions
This file was deleted.

template/mkdocs.yaml.jinja

Lines changed: 0 additions & 67 deletions
This file was deleted.

template/mypy.ini.jinja

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[mypy]
22
disable_error_code = import-untyped
3+
exclude = (^|/)\.(snakemake|pixi)(/|$)

template/pixi.toml.jinja

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ clio-tools = ">=2025.03.03"
1313
conda = ">=25.0.0"
1414
ipdb = ">=0.13.13"
1515
ipykernel = ">=6.29.5"
16+
jsonschema = ">=4.0.0"
1617
mypy = ">=1.15.0"
1718
pytest = ">=8.3.5"
1819
python = ">=3.12"
@@ -22,16 +23,3 @@ snakemake-minimal = ">=8.29.0"
2223

2324
[tasks]
2425
test-integration = {cmd = "pytest tests/clio_test.py"}
25-
26-
[feature.docs.dependencies]
27-
mkdocs-material = ">=9.6.7"
28-
29-
[feature.docs.pypi-dependencies]
30-
mkdocs-mermaid2-plugin = ">=1.2.1"
31-
32-
[feature.docs.tasks]
33-
serve-docs = {cmd = "mkdocs serve"}
34-
build-docs = {cmd = "mkdocs build"}
35-
36-
[environments]
37-
docs = ["docs"]

template/tests/clio_test.py.jinja

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ def test_standard_file_existance(module_path, file):
4040
def test_snakemake_all_failure(module_path):
4141
"""The snakemake 'all' rule should return an error by default."""
4242
process = subprocess.run(
43-
"snakemake --cores 4", shell=True, cwd=module_path, capture_output=True
43+
"snakemake --cores 1", shell=True, cwd=module_path, capture_output=True
4444
)
4545
assert "INVALID (missing locally)" in str(process.stderr)
4646

4747

4848
def test_snakemake_integration_testing(module_path):
4949
"""Run a light-weight test simulating someone using this module."""
5050
assert subprocess.run(
51-
"snakemake --use-conda --cores 4",
51+
"snakemake --use-conda --cores 1",
5252
shell=True,
5353
check=True,
5454
cwd=module_path / "tests/integration",

0 commit comments

Comments
 (0)