Skip to content

Commit 6cbdad5

Browse files
committed
updates
1 parent b5a660e commit 6cbdad5

31 files changed

+918
-686
lines changed

.github/workflows/cleanup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
validate-data:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v4
1010
- name: Cleanup temporary files/directories
1111
run: |
1212
./scripts/cleanup.py

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
matrix:
2222
python-version: [ 3.7, 3.8, 3.9 ]
2323
steps:
24-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v4
2525
- name: Set up Python ${{ matrix.python-version }}
2626
uses: actions/setup-python@v2
2727
with:

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.9-alpine
1+
FROM python:3.13-alpine
22
RUN mkdir /app
33
WORKDIR /app
44
COPY requirements.txt .
@@ -7,4 +7,4 @@ COPY . .
77
ENV PYTHONPATH="/app"
88
RUN addgroup -S projects && adduser -S -H projects -G projects
99
RUN chown -R projects:projects /app
10-
USER projects
10+
USER projects

docs/source/conf.py

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
This file only contains a selection of the most common options.
55
66
For a full list see the documentation:
7-
http://www.sphinx-doc.org/en/master/config
7+
https://www.sphinx-doc.org/en/master/config
88
"""
99
from __future__ import absolute_import, print_function, unicode_literals
1010

@@ -47,11 +47,11 @@
4747
# https://www.sphinx-doc.org/en/master/usage/extensions/viewcode.html
4848
# https://www.sphinx-doc.org/en/master/usage/extensions/todo.html
4949
extensions = [
50-
"sphinx.ext.autodoc",
51-
"sphinx.ext.viewcode",
52-
"sphinx.ext.todo",
53-
"sphinxcontrib.napoleon",
54-
"guzzle_sphinx_theme"
50+
"sphinx.ext.autodoc",
51+
"sphinx.ext.viewcode",
52+
"sphinx.ext.todo",
53+
"sphinxcontrib.napoleon",
54+
"guzzle_sphinx_theme"
5555
]
5656

5757
intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}
@@ -93,12 +93,12 @@
9393

9494
# Custom sidebar templates, filenames relative to this file.
9595
html_sidebars = {
96-
"**": [
97-
"logo-text.html",
98-
"globaltoc.html",
99-
"localtoc.html",
100-
"searchbox.html"
101-
]
96+
"**": [
97+
"logo-text.html",
98+
"globaltoc.html",
99+
"localtoc.html",
100+
"searchbox.html"
101+
]
102102
}
103103

104104
# Output file base name for HTML help builder.
@@ -117,25 +117,25 @@
117117
# -- Options for LaTeX output ---------------------------------------
118118

119119
latex_elements = {
120-
# Paper size ("letterpaper" or "a4paper").
121-
# "papersize": "letterpaper",
122-
#
123-
# The font size ("10pt", "11pt" or "12pt").
124-
# "pointsize": "10pt",
125-
#
126-
# Additional stuff for the LaTeX preamble.
127-
# "preamble": "",
120+
# Paper size ("letterpaper" or "a4paper").
121+
# "papersize": "letterpaper",
122+
#
123+
# The font size ("10pt", "11pt" or "12pt").
124+
# "pointsize": "10pt",
125+
#
126+
# Additional stuff for the LaTeX preamble.
127+
# "preamble": "",
128128
}
129129

130130
# Grouping the document tree into LaTeX files. List of tuples
131131
# (source start file, target name, title, author,
132132
# documentclass [howto/manual]).
133133
latex_documents = [
134-
("index",
135-
"{0}.tex".format(project),
136-
"{0} Documentation".format(project),
137-
author,
138-
"manual")
134+
("index",
135+
"{0}.tex".format(project),
136+
"{0} Documentation".format(project),
137+
author,
138+
"manual")
139139
]
140140

141141
# The name of an image file (relative to this directory) to place at
@@ -163,10 +163,10 @@
163163
# One entry per manual page. List of tuples
164164
# (source start file, name, description, authors, manual section).
165165
man_pages = [
166-
("index", project,
167-
"{0} Documentation".format(project),
168-
[author],
169-
3)
166+
("index", project,
167+
"{0} Documentation".format(project),
168+
[author],
169+
3)
170170
]
171171

172172
# If true, show URL addresses after external links.
@@ -179,13 +179,13 @@
179179
# dir menu entry, description, category)
180180

181181
texinfo_documents = [
182-
("index",
183-
project,
184-
"{0} Documentation".format(project),
185-
author,
186-
project,
187-
__description__,
188-
"Miscellaneous"),
182+
("index",
183+
project,
184+
"{0} Documentation".format(project),
185+
author,
186+
project,
187+
__description__,
188+
"Miscellaneous"),
189189
]
190190

191191
# Documents to append as an appendix to all manuals.

pyproject.toml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# pyproject.toml is a configuration file that is used to
2+
# specify the build system requirements for a Python project.
3+
#
4+
# References:
5+
# - [PEP-518](https://peps.python.org/pep-0518/)
6+
# - [PEP-517](https://peps.python.org/pep-0517/)
7+
# - [PEP-621](https://peps.python.org/pep-0621/)
8+
# - [PEP-660](https://peps.python.org/pep-0660/)
9+
# - [Python Packaging Reference - pyproject.toml](https://packaging.python.org/en/latest/specifications/pyproject-toml/#pyproject-toml-specification
10+
#
11+
# JSON Schema:
12+
# {
13+
# "$schema": "http://json-schema.org/schema#",
14+
# "type": "object",
15+
# "additionalProperties": false,
16+
# "properties": {
17+
# "build-system": {
18+
# "type": "object",
19+
# "additionalProperties": false,
20+
# "properties": {
21+
# "requires": {
22+
# "type": "array",
23+
# "items": {
24+
# "type": "string"
25+
# }
26+
# }
27+
# },
28+
# "required": [
29+
# "requires"
30+
# ]
31+
# },
32+
# "tool": {
33+
# "type": "object"
34+
# }
35+
# }
36+
# }
37+
38+
[build-system]
39+
requires = ["setuptools>=42", "wheel"]
40+
build-backend = "setuptools.build_meta"
41+
42+
[project]
43+
name = "skeleton"
44+
version = "0.0.10"
45+
description = "Python Module Template"
46+
readme = "README.md"
47+
license = { text = "MIT" }
48+
authors = [{ name = "Chad Loether", email = "chad.loether@outlook.com" }]
49+
keywords = ["template", "skeleton"]
50+
classifiers = [
51+
"Development Status :: 2 - Pre-Alpha",
52+
"Natural Language :: English",
53+
"Intended Audience :: Developers",
54+
"License :: OSI Approved :: MIT License",
55+
"Operating System :: OS Independent",
56+
"Programming Language :: Python :: 2",
57+
"Programming Language :: Python :: 2.6",
58+
"Programming Language :: Python :: 2.7",
59+
"Programming Language :: Python :: 3",
60+
"Programming Language :: Python :: 3.3",
61+
"Programming Language :: Python :: 3.4",
62+
"Programming Language :: Python :: 3.5",
63+
"Programming Language :: Python :: 3.6",
64+
"Programming Language :: Python :: 3.7",
65+
"Programming Language :: Python :: 3.8",
66+
"Topic :: Software Development :: Libraries :: Python Modules"
67+
]
68+
dependencies = ["six", "appdirs"]
69+
70+
[project.urls]
71+
Source = "https://github.com/cloether/skeleton"
72+
Tracker = "https://github.com/cloether/skeleton/issues"
73+
74+
[tool.setuptools.packages.find]
75+
include = ["skeleton"]
76+
exclude = ["doc*", "example*", "script*", "test*"]
77+
78+
[project.optional-dependencies]
79+
docs = ["sphinx", "sphinxcontrib-napoleon", "guzzle_sphinx_theme"]
80+
tests = [
81+
"check-manifest",
82+
"coverage",
83+
"pycodestyle",
84+
"pytest",
85+
"pytest-cov",
86+
"pytest-html",
87+
"tox",
88+
"tox-travis",
89+
"twine",
90+
"wheel"
91+
]
92+
python2.6 = ["ordereddict==1.1", "simplejson==3.3.0"]
93+
python2.7 = ["ipaddress"]
94+
95+
[project.scripts]
96+
skeleton = "skeleton.__main__:main"

pytest.ini

Lines changed: 60 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,72 @@
1-
; References:
1+
; pytest.ini
2+
;
3+
; references:
24
; https://docs.pytest.org/en/stable/
35
; https://plugincompat.herokuapp.com/
4-
;suppress inspection for section "LongLine"
6+
57
[pytest]
6-
addopts = -rN --tb=short -p no:warnings --cache-clear --cov . --html=tests/reports/pytest.html --cov-config 'tests/.coveragerc' --self-contained-html
7-
cache_dir = tests/.pytest_cache
8-
log_cli = 1
8+
9+
# minimum compatible pytest version
10+
minversion = 7.0
11+
12+
; required plugins and version constraints
13+
required_plugins =
14+
pytest-cov>=6.1.1
15+
pytest-html>=4.1.1
16+
pytest-json-report>=1.5.0
17+
18+
# cli arguments to pass to pytest
19+
# TODO: look into '--cov=.'
20+
addopts =
21+
-rN
22+
--tb=short
23+
-p no:warnings
24+
--cache-clear
25+
--cov=.
26+
--cov-config=tests/.coveragerc
27+
--cov-report=html:tests/reports/coverage.html
28+
--cov-report=xml:tests/reports/coverage.xml
29+
--cov-report=json:tests/reports/coverage.json
30+
--cov-report=lcov:tests/reports/coverage.lcov
31+
--self-contained-html
32+
--html=tests/reports/results.html
33+
--junitxml=tests/reports/results.xml
34+
--json-report
35+
--json-report-file=tests/reports/results.json
36+
--json-report-indent=2
37+
38+
; discover test files in this directory
39+
testpaths = tests
40+
python_files = tests/test_*.py
41+
norecursedirs =
42+
.git
43+
.idea
44+
.tox
45+
scripts
46+
build
47+
examples
48+
docs
49+
50+
; logging configuration for CLI
51+
log_cli = true
952
log_cli_date_format = %Y-%m-%d %H:%M:%S
1053
log_cli_format = %(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)
1154
log_cli_level = DEBUG
55+
56+
; logging configuration for file output
1257
log_file = tests/logs/pytest.log
1358
log_file_date_format = %Y-%m-%d %H:%M:%S
1459
log_file_format = %(asctime)s [%(name)s] %(levelname)s: %(message)s
1560
log_file_level = DEBUG
1661
log_level = DEBUG
17-
norecursedirs = .git .idea .tox scripts build examples docs
18-
python_files = tests/test_*.py
62+
63+
; pytest cache location
64+
cache_dir = tests/.pytest_cache
65+
66+
; additional pytest-html setting (optional)
1967
render_collapsed = 1
20-
required_plugins = pytest-html pytest-cov
21-
testpaths = tests
68+
69+
; marker declarations (if custom marks are used)
70+
markers =
71+
slow: marks tests as slow (use with '-m "not slow"')
72+
integration: marks integration tests

0 commit comments

Comments
 (0)