Skip to content
Merged
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
43 changes: 22 additions & 21 deletions .config/cliff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@ within each release.

Commits from bots, like `dependabot` or `pre-commit-ci`, are not included in
the changelog.

"""

body = """
{%- macro remote_url() -%}
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
{%- endmacro -%}

{% macro print_commit(commit) -%}
{%- macro print_commit(commit) -%}
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
{% if commit.breaking %}**breaking** {% endif %}\
{{ commit.message | upper_first }} \
Expand All @@ -51,48 +52,48 @@ body = """
{% endif %}\
{% endif %} \
([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }}))\
{% endmacro -%}
{%- endmacro -%}

{% if version %}\
{% if previous.version %}\
{% if version %}
{% if previous.version %}
## [{{ version | trim_start_matches(pat="v") }}]\
({{ self::remote_url() }}/compare/{{ previous.version }}..{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
{% else %}
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% endif %}\
{% else %}\
{% endif %}
{% else %}
## [unreleased]
{% endif %}\
{% endif %}

{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits
| filter(attribute="scope")
| sort(attribute="scope") %}
{{ self::print_commit(commit=commit) }}
{%- endfor %}
{% endfor %}
{% for commit in commits %}
{%- if not commit.scope -%}
{% if not commit.scope %}
{{ self::print_commit(commit=commit) }}
{% endif -%}
{% endfor -%}
{% endfor -%}
{% endif %}
{% endfor %}
{% endfor %}

{%- if github -%}
{% if github %}
{% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
### ❤️ New contributors
{% endif %}\
{% endif %}
{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}
{% if contributor.username is containing("[bot]") %}
- `@{{ contributor.username }}` started making automated contributions\
{% else %}\
{% else %}
- [`@{{ contributor.username }}`](https://github.com/{{ contributor.username }}) made their first contribution
{%- if contributor.pr_number %} in \
{% if contributor.pr_number %} in \
[#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }})\
{%- endif %}
{%- endif %}\
{%- endfor -%}
{%- endif %}
{% endif %}
{% endif %}\
{% endfor %}
{% endif %}

"""

Expand Down
2 changes: 1 addition & 1 deletion .config/cog.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ branch_whitelist = ["main"]
pre_bump_hooks = [
# Quiet the log output of git-cliff, it is noisy.
"RUST_LOG='none' uvx git-cliff --tag {{version}}",
"uvx rumdl fmt CHANGELOG.md --silent",
"uvx --from panache-cli panache format CHANGELOG.md --quiet",
"git commit CHANGELOG.md -m 'build: 🔖 update version to {{version}} [skip ci]'",
]
post_bump_hooks = ["git push", "git push --tags"]
Expand Down
8 changes: 4 additions & 4 deletions .config/rumdl.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[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
# This is autogenerated from the `.qmd` version
"**/README.md",
# This has it's own structure
# This has its own structure
"**/LICENSE.md",
# `_badges.qmd` gets mangled by rumdl
"**/_badges.qmd",
]

# List style: `-`
Expand Down
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 0.7.0
_commit: 0.9.0
_src_path: gh:seedcase-project/t-squared
for_seedcase: true
github_repo: template-python-package
Expand Down
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ max_line_length = 88

# Have a bit shorter line length for text docs
[*.{txt,md,qmd}]
max_line_length = 72
max_line_length = 80

# Python always uses 4 spaces for tabs
[*.py]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
permissions: read-all

jobs:
build-deploy:
build-website:
runs-on: ubuntu-latest
# Stop builds from running more than one at a time, to save resources and also
# to limit conflicts when uploading to the hosting provider.
Expand Down
337 changes: 164 additions & 173 deletions CHANGELOG.md

Large diffs are not rendered by default.

35 changes: 16 additions & 19 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
# Contributor Code of Conduct

