Skip to content

Commit dae1e9a

Browse files
authored
Merge branch 'main' into build/delete-ref-folder
2 parents f269d70 + f5cfa42 commit dae1e9a

37 files changed

+804
-521
lines changed

.cz.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tool.commitizen]
2-
version = "0.15.7"
2+
version = "0.15.9"
33
bump_message = "build(version): :bookmark: update version from $current_version to $new_version"
44
version_schema = "semver"
55
version_provider = "commitizen"

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ updates:
33
- package-ecosystem: github-actions
44
directory: /
55
schedule:
6-
interval: monthly
6+
interval: weekly
77
commit-message:
88
prefix: ci
99
include: scope

.github/workflows/release-project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions: read-all
1111
jobs:
1212
release:
1313
# This job outputs env variables `previous_version` and `current_version`.
14-
# Only give permissions for this job.
14+
# The workflow needs write permissions for `GITHUB_TOKEN` to create a release.
1515
permissions:
1616
contents: write
1717
uses: seedcase-project/.github/.github/workflows/reusable-release-project.yml@main

.github/workflows/test.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Test template creation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
# Least privilege permissions
10+
permissions: read-all
11+
12+
jobs:
13+
test-copier:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
18+
19+
- name: Set up uv
20+
uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b
21+
with:
22+
enable-cache: true
23+
24+
- name: Set up Quarto
25+
uses: quarto-dev/quarto-actions/setup@9e48da27e184aa238fcb49f5db75469626d43adb # v2.1.9
26+
27+
- name: Install justfile
28+
run: sudo apt install -y just
29+
30+
- name: Set Git user
31+
run: |
32+
git config --global user.name "GitHub Actions"
33+
git config --global user.email "[email protected]"
34+
35+
- name: Test and check template creation
36+
run: just _tests

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ repos:
2525
# sub-packages, which confuses pre-commit when it tries to find the latest
2626
# version
2727
- repo: https://github.com/adhtruong/mirrors-typos
28-
rev: v1.35.3
28+
rev: v1.35.5
2929
hooks:
3030
- id: typos

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.re
2121

