Skip to content

Commit a0d6b7c

Browse files
authored
Merge pull request #5 from 56kyle/develop
Develop
2 parents af0fd99 + 7dd6d70 commit a0d6b7c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1872
-1226
lines changed

.github/workflows/constraints.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
pip==23.0.1
1+
pip==23.2.1
22
cookiecutter==2.1.1
33
cutty==0.18.0
44
nox==2022.11.21
55
nox-poetry==1.0.2
6-
poetry==1.3.2
6+
poetry==1.6.1
77
pre-commit==3.1.0
8-
virtualenv==20.14.1
8+
virtualenv==20.25.0

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ jobs:
88
- uses: actions/checkout@v3
99
- uses: actions/[email protected]
1010
with:
11-
python-version: "3.8"
11+
python-version: "3.9"
1212
- run: |
1313
pip install --constraint=.github/workflows/constraints.txt pip
1414
pip install --constraint=.github/workflows/constraints.txt nox
1515
- name: Build documentation
1616
run: nox --force-color --session=docs
17-
- uses: actions/upload-artifact@v3
17+
- uses: actions/upload-artifact@v4
1818
with:
1919
name: docs
2020
path: docs/_build

.github/workflows/tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ jobs:
66
fail-fast: false
77
matrix:
88
include:
9+
- { python-version: "3.12", os: ubuntu-latest }
10+
- { python-version: "3.12", os: windows-latest }
11+
- { python-version: "3.12", os: macos-latest }
12+
- { python-version: "3.11", os: ubuntu-latest }
913
- { python-version: "3.10", os: ubuntu-latest }
10-
- { python-version: "3.10", os: windows-latest }
11-
- { python-version: "3.10", os: macos-latest }
1214
- { python-version: "3.9", os: ubuntu-latest }
13-
- { python-version: "3.8", os: ubuntu-latest }
14-
- { python-version: "3.7", os: ubuntu-latest }
1515
name: Python ${{ matrix.python-version }} (${{ matrix.os }})
1616
runs-on: ${{ matrix.os }}
1717
steps:

.github/workflows/update-instance.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
repository: "cjolowicz/${{ env.PROJECT }}"
2222
path: ${{ env.PROJECT }}
2323
token: ${{ secrets.X_GITHUB_TOKEN }}
24-
- name: Set up Python 3.10
24+
- name: Set up Python 3.12
2525
uses: actions/[email protected]
2626
with:
27-
python-version: "3.10"
27+
python-version: "3.12"
2828
- name: Install cutty
2929
working-directory: ${{ env.TEMPLATE }}
3030
run: |

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Request features on the [Issue Tracker].
3232

3333
## How to set up your development environment
3434

35-
You need Python 3.7+ and the following tools:
35+
You need Python 3.9+ and the following tools:
3636

3737
- [Cookiecutter]
3838
- [Poetry]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ cookiecutter gh:cjolowicz/cookiecutter-hypermodern-python --checkout=2022.6.3
7878
- Generate command-line reference with [sphinx-click]
7979
- Manage project labels with [GitHub Labeler]
8080

81-
The template supports Python 3.7, 3.8, 3.9, and 3.10.
81+
The template supports Python 3.9, 3.10, 3.11, and 3.12.
8282

8383
[autodoc]: https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html
8484
[bandit]: https://github.com/PyCQA/bandit

docs/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
"""Sphinx configuration."""
2+
23
from datetime import datetime
34

45

56
project = "Hypermodern Python Cookiecutter"
67
author = "Claudio Jolowicz"
7-
copyright = f"{datetime.now().year}, {author}"
8+
copyright = f"{datetime.now().year}, {author}" # noqa: A001
89
extensions = ["sphinx.ext.intersphinx", "myst_parser"]
910
intersphinx_mapping = {"mypy": ("https://mypy.readthedocs.io/en/stable/", None)}
1011
language = "en"

docs/guide.md

