Skip to content

Commit bf9a71b

Browse files
committed
readme and pyproject
1 parent e11664e commit bf9a71b

File tree

3 files changed

+62
-21
lines changed

3 files changed

+62
-21
lines changed

‎README.md

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ in the DOCS
7575
- [Example Use](#example-use)
7676
- [Help](#help)
7777
- [Developer Notes](#developer-notes)
78-
- [Generate semgrep_sec.yaml](#generate-semgrep_secyaml)
78+
- [Generate semgrep\_sec.yaml](#generate-semgrep_secyaml)
7979
- [Documentation](#documentation)
8080
- [Install With PIP](#install-with-pip)
8181
- [Language information](#language-information)
@@ -92,6 +92,8 @@ in the DOCS
9292
- [How to run](#how-to-run)
9393
- [Windows](#windows)
9494
- [Linux/ MacOS](#linux-macos)
95+
- [Building](#building)
96+
- [Testing](#testing)
9597
- [Download Project](#download-project)
9698
- [Clone](#clone)
9799
- [Using The Command Line](#using-the-command-line)
@@ -160,8 +162,8 @@ Head to https://pypi.org/project/SimpleSecurity/ for more info
160162

161163
### Built for
162164

163-
This program has been written for Python versions 3.7 - 3.10 and has been tested with both 3.7 and
164-
3.10
165+
This program has been written for Python versions 3.8 - 3.11 and has been tested with both 3.8 and
166+
3.11
165167

166168
## Install Python on Windows
167169

@@ -221,6 +223,36 @@ version.
221223
- File
222224
`python3.x [file]` or `./[file]`
223225

226+
## Building
227+
228+
This project uses https://github.com/FHPythonUtils/FHMake to automate most of the building. This
229+
command generates the documentation, updates the requirements.txt and builds the library artefacts
230+
231+
Note the functionality provided by fhmake can be approximated by the following
232+
233+
```sh
234+
handsdown --cleanup -o documentation/reference
235+
poetry export -f requirements.txt --output requirements.txt
236+
poetry export -f requirements.txt --with dev --output requirements_optional.txt
237+
poetry build
238+
```
239+
240+
`fhmake audit` can be run to perform additional checks
241+
242+
## Testing
243+
244+
For testing with the version of python used by poetry use
245+
246+
```sh
247+
poetry run pytest
248+
```
249+
250+
Alternatively use `tox` to run tests over python 3.8 - 3.11
251+
252+
```sh
253+
tox
254+
```
255+
224256
## Download Project
225257

226258
### Clone

‎pyproject.toml

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ classifiers = [
1616
"Programming Language :: Python :: Implementation :: CPython",
1717
"Topic :: Security",
1818
"Topic :: Software Development :: Libraries :: Python Modules",
19-
"Topic :: Utilities"
19+
"Topic :: Utilities",
2020
]
2121
homepage = "https://github.com/FHPythonUtils/SimpleSecurity"
2222
repository = "https://github.com/FHPythonUtils/SimpleSecurity"
@@ -38,6 +38,18 @@ semgrep = { version = "<2,>=0.67.0", optional = true }
3838
[tool.poetry.extras]
3939
full = ["poetry", "bandit", "safety", "dodgy", "dlint", "semgrep"]
4040

41+
[tool.black]
42+
line-length = 100
43+
target-version = ["py38"]
44+
45+
[tool.isort]
46+
profile = "black"
47+
indent = "Tab"
48+
49+
[tool.pydocstyle]
50+
convention = "google"
51+
ignore = "D205,D415"
52+
4153
[build-system]
4254
requires = ["poetry-core"]
4355
build-backend = "poetry.core.masonry.api"
@@ -53,24 +65,22 @@ variable-naming-style = "camelCase"
5365
indent-string = "\t"
5466

5567
[tool.pylint.master]
56-
ignore-patterns = "test_.*?py"
68+
ignore-paths = ["tests"]
5769

5870
[tool.pylint.messages_control]
5971
enable = ["F", "E", "W", "R", "C"]
60-
disable = [
61-
"pointless-string-statement",
62-
"superfluous-parens",
63-
"bad-continuation"
64-
]
72+
disable = ["pointless-string-statement", "superfluous-parens"]
6573

66-
[tool.black]
67-
line-length = 100
68-
target-version = ["py37"]
69-
70-
[tool.isort]
71-
profile = "black"
72-
indent = "Tab"
74+
[tool.tox]
75+
legacy_tox_ini = """
76+
[tox]
77+
env_list =
78+
py311
79+
py310
80+
py39
81+
py38
7382
74-
[tool.pydocstyle]
75-
convention = "google"
76-
ignore = "D205,D415"
83+
[testenv]
84+
deps = pytest
85+
commands = pytest tests
86+
"""

‎requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-

0 commit comments

Comments
 (0)