Skip to content

Commit 7c15c71

Browse files
author
Ware, Joseph (DLSLtd,RAL,LSCI)
committed
Merge branch 'main' into debug-services
2 parents 586ae06 + 242d289 commit 7c15c71

File tree

17 files changed

+98
-82
lines changed

17 files changed

+98
-82
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ updates:
1313
actions:
1414
patterns:
1515
- "*"
16+
commit-message:
17+
prefix: "chore"
1618

1719
- package-ecosystem: "pip"
1820
directory: "/"
@@ -22,3 +24,5 @@ updates:
2224
dev-dependencies:
2325
patterns:
2426
- "*"
27+
commit-message:
28+
prefix: "chore"

.github/workflows/_check.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,19 @@ name: CI
22

33
on:
44
push:
5+
branches:
6+
- main
7+
tags:
8+
- '*'
59
pull_request:
610

711
jobs:
8-
check:
9-
uses: ./.github/workflows/_check.yml
10-
1112
lint:
12-
needs: check
13-
if: needs.check.outputs.branch-pr == ''
1413
uses: ./.github/workflows/_tox.yml
1514
with:
1615
tox: pre-commit
1716

1817
test:
19-
needs: check
20-
if: needs.check.outputs.branch-pr == ''
2118
uses: ./.github/workflows/_test.yml
2219
with:
2320
python-version: dev
@@ -26,8 +23,6 @@ jobs:
2623
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2724

2825
docs:
29-
needs: check
30-
if: needs.check.outputs.branch-pr == ''
3126
uses: ./.github/workflows/_docs.yml
3227
permissions:
3328
contents: write

.github/workflows/pr.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: PR Conventional Commit Validation
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, edited]
6+
7+
jobs:
8+
validate-pr-title:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: PR Conventional Commit Validation
12+
uses: ytanikin/[email protected]
13+
with:
14+
task_types: '["feat","fix","docs","test","ci","refactor","perf","chore","revert"]'
15+
add_label: 'false'

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.5.0
3+
rev: v5.0.0
44
hooks:
55
- id: check-added-large-files
66
- id: check-yaml

.vscode/launch.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
"debug-test"
1515
],
1616
"console": "integratedTerminal",
17-
"env": {
18-
// Enable break on exception when debugging tests (see: tests/conftest.py)
19-
"PYTEST_RAISE": "1",
20-
},
2117
}
2218
]
2319
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Visit <https://dev-portal.diamond.ac.uk/create> and you will see a list of templ
4343

4444
## Create a new project from the commandline
4545

46-
You will need to `pip install copier` inside an activated `venv` from python3.10 or later, then you can create a new module via:
46+
You will need to `pip install copier` inside an activated `venv` from python3.11 or later, then you can create a new module via:
4747

4848
```
4949
mkdir /path/to/my-project
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# 21. Run CI on pull requests and main branch only
2+
3+
Date: 2025-05-06
4+
5+
## Status
6+
7+
Accepted
8+
9+
## Context
10+
11+
CI has been being run on branches that do not have open pull requests, which has: added spurious jobs to the organisation's compute limit; made workflow definitions more complex; made the results page harder to parse; and allowed known working development branches to become stale or forgotten.
12+
13+
Running CI only on branches that have open pull requests will: reduce compute jobs created for code that is known to not be working; simplify workflow definitions; simplify the CI results page; encourage early creation of pull requests, adding visibility to development.
14+
15+
Draft pull requests will still have CI jobs run, ensuring that code quality is maintained while allowing reviewers to ignore changes that are not ready for human review.
16+
17+
## Decision
18+
19+
CI will only be run on all PRs when changes are made, and on the main branch when PRs are merged into it: not on branches that do not have open PRs.
20+
Opening a draft PR will allow CI to be run, with the understanding that the PR may not be ready for review.
21+
22+
## Consequences
23+
24+
The `check` job will be removed and CI will run on all PRs and on the `main` branch.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# 21. Semantic Versioning and Conventional Commits
2+
3+
Date: 2025-04-07
4+
5+
## Status
6+
7+
Proposed
8+
9+
## Context
10+
11+
The template is in a period of both upheaval and uptake, where new users may adopt its use amidst major version changes.
12+
To give some certainty to users, we should document changes and highlight important ones.
13+
As dependency management becomes more automated, we should ensure that semantic versioning is used accurately, and make allowances for automation.
14+
15+
## Decision
16+
17+
Commits to the default branch of the copier template should be made using [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/), and the Conventional Commit standard should be used to identify the next released version and create changelogs/release notes.
18+
19+
## Consequences
20+
21+
A [GitHub Action](https://github.com/ytanikin/PRConventionalCommits) has been configured to ensure that PRs may not be merged without being in the form of a Conventional Commit.
22+
PRs will be squash-and-merged, with the complete git history of the change preserved in the PR but only a single commit on the default branch.
23+
PR commit messages will be taken from the title and body of the PR, ensuring that the commit will be compatible with the standard.
24+
Tooling (dependabot etc.) will be configured to make compatible PRs.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# 22. Follow NEP 0029 release cycle
2+
3+
Date: 2025-05-09
4+
5+
## Status
6+
7+
Proposed
8+
9+
## Context
10+
11+
The scientific Python ecosystem, whilst continuing to move to benefit from new Python features, must maintain support for existing projects and provide a reasonable time-frame and predictability for breaking changes. Multiple libraries therefore make use of the [NEP-0029 deprecation policy](https://numpy.org/neps/nep-0029-deprecation_policy.html). We should follow suite.
12+
13+
## Decision
14+
15+
This template will follow the NEP-0029 deprecation policy.
16+
17+
## Consequences
18+
19+
The matrix of supported Python versions will be periodically updated to those expected by the policy. When versions of Python are dropped, this will be considered a Major change for the purposes of Semantic Versioning and ADR #21.

0 commit comments

Comments
 (0)