Lines changed: 43 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,15 @@ python -VV
9898
py -VV
9999
```
100100

101-
Both of these commands should display the latest Python version, 3.10.
101+
Both of these commands should display the latest Python version, 3.12.
102102

103103
For local testing with multiple Python versions,
104-
repeat these steps for the latest bugfix releases of Python 3.7+,
104+
repeat these steps for the latest bugfix releases of Python 3.9+,
105105
with the following changes:
106106

107107
- Do _not_ enable the option to add Python to the `PATH` environment variable.
108108
- `py -VV` and `python -VV` should still display the version of the latest stable release.
109-
- `py -X.Y -VV` (e.g. `py -3.7 -VV`) should display the exact version you just installed.
109+
- `py -X.Y -VV` (e.g. `py -3.9 -VV`) should display the exact version you just installed.
110110

111111
Note that binary installers are not provided for security releases.
112112

@@ -137,26 +137,26 @@ Install the Python build dependencies for your platform,
137137
using one of the commands listed in the [official instructions][pyenv wiki].
138138

139139
Install the latest point release of every supported Python version.
140-
This project template supports Python 3.7, 3.8, 3.9, and 3.10.
140+
This project template supports Python 3.9, 3.10, 3.11, and 3.12.
141141

142142
```console
143-
$ pyenv install 3.7.12
144-
$ pyenv install 3.8.12
145-
$ pyenv install 3.9.10
146-
$ pyenv install 3.10.2
143+
$ pyenv install 3.9.13
144+
$ pyenv install 3.10.11
145+
$ pyenv install 3.11.8
146+
$ pyenv install 3.12.2
147147
```
148148

149149
After creating your project (see [below](creating-a-project)),
150150
you can make these Python versions accessible in the project directory,
151151
using the following command:
152152

153153
```console
154-
$ pyenv local 3.10.2 3.9.10 3.8.12 3.7.12
154+
$ pyenv local 3.12.2 3.11.8 3.10.11 3.9.13
155155
```
156156

157157
The first version listed is the one used when you type plain `python`.
158158
Every version can be used by invoking `python<major.minor>`.
159-
For example, use `python3.7` to invoke Python 3.7.
159+
For example, use `python3.9` to invoke Python 3.9.
160160

161161
### Requirements
162162

@@ -182,15 +182,10 @@ Install [Cookiecutter] using pipx:
182182
$ pipx install cookiecutter
183183
```
184184

185-
Install [Poetry] by downloading and running [install-poetry.py]:
186-
187-
```console
188-
$ python install-poetry.py
189-
```
190-
191-
Install [Nox] and [nox-poetry] using pipx:
185+
Install [Poetry], [Nox], and [nox-poetry] using pipx:
192186

193187
```console
188+
$ pipx install poetry
194189
$ pipx install nox
195190
$ pipx inject nox nox-poetry
196191
```
@@ -981,14 +976,14 @@ for every Python version supported by your project,
981976
and easily switch between them:
982977

983978
```console
984-
$ poetry env use 3.7
985-
$ poetry env use 3.8
986979
$ poetry env use 3.9
987980
$ poetry env use 3.10
981+
$ poetry env use 3.11
982+
$ poetry env use 3.12
988983
```
989984

990985
Only one Poetry environment can be active at any time.
991-
Note that `3.10` comes last,
986+
Note that `3.12` comes last,
992987
to ensure that the current Python release is the active environment.
993988
Install your package with `poetry install` into each environment after creating it.
994989

@@ -1161,7 +1156,7 @@ For example, the following may be more practical during development
11611156
(this will only run tests and type checks, on the current Python release):
11621157

11631158
```console
1164-
$ nox -p 3.10 -rs tests mypy
1159+
$ nox -p 3.12 -rs tests mypy
11651160
```
11661161

11671162
Many sessions accept additional options after `--` separator.
@@ -1187,39 +1182,39 @@ The following table gives an overview of the available Nox sessions:
11871182
- Default
11881183
- - [coverage](the-coverage-session)
11891184
- Report coverage with [Coverage.py]
1190-
- `3.10`
1185+
- `3.12`
11911186
- (✓)
11921187
- - [docs](the-docs-session)
11931188
- Build and serve [Sphinx] documentation
1194-
- `3.10`
1189+
- `3.12`
11951190
-
11961191
- - [docs-build](the-docs-build-session)
11971192
- Build [Sphinx] documentation
1198-
- `3.10`
1193+
- `3.12`
11991194
-
12001195
- - [mypy](the-mypy-session)
12011196
- Type-check with [mypy]
1202-
- `3.7``3.10`
1197+
- `3.9``3.12`
12031198
-
12041199
- - [pre-commit](the-pre-commit-session)
12051200
- Lint with [pre-commit]
1206-
- `3.10`
1201+
- `3.12`
12071202
-
12081203
- - [safety](the-safety-session)
12091204
- Scan dependencies with [Safety]
1210-
- `3.10`
1205+
- `3.12`
12111206
-
12121207
- - [tests](the-tests-session)
12131208
- Run tests with [pytest]
1214-
- `3.7``3.10`
1209+
- `3.9``3.12`
12151210
-
12161211
- - [typeguard](the-typeguard-session)
12171212
- Type-check with [Typeguard]
1218-
- `3.10`
1213+
- `3.12`
12191214
-
12201215
- - [xdoctest](the-xdoctest-session)
12211216
- Run examples with [xdoctest]
1222-
- `3.7``3.10`
1217+
- `3.9``3.12`
12231218
-
12241219

