Skip to content

Commit 622a359

Browse files
committed
Update copier template
1 parent 28bde41 commit 622a359

File tree

13 files changed

+327
-75
lines changed

13 files changed

+327
-75
lines changed

.copier-answers.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2-
_commit: v0.4.1
2+
_commit: v0.5.0
33
_src_path: /Users/znicholls/Documents/repos/copier-core-python-repository
44
55
initial_setup: true

.github/ISSUE_TEMPLATE/feature_request.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
name: Feature Request
33
about: Request a feature or suggest an idea for this project
44
title: ''
5-
labels: feature-request
5+
labels: feature
66
assignees: ''
7+
78
---
89

910
## The motivation

.github/actions/setup/action.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ runs:
4040
shell: bash
4141
run: |
4242
# This line used to be needed, but seems to have been
43-
# sorted with newer poetry versions. The check is whether
44-
# the right version of python is shown below after running
45-
# `poetry run which python` and whether the right version
46-
# of python is used in the tests
43+
# sorted with newer poetry versions. We can still check whether
44+
# the right version of python is used by looking at the output of
45+
# `poetry run which python` below and whether the right version
46+
# of python is used in the tests (or whatever step is being done)
4747
# poetry env use "python${{ inputs.python-version }}"
4848
poetry config virtualenvs.create true
4949
poetry config virtualenvs.in-project true
@@ -54,6 +54,7 @@ runs:
5454
poetry install --no-interaction --no-root ${{ inputs.poetry-dependency-install-flags }}
5555
# Now run same command but let the package install too
5656
- name: Install package
57+
# To ensure that the package is always installed, this step is run even if the cache was hit
5758
if: ${{ inputs.run-poetry-install == 'true' }}
5859
shell: bash
5960
run: |
File renamed without changes.

.github/workflows/bump.yaml

+12-5
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,21 @@ jobs:
4747
- name: Create bump and changelog
4848

4949
run: |
50-
BASE_VERSION=`poetry version -s`
51-
NEW_VERSION=`poetry version -s ${{ github.event.inputs.bump_rule }}`
52-
poetry run towncrier build --yes --version v$NEW_VERSION
53-
5450
git config --global user.name "$GITHUB_ACTOR"
5551
git config --global user.email "$CI_COMMIT_EMAIL"
5652
53+
# Bump
54+
BASE_VERSION=`poetry version -s`
55+
NEW_VERSION=`poetry version -s ${{ github.event.inputs.bump_rule }}`
56+
echo "Bumping version $BASE_VERSION > $NEW_VERSION"
57+
poetry run towncrier build --yes --version v$NEW_VERSION
5758
git commit -a -m "bump: version $BASE_VERSION -> $NEW_VERSION"
5859
git tag v$NEW_VERSION
60+
61+
# Bump to alpha (so that future commits do not have the same
62+
# version as the tagged commit)
63+
BASE_VERSION=`poetry version -s`
64+
NEW_VERSION=`poetry version -s prerelease`
65+
echo "Bumping version $BASE_VERSION > $NEW_VERSION"
66+
git commit -a -m "bump(pre-release): version $BASE_VERSION > $NEW_VERSION"
5967
git push && git push --tags
60-
echo "Bumped to version $NEW_VERSION"

.github/workflows/ci.yaml

+6-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
uses: actions/checkout@v3
1717
- uses: ./.github/actions/setup
1818
with:
19-
os: ubuntu-latest
19+
os: "ubuntu-latest"
2020
python-version: "3.9"
2121
venv-id: "docs"
2222
poetry-dependency-install-flags: "--all-extras --only 'main,dev'"
@@ -31,7 +31,7 @@ jobs:
3131
uses: actions/checkout@v3
3232
- uses: ./.github/actions/setup
3333
with:
34-
os: ubuntu-latest
34+
os: "ubuntu-latest"
3535
python-version: "3.9"
3636
venv-id: "docs"
3737
poetry-dependency-install-flags: "--all-extras --only 'main,docs'"
@@ -52,7 +52,10 @@ jobs:
5252
runs-on: "${{ matrix.os }}"
5353
defaults:
5454
run:
55-
shell: bash # Need this for windows to not explode apparently
55+
# This might be needed for Windows and doesn't seem to affect unix-based systems
56+
# so we include it. If you have better proof of whether this is needed or not,
57+
# feel free to update.
58+
shell: bash
5659
steps:
5760
- name: Check out repository
5861
uses: actions/checkout@v3

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# ruff
2+
.ruff_cache
3+
14
# Notebooks
25
*.ipynb
36

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ endef
1818
export PRINT_HELP_PYSCRIPT
1919

2020

21+
.PHONY: help
2122
help: ## print short description of each target
2223
@python3 -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
2324

docs/source/conf.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,16 @@ def _generate_module_rst_new(*args, **kwargs):
143143
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
144144

145145
# Pick your theme for html output, we typically use the read the docs theme
146-
html_theme = "sphinx_rtd_theme"
146+
html_theme = "sphinx_book_theme"
147147
html_static_path = ["_static"]
148+
html_theme_options = {
149+
"repository_url": "https://github.com/openscm/openscm-runner",
150+
"repository_branch": "main",
151+
"path_to_docs": "docs/source",
152+
"use_repository_button": True,
153+
"use_issues_button": True,
154+
"use_edit_page_button": True,
155+
}
148156

149157

150158
# Ignore ipynb files when building (see https://github.com/executablebooks/MyST-NB/issues/363).

docs/source/development.md

+28
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,34 @@
22
# Development
33

44
Notes for developers. If you want to get involved, please do!
5+
We welcome all kinds of contributions, for example:
6+
7+
- docs fixes/clarifications
8+
- bug reports
9+
- bug fixes
10+
- feature requests
11+
- pull requests
12+
- tutorials
13+
14+
## Workflows
15+
16+
<!---
17+
This section is auto-generated by the copier template
18+
and the text below is just a placeholder to get you started.
19+
The workflows section will likely need to be updated
20+
to be project specific as the project's norms are established.
21+
-->
22+
23+
We don't mind whether you use a branching or forking workflow.
24+
However, please only push to your own branches,
25+
pushing to other people's branches is often a recipe for disaster,
26+
is never required in our experience
27+
so is best avoided.
28+
29+
Try and keep your merge requests as small as possible
30+
(focus on one thing if you can).
31+
This makes life much easier for reviewers
32+
which allows contributions to be accepted at a faster rate.
533

634
## Language
735

0 commit comments

Comments
 (0)