Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "/home/runner/work/cookiecutter-scverse/cookiecutter-scverse",
"commit": "77339226581ec535e1972984083ae70b702e7bec",
"commit": "2e75ba3563db51cf9022a1a0c9cc5d2f6c18edb1",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down Expand Up @@ -36,7 +36,7 @@
"trim_blocks": true
},
"_template": "/home/runner/work/cookiecutter-scverse/cookiecutter-scverse",
"_commit": "77339226581ec535e1972984083ae70b702e7bec"
"_commit": "2e75ba3563db51cf9022a1a0c9cc5d2f6c18edb1"
}
},
"directory": null
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
# Check [[tool.hatch.envs.hatch-test.matrix]] in pyproject.toml and https://hatch.pypa.io/latest/environment/ for
# more details.
get-environments:
runs-on: ubuntu-latest
runs-on: ubuntu-slim
outputs:
envs: ${{ steps.get-envs.outputs.envs }}
steps:
Expand Down Expand Up @@ -70,6 +70,8 @@ jobs:
python-version: ${{ matrix.env.python }}
- name: create hatch environment
run: uvx hatch env create ${{ matrix.env.name }}
- name: list all all installed package versions
run: uvx hatch run ${{ matrix.env.name }}:uv pip list
- name: run tests using hatch
env:
MPLBACKEND: agg
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.11
rev: v0.14.13
hooks:
- id: ruff-check
types_or: [python, pyi, jupyter]
Expand Down
9 changes: 6 additions & 3 deletions docs/template_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,11 @@ There you can see the execution history, logs, and (re-)trigger workflows manual
[Github Actions]: https://github.com/features/actions
[twine]: https://github.com/pypa/twine

### Automating PyPI released using GitHub actions
(automating-the-pypi-release-using-github-actions)=
(automating-pypi-released-using-github-actions)=
(configuring-the-github-workflow)=

#### Configuring the Github workflow
### Automating the PyPI release using GitHub actions

Tags adhering to `"*.*.*"` that are pushed to the `main` branch will trigger the release Github workflow that automatically builds and uploads the Python package to [PyPI][].

Expand All @@ -155,8 +157,9 @@ To set this up, login to [PyPI][], and proceed depending on whether you already
- If yes, navigate to the project. In the left sidebar, choose "Publishing", then proceed to add the repository details.
- If not, go to your [PyPI publishing settings][] and fill out the “Add a new pending publisher” form.

Enter everything *exactly* as it is displayed on GitHub (i.e. use the correct casing for your repository name).
The "Workflow name" needs to bet set to `release.yaml`.
In most cases, you can leave the "Environment name" empty.
Set "Environment name" to “pypi” to match `environment: pypi` in `.github/workflows/release.yaml`.
For more details, please refer to the official [PyPI guide for setting up trusted publishing][trusted publisher].

[pypi-trusted-publishing-guide]: https://docs.pypi.org/trusted-publishers/adding-a-publisher/
Expand Down