Skip to content

Commit 9a6734c

Browse files
committed
Merge branch 'main' into feature-ci-cdsapi
2 parents 97fca1c + 54811df commit 9a6734c

15 files changed

Lines changed: 47 additions & 123 deletions

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

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,26 @@ jobs:
2828
else
2929
echo "CDSAPI_KEY secret is empty or not set. Skipping .cdsapirc setup."
3030
fi
31-
- name: setup-pixi
31+
- name: Setup pixi
3232
uses: prefix-dev/setup-pixi@v0.8.3
33-
- name: Run tests
34-
run: pixi run pytest tests/clio_test.py
35-
- name: Run linting
36-
run: pixi run snakemake --lint
33+
- name: Run integration tests
34+
id: tests
35+
run: pixi run test-integration
36+
continue-on-error: true
37+
- name: Run snakemake linting
38+
id: linting
39+
run: |
40+
pixi run snakemake --lint --snakefile workflow/Snakefile
41+
pixi run snakemake --lint --snakefile tests/integration/Snakefile
42+
continue-on-error: true
43+
- name: Save integration logs
44+
if: ${{ always() }}
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: integration-test-logs-${{ matrix.os }}
48+
path: tests/integration/results/integration_test/logs
49+
if-no-files-found: ignore
50+
retention-days: 30
51+
- name: Fail if integration or linting failed
52+
if: ${{ steps.tests.outcome == 'failure' || steps.linting.outcome == 'failure' }}
53+
run: exit 1

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ repos:
2424

2525
# Python file formatting
2626
- repo: https://github.com/astral-sh/ruff-pre-commit
27-
rev: v0.11.12
27+
rev: v0.12.7
2828
hooks:
2929
- id: ruff
3030
args: [--fix, --exit-non-zero-on-fix]

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/README.md.jinja

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pixi install --all
2323
For testing, simply run:
2424

2525
```shell
26-
pixi run test
26+
pixi run test-integration
2727
```
2828

2929
To view the documentation locally, use:
@@ -37,5 +37,5 @@ To test a minimal example of a workflow using this module:
3737
```shell
3838
pixi shell # activate this project's environment
3939
cd tests/integration/ # navigate to the integration example
40-
snakemake --use-conda # run the workflow!
40+
snakemake --use-conda --cores 2 # run the workflow!
4141
```

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)(/|$)

0 commit comments

Comments
 (0)