As contributors and maintainers of this project, we pledge to respect
all people who contribute through reporting issues, posting suggestions,
updating any material, submitting pull requests, and other activities.
As contributors and maintainers of this project, we pledge to respect all people
who contribute through reporting issues, posting suggestions, updating any
material, submitting pull requests, and other activities.

We are committed to making participation in this project a
harassment-free experience for everyone, regardless of level of
experience, gender, gender identity and expression, sexual orientation,
disability, personal appearance, body size, race, ethnicity, age, or
religion.
We are committed to making participation in this project a harassment-free
experience for everyone, regardless of level of experience, gender, gender
identity and expression, sexual orientation, disability, personal appearance,
body size, race, ethnicity, age, or religion.

Examples of unacceptable behavior by participants include the use of
sexual language or imagery, derogatory comments or personal attacks,
trolling, public or private harassment, insults, or other unprofessional
conduct.
Examples of unacceptable behavior by participants include the use of sexual
language or imagery, derogatory comments or personal attacks, trolling, public
or private harassment, insults, or other unprofessional conduct.

Project maintainers have the right and responsibility to remove, edit,
or reject comments, commits, code, wiki edits, issues, and other
contributions that are not aligned to this Code of Conduct. Project
maintainers who do not follow the Code of Conduct may be removed from
the project team.
Project maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct. Project maintainers who do not follow the
Code of Conduct may be removed from the project team.

Instances of abusive, harassing, or otherwise unacceptable behavior may
be reported by opening an issue or contacting one or more of the project
Instances of abusive, harassing, or otherwise unacceptable behavior may 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
Expand Down
138 changes: 68 additions & 70 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,106 +2,104 @@

## :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
new issue on our GitHub repository.
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 new issue on
our GitHub repository.

