Repository navigation
Turn the template into a cruft template #15
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,31 +1,38 @@ | ||
| name: Tests | ||
| name: Template | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
| schedule: | ||
| # Run weekly on Mondays at 6:00 UTC | ||
| # Weekly, to catch upstream releases that break a freshly created project | ||
| - cron: "0 6 * * 1" | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| test: | ||
| name: Run pytest | ||
| generate: | ||
| name: Create a project and run its checks | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| filter: blob:none | ||
| fetch-depth: 0 | ||
| - uses: astral-sh/setup-uv@v6 | ||
| - name: Create a project with the default answers | ||
| run: uvx cruft create . --no-input --output-dir "$RUNNER_TEMP" | ||
| - name: Put it under git, as the README's create steps do | ||
| working-directory: ${{ runner.temp }}/my-analysis | ||
| run: git init -q -b main && git add -A | ||
| - uses: prefix-dev/setup-pixi@v0.8.0 | ||
| with: | ||
| pixi-version: v0.60.0 | ||
| cache: true | ||
| frozen: true | ||
| manifest-path: ${{ runner.temp }}/my-analysis/pixi.toml | ||
| cache: false | ||
| - name: Run tests | ||
| working-directory: ${{ runner.temp }}/my-analysis | ||
| run: pixi run test | ||
| - name: Run pre-commit | ||
| working-directory: ${{ runner.temp }}/my-analysis | ||
| run: pixi run pre-commit run --all-files | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,182 +1,7 @@ | ||
| # Byte-compiled / optimized / DLL files | ||
| __pycache__/ | ||
| *.py[cod] | ||
| *$py.class | ||
|
|
||
| # C extensions | ||
| *.so | ||
|
|
||
| # Distribution / packaging | ||
| .Python | ||
| build/ | ||
| develop-eggs/ | ||
| dist/ | ||
| downloads/ | ||
| eggs/ | ||
| .eggs/ | ||
| lib/ | ||
| lib64/ | ||
| parts/ | ||
| sdist/ | ||
| var/ | ||
| wheels/ | ||
| pip-wheel-metadata/ | ||
| share/python-wheels/ | ||
| *.egg-info/ | ||
| .installed.cfg | ||
| *.egg | ||
| MANIFEST | ||
|
|
||
| # PyInstaller | ||
| # Usually these files are written by a python script from a template | ||
| # before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
| *.manifest | ||
| *.spec | ||
|
|
||
| # Installer logs | ||
| pip-log.txt | ||
| pip-delete-this-directory.txt | ||
|
|
||
| # Unit test / coverage reports | ||
| htmlcov/ | ||
| .tox/ | ||
| .nox/ | ||
| .coverage | ||
| .coverage.* | ||
| .cache | ||
| nosetests.xml | ||
| coverage.xml | ||
| *.cover | ||
| *.py,cover | ||
| .hypothesis/ | ||
| .pytest_cache/ | ||
|
|
||
| # Translations | ||
| *.mo | ||
| *.pot | ||
|
|
||
| # Django stuff: | ||
| *.log | ||
| local_settings.py | ||
| db.sqlite3 | ||
| db.sqlite3-journal | ||
|
|
||
| # Flask stuff: | ||
| instance/ | ||
| .webassets-cache | ||
|
|
||
| # Scrapy stuff: | ||
| .scrapy | ||
|
|
||
| # Sphinx documentation | ||
| docs/_build/ | ||
|
|
||
| # PyBuilder | ||
| target/ | ||
|
|
||
| # Jupyter Notebook | ||
| .ipynb_checkpoints | ||
|
|
||
| # IPython | ||
| profile_default/ | ||
| ipython_config.py | ||
|
|
||
| # pyenv | ||
| .python-version | ||
|
|
||
| # pipenv | ||
| # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
| # However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
| # having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
| # install all needed dependencies. | ||
| #Pipfile.lock | ||
|
|
||
| # PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
| __pypackages__/ | ||
|
|
||
| # Celery stuff | ||
| celerybeat-schedule | ||
| celerybeat.pid | ||
|
|
||
| # SageMath parsed files | ||
| *.sage.py | ||
|
|
||
| # Environments | ||
| .env | ||
| .venv | ||
| env/ | ||
| venv/ | ||
| ENV/ | ||
| env.bak/ | ||
| venv.bak/ | ||
| .pixi/ | ||
|
|
||
| # Spyder project settings | ||
| .spyderproject | ||
| .spyproject | ||
|
|
||
| # Rope project settings | ||
| .ropeproject | ||
|
|
||
| # mkdocs documentation | ||
| /site | ||
|
|
||
| # mypy | ||
| .mypy_cache/ | ||
| .dmypy.json | ||
| dmypy.json | ||
|
|
||
| # Pyre type checker | ||
| .pyre/ | ||
|
|
||
| # patterns to prevent data and figures from being uploaded | ||
| *.csv | ||
| *.pickle | ||
| *.h5ad | ||
| *.RData | ||
| *.loom | ||
| *.eps | ||
| *.png | ||
| *.jpg | ||
| *.jpeg | ||
| *.svg | ||
| *.mtx | ||
| *.txt | ||
| *.rds | ||
| *.npz | ||
| *.h5 | ||
| *.txt.gz | ||
| *.gmt | ||
| *.gmx | ||
|
|
||
| *.zarr | ||
|
|
||
| # Data never enters git; only its READMEs and placeholders do. | ||
| data/** | ||
| !data/**/ | ||
| !data/**/README.md | ||
| !data/**/.gitkeep | ||
|
|
||
| # Directories to ignore. Unanchored, so they also match inside every analysis task directory | ||
| # (analysis/<topic>/.../<name>_vN/): the untracked half of a task, anchored to the main checkout. | ||
| figures/ | ||
| outputs/ | ||
| logs/ | ||
|
|
||
| # A task's results/ (small evidence tables) is tracked even though *.csv / *.txt are ignored above. | ||
| !analysis/**/results/**/*.csv | ||
| !analysis/**/results/**/*.txt | ||
|
|
||
| # OS specifics | ||
| .ruff_cache/ | ||
| **.DS_Store | ||
|
|
||
| # R stuff | ||
| *.Rhistory | ||
|
|
||
| .vscode/* | ||
| .github/prompts/* | ||
|
|
||
| # Claude Code local files (personal settings + local agent worktrees) | ||
| .claude/settings.local.json | ||
| .claude/worktrees/ |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.