From eb66dd12e1cebaee99ff2bf2b14465c0aaf20f36 Mon Sep 17 00:00:00 2001 From: "Luke W. Johnston" Date: Thu, 12 Feb 2026 22:31:33 +0100 Subject: [PATCH 1/9] refactor: :memo: emojis can't end on header --- CONTRIBUTING.md | 15 ++++++++------- template/CONTRIBUTING.md.jinja | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7c4d319..724a681 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,13 +1,14 @@ # Contributing -## Issues and bugs :bug: +## :bug: Issues and bugs The easiest way to contribute is to report issues or bugs that you might -find while using `template-python-package`. You can do this by creating a +find while using `template-python-package`. You can do this by creating +a [new](https://github.com/seedcase-project/template-python-package/issues/new/choose) issue on our GitHub repository. -## Adding or modifying content :pencil2: +## :pencil2: Adding or modifying content If you would like to contribute content, please check out our [guidebook](https://guidebook.seedcase-project.org/) for more specific @@ -50,13 +51,13 @@ history. Meaning that if you make changes to the template and try to test it, it won't be able to test those changes. You have to commit the changes first in order for copier to use them. -When committing changes, please try to follow [Conventional -Commits](https://decisions.seedcase-project.org/why-conventional-commits) +When committing changes, please try to follow +[Conventional Commits](https://decisions.seedcase-project.org/why-conventional-commits) as Git messages. Using this convention allows us to be able to automatically create a release based on the commit message by using [Commitizen](https://decisions.seedcase-project.org/why-semantic-release-with-commitizen). If you don't use Conventional Commits when making a commit, we will -revise the pull request title to follow that format, as we use [squash -merges](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/squashing-commits/about-squash-merges) +revise the pull request title to follow that format, as we use +[squash merges](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/squashing-commits/about-squash-merges) when merging pull requests, so all other commits in the pull request will be squashed into one commit. diff --git a/template/CONTRIBUTING.md.jinja b/template/CONTRIBUTING.md.jinja index fe684a2..78572ad 100644 --- a/template/CONTRIBUTING.md.jinja +++ b/template/CONTRIBUTING.md.jinja @@ -1,13 +1,13 @@ # Contributing -## Issues and bugs :bug: +## :bug: Issues and bugs The easiest way to contribute is to report issues or bugs that you might find while using `{{ github_repo }}`. You can do this by creating a [new](https://github.com/{{ github_repo_spec }}/issues/new/choose) issue on our GitHub repository. -## Adding or modifying content :pencil2: +## :pencil2: Adding or modifying content {% if is_seedcase_project -%} If you would like to contribute content, please check out our From 0904d589fff99cb9a4ea4d127415e2a284ea16b0 Mon Sep 17 00:00:00 2001 From: "Luke W. Johnston" Date: Thu, 12 Feb 2026 22:32:18 +0100 Subject: [PATCH 2/9] feat: :sparkles: add rumdl to justfile --- justfile | 8 ++++++-- template/justfile.jinja | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/justfile b/justfile index ca6ed10..ae250a7 100644 --- a/justfile +++ b/justfile @@ -7,7 +7,7 @@ @_builds: build-contributors build-website build-readme # Run all build-related recipes in the justfile -run-all: update-quarto-theme update-template _checks _tests _builds +run-all: update-quarto-theme update-template _checks format-md _tests _builds # Install the pre-commit hooks install-precommit: @@ -25,7 +25,7 @@ update-quarto-theme: # Update files in the template from the copier parent folder update-template: - cp CODE_OF_CONDUCT.md .pre-commit-config.yaml .typos.toml .editorconfig template/ + cp CODE_OF_CONDUCT.md .pre-commit-config.yaml .typos.toml .editorconfig .rumdl.toml template/ mkdir -p template/tools cp tools/get-contributors.sh template/tools/ cp .github/pull_request_template.md template/.github/ @@ -48,6 +48,10 @@ check-commits: check-spelling: uvx typos +# Format Markdown files +format-md: + uvx rumdl fmt --silent + # Test that a Python package can be created from the template, with parameters for: `is_seedcase_project` (true or false) and `hosting_provider` (either "gh-pages" or "netlify") test is_seedcase_project="true" hosting_provider="netlify": sh ./test-template.sh {{ is_seedcase_project }} {{ hosting_provider }} diff --git a/template/justfile.jinja b/template/justfile.jinja index 182379e..3701ae2 100644 --- a/template/justfile.jinja +++ b/template/justfile.jinja @@ -7,7 +7,7 @@ # Run all build-related recipes in the justfile {%- if is_seedcase_project %} -run-all: install-deps update-quarto-theme format-python _checks _tests _builds +run-all: install-deps update-quarto-theme format-python format-md _checks _tests _builds {%- else %} run-all: install-deps format-python _checks _tests _builds {%- endif %} @@ -61,6 +61,10 @@ format-python: uv run ruff check --fix . uv run ruff format . +# Format Markdown files +format-md: + uvx rumdl fmt --silent + # Build the documentation website using Quarto build-website: # To let Quarto know where python is. From a44d7846f2c46d00a22f926a872a87e226520e8e Mon Sep 17 00:00:00 2001 From: "Luke W. Johnston" Date: Thu, 12 Feb 2026 22:32:40 +0100 Subject: [PATCH 3/9] feat: :wrench: add rumdl config file --- .rumdl.toml | 32 ++++++++++++++++++++++++++++++++ template/.rumdl.toml | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 .rumdl.toml create mode 100644 template/.rumdl.toml diff --git a/.rumdl.toml b/.rumdl.toml new file mode 100644 index 0000000..4cbf65d --- /dev/null +++ b/.rumdl.toml @@ -0,0 +1,32 @@ +[global] +# 72 to match what we have currently been using +line_length = 72 +flavor = "quarto" +exclude = [ + # Common directories to exclude + ".github", + # This is auto-generated from the qmd version + "**/README.md", + # This has it's own structure + "**/LICENSE.md" +] + +# List style: `-` +[MD004] +style = "dash" + +# Wrap list items +[MD032] +allow-lazy-continuation = false + +# Reflow text +[MD013] +reflow = true +reflow-mode = "normalize" +# Exclude code blocks from line length check +# code-blocks = false + +# Fix tables and their separator row +[MD060] +enabled = true +style = "aligned-no-space" diff --git a/template/.rumdl.toml b/template/.rumdl.toml new file mode 100644 index 0000000..4cbf65d --- /dev/null +++ b/template/.rumdl.toml @@ -0,0 +1,32 @@ +[global] +# 72 to match what we have currently been using +line_length = 72 +flavor = "quarto" +exclude = [ + # Common directories to exclude + ".github", + # This is auto-generated from the qmd version + "**/README.md", + # This has it's own structure + "**/LICENSE.md" +] + +# List style: `-` +[MD004] +style = "dash" + +# Wrap list items +[MD032] +allow-lazy-continuation = false + +# Reflow text +[MD013] +reflow = true +reflow-mode = "normalize" +# Exclude code blocks from line length check +# code-blocks = false + +# Fix tables and their separator row +[MD060] +enabled = true +style = "aligned-no-space" From f661706244a68c4a1f245dd78cf17d3ead391c05 Mon Sep 17 00:00:00 2001 From: "Luke W. Johnston" Date: Thu, 12 Feb 2026 22:33:21 +0100 Subject: [PATCH 4/9] refactor: :memo: don't need separate format Md step --- .github/pull_request_template.md | 1 - template/.github/pull_request_template.md | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 735ead1..2a84440 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -8,5 +8,4 @@ Needs a quick/an in-depth review. ## Checklist -- [ ] Formatted Markdown - [ ] Ran `just run-all` diff --git a/template/.github/pull_request_template.md b/template/.github/pull_request_template.md index 735ead1..2a84440 100644 --- a/template/.github/pull_request_template.md +++ b/template/.github/pull_request_template.md @@ -8,5 +8,4 @@ Needs a quick/an in-depth review. ## Checklist -- [ ] Formatted Markdown - [ ] Ran `just run-all` From 0b31fc7b30dc9bc62c91ebdf6d6e206cf999036a Mon Sep 17 00:00:00 2001 From: "Luke W. Johnston" Date: Thu, 12 Feb 2026 22:34:22 +0100 Subject: [PATCH 5/9] refactor: :fire: not using Quarto format Markdown flow --- .vscode/settings.json | 2 -- _quarto.yml | 5 ----- template/.vscode/settings.json | 2 -- template/_quarto.yml.jinja | 5 ----- 4 files changed, 14 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index f5816ff..495958e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,8 +3,6 @@ "editor.wordWrap": "off", "editor.formatOnSave": true, "git.autofetch": false, - "quarto.visualEditor.markdownWrap": "column", - "quarto.visualEditor.markdownWrapColumn": 72, "editor.tabCompletion": "on", "editor.snippetSuggestions": "inline", "conventional-branch.type": [ diff --git a/_quarto.yml b/_quarto.yml index cd9b034..c1710d1 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -43,8 +43,3 @@ format: - brand include-before-body: - "docs/includes/site-counter.html" - -editor: - markdown: - wrap: 72 - canonical: true diff --git a/template/.vscode/settings.json b/template/.vscode/settings.json index e5437b2..e9f9b18 100644 --- a/template/.vscode/settings.json +++ b/template/.vscode/settings.json @@ -6,8 +6,6 @@ "source.organizeImports": "always" }, "git.autofetch": false, - "quarto.visualEditor.markdownWrap": "column", - "quarto.visualEditor.markdownWrapColumn": 72, "autoDocstring.customTemplatePath": ".vscode/google-notypes.mustache", "editor.tabCompletion": "on", "editor.snippetSuggestions": "inline", diff --git a/template/_quarto.yml.jinja b/template/_quarto.yml.jinja index 2c402ca..0569b5a 100644 --- a/template/_quarto.yml.jinja +++ b/template/_quarto.yml.jinja @@ -89,8 +89,3 @@ format: # TODO: Uncomment if using the goatcounter website visitor counter # include-before-body: # - "docs/includes/site-counter.html" - -editor: - markdown: - wrap: 72 - canonical: true From ea9707cf7a839999b15bbb76f7c60297eb015635 Mon Sep 17 00:00:00 2001 From: "Luke W. Johnston" Date: Thu, 12 Feb 2026 22:34:44 +0100 Subject: [PATCH 6/9] feat: :sparkles: add rumdl to vscode extension list --- .vscode/extensions.json | 3 ++- template/.vscode/extensions.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 184eca4..12d16c4 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -12,7 +12,8 @@ "vivaxy.vscode-conventional-commits", "pshaddel.conventional-branch", "tekumara.typos-vscode", - "EditorConfig.EditorConfig" + "EditorConfig.EditorConfig", + "rvben.rumdl" ], // List of extensions recommended by VS Code that should not be recommended for users of this workspace. "unwantedRecommendations": [] diff --git a/template/.vscode/extensions.json b/template/.vscode/extensions.json index 571e08a..18ec7f6 100644 --- a/template/.vscode/extensions.json +++ b/template/.vscode/extensions.json @@ -16,7 +16,8 @@ "charliermarsh.ruff", "pshaddel.conventional-branch", "tekumara.typos-vscode", - "EditorConfig.EditorConfig" + "EditorConfig.EditorConfig", + "rvben.rumdl" ], "unwantedRecommendations": [] } From b062026dcc427cd8bdbb17bcdc4c10de6b847c15 Mon Sep 17 00:00:00 2001 From: "Luke W. Johnston" Date: Thu, 12 Feb 2026 22:36:44 +0100 Subject: [PATCH 7/9] feat: :sparkles: add rumdl pre-commit hook --- .pre-commit-config.yaml | 9 ++++++++- template/.pre-commit-config.yaml | 11 +++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a86eaad..f93e648 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,6 +15,8 @@ repos: hooks: - id: trailing-whitespace - id: end-of-file-fixer + - id: check-merge-conflict + args: [--assume-in-merge] - repo: https://github.com/commitizen-tools/commitizen rev: v4.13.7 @@ -25,6 +27,11 @@ repos: # sub-packages, which confuses pre-commit when it tries to find the latest # version - repo: https://github.com/adhtruong/mirrors-typos - rev: v1.43.3 + rev: v1.43.4 hooks: - id: typos + + - repo: https://github.com/rvben/rumdl-pre-commit + rev: v0.1.18 + hooks: + - id: rumdl-fmt # Auto-format diff --git a/template/.pre-commit-config.yaml b/template/.pre-commit-config.yaml index fba6974..f93e648 100644 --- a/template/.pre-commit-config.yaml +++ b/template/.pre-commit-config.yaml @@ -15,9 +15,11 @@ repos: hooks: - id: trailing-whitespace - id: end-of-file-fixer + - id: check-merge-conflict + args: [--assume-in-merge] - repo: https://github.com/commitizen-tools/commitizen - rev: v4.12.1 + rev: v4.13.7 hooks: - id: commitizen @@ -25,6 +27,11 @@ repos: # sub-packages, which confuses pre-commit when it tries to find the latest # version - repo: https://github.com/adhtruong/mirrors-typos - rev: v1.42.3 + rev: v1.43.4 hooks: - id: typos + + - repo: https://github.com/rvben/rumdl-pre-commit + rev: v0.1.18 + hooks: + - id: rumdl-fmt # Auto-format From e9a3ff32353234e78dc6166af324a08ff068d78a Mon Sep 17 00:00:00 2001 From: "Luke W. Johnston" Date: Thu, 12 Feb 2026 22:39:33 +0100 Subject: [PATCH 8/9] style: :art: reformat Markdown with rumdl --- CHANGELOG.md | 118 +++++++++++++++++------------------ CODE_OF_CONDUCT.md | 4 +- README.md | 4 +- README.qmd | 21 +++---- _metadata.yml | 4 ++ docs/guide.qmd | 48 +++++++------- index.qmd | 114 +++++++++++++++++---------------- template/CHANGELOG.md | 4 +- template/CODE_OF_CONDUCT.md | 4 +- template/README.qmd | 100 +++++++++++++++-------------- template/_metadata.yml.jinja | 5 ++ 11 files changed, 222 insertions(+), 204 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f0edf9..9fd4985 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # Changelog -Since we follow [Conventional -Commits](https://decisions.seedcase-project.org/why-conventional-commits) +Since we follow +[Conventional Commits](https://decisions.seedcase-project.org/why-conventional-commits) when writing commit messages, we're able to automatically create formal "releases" of the template based on the commit messages. Releases in the context of template are when changes occur to the `template/` files or @@ -37,164 +37,164 @@ each release. ### Fix -- :bug: overwrite `_contributor.qmd` with `>` (#207) +- :bug: overwrite `_contributor.qmd` with `>` (#207) ### Refactor -- :arrow_up: upgrade pre-commit hook versions (#208) +- :arrow_up: upgrade pre-commit hook versions (#208) ## 0.17.9 (2025-09-10) ### Refactor -- :pencil2: use `update`, not `add` for Quarto extension (#195) +- :pencil2: use `update`, not `add` for Quarto extension (#195) ## 0.17.8 (2025-09-08) ### Fix -- :hammer: ignore other dirs and files when listing todos (#200) -- :bug: `github_repo` (via `_folder_name`) doesn't work using `update` +- :hammer: ignore other dirs and files when listing todos (#200) +- :bug: `github_repo` (via `_folder_name`) doesn't work using `update` (#197) ### Refactor -- :pushpin: update pre-commit hook versions (#199) -- :memo: simplify CHANGELOG description (#193) -- :hammer: contributor script outputs text, output to file with +- :pushpin: update pre-commit hook versions (#199) +- :memo: simplify CHANGELOG description (#193) +- :hammer: contributor script outputs text, output to file with justfile (#192) -- :fire: `update-from-workflow` is too complicated and not needed +- :fire: `update-from-workflow` is too complicated and not needed (#190) ## 0.17.7 (2025-09-05) ### Refactor -- :memo: simplify PR template (#196) +- :memo: simplify PR template (#196) ## 0.17.6 (2025-09-05) ### Refactor -- :truck: rename to `check-python`, not `build` (#189) +- :truck: rename to `check-python`, not `build` (#189) ## 0.17.5 (2025-09-02) ### Refactor -- :wrench: can render everything in Quarto project (#183) +- :wrench: can render everything in Quarto project (#183) ## 0.17.4 (2025-09-02) ### Refactor -- :wrench: add more items to sidebar, like overview (#182) +- :wrench: add more items to sidebar, like overview (#182) ## 0.17.3 (2025-09-02) ### Refactor -- :recycle: create homepage as variable, not question (#179) +- :recycle: create homepage as variable, not question (#179) ## 0.17.2 (2025-09-02) ### Refactor -- :hammer: ignore `justfile` when listing TODO items (#181) +- :hammer: ignore `justfile` when listing TODO items (#181) ## 0.17.1 (2025-09-02) ### Refactor -- :recycle: need `date-released` in `CITATION.cff` (#180) +- :recycle: need `date-released` in `CITATION.cff` (#180) ## 0.17.0 (2025-09-02) ### Feat -- :sparkles: add CHANGELOG with some description of it (#178) +- :sparkles: add CHANGELOG with some description of it (#178) ## 0.16.6 (2025-09-02) ### Refactor -- :recycle: delete whole references folder pre and post render (#142) +- :recycle: delete whole references folder pre and post render (#142) ## 0.16.5 (2025-09-01) ### Refactor -- :truck: move GoatCounter file into `docs/includes/` (#177) +- :truck: move GoatCounter file into `docs/includes/` (#177) ## 0.16.4 (2025-09-01) ### Refactor -- :pushpin: update pre-commit versions (#171) +- :pushpin: update pre-commit versions (#171) ## 0.16.3 (2025-09-01) ### Refactor -- :hammer: use `--upgrade` when installing Python dependencies (#174) +- :hammer: use `--upgrade` when installing Python dependencies (#174) ## 0.16.2 (2025-09-01) ### Refactor -- :wrench: add `theme` option in `_quarto.yml`, and `brand` for +- :wrench: add `theme` option in `_quarto.yml`, and `brand` for Seedcase (#170) ## 0.16.1 (2025-09-01) ### Refactor -- :technologist: simplify the pull request template (#165) +- :technologist: simplify the pull request template (#165) ## 0.16.0 (2025-08-26) ### Feat -- :sparkles: add `update-from-template` workflow (#134) -- :sparkles: add hosting provider variable (#153) -- :memo: add Conduct, Contributing, and filled out README (#131) -- :sparkles: add 404 page to template (#141) -- :sparkles: add files with copier variables (#127) -- :sparkles: copy over static files to template folder (#117) -- :hammer: gitleaks pre-commit to check for credentials (#100) -- :sparkles: add mypy to VS Code settings and extensions (#93) -- :sparkles: add examples section to docstring template (#39) -- 🧑‍💻 add recipe `add-function` (#2) +- :sparkles: add `update-from-template` workflow (#134) +- :sparkles: add hosting provider variable (#153) +- :memo: add Conduct, Contributing, and filled out README (#131) +- :sparkles: add 404 page to template (#141) +- :sparkles: add files with copier variables (#127) +- :sparkles: copy over static files to template folder (#117) +- :hammer: gitleaks pre-commit to check for credentials (#100) +- :sparkles: add mypy to VS Code settings and extensions (#93) +- :sparkles: add examples section to docstring template (#39) +- 🧑‍💻 add recipe `add-function` (#2) ### Fix -- :bug: need to run build workflow after version bump to get changelog +- :bug: need to run build workflow after version bump to get changelog (#110) -- :construction_worker: explicitly checkout newest version to publish +- :construction_worker: explicitly checkout newest version to publish (#107) -- :construction_worker: forgot to checkout before building and +- :construction_worker: forgot to checkout before building and publishing (#106) -- :construction_worker: only run when previous and current versions +- :construction_worker: only run when previous and current versions are different (#98) -- :construction_worker: use the `has_released` output to run or not +- :construction_worker: use the `has_released` output to run or not (#97) -- :bug: install uv in publish step and only for tags (#96) -- :hammer: the `check-commits` recipe wasn't correctly checking them +- :bug: install uv in publish step and only for tags (#96) +- :hammer: the `check-commits` recipe wasn't correctly checking them (#48) -- :hammer: the `check-commits` recipe wasn't correctly checking them -- :bug: remove auto-built reference docs before/after building (#47) -- :bug: remove auto-built reference docs before/after building -- :fire: remove django debugger (#44) -- add `test-python` to `run-all` (#38) -- :hammer: update test snippet to given, when, then (#29) - -### Refactor - -- :recycle: specify svg for all badges (#157) -- :recycle: move copier test to own file (#156) -- :recycle: update post-copy message (#154) -- :recycle: match copier vars in `template-website` (#152) -- :recycle: use `bash` for `check-commits` justfile recipe (#150) -- :wrench: include `github-actions` in dependabot config (#136) -- :construction_worker: move `uv build` step into publish job (#101) -- :recycle: make mypy more strict in settings (#94) +- :hammer: the `check-commits` recipe wasn't correctly checking them +- :bug: remove auto-built reference docs before/after building (#47) +- :bug: remove auto-built reference docs before/after building +- :fire: remove django debugger (#44) +- add `test-python` to `run-all` (#38) +- :hammer: update test snippet to given, when, then (#29) + +### Refactor + +- :recycle: specify svg for all badges (#157) +- :recycle: move copier test to own file (#156) +- :recycle: update post-copy message (#154) +- :recycle: match copier vars in `template-website` (#152) +- :recycle: use `bash` for `check-commits` justfile recipe (#150) +- :wrench: include `github-actions` in dependabot config (#136) +- :construction_worker: move `uv build` step into publish job (#101) +- :recycle: make mypy more strict in settings (#94) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 22bcd1a..e6f3284 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -26,5 +26,5 @@ be reported by opening an issue or contacting one or more of the project maintainers. This Code of Conduct is adapted from the Contributor Covenant -(https://contributor-covenant.org), version 1.0.0, available at -https://contributor-covenant.org/version/1/0/0/ +(), version 1.0.0, available at + diff --git a/README.md b/README.md index 765e9d0..965e27d 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,8 @@ integration and delivery workflows, and supporting files for building robust Python packages. Check out our -[website](https://template-python-package.seedcase-project.org/) for -more information, such as the features it provides and a +[website](https://template-python-package.seedcase-project.org) for more +information, such as the features it provides and a [guide](https://template-python-package.seedcase-project.org/docs/guide/) to using the template. For a list of changes, see our [changelog](https://template-python-package.seedcase-project.org/docs/releases/) diff --git a/README.qmd b/README.qmd index 03d0ff6..ebf8dfa 100644 --- a/README.qmd +++ b/README.qmd @@ -18,24 +18,21 @@ configurations for tools that improve developer experience, continuous integration and delivery workflows, and supporting files for building robust Python packages. -Check out our -[website](https://{{< meta gh.repo >}}.{{< meta gh.org >}}.org/) for -more information, such as the features it provides and a -[guide](https://{{< meta gh.repo >}}.{{< meta gh.org >}}.org/docs/guide/) -to using the template. For a list of changes, see our -[changelog](https://{{< meta gh.repo >}}.{{< meta gh.org >}}.org/docs/releases/) -page. +Check out our [website]({{< meta links.site >}}) for more information, +such as the features it provides and a +[guide]({{< meta links.site >}}/docs/guide/) to using the template. For +a list of changes, see our +[changelog]({{< meta links.site >}}/docs/releases/) page. ## Contributing -Check out our [contributing -page](https://{{< meta gh.repo >}}.{{< meta gh.org >}}.org/contributing/) +Check out our [contributing page]({{< meta links.site >}}/contributing/) for information on how to contribute to the project, including how to set up your development environment. -Please note that this project is released with a [Contributor Code of -Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree -to abide by its terms. +Please note that this project is released with a +[Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in +this project you agree to abide by its terms. ### Contributors diff --git a/_metadata.yml b/_metadata.yml index c5135a2..7cb987e 100644 --- a/_metadata.yml +++ b/_metadata.yml @@ -6,3 +6,7 @@ gh: titles: full: "Template Python Package: An opinionated setup for making Python packages" short: "Template Python Package" + +links: + github: "https://github.com/seedcase-project/template-python-package" + site: "https://template-python-package.seedcase-project.org" diff --git a/docs/guide.qmd b/docs/guide.qmd index ac89e29..1f30c92 100644 --- a/docs/guide.qmd +++ b/docs/guide.qmd @@ -10,19 +10,19 @@ post-creation tasks. In order to use this template, you need to install a few programs: -- [Python](https://www.python.org/): Required by the template tool - itself (copier) and for installing and using many of the tools in - this template. -- [Git](https://git-scm.com/): For version control and setting up Git - to track the newly created package. -- [copier](https://copier.readthedocs.io/en/stable/#quick-start): A - template tool for making new projects in a standardised and - structured way. -- [uv](https://docs.astral.sh/uv/): A tool for managing Python - environments and running commands. Some post-copy steps of this - template use uv. -- [just](https://just.systems/man/en/): A build management tool that - helps with running common build and check tasks. +- [Python](https://www.python.org/): Required by the template tool + itself (copier) and for installing and using many of the tools in this + template. +- [Git](https://git-scm.com/): For version control and setting up Git to + track the newly created package. +- [copier](https://copier.readthedocs.io/en/stable/#quick-start): A + template tool for making new projects in a standardised and structured + way. +- [uv](https://docs.astral.sh/uv/): A tool for managing Python + environments and running commands. Some post-copy steps of this + template use uv. +- [just](https://just.systems/man/en/): A build management tool that + helps with running common build and check tasks. You will need to install Python and Git yourself, but the other tools can be installed using @@ -163,23 +163,23 @@ Some configuration is needed after copying this template to a new repository, including configuration external to the repository. Some GitHub workflows require installing GitHub Apps, for greater security purposes and easier administration when managing multiple repositories. -The [security -section](https://guidebook.seedcase-project.org/operations/security#using-github-apps-to-generate-tokens) +The +[security section](https://guidebook.seedcase-project.org/operations/security#using-github-apps-to-generate-tokens) in our [Guidebook](https://guidebook.seedcase-project.org/) provides instructions on how to set up GitHub Apps, secrets, and variables. Ideally the secrets and variables should be set up in the organization settings. The specific workflows in this template that require this additional setup are: -- The workflow `.github/workflows/release-package.yml` requires the - [auto-release-token](https://github.com/apps/auto-release-token) - GitHub App as well as a creating a GitHub secret called - `UPDATE_VERSION_TOKEN` and a variable called `UPDATE_VERSION_APP_ID` - that has the App ID. -- The workflow `.github/workflows/add-to-project.yml` requires the - [add-to-board-token](https://github.com/apps/add-to-board-token) - GitHub App, along with the `ADD_TO_BOARD_TOKEN` secret and the - `ADD_TO_BOARD_APP_ID` variable of the GitHub App's ID. +- The workflow `.github/workflows/release-package.yml` requires the + [auto-release-token](https://github.com/apps/auto-release-token) + GitHub App as well as a creating a GitHub secret called + `UPDATE_VERSION_TOKEN` and a variable called `UPDATE_VERSION_APP_ID` + that has the App ID. +- The workflow `.github/workflows/add-to-project.yml` requires the + [add-to-board-token](https://github.com/apps/add-to-board-token) + GitHub App, along with the `ADD_TO_BOARD_TOKEN` secret and the + `ADD_TO_BOARD_APP_ID` variable of the GitHub App's ID. If you use Netlify, you will also need to add a `NETLIFY_AUTH_TOKEN` secret of your Netlify Token. diff --git a/index.qmd b/index.qmd index 7042c5e..79754d2 100644 --- a/index.qmd +++ b/index.qmd @@ -11,63 +11,69 @@ including for developing the package. ## Features -- Use [uv](https://decisions.seedcase-project.org/why-uv/) to manage - the Python package and for project management. -- Includes a [justfile](https://just.systems/man/en/) for managing - common tasks like building the website and running checks. -- Uses [typos](https://github.com/crate-ci/typos) to check for common - spelling mistakes. -- Code formatting and linting with - [ruff](https://decisions.seedcase-project.org/why-ruff/). -- Run checks with [pre-commit](https://pre-commit.com/) hooks to - ensure consistent formatting and style across the project. It - includes checks for credentials, typos, and file formatting. -- GitHub workflows for automatically adding Pull Requests and Issues - to a project board. -- Pull Request template for easy creation of new Pull Requests. -- Includes [GitHub Actions](https://docs.github.com/en/actions) for - continuous integration, testing, and delivery for running checks, - formatting, releasing, and building the Python package and associated - documentation. -- Pull Request template for easy creation of new Pull Requests. -- [VS Code](https://code.visualstudio.com/) settings commonly used by - contributors working in VS Code. -- Includes an [EditorConfig](https://editorconfig.org/) file to ensure - consistent formatting across different editors. -- [`CITATION.cff`](https://citation-file-format.github.io/) file for - citation information. -- Python package folder and file structure that takes advantage of - Python's packaging ecosystem. -- [`pyproject.toml`](https://peps.python.org/pep-0518/) for tracking - dependencies and project metadata. -- Uses [Quarto](https://quarto.org/) Markdown for the website content, - allowing for easy integration of code, text, and figures. -- Uses - [Commitizen](https://decisions.seedcase-project.org/why-changelog-with-commitizen) - to - [check](https://decisions.seedcase-project.org/why-lint-with-commitizen/) - commit messages and automatically create the changelog. -- Automated Git tagging and GitHub releases with - [commitizen](https://decisions.seedcase-project.org/why-semantic-release-with-commitizen/) - that are based on messages following [Conventional - Commits](https://decisions.seedcase-project.org/why-conventional-commits). -- Uses a [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/) - license for the website content. -- Uses an [MIT](https://decisions.seedcase-project.org/why-mit-license/index.html) - license for the code. -- Optionally uses the - [`seedcase-theme`](https://github.com/{{< meta gh.org >}}/seedcase-theme) - Quarto extension for a standard appearance across websites. -- Uses [Netlify](https://www.netlify.com/) for hosting the website. -- Includes a [GoatCounter](https://www.goatcounter.com/) file for website visitor - tracking, which is privacy-friendly and does not use cookies. That means - it doesn't need a GDPR notice as no personal data is collected. +- Use [uv](https://decisions.seedcase-project.org/why-uv/) to manage the + Python package and for project management. +- Includes a [justfile](https://just.systems/man/en/) for managing + common tasks like building the website and running checks. +- Uses [typos](https://github.com/crate-ci/typos) to check for common + spelling mistakes. +- Code formatting and linting with + [ruff](https://decisions.seedcase-project.org/why-ruff/). +- Run checks with [pre-commit](https://pre-commit.com/) hooks to ensure + consistent formatting and style across the project. It includes checks + for credentials, typos, and file formatting. +- GitHub workflows for automatically adding Pull Requests and Issues to + a project board. +- Pull Request template for easy creation of new Pull Requests. +- Includes [GitHub Actions](https://docs.github.com/en/actions) for + continuous integration, testing, and delivery for running checks, + formatting, releasing, and building the Python package and associated + documentation. +- Pull Request template for easy creation of new Pull Requests. +- [VS Code](https://code.visualstudio.com/) settings commonly used by + contributors working in VS Code. +- Includes an [EditorConfig](https://editorconfig.org/) file to ensure + consistent formatting across different editors. +- [`CITATION.cff`](https://citation-file-format.github.io/) file for + citation information. +- Python package folder and file structure that takes advantage of + Python's packaging ecosystem. +- [`pyproject.toml`](https://peps.python.org/pep-0518/) for tracking + dependencies and project metadata. +- Uses [Quarto](https://quarto.org/) Markdown for the website content, + allowing for easy integration of code, text, and figures. +- Uses + [Commitizen](https://decisions.seedcase-project.org/why-changelog-with-commitizen) + to + [check](https://decisions.seedcase-project.org/why-lint-with-commitizen/) + commit messages and automatically create the changelog. +- Automated Git tagging and GitHub releases with + [commitizen](https://decisions.seedcase-project.org/why-semantic-release-with-commitizen/) + that are based on messages following + [Conventional + Commits](https://decisions.seedcase-project.org/why-conventional-commits). +- Uses a [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/) + license for the website content. +- Uses an + [MIT](https://decisions.seedcase-project.org/why-mit-license/index.html) + license for the code. +- Optionally uses the + [`seedcase-theme`](https://github.com/seedcase-project/seedcase-theme) + Quarto extension for a standard appearance across websites. +- Uses [Netlify](https://www.netlify.com/) for hosting the website. +- Includes a [GoatCounter](https://www.goatcounter.com/) file for + website visitor tracking, which is privacy-friendly and does not use + cookies. That means it doesn't need a GDPR notice as no personal data + is collected. +- Uses [rumdl](https://rumdl.dev/) to format Markdown files so that they + are standardized and consistent across the project, as well as being + easier to read in raw form. ## Want to contribute? -We would love your feedback or contributions! Head over to our [GitHub -repository](https://github.com/{{< meta gh.org >}}/{{< meta gh.repo >}}) to -share your ideas or contribute code. Your input makes us better! +We would love your feedback or contributions! Head over to our +[GitHub repository]({{< meta links.github >}}) to share your ideas or +contribute code. Your input makes us better! ### Contributors diff --git a/template/CHANGELOG.md b/template/CHANGELOG.md index dda0fdc..dbea7ff 100644 --- a/template/CHANGELOG.md +++ b/template/CHANGELOG.md @@ -1,7 +1,7 @@ # Changelog -Since we follow [Conventional -Commits](https://decisions.seedcase-project.org/why-conventional-commits) +Since we follow +[Conventional Commits](https://decisions.seedcase-project.org/why-conventional-commits) when writing commit messages, we're able to automatically create formal releases of the Python package based on the commit messages. The releases are also published to Zenodo for easier discovery, archival, diff --git a/template/CODE_OF_CONDUCT.md b/template/CODE_OF_CONDUCT.md index 22bcd1a..e6f3284 100644 --- a/template/CODE_OF_CONDUCT.md +++ b/template/CODE_OF_CONDUCT.md @@ -26,5 +26,5 @@ be reported by opening an issue or contacting one or more of the project maintainers. This Code of Conduct is adapted from the Contributor Covenant -(https://contributor-covenant.org), version 1.0.0, available at -https://contributor-covenant.org/version/1/0/0/ +(), version 1.0.0, available at + diff --git a/template/README.qmd b/template/README.qmd index 25d4e75..fce0f0f 100644 --- a/template/README.qmd +++ b/template/README.qmd @@ -18,50 +18,56 @@ Seedcase template :tada: ## Project files and folders -- `.github/`: Contains GitHub-specific files, such as issue and pull - request templates, workflows, - [dependabot](https://docs.github.com/en/code-security/getting-started/dependabot-quickstart-guide) - configuration, pull request templates, and a - [CODEOWNERS](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners) - file. -- `tools/vulture-allowlist.py`: List of variables that shouldn't be flagged by [Vulture](https://github.com/jendrikseipp/vulture) as unused. -- `tools/get-contributors.sh`: Script to get list of project contributors. -- `tests/`: Test files for the package. -- `src/`: Source code for the package. -- `docs/`: Documentation about using and developing the Python package. -- `_renderer.py`: Custom [`quartodoc`](https://machow.github.io/quartodoc/) renderer. -- `pytest.ini`: Pytest configuration file. -- `mypy.ini`: [`mypy`](https://mypy.readthedocs.io/en/stable/) configuration file for type checking Python code. -- `.copier-answers.yml`: Contains the answers you gave when copying - the project from the template. **You should not modify this file - directly.** -- `.cz.toml`: - [Commitizen](https://commitizen-tools.github.io/commitizen/) - configuration file for managing versions and changelogs. -- `.pre-commit-config.yaml`: [Pre-commit](https://pre-commit.com/) - configuration file for managing and running checks before each - commit. -- `.typos.toml`: [typos](https://github.com/crate-ci/typos) spell - checker configuration file. -- `justfile`: [`just`](https://just.systems/man/en/) configuration - file for scripting project tasks. -- `.editorconfig`: Editor configuration file for - [EditorConfig](https://editorconfig.org/) to maintain consistent - coding styles across different editors and IDEs. -- `CHANGELOG.md`: Changelog file for tracking changes in the project. -- `CITATION.cff`: Structured citation metadata for your project. -- `CONTRIBUTING.md`: Guidelines for contributing to the project. -- `_metadata.yml`: Quarto metadata file for the website, including - information about the project, such as the titles and GitHub names. -- `pyproject.toml`: Main Python project configuration file defining - metadata and dependencies. -- `_quarto.yml`: Quarto configuration file for the website, including - settings for the website, such as the theme, navigation, and other - options. -- `ruff.toml`: [Ruff](https://docs.astral.sh/ruff/) configuration file - for linting and formatting Python code. -- `uv.lock`: Lockfile used by [`uv`](https://docs.astral.sh/uv/) to - record exact versions of installed dependencies. +- `.github/`: Contains GitHub-specific files, such as issue and pull + request templates, workflows, + [dependabot](https://docs.github.com/en/code-security/getting-started/dependabot-quickstart-guide) + configuration, pull request templates, and a + [CODEOWNERS](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners) + file. +- `tools/vulture-allowlist.py`: List of variables that shouldn't be + flagged by [Vulture](https://github.com/jendrikseipp/vulture) as + unused. +- `tools/get-contributors.sh`: Script to get list of project + contributors. +- `tests/`: Test files for the package. +- `src/`: Source code for the package. +- `docs/`: Documentation about using and developing the Python package. +- `_renderer.py`: Custom + [`quartodoc`](https://machow.github.io/quartodoc/) renderer. +- `pytest.ini`: Pytest configuration file. +- `mypy.ini`: [`mypy`](https://mypy.readthedocs.io/en/stable/) + configuration file for type checking Python code. +- `.copier-answers.yml`: Contains the answers you gave when copying the + project from the template. + **You should not modify this file directly.** +- `.cz.toml`: + [Commitizen](https://commitizen-tools.github.io/commitizen/) + configuration file for managing versions and changelogs. +- `.pre-commit-config.yaml`: [Pre-commit](https://pre-commit.com/) + configuration file for managing and running checks before each commit. +- `.typos.toml`: [typos](https://github.com/crate-ci/typos) spell + checker configuration file. +- `justfile`: [`just`](https://just.systems/man/en/) configuration file + for scripting project tasks. +- `.editorconfig`: Editor configuration file for + [EditorConfig](https://editorconfig.org/) to maintain consistent + coding styles across different editors and IDEs. +- `CHANGELOG.md`: Changelog file for tracking changes in the project. +- `CITATION.cff`: Structured citation metadata for your project. +- `CONTRIBUTING.md`: Guidelines for contributing to the project. +- `_metadata.yml`: Quarto metadata file for the website, including + information about the project, such as the titles and GitHub names. +- `pyproject.toml`: Main Python project configuration file defining + metadata and dependencies. +- `_quarto.yml`: Quarto configuration file for the website, including + settings for the website, such as the theme, navigation, and other + options. +- `ruff.toml`: [Ruff](https://docs.astral.sh/ruff/) configuration file + for linting and formatting Python code. +- `uv.lock`: Lockfile used by [`uv`](https://docs.astral.sh/uv/) to + record exact versions of installed dependencies. +- `.rumdl.toml`: [rumdl](https://rumdl.dev/) configuration file for + formatting Markdown files so that they are standardized and consistent ## Contributing @@ -69,9 +75,9 @@ Check out our [contributing document](CONTRIBUTING.md) for information on how to contribute to the project, including how to set up your development environment. -Please note that this project is released with a [Contributor Code of -Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree -to abide by its terms. +Please note that this project is released with a +[Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in +this project you agree to abide by its terms. ## Licensing diff --git a/template/_metadata.yml.jinja b/template/_metadata.yml.jinja index 2815f98..9d738f9 100644 --- a/template/_metadata.yml.jinja +++ b/template/_metadata.yml.jinja @@ -1,3 +1,8 @@ gh: repo: {{ github_repo }} org: {{ github_user }} + +links: + github: "https://github.com/{{ github_user }}/{{ github_repo }}" + # TODO: Confirm this is the correct URL + site: "https://{{ github_repo }}.{{ github_user }}.org From 26e7bad24962e1f9d262006e200b58da83033f00 Mon Sep 17 00:00:00 2001 From: "Luke W. Johnston" Date: Thu, 12 Feb 2026 22:42:03 +0100 Subject: [PATCH 9/9] refactor: :memo: match style for pull request template to other repos --- .github/pull_request_template.md | 2 +- template/.github/pull_request_template.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 2a84440..37d861c 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -4,7 +4,7 @@ EXPLANATION Closes # -Needs a quick/an in-depth review. +Needs a quick/thorough review. ## Checklist diff --git a/template/.github/pull_request_template.md b/template/.github/pull_request_template.md index 2a84440..37d861c 100644 --- a/template/.github/pull_request_template.md +++ b/template/.github/pull_request_template.md @@ -4,7 +4,7 @@ EXPLANATION Closes # -Needs a quick/an in-depth review. +Needs a quick/thorough review. ## Checklist