Skip to content
This repository was archived by the owner on Jan 20, 2024. It is now read-only.

Commit 824af30

Browse files
committed
tox + docs
1 parent 8b1439d commit 824af30

File tree

3 files changed

+65
-23
lines changed

3 files changed

+65
-23
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ repos:
2828
rev: v3.3.1
2929
hooks:
3030
- id: pyupgrade
31-
args: [--py37-plus]
31+
args: [--py38-plus]
3232
- repo: https://github.com/boidolr/pre-commit-images
3333
rev: v1.1.0
3434
hooks:

README.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ in the DOCS
6363
- [How to run](#how-to-run)
6464
- [Windows](#windows)
6565
- [Linux/ MacOS](#linux-macos)
66+
- [Building](#building)
67+
- [Testing](#testing)
6668
- [Download Project](#download-project)
6769
- [Clone](#clone)
6870
- [Using The Command Line](#using-the-command-line)
@@ -106,8 +108,8 @@ Head to https://pypi.org/project/checkrequirements/ for more info
106108

107109
### Built for
108110

109-
This program has been written for Python versions 3.7 - 3.10 and has been tested with both 3.7 and
110-
3.10
111+
This program has been written for Python versions 3.8 - 3.11 and has been tested with both 3.8 and
112+
3.11
111113

112114
## Install Python on Windows
113115

@@ -167,6 +169,36 @@ version.
167169
- File
168170
`python3.x [file]` or `./[file]`
169171

172+
## Building
173+
174+
This project uses https://github.com/FHPythonUtils/FHMake to automate most of the building. This
175+
command generates the documentation, updates the requirements.txt and builds the library artefacts
176+
177+
Note the functionality provided by fhmake can be approximated by the following
178+
179+
```sh
180+
handsdown --cleanup -o documentation/reference
181+
poetry export -f requirements.txt --output requirements.txt
182+
poetry export -f requirements.txt --with dev --output requirements_optional.txt
183+
poetry build
184+
```
185+
186+
`fhmake audit` can be run to perform additional checks
187+
188+
## Testing
189+
190+
For testing with the version of python used by poetry use
191+
192+
```sh
193+
poetry run pytest
194+
```
195+
196+
Alternatively use `tox` to run tests over python 3.8 - 3.11
197+
198+
```sh
199+
tox
200+
```
201+
170202
## Download Project
171203

172204
### Clone

pyproject.toml

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,22 @@ pylint = "^2.13.5"
3737
handsdown = "^1.1.0"
3838
coverage = "^6.3.2"
3939

40+
[tool.black]
41+
line-length = 100
42+
target-version = ["py38"]
43+
44+
[tool.isort]
45+
profile = "black"
46+
indent = "Tab"
47+
48+
[tool.pydocstyle]
49+
convention = "google"
50+
ignore = "D205,D415"
51+
52+
[build-system]
53+
requires = ["poetry-core"]
54+
build-backend = "poetry.core.masonry.api"
55+
4056
[tool.pylint.basic]
4157
argument-naming-style = "camelCase"
4258
attr-naming-style = "camelCase"
@@ -48,28 +64,22 @@ variable-naming-style = "camelCase"
4864
indent-string = "\t"
4965

5066
[tool.pylint.master]
51-
ignore-patterns = "test_.*?py"
67+
ignore-paths = ["tests"]
5268

5369
[tool.pylint.messages_control]
5470
enable = ["F", "E", "W", "R", "C"]
55-
disable = [
56-
"pointless-string-statement",
57-
"superfluous-parens",
58-
"bad-continuation"
59-
]
60-
61-
[tool.black]
62-
line-length = 100
63-
target-version = ["py37"]
64-
65-
[tool.isort]
66-
profile = "black"
67-
indent = "Tab"
71+
disable = ["pointless-string-statement", "superfluous-parens"]
6872

69-
[tool.pydocstyle]
70-
convention = "google"
71-
ignore = "D205,D415"
73+
[tool.tox]
74+
legacy_tox_ini = """
75+
[tox]
76+
env_list =
77+
py311
78+
py310
79+
py39
80+
py38
7281
73-
[build-system]
74-
requires = ["poetry-core"]
75-
build-backend = "poetry.core.masonry.api"
82+
[testenv]
83+
deps = pytest
84+
commands = pytest tests
85+
"""

0 commit comments

Comments
 (0)