12251220
:::
@@ -1279,7 +1274,7 @@ For example, the following command runs mypy
12791274
using the current stable release of Python:
12801275

12811276
```console
1282-
$ nox --session=mypy --python=3.10
1277+
$ nox --session=mypy --python=3.12
12831278
```
12841279

12851280
Use the separator `--` to pass additional options and arguments to `mypy`.
@@ -1353,7 +1348,7 @@ For example, the following command runs the test suite
13531348
using the current stable release of Python:
13541349

13551350
```console
1356-
$ nox --session=tests --python=3.10
1351+
$ nox --session=tests --python=3.12
13571352
```
13581353

13591354
Use the separator `--` to pass additional options to `pytest`.
@@ -1480,7 +1475,7 @@ For example, the following command runs the examples
14801475
using the current stable release of Python:
14811476

14821477
```console
1483-
$ nox --session=xdoctest --python=3.10
1478+
$ nox --session=xdoctest --python=3.12
14841479
```
14851480

14861481
By default, the Nox session uses the `all` subcommand to run all examples.
@@ -2274,28 +2269,28 @@ as shown in the table below:
22742269
- Python versions
22752270
- - [pre-commit](the-pre-commit-session)
22762271
- Ubuntu
2277-
- 3.10
2272+
- 3.12
22782273
- - [safety](the-safety-session)
22792274
- Ubuntu
2280-
- 3.10
2275+
- 3.12
22812276
- - [mypy](the-mypy-session)
22822277
- Ubuntu
2283-
- 3.10, 3.9, 3.8, 3.7
2278+
- 3.12, 3.11, 3.10, 3.9
22842279
- - [tests](the-tests-session)
22852280
- Ubuntu
2286-
- 3.10, 3.9, 3.8, 3.7
2281+
- 3.12, 3.11, 3.10, 3.9
22872282
- - [tests](the-tests-session)
22882283
- Windows
2289-
- 3.10
2284+
- 3.12
22902285
- - [tests](the-tests-session)
22912286
- macOS
2292-
- 3.10
2287+
- 3.12
22932288
- - [coverage](the-coverage-session)
22942289
- Ubuntu
2295-
- 3.10
2290+
- 3.12
22962291
- - [docs-build](the-docs-build-session)
22972292
- Ubuntu
2298-
- 3.10
2293+
- 3.12
22992294

23002295
:::
23012296

