Skip to content

Commit a9170e6

Browse files
authored
Merge pull request #27 from DiamondLightSource/copier-template
update to copier template 1.3.0
2 parents 454132a + 45101d4 commit a9170e6

File tree

10 files changed

+37
-28
lines changed

10 files changed

+37
-28
lines changed

.copier-answers.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: 1.0.2-87-g16b7b0e
2+
_commit: 1.3.0
33
_src_path: gh:DiamondLightSource/python-copier-template
44
author_email: [email protected]
55
author_name: Giles Knap
@@ -13,3 +13,4 @@ git_platform: github.com
1313
github_org: DiamondLightSource
1414
package_name: dls_pmac_control
1515
repo_name: dls-pmac-control
16+
type_checker: mypy

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ same or is improved by a pull request!
2323
It is recommended that developers use a [vscode devcontainer](https://code.visualstudio.com/docs/devcontainers/containers). This repository contains configuration to set up a containerized development environment that suits its own needs.
2424

2525
This project was created using the [Diamond Light Source Copier Template](https://github.com/DiamondLightSource/python-copier-template) for Python projects.
26-
The template's [Developer Guide](https://diamondlightsource.github.io/python-copier-template) contains detailed information on setting up a development environment, running the tests and what standards the code and documentation
27-
should follow.
26+
27+
For more information on common tasks like setting up a developer environment, running the tests, and setting a pre-commit hook, see the template's [How-to guides](https://diamondlightsource.github.io/python-copier-template/1.3.0/how-to.html).

.github/workflows/_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
pip-install: ".[dev]"
5353

5454
- name: Run tests
55-
run: tox -e pytest
55+
run: tox -e tests
5656

5757
- name: Upload coverage to Codecov
5858
uses: codecov/codecov-action@v4

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
if: needs.check.outputs.branch-pr == ''
1414
uses: ./.github/workflows/_tox.yml
1515
with:
16-
tox: pre-commit,pyright
16+
tox: pre-commit,type-checking
1717

1818
test:
1919
needs: check

docs/conf.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,6 @@
160160
},
161161
"check_switcher": False,
162162
"navbar_end": ["theme-switcher", "icon-links", "version-switcher"],
163-
"external_links": [
164-
{
165-
"name": "Release Notes",
166-
"url": f"https://github.com/{github_user}/{github_repo}/releases",
167-
}
168-
],
169163
"navigation_with_keys": False,
170164
}
171165

docs/explanations/decisions.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
1-
% This Source Code Form is subject to the terms of the Mozilla Public
2-
3-
% License, v. 2.0. If a copy of the MPL was not distributed with this
4-
5-
% file, You can obtain one at http://mozilla.org/MPL/2.0/.
6-
71
# Architectural Decision Records
82

9-
We record major architectural decisions in Architecture Decision Records (ADRs),
10-
as [described by Michael Nygard](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions).
11-
Below is the list of our current ADRs.
3+
Architectural decisions are made throughout a project's lifetime. As a way of keeping track of these decisions, we record these decisions in Architecture Decision Records (ADRs) listed below.
124

135
```{toctree}
146
:glob: true
157
:maxdepth: 1
168
179
decisions/*
1810
```
11+
12+
For more information on ADRs see this [blog by Michael Nygard](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions).

docs/explanations/decisions/COPYME

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# 3. Short descriptive title
2+
3+
Date: Today's date
4+
5+
## Status
6+
7+
Accepted
8+
9+
## Context
10+
11+
Background to allow us to make the decision, to show how we arrived at our conclusions.
12+
13+
## Decision
14+
15+
What decision we made.
16+
17+
## Consequences
18+
19+
What we will do as a result of this decision.

docs/how-to/run-container.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Run in a container
22

3-
Pre-built containers with {\{repo_name}} and its dependencies already
3+
Pre-built containers with dls-pmac-control and its dependencies already
44
installed are available on [Github Container Registry](https://ghcr.io/DiamondLightSource/dls-pmac-control).
55

66
## Starting the container

docs/reference.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ Technical reference material including APIs and release notes.
88
99
reference/*
1010
genindex
11+
Release Notes <https://github.com/DiamondLightSource/dls-pmac-control/releases>
1112
```

pyproject.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ requires-python = ">=3.9"
2323
dev = [
2424
"copier",
2525
"mock",
26+
"mypy",
2627
"myst-parser",
2728
"pipdeptree",
2829
"pre-commit",
@@ -53,8 +54,8 @@ name = "Giles Knap"
5354
[tool.setuptools_scm]
5455
write_to = "src/dls_pmac_control/_version.py"
5556

56-
[tool.pyright]
57-
reportMissingImports = false # Ignore missing stubs in imported modules
57+
[tool.mypy]
58+
ignore_missing_imports = true # Ignore missing stubs in imported modules
5859

5960
[tool.pytest.ini_options]
6061
# Run pytest with all our checkers, and don't spam us with massive tracebacks on error
@@ -80,21 +81,20 @@ legacy_tox_ini = """
8081
[tox]
8182
skipsdist=True
8283
83-
[testenv:{pre-commit,pyright,pytest,docs}]
84+
[testenv:{pre-commit,type-checking,tests,docs}]
8485
# Don't create a virtualenv for the command, requires tox-direct plugin
8586
direct = True
8687
passenv = *
8788
allowlist_externals =
8889
pytest
8990
pre-commit
90-
pyright
91+
mypy
9192
sphinx-build
9293
sphinx-autobuild
9394
commands =
94-
pytest: pytest --cov=dls_pmac_control --cov-report term --cov-report xml:cov.xml {posargs}
95-
# TODO: pyright disabled becaue pyQT gives 290 errors - will investigate
96-
# pyright: pyright src {posargs}
9795
pre-commit: pre-commit run --all-files {posargs}
96+
type-checking: mypy src tests {posargs}
97+
tests: pytest --cov=dls_pmac_control --cov-report term --cov-report xml:cov.xml {posargs}
9898
docs: sphinx-{posargs:build -EW --keep-going} -T docs build/html
9999
"""
100100

0 commit comments

Comments
 (0)