Skip to content

Commit

Permalink
Merge pull request #91 from openscm/changelog
Browse files Browse the repository at this point in the history
Update copier template
  • Loading branch information
znicholls authored Jan 30, 2024
2 parents 7667205 + 5e9054b commit 7caec47
Show file tree
Hide file tree
Showing 15 changed files with 333 additions and 75 deletions.
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: v0.4.1
_commit: v0.5.0
_src_path: /Users/znicholls/Documents/repos/copier-core-python-repository
email: zebedee.nicholls@climate-energy-college.org
initial_setup: true
Expand Down
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
name: Feature Request
about: Request a feature or suggest an idea for this project
title: ''
labels: feature-request
labels: feature
assignees: ''

---

## The motivation
Expand Down
9 changes: 5 additions & 4 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ runs:
shell: bash
run: |
# This line used to be needed, but seems to have been
# sorted with newer poetry versions. The check is whether
# the right version of python is shown below after running
# `poetry run which python` and whether the right version
# of python is used in the tests
# sorted with newer poetry versions. We can still check whether
# the right version of python is used by looking at the output of
# `poetry run which python` below and whether the right version
# of python is used in the tests (or whatever step is being done)
# poetry env use "python${{ inputs.python-version }}"
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
Expand All @@ -54,6 +54,7 @@ runs:
poetry install --no-interaction --no-root ${{ inputs.poetry-dependency-install-flags }}
# Now run same command but let the package install too
- name: Install package
# To ensure that the package is always installed, this step is run even if the cache was hit
if: ${{ inputs.run-poetry-install == 'true' }}
shell: bash
run: |
Expand Down
File renamed without changes.
17 changes: 12 additions & 5 deletions .github/workflows/bump.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,21 @@ jobs:
- name: Create bump and changelog

run: |
BASE_VERSION=`poetry version -s`
NEW_VERSION=`poetry version -s ${{ github.event.inputs.bump_rule }}`
poetry run towncrier build --yes --version v$NEW_VERSION
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "$CI_COMMIT_EMAIL"
# Bump
BASE_VERSION=`poetry version -s`
NEW_VERSION=`poetry version -s ${{ github.event.inputs.bump_rule }}`
echo "Bumping version $BASE_VERSION > $NEW_VERSION"
poetry run towncrier build --yes --version v$NEW_VERSION
git commit -a -m "bump: version $BASE_VERSION -> $NEW_VERSION"
git tag v$NEW_VERSION
# Bump to alpha (so that future commits do not have the same
# version as the tagged commit)
BASE_VERSION=`poetry version -s`
NEW_VERSION=`poetry version -s prerelease`
echo "Bumping version $BASE_VERSION > $NEW_VERSION"
git commit -a -m "bump(pre-release): version $BASE_VERSION > $NEW_VERSION"
git push && git push --tags
echo "Bumped to version $NEW_VERSION"
9 changes: 6 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@v3
- uses: ./.github/actions/setup
with:
os: ubuntu-latest
os: "ubuntu-latest"
python-version: "3.9"
venv-id: "docs"
poetry-dependency-install-flags: "--all-extras --only 'main,dev'"
Expand All @@ -31,7 +31,7 @@ jobs:
uses: actions/checkout@v3
- uses: ./.github/actions/setup
with:
os: ubuntu-latest
os: "ubuntu-latest"
python-version: "3.9"
venv-id: "docs"
poetry-dependency-install-flags: "--all-extras --only 'main,docs'"
Expand All @@ -52,7 +52,10 @@ jobs:
runs-on: "${{ matrix.os }}"
defaults:
run:
shell: bash # Need this for windows to not explode apparently
# This might be needed for Windows and doesn't seem to affect unix-based systems
# so we include it. If you have better proof of whether this is needed or not,
# feel free to update.
shell: bash
steps:
- name: Check out repository
uses: actions/checkout@v3
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# ruff
.ruff_cache

# Notebooks
*.ipynb

Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ endef
export PRINT_HELP_PYSCRIPT


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

Expand Down
3 changes: 3 additions & 0 deletions changelog/89.breaking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Updated to CICERO-SCM v1.1.1

This also removes the pin on Pandas when installing CICERO-SCM's python port
3 changes: 3 additions & 0 deletions changelog/91.trivial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Updated to use v0.5.0 of the copier template

This fixes up the docs theme and some other workflow bits and pieces.
10 changes: 9 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,16 @@ def _generate_module_rst_new(*args, **kwargs):
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

# Pick your theme for html output, we typically use the read the docs theme
html_theme = "sphinx_rtd_theme"
html_theme = "sphinx_book_theme"
html_static_path = ["_static"]
html_theme_options = {
"repository_url": "https://github.com/openscm/openscm-runner",
"repository_branch": "main",
"path_to_docs": "docs/source",
"use_repository_button": True,
"use_issues_button": True,
"use_edit_page_button": True,
}


# Ignore ipynb files when building (see https://github.com/executablebooks/MyST-NB/issues/363).
Expand Down
28 changes: 28 additions & 0 deletions docs/source/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,34 @@
# Development

Notes for developers. If you want to get involved, please do!
We welcome all kinds of contributions, for example:

- docs fixes/clarifications
- bug reports
- bug fixes
- feature requests
- pull requests
- tutorials

## Workflows

<!---
This section is auto-generated by the copier template
and the text below is just a placeholder to get you started.
The workflows section will likely need to be updated
to be project specific as the project's norms are established.
-->

We don't mind whether you use a branching or forking workflow.
However, please only push to your own branches,
pushing to other people's branches is often a recipe for disaster,
is never required in our experience
so is best avoided.

Try and keep your merge requests as small as possible
(focus on one thing if you can).
This makes life much easier for reviewers
which allows contributions to be accepted at a faster rate.

## Language

Expand Down
Loading

0 comments on commit 7caec47

Please sign in to comment.