Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add template #1

Merged
merged 38 commits into from
Mar 12, 2025
Merged
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
e148639
Move to pixi
irm-codebase Mar 4, 2025
467e7a9
Separete pyproject into individual configuration files
irm-codebase Mar 4, 2025
ca4796b
Add pixi tests
irm-codebase Mar 4, 2025
34cb537
Move integration tests within the template
irm-codebase Mar 4, 2025
2d46514
Merge branch 'main' into add-template
irm-codebase Mar 4, 2025
b11be15
update README
irm-codebase Mar 4, 2025
18166bd
Add scheduled workflow for copier template updates.
irm-codebase Mar 5, 2025
353376e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 5, 2025
5aec108
Add PR CI and avoid snakefmt template false positive
irm-codebase Mar 5, 2025
2828bee
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 5, 2025
1fb55eb
Fix CI
irm-codebase Mar 5, 2025
cf6592d
use miniconda incubator in CI
irm-codebase Mar 5, 2025
cb225a9
Add local mamba dependency
irm-codebase Mar 5, 2025
d83d963
switch mamba-> conda
irm-codebase Mar 5, 2025
7146a52
Try pixi local and mini-forge in global
irm-codebase Mar 5, 2025
7524b37
Use pixi with conda dependency
irm-codebase Mar 5, 2025
827c665
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 5, 2025
eecaa11
Avoid windows bug: shell commands must use \"
irm-codebase Mar 5, 2025
e1898c1
Specify locations to skip for the template
irm-codebase Mar 5, 2025
a1a5d99
Add pull request CI test to the template.
irm-codebase Mar 5, 2025
af272a1
update readme and changelog
irm-codebase Mar 5, 2025
573246b
PR fixes: add examples to docs, avoid name confusion
irm-codebase Mar 6, 2025
30e1198
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 6, 2025
d1d896d
Improve the explanation in the README
irm-codebase Mar 6, 2025
86fc03d
Use conda-forge to install clio-tools
irm-codebase Mar 6, 2025
65d0e4b
PR fixes: no pixi shell use, remove unused mkdocs plugin, fix github …
irm-codebase Mar 7, 2025
81f1b95
Fix integration test configuration path
irm-codebase Mar 7, 2025
cf5fb7f
Fix relative path bug
irm-codebase Mar 7, 2025
ff5c1b6
Minor docs updates
brynpickering Mar 7, 2025
bb24ded
Update highlight to tip
brynpickering Mar 7, 2025
977c0ba
Remove attempt at highlighting
brynpickering Mar 7, 2025
13cbe9d
Update tests/utils/simple_answers.yaml
sjpfenninger Mar 11, 2025
1098a91
Update tests/utils/simple_answers.yaml
sjpfenninger Mar 11, 2025
d11f453
Update copier.yaml
irm-codebase Mar 11, 2025
71ff30c
Update README.md
irm-codebase Mar 11, 2025
61d9590
PR fixes: improve instructions, improve integration test.
irm-codebase Mar 11, 2025
bd0428d
Remove mermaid
irm-codebase Mar 11, 2025
e8b7571
Simplify: read the docs is optional, improve README
irm-codebase Mar 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
PR fixes: no pixi shell use, remove unused mkdocs plugin, fix github …
…username
irm-codebase committed Mar 7, 2025
commit 65d0e4b2df8592997f55157dbd3554b5032db34a
27 changes: 13 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -37,9 +37,7 @@ We recommend using [`pixi`](https://pixi.sh/) as your package manager. Once inst
5. Extra: run the auto-generated example module!

```shell
pixi shell # activate your project's environment
cd tests/integration/ # navigate to the integration example...
snakemake --use-conda # run the example!
pixi run snakemake --snakefile=tests/integration/Snakefile --use-conda
```

## Features
@@ -54,14 +52,15 @@ We recommend using [`pixi`](https://pixi.sh/) as your package manager. Once inst
- Premade `pytest` setup.
- Auto-generated documentation, ready for [Read the Docs](https://about.readthedocs.com/).

## IMPORTANT

A few things to be aware of.

- **Modules do not work like regular snakemake workflows**
- The primary way to test them should be external (calling `module:`, passing resources, and requesting results). Check the pre-made example in `tests/integration` for more info.
- Internal access (calling the `all:` rule) will not work, as the module will not have the necessary `resources/` to execute properly.
- **Please respect the 'specification' section of the documentation**
- `docs/hooks/clio_standard.py` will auto-generate documentation for you as long as certain files (e.g., `INTERFACE.yaml`, `CITATION.yaml`) are filled correctly.
- Please **do not modify this file** to ensure all data modules have a similar 'specification' section.
- If you wish to extend the documentation, feel free to add other sections.
> [!IMPORTANT]
>
> A few things to be aware of.
>
> - **Modules do not work like regular snakemake workflows**
> - The primary way to test them should be external (calling `module:`, passing resources, and requesting results). Check the pre-made example in `tests/integration` for more info.
> - Internal access (calling the `all:` rule) will not work, as the module will not have the necessary `resources/` to execute properly.
> - **Please respect the 'specification' section of the documentation**
> - `docs/hooks/clio_standard.py` will auto-generate documentation for you as long as certain files (e.g., `INTERFACE.yaml`, `CITATION.yaml`) are filled correctly.
> - Please **do not modify this file** to ensure all data modules have a similar 'specification' section.
> - If you wish to extend the documentation, feel free to add other sections.
>
2 changes: 1 addition & 1 deletion copier.yaml
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ github_org:
Please provide the name of the github account or organisation where
this module will be created (e.g., 'calliope-project' in 'github.com/calliope-project').
validator: >-
{% if not (github_org | regex_search('^[a-z][a-z0-9_-]*$')) %}
{% if not (github_org | regex_search('^[a-zA-Z0-9][a-zA-Z0-9-]*$')) %}
"Only lowercase letters, digits, hyphens and underscores are valid."
{% endif %}
default: "calliope-project"
2 changes: 0 additions & 2 deletions template/{{ module_short_name }}/mkdocs.yaml.jinja
Original file line number Diff line number Diff line change
@@ -42,8 +42,6 @@ theme:
accent: pink
markdown_extensions:
- admonition
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.arithmatex:
generic: true
- pymdownx.betterem:
6 changes: 5 additions & 1 deletion template/{{ module_short_name }}/tests/clio_test.py.jinja
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
"""Set of standard clio tests."""
"""Set of standard clio tests.

DO NOT MANUALLY MODIFY THIS FILE!
It should be updated through our templating functions.
"""

import subprocess
from pathlib import Path
2 changes: 1 addition & 1 deletion template/{{ module_short_name }}/workflow/Snakefile
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ min_version("8.10")


# Load the example configuration. This will be overridden by users.
configfile: "config/example.yaml"
configfile: workflow.source_path("config/example.yaml")


# Validate the configuration using the schema file.