Skip to content

Commit

Permalink
update to copier template 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Feb 21, 2024
1 parent 1c6b7ff commit 45101d4
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 28 deletions.
3 changes: 2 additions & 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
_commit: 1.0.2-87-g16b7b0e
_commit: 1.3.0
_src_path: gh:DiamondLightSource/python-copier-template
author_email: giles.knap@diamond.ac.uk
author_name: Giles Knap
Expand All @@ -13,3 +13,4 @@ git_platform: github.com
github_org: DiamondLightSource
package_name: dls_pmac_control
repo_name: dls-pmac-control
type_checker: mypy
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ same or is improved by a pull request!
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.

This project was created using the [Diamond Light Source Copier Template](https://github.com/DiamondLightSource/python-copier-template) for Python projects.
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
should follow.

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).
2 changes: 1 addition & 1 deletion .github/workflows/_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
pip-install: ".[dev]"

- name: Run tests
run: tox -e pytest
run: tox -e tests

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
if: needs.check.outputs.branch-pr == ''
uses: ./.github/workflows/_tox.yml
with:
tox: pre-commit,pyright
tox: pre-commit,type-checking

test:
needs: check
Expand Down
6 changes: 0 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,6 @@
},
"check_switcher": False,
"navbar_end": ["theme-switcher", "icon-links", "version-switcher"],
"external_links": [
{
"name": "Release Notes",
"url": f"https://github.com/{github_user}/{github_repo}/releases",
}
],
"navigation_with_keys": False,
}

Expand Down
12 changes: 3 additions & 9 deletions docs/explanations/decisions.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
% This Source Code Form is subject to the terms of the Mozilla Public

% License, v. 2.0. If a copy of the MPL was not distributed with this

% file, You can obtain one at http://mozilla.org/MPL/2.0/.

# Architectural Decision Records

We record major architectural decisions in Architecture Decision Records (ADRs),
as [described by Michael Nygard](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions).
Below is the list of our current ADRs.
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.

```{toctree}
:glob: true
:maxdepth: 1
decisions/*
```

For more information on ADRs see this [blog by Michael Nygard](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions).
19 changes: 19 additions & 0 deletions docs/explanations/decisions/COPYME
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 3. Short descriptive title

Date: Today's date

## Status

Accepted

## Context

Background to allow us to make the decision, to show how we arrived at our conclusions.

## Decision

What decision we made.

## Consequences

What we will do as a result of this decision.
2 changes: 1 addition & 1 deletion docs/how-to/run-container.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Run in a container

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

## Starting the container
Expand Down
1 change: 1 addition & 0 deletions docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ Technical reference material including APIs and release notes.
reference/*
genindex
Release Notes <https://github.com/DiamondLightSource/dls-pmac-control/releases>
```
14 changes: 7 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ requires-python = ">=3.9"
dev = [
"copier",
"mock",
"mypy",
"myst-parser",
"pipdeptree",
"pre-commit",
Expand Down Expand Up @@ -53,8 +54,8 @@ name = "Giles Knap"
[tool.setuptools_scm]
write_to = "src/dls_pmac_control/_version.py"

[tool.pyright]
reportMissingImports = false # Ignore missing stubs in imported modules
[tool.mypy]
ignore_missing_imports = true # Ignore missing stubs in imported modules

[tool.pytest.ini_options]
# Run pytest with all our checkers, and don't spam us with massive tracebacks on error
Expand All @@ -80,21 +81,20 @@ legacy_tox_ini = """
[tox]
skipsdist=True
[testenv:{pre-commit,pyright,pytest,docs}]
[testenv:{pre-commit,type-checking,tests,docs}]
# Don't create a virtualenv for the command, requires tox-direct plugin
direct = True
passenv = *
allowlist_externals =
pytest
pre-commit
pyright
mypy
sphinx-build
sphinx-autobuild
commands =
pytest: pytest --cov=dls_pmac_control --cov-report term --cov-report xml:cov.xml {posargs}
# TODO: pyright disabled becaue pyQT gives 290 errors - will investigate
# pyright: pyright src {posargs}
pre-commit: pre-commit run --all-files {posargs}
type-checking: mypy src tests {posargs}
tests: pytest --cov=dls_pmac_control --cov-report term --cov-report xml:cov.xml {posargs}
docs: sphinx-{posargs:build -EW --keep-going} -T docs build/html
"""

Expand Down

0 comments on commit 45101d4

Please sign in to comment.