Skip to content

Commit 7caec47

Browse files
authored
Merge pull request #91 from openscm/changelog
Update copier template
2 parents 7667205 + 5e9054b commit 7caec47

15 files changed

Lines changed: 333 additions & 75 deletions

File tree

.copier-answers.yml

Lines changed: 1 addition & 1 deletion
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
email: zebedee.nicholls@climate-energy-college.org
55
initial_setup: true

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 2 additions & 1 deletion
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

Lines changed: 5 additions & 4 deletions
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: |

.github/workflows/bump.yaml

Lines changed: 12 additions & 5 deletions
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

Lines changed: 6 additions & 3 deletions
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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# ruff
2+
.ruff_cache
3+
14
# Notebooks
25
*.ipynb
36

Makefile

Lines changed: 1 addition & 0 deletions
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

changelog/89.breaking.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Updated to CICERO-SCM v1.1.1
2+
3+
This also removes the pin on Pandas when installing CICERO-SCM's python port

changelog/91.trivial.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Updated to use v0.5.0 of the copier template
2+
3+
This fixes up the docs theme and some other workflow bits and pieces.

0 commit comments

Comments
 (0)