Skip to content

Commit 6cfc5f0

Browse files
committed
Replace Makefile with tox setup in pyproject.toml
We can now remove the Makefile: - tox does our testing - GitHub Actions creates releases - there's no need for a virtualenv anymore Note that we remove the `safety` step, that's still run in CI (tests.yaml).
1 parent 34e1fc2 commit 6cfc5f0

4 files changed

Lines changed: 63 additions & 60 deletions

File tree

DEVELOPMENT.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Development
2+
3+
## Running tests locally
4+
5+
To run tests locally, install [tox](https://tox.wiki/) using [uv](https://docs.astral.sh/uv/)
6+
with [tox-uv](https://github.com/tox-dev/tox-uv):
7+
8+
```bash
9+
uv tool install tox --with tox-uv
10+
```
11+
12+
Install Python versions:
13+
14+
```bash
15+
uv python install 3.8 3.9 3.10 3.11 3.12
16+
```
17+
18+
To run tests for all Python versions:
19+
20+
```shell
21+
tox
22+
```
23+
24+
TODO: Deduplicate Python version list in [tests.yaml](.github/workflows/tests.yaml)

Makefile

Lines changed: 0 additions & 59 deletions
This file was deleted.

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,13 @@ If you wish to learn more about our API, please visit the [Mollie Developer Port
288288

289289
## Want to help us make our API client even better?
290290

291-
Want to help us make our API client even better? We take [pull requests](https://github.com/mollie/mollie-api-python/pulls?utf8=%E2%9C%93&q=is%3Apr), sure. But how would you like to contribute to a technology oriented organization? Mollie is hiring developers and system engineers. [Check out our vacancies](https://jobs.mollie.com/) or [get in touch](mailto:personeel@mollie.com).
291+
Want to help us make our API client even better?
292+
We take [pull requests](https://github.com/mollie/mollie-api-python/pulls?utf8=%E2%9C%93&q=is%3Apr), sure.
293+
Check out [DEVELOPMENT.md](./DEVELOPMENT.md).
294+
295+
But how would you like to contribute to a technology oriented organization?
296+
Mollie is hiring developers and system engineers.
297+
[Check out our vacancies](https://jobs.mollie.com/) or [get in touch](mailto:personeel@mollie.com).
292298

293299
## License
294300
[BSD (Berkeley Software Distribution) License](https://opensource.org/licenses/bsd-license.php).

pyproject.toml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,35 @@ exclude_lines = [
2222
"pragma: no cover",
2323
"if TYPE_CHECKING:",
2424
]
25+
26+
[tool.tox]
27+
requires = ["tox>=4.19"]
28+
env_list = ["flake8", "3.12", "3.11", "3.10", "3.9", "3.8", "type"]
29+
30+
[tool.tox.env_run_base]
31+
description = "Run tests under {base_python}"
32+
deps = [
33+
"pytest",
34+
"pytest-cov",
35+
"pytest-mock",
36+
"mock",
37+
"responses",
38+
]
39+
commands = [["pytest"]]
40+
41+
[tool.tox.env.type]
42+
description = "Run type check"
43+
deps = [
44+
"mypy",
45+
"types-requests",
46+
]
47+
commands = [["mypy", "--config", "mypy.ini", "mollie"]]
48+
49+
[tool.tox.env.flake8]
50+
description = "Run codestyle check"
51+
deps = [
52+
"flake8",
53+
"flake8-isort",
54+
"flake8-black",
55+
]
56+
commands = [["flake8", "mollie"]]

0 commit comments

Comments
 (0)