2222
This repository contains a [copier](https://copier.readthedocs.io/)
2323
template for setting up a new repository for a Python package. Along
24-
with a structured directory layout, this template includes configured
25-
development tools, CI configuration, and supporting files for package
26-
setup, publishing, and maintenance.
24+
with a structured directory layout, this template includes
25+
configurations for tools that improve developer experience, continuous
26+
integration and delivery workflows, and supporting files for building
27+
robust Python packages.
2728

2829
Check out our
2930
[website](https://template-python-package.seedcase-project.org/) for

README.qmd

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ metadata-files:
1313

1414
This repository contains a [copier](https://copier.readthedocs.io/)
1515
template for setting up a new repository for a Python package. Along
16-
with a structured directory layout, this template includes configurations
17-
for tools that improve developer experience, continuous integration and
18-
delivery workflows, and supporting files for building robust Python packages.
16+
with a structured directory layout, this template includes
17+
configurations for tools that improve developer experience, continuous
18+
integration and delivery workflows, and supporting files for building
19+
robust Python packages.
1920

2021
Check out our
2122
[website](https://{{< meta gh.repo >}}.{{< meta gh.org >}}.org/) for

_contributors.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
These are the people who have contributed by submitting changes through pull requests :tada:
22

33

4-
[\@lwjohnst86](https://github.com/lwjohnst86), [\@signekb](https://github.com/signekb), [\@martonvago](https://github.com/martonvago)
4+
[\@lwjohnst86](https://github.com/lwjohnst86), [\@martonvago](https://github.com/martonvago), [\@signekb](https://github.com/signekb)

_extensions/seedcase-project/seedcase-theme/_extension.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
title: seedcase-theme
22
author: Luke W. Johnston
3-
version: 0.1.0
4-
quarto-required: ">=1.2.0"
3+
version: 0.4.1
4+
quarto-required: ">=1.7.0"
55
contributes:
66
formats:
77
common:
@@ -27,6 +27,7 @@ contributes:
2727
location: navbar
2828
type: textbox
2929
navbar:
30+
pinned: true
3031
background: light
3132
logo: logos/navbar-logo-seedcase-project.svg
3233
logo-alt: "Seedcase Project logo: Main page"
@@ -43,7 +44,5 @@ contributes:
4344
href: https://seedcase-project.org/#acknowledgements
4445

4546
csl: vancouver.csl
46-
4747
format: seedcase-theme-html
48-
4948
brand: _brand.yml

copier.yaml

Lines changed: 45 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,31 @@ _tasks:
99
# Message to show after generating or regenerating the project successfully
1010
_message_after_copy: |
1111
12-
Your project "{{ package_name }}" has been created successfully!
12+
Your project "{{ github_repo }}" has been created successfully!
1313
14-
Next steps:
14+
See the [guide](https://template-python-package.seedcase-project.org/docs/guide) for more detail
15+
on the next steps. Briefly:
1516
1617
1. Change directory to the project root:
1718
18-
$ cd {{ _copier_conf.dst_path }}
19+
``` bash
20+
cd {{ _copier_conf.dst_path | realpath }}
21+
```
1922
20-
2. Install the pre-commit hooks:
23+
2. Install the pre-commit hooks, add (called "update" here) the Quarto extension,
24+
and build the README:
2125
22-
$ just install-precommit
26+
``` bash
27+
just install-precommit update-quarto-theme build-readme
28+
```
2329
24-
3. Install [`spaid`](https://github.com/seedcase-project/spaid) and run these commands to upload and configure your project on GitHub:
30+
3. Install [`spaid`](https://github.com/seedcase-project/spaid) and run these setup steps:
2531
26-
$ spaid_gh_create_repo_from_local -h
27-
$ spaid_gh_set_repo_settings -h
28-
$ spaid_gh_ruleset_basic_protect_main -h
32+
``` bash
33+
spaid_gh_create_repo_from_local -h
34+
spaid_gh_set_repo_settings -h
35+
spaid_gh_ruleset_basic_protect_main -h
36+
```
2937
3038
4. Configure GitHub following this
3139
[guide](https://guidebook.seedcase-project.org/operations/security#using-github-apps-to-generate-tokens):
@@ -37,46 +45,37 @@ _message_after_copy: |
3745
3846
5. List and complete all TODO items in the repository:
3947
40-
$ just list-todos
48+
``` bash
49+
just list-todos
50+
```
4151
4252
# Questions:
43-
package_github_repo:
44-
type: str
45-
help: "What is or will be the GitHub repository spec for the project?"
46-
placeholder: "user/repo"
47-
validator: |
48-
{% if package_github_repo and not (package_github_repo | regex_search('^[\w.-]+\/[\w.-]+$')) %}
49-
Must be in the format `user/repo` and contain only alphanumeric characters and `_`, `-`, or `.`.
50-
{% endif %}
53+
is_seedcase_project:
54+
type: bool
55+
help: "Is this package part of the Seedcase Project?"
56+
default: true
5157

52-
github_user:
58+
github_repo:
5359
type: str
54-
default: "{{ package_github_repo.split('/')[0] if package_github_repo else '' }}"
60+
default: "{{ _copier_conf.dst_path | realpath | basename }}"
5561
when: false
5662

57-
package_name:
63+
github_user:
5864
type: str
59-
help: "What is the name of the package?"
60-
default: "{{ _copier_conf.dst_path | basename }}"
61-
validator: |
62-
{% if package_name and not (package_name | regex_search('^[\w.-]+$')) %}
63-
Must contain only alphanumeric characters and `_`, `-`, or `.`.
64-
{% endif %}
65+
help: "What is the name of the GitHub user or organisation where the repository will be or is stored?"
66+
default: "{{ 'seedcase-project' if is_seedcase_project else '' }}"
6567

66-
package_name_snake_case:
68+
hosting_provider:
6769
type: str
68-
default: "{{package_name | replace('-', '_') | replace('.', '_')}}"
69-
when: false
70-
71-
is_seedcase_project:
72-
type: bool
73-
help: "Is this package part of the Seedcase Project?"
74-
default: "{{ github_user == 'seedcase-project' }}"
70+
help: "What hosting provider will you use for the documentation website?"
71+
choices:
72+
- netlify
73+
- gh-pages
7574

7675
homepage:
7776
type: str
7877
help: "What is the homepage of your project?"
79-
default: "{{ 'https://%s.seedcase-project.org' % package_name if is_seedcase_project else '' }}"
78+
default: "{{ 'https://%s.seedcase-project.org' % github_repo if is_seedcase_project else '' }}"
8079

8180
author_given_name:
8281
type: str
@@ -103,6 +102,16 @@ github_board_number:
103102
The board number must be an integer.
104103
{% endif %}
105104
105+
github_repo_snake_case:
106+
type: str
107+
default: "{{github_repo | replace('-', '_') | replace('.', '_')}}"
108+
when: false
109+
110+
github_repo_spec:
111+
type: str
112+
default: "{{ github_user }}/{{ github_repo }}"
113+
when: false
114+
106115
copyright_year:
107116
type: str
108117
default: "{{ copyright_year | default('%Y' | strftime) }}"

0 commit comments

Comments
 (0)