## :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
details on how we work and develop. It is a regularly evolving document,
so is at various states of completion.
[guidebook](https://guidebook.seedcase-project.org/) for more specific details
on how we work and develop. It is a regularly evolving document, so is at
various states of completion.

To contribute to `template-python-package`, you first need to install
[uv](https://docs.astral.sh/uv/) and
[justfile](https://just.systems/man/en/packages.html). We use uv and
justfile to manage our project, such as to run checks and test the
template. Both the uv and justfile websites have a more detailed guide
on using uv, but below are some simple instructions to get you started.
[justfile](https://just.systems/man/en/packages.html). We use uv and justfile to
manage our project, such as to run checks and test the template. Both the uv and
justfile websites have a more detailed guide on using uv, but below are some
simple instructions to get you started.

It's easiest to first
[install uv](https://docs.astral.sh/uv/getting-started/installation/)
and then install justfile with uv. Once you've installed uv, install
justfile by running:
[install uv](https://docs.astral.sh/uv/getting-started/installation/) and then
install justfile with uv. Once you've installed uv, install justfile by running:

``` bash
```bash
uv tool install rust-just
```

We keep all our development workflows in the `justfile`, so you can
explore it to see what commands are available. To see a list of commands
available, run:
We keep all our development workflows in the `justfile`, so you can explore it
to see what commands are available. To see a list of commands available, run:

``` bash
```bash
just
```

As you contribute, make sure your changes will pass our tests by opening
a terminal so that the working directory is the root of this project
As you contribute, make sure your changes will pass our tests by opening a
terminal so that the working directory is the root of this project
(`template-python-package/`) and running:

``` bash
```bash
just run-all
```

When testing the template, Copier can only use content kept in the Git
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 testing the template, Copier can only use content kept in the Git 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/)
as Git messages. Using this convention allows us to be able to
automatically create a release based on the commit message by using
as Git messages. Using this convention allows us to be able to automatically
create a release based on the commit message by using
[Cocogitto](https://decisions.seedcase-project.org/why-semantic-release-with-cocogitto/).
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 when merging pull requests, so all other commits in the pull
request will be squashed into one commit.
If you don't use Conventional Commits when making a commit, we will revise the
pull request title to follow that format. That's because we use squash merges
when merging pull requests, so all other commits in the pull request will be
squashed into one commit.

## :file_folder: Explanation of files and folders

This list describes the default files that are included in the template
as well as explains a bit more about them and what they are used for.

- `.copier-answers.yml`: Contains the answers you gave when copying the
project from the template.
**You should not modify this file directly.**
- `.github/`: Contains GitHub-specific files, such as the workflow to
build the website from the Markdown files.
- `_quarto.yml`: Quarto configuration file for the website, including
settings for the website, such as the theme, navigation, and other
options.
- `.gitignore`: This ignore file tells Git which files to not track.
Unless you know what you are doing, it's best to not touch this file.
- `.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.
- `CITATION.cff`: Structured citation metadata for your project when
archived on [Zenodo](https://zenodo.org/) and used by GitHub to
display the citation information on the repository page. This is used
to add the metadata to Zenodo when a GitHub release has been uploaded
to Zenodo.
- `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.
- `CONTRIBUTING.md`: Guidelines for contributing to the project.
- `.github/`: Contains GitHub-specific files, such as issue and pull
request templates, workflows,
This list describes the default files that are included in the template as well
as explains a bit more about them and what they are used for.

- `.copier-answers.yml`: Contains the answers you gave when copying the project
from the template. **You should not modify this file directly.**
- `.github/`: Contains GitHub-specific files, such as issue and pull request
templates, workflows,
[dependabot](https://docs.github.com/en/code-security/tutorials/secure-your-dependencies/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.
- `_metadata.yml`: Quarto metadata file for the website, including
information about the project, such as the titles and GitHub names.
- `.rumdl.toml`: [rumdl](https://rumdl.dev) configuration file for
formatting Markdown files in the project.
- `cog.toml`: [Cocogitto](https://docs.cocogitto.io) configuration file
for managing versions.
- `.config/cliff.toml`: [git-cliff](https://git-cliff.org) configuration
file for creating the changelog.
- `_metadata.yml`: Quarto metadata file for the website, including information
about the project, such as the titles and GitHub names.
- `_quarto.yml`: Quarto configuration file for the website, including settings
for the website, such as the theme, navigation, and other options.
- `_metadata.yml`: Quarto metadata file for the website, including information
about the project, such as the titles and GitHub names.
- `.gitignore`: This ignore file tells Git which files to not track. Unless you
know what you are doing, it's best to not touch this file.
- `.pre-commit-config.yaml`: [Pre-commit](https://pre-commit.com/) configuration
file for managing and running checks before each commit.
- `.config/`: Contains configuration files for various tools used in the
project, such as:
- `typos.toml`: [typos](https://github.com/crate-ci/typos) spell checker
configuration file.
- `rumdl.toml` and `panache.toml`: [rumdl](https://rumdl.dev) and
[Panache](https://panache.bz) configuration file for formatting Markdown
files in the project.
- `cog.toml`: [Cocogitto](https://docs.cocogitto.io) configuration file for
managing versions.
- `cliff.toml`: [git-cliff](https://git-cliff.org) configuration file for
creating the changelog.
- `.editorconfig`: Editor configuration file for
[EditorConfig](https://editorconfig.org/) to maintain consistent coding styles
across different editors and IDEs.
- `CITATION.cff`: Structured citation metadata for your project when archived on
[Zenodo](https://zenodo.org/) and used by GitHub to display the citation
information on the repository page. This is used to add the metadata to Zenodo
when a GitHub release has been uploaded to Zenodo.
- `justfile`: [`just`](https://just.systems/man/en/) configuration file for
scripting project tasks.
- `CHANGELOG.md`: Changelog file for tracking changes in the project.
- `CONTRIBUTING.md`: Guidelines for contributing to the project.
30 changes: 14 additions & 16 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,19 @@

Copyright (c) 2023-2026 template-python-package authors

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Loading
Loading