@@ -2625,7 +2620,7 @@ You can also read the articles on [this blog][hypermodern python blog].
26252620
[flake8-bandit]: https://github.com/tylerwince/flake8-bandit
26262621
[flake8-bugbear codes]: https://github.com/PyCQA/flake8-bugbear#list-of-warnings
26272622
[flake8-bugbear]: https://github.com/PyCQA/flake8-bugbear
2628-
[flake8-docstrings]: https://gitlab.com/pycqa/flake8-docstrings
2623+
[flake8-docstrings]: https://github.com/pycqa/flake8-docstrings
26292624
[flake8-rst-docstrings codes]: https://github.com/peterjc/flake8-rst-docstrings#flake8-validation-codes
26302625
[flake8-rst-docstrings]: https://github.com/peterjc/flake8-rst-docstrings
26312626
[flake8]: http://flake8.pycqa.org
@@ -2653,7 +2648,6 @@ You can also read the articles on [this blog][hypermodern python blog].
26532648
[hypermodern python cookiecutter]: https://github.com/cjolowicz/cookiecutter-hypermodern-python
26542649
[hypermodern python]: https://medium.com/@cjolowicz/hypermodern-python-d44485d9d769
26552650
[import hook]: https://docs.python.org/3/reference/import.html#import-hooks
2656-
[install-poetry.py]: https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py
26572651
[isort black profile]: https://pycqa.github.io/isort/docs/configuration/black_compatibility.html
26582652
[isort force_single_line]: https://pycqa.github.io/isort/docs/configuration/options.html#force-single-line
26592653
[isort lines_after_imports]: https://pycqa.github.io/isort/docs/configuration/options.html#lines-after-imports
@@ -2672,10 +2666,10 @@ You can also read the articles on [this blog][hypermodern python blog].
26722666
[nox]: https://nox.thea.codes/
26732667
[package metadata]: https://packaging.python.org/en/latest/specifications/core-metadata/
26742668
[pep 257]: http://www.python.org/dev/peps/pep-0257/
2675-
[pep 440]: https://www.python.org/dev/peps/pep-0440/
2676-
[pep 517]: https://www.python.org/dev/peps/pep-0517/
2677-
[pep 518]: https://www.python.org/dev/peps/pep-0518/
2678-
[pep 561]: https://www.python.org/dev/peps/pep-0561/
2669+
[pep 440]: https://peps.python.org/pep-0440/
2670+
[pep 517]: https://peps.python.org/pep-0517/
2671+
[pep 518]: https://peps.python.org/pep-0518/
2672+
[pep 561]: https://peps.python.org/pep-0561/
26792673
[pep 8]: http://www.python.org/dev/peps/pep-0008/
26802674
[pep8-naming codes]: https://github.com/pycqa/pep8-naming#pep-8-naming-conventions
26812675
[pep8-naming]: https://github.com/pycqa/pep8-naming
@@ -2711,7 +2705,7 @@ You can also read the articles on [this blog][hypermodern python blog].
27112705
[pypa/gh-action-pypi-publish]: https://github.com/pypa/gh-action-pypi-publish
27122706
[pypi]: https://pypi.org/
27132707
[pyproject.toml]: https://python-poetry.org/docs/pyproject/
2714-
[pytest layout]: https://docs.pytest.org/en/latest/explanation/goodpractices.html#choosing-a-test-layout-import-rules
2708+
[pytest layout]: https://docs.pytest.org/en/latest/explanation/goodpractices.html#choosing-a-test-layout
27152709
[pytest]: https://docs.pytest.org/en/latest/
27162710
[python build]: https://python-poetry.org/docs/cli/#build
27172711
[python package]: https://docs.python.org/3/tutorial/modules.html#packages
@@ -2746,6 +2740,6 @@ You can also read the articles on [this blog][hypermodern python blog].
27462740
[versions and constraints]: https://python-poetry.org/docs/dependency-specification/
27472741
[virtual environment]: https://docs.python.org/3/tutorial/venv.html
27482742
[virtualenv]: https://virtualenv.pypa.io/
2749-
[wheel]: https://www.python.org/dev/peps/pep-0427/
2743+
[wheel]: https://peps.python.org/pep-0427/
27502744
[xdoctest]: https://github.com/Erotemic/xdoctest
27512745
[yaml]: https://yaml.org/

docs/quickstart.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,17 @@ Install [Cookiecutter]:
88
$ pipx install cookiecutter
99
```
1010

11-
Install [Poetry] by downloading and running [install-poetry.py]:
12-
13-
```console
14-
$ python install-poetry.py
15-
```
16-
17-
Install [Nox] and [nox-poetry]:
11+
Install [Poetry], [Nox], and [nox-poetry]:
1812

1913
```console
14+
$ pipx install poetry
2015
$ pipx install nox
2116
$ pipx inject nox nox-poetry
2217
```
2318

2419
[pipx] is preferred, but you can also install with `pip install --user`.
2520

26-
It is recommended to set up Python 3.7, 3.8, 3.9, 3.10 using [pyenv].
21+
It is recommended to set up Python 3.9, 3.10, 3.11, and 3.12 using [pyenv].
2722

2823
## Creating a project
2924

@@ -159,7 +154,6 @@ by applying labels to them, like this:
159154
[codecov]: https://codecov.io/
160155
[cookiecutter]: https://github.com/audreyr/cookiecutter
161156
[github]: https://github.com/
162-
[install-poetry.py]: https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py
163157
[nox]: https://nox.thea.codes/
164158
[nox-poetry]: https://nox-poetry.readthedocs.io/
165159
[pipx]: https://pipxproject.github.io/pipx/

0 commit comments

Comments
 (0)