Skip to content

Commit eb204e8

Browse files
authored
Nit fixes, cleanup old versions (#80)
* Add Django 4.2 classifier * Update docs copyright * Use default language 'en' * Cleanup commands * Ignore Redis dump file * Remove 3.11 from Django 3.2 * Remove Django-specific options from pytest.ini * Calculate copyright year range * Switch to .readthedocs.yaml
1 parent 3a774d1 commit eb204e8

7 files changed

Lines changed: 29 additions & 12 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ build
1010
dist
1111
*.pyc
1212
.pytest_cache/
13+
# dump.rdb is created by redis-server, needed to run tests
14+
dump.rdb

.readthedocs.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# .readthedocs.yaml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
version: 2
6+
formats: all
7+
build:
8+
os: ubuntu-22.04
9+
tools:
10+
python: "3.11"
11+
sphinx:
12+
configuration: docs/conf.py
13+
python:
14+
install:
15+
- requirements: docs/requirements.txt

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
recursive-include docs *
22
recursive-include tests *
3-
include pytest.ini AUTHORS.rst CODE_OF_CONDUCT.md pyproject.toml LICENSE README.rst tox.ini .coveragerc .isort.cfg
3+
include pytest.ini AUTHORS.rst CODE_OF_CONDUCT.md pyproject.toml LICENSE README.rst tox.ini .coveragerc .isort.cfg .readthedocs.yaml
44
prune docs/_build
55
global-exclude *.pyc
66
prune __pycache__

docs/conf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
# add these directories to sys.path here. If the directory is relative to the
1717
# documentation root, use os.path.abspath to make it absolute, like shown here.
1818
#
19+
from datetime import date
1920
import os
2021
import sys
2122

@@ -60,7 +61,7 @@
6061

6162
# General information about the project.
6263
project = "python-dockerflow"
63-
copyright = "2016, Mozilla Foundation"
64+
copyright = f"2016 - {date.today().year}, Mozilla Foundation"
6465
author = "Mozilla Foundation"
6566

6667
# The version info for the project you're documenting, acts as replacement for
@@ -77,7 +78,7 @@
7778
#
7879
# This is also used if you do content translation via gettext catalogs.
7980
# Usually you set "language" from the command line for these cases.
80-
language = None
81+
language = "en"
8182

8283
# There are two options for replacing |today|: either, you set today to some
8384
# non-false value, then it is used:

pytest.ini

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
[pytest]
2-
DJANGO_SETTINGS_MODULE = tests.django.settings
32
norecursedirs = .git .*
43
addopts = -rsxX --showlocals --tb=native --cov=dockerflow --cov-report xml --cov-report term --cov-report html --cov-append
5-
django_find_project = false
64
python_paths = .

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def read(*parts):
3030
"Framework :: Django :: 3.2",
3131
"Framework :: Django :: 4.0",
3232
"Framework :: Django :: 4.1",
33+
"Framework :: Django :: 4.2",
3334
"Framework :: Flask",
3435
"Intended Audience :: Developers",
3536
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",

tox.ini

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ usedevelop = True
33
minversion = 1.8
44
envlist =
55
py38-lint
6-
py38-docs
7-
py{37,38,39,310,311}-dj32
6+
py311-docs
7+
py{37,38,39,310}-dj32
88
py{38,39,310,311}-dj{40,41,42}
99
py{37,38,39,310,311}-fl{20,21,22}
1010
py{37,38,39,310,311}-s{21,22}
@@ -39,12 +39,12 @@ deps =
3939
s22: -ctests/constraints/sanic-22.txt
4040
commands =
4141
python --version
42-
dj{32,40,41,42}: pytest tests/core/ tests/django --nomigrations {posargs:}
43-
fl{012,10,11,20,21,22}: pytest tests/core/ tests/flask/ {posargs:}
44-
s{20,21,22}: pytest tests/core/ tests/sanic/ {posargs:}
42+
dj{32,40,41,42}: pytest tests/core/ tests/django --no-migrations -o DJANGO_SETTINGS_MODULE=tests.django.settings -o django_find_project=false {posargs:}
43+
fl{20,21,22}: pytest tests/core/ tests/flask/ {posargs:}
44+
s{21,22}: pytest tests/core/ tests/sanic/ {posargs:}
4545

46-
[testenv:py38-docs]
47-
basepython = python3.8
46+
[testenv:py311-docs]
47+
basepython = python3.11
4848
deps = -rdocs/requirements.txt
4949
commands = sphinx-build -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html
5050
pip_pre = false

0 commit comments

Comments
 (0)