Skip to content

Commit d767ac4

Browse files
authored
chore: update project structure to 7cf13131
1 parent 5dd794d commit d767ac4

15 files changed

+242
-20
lines changed

.cruft.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"template": "https://github.com/woltapp/wolt-python-package-cookiecutter",
3-
"commit": "4eecc9c4d27e3c9321438bc1fdaf717bec5eadf6",
3+
"commit": "7cf131315aae15890e44411c9fcecdbb584dca48",
44
"checkout": null,
55
"context": {
66
"cookiecutter": {

.github/actions/python-poetry-env/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ inputs:
55
python-version:
66
required: false
77
description: 'Python version'
8-
default: '3.10'
8+
default: '3.12'
99
outputs: {}
1010
runs:
1111
using: 'composite'
1212
steps:
13-
- uses: actions/setup-python@v4
13+
- uses: actions/setup-python@v5
1414
with:
1515
python-version: ${{inputs.python-version}}
1616
- name: Install poetry

.github/workflows/cookiecutter.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ jobs:
88
auto-update-project:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v4
1212
- name: Set up Python
13-
uses: actions/setup-python@v4
13+
uses: actions/setup-python@v5
1414
with:
15-
python-version: 3.9
15+
python-version: "3.12"
1616

1717
- name: Install dependencies
1818
run: python -m pip install cruft poetry jello tabulate

.github/workflows/dependencies.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
auto-update-dependencies:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v4
1212
- uses: ./.github/actions/python-poetry-env
1313

1414
- name: Install tabulate

.github/workflows/draft_release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
draft-release:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v4
1616
- uses: ./.github/actions/python-poetry-env
1717
- name: Update version
1818
id: updated_version

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
build-and-publish:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v4
1212
- uses: ./.github/actions/python-poetry-env
1313
- name: Publish to pypi
1414
run: |

.github/workflows/test.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
actionlint:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v4
1414
- name: Download actionlint
1515
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.6.21
1616
shell: bash
@@ -22,14 +22,14 @@ jobs:
2222
name: Check if automatic project update was successful
2323
runs-on: ubuntu-latest
2424
steps:
25-
- uses: actions/checkout@v2
25+
- uses: actions/checkout@v4
2626
- name: Fail if .rej files exist as structure update was not successful
2727
run: test -z "$(find . -iname '*.rej')"
2828

2929
pre-commit:
3030
runs-on: ubuntu-latest
3131
steps:
32-
- uses: actions/checkout@v2
32+
- uses: actions/checkout@v4
3333
- uses: ./.github/actions/python-poetry-env
3434
- run: poetry run pre-commit run --all-files
3535

.github/workflows/test.yml.rej

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
diff a/.github/workflows/test.yml b/.github/workflows/test.yml (rejected hunks)
2+
@@ -38,10 +38,17 @@ jobs:
3+
strategy:
4+
fail-fast: false
5+
matrix:
6+
- python-version: ["3.7", "3.8", "3.9", "3.10"]
7+
+ python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
8+
steps:
9+
- - uses: actions/checkout@v2
10+
+ - uses: actions/checkout@v4
11+
- uses: ./.github/actions/python-poetry-env
12+
with:
13+
python-version: ${{ matrix.python-version }}
14+
- run: poetry run pytest
15+
+
16+
+ docs:
17+
+ runs-on: ubuntu-latest
18+
+ steps:
19+
+ - uses: actions/checkout@v4
20+
+ - uses: ./.github/actions/python-poetry-env
21+
+ - run: poetry run mkdocs build

.pre-commit-config.yaml.rej

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
diff a/.pre-commit-config.yaml b/.pre-commit-config.yaml (rejected hunks)
2+
@@ -15,26 +15,19 @@ repos:
3+
- id: mixed-line-ending
4+
- repo: local
5+
hooks:
6+
- - id: autoflake
7+
- name: autoflake
8+
- entry: poetry run autoflake -r -i --remove-all-unused-imports --remove-unused-variables
9+
+ - id: ruff-format
10+
+ name: ruff-format
11+
+ entry: poetry run ruff format
12+
+ require_serial: true
13+
language: system
14+
types: [ python ]
15+
- - id: isort
16+
- name: isort
17+
- entry: poetry run isort
18+
- language: system
19+
- types: [python]
20+
- - id: black
21+
- name: black
22+
- entry: poetry run black
23+
- language: system
24+
- types: [python]
25+
- - id: pyupgrade
26+
- name: pyupgrade
27+
- entry: poetry run pyupgrade --py37-plus
28+
+ - id: ruff
29+
+ name: ruff
30+
+ # Add --fix, in case you want it to autofix when this hook runs
31+
+ entry: poetry run ruff check --force-exclude
32+
+ require_serial: true
33+
language: system
34+
- types: [python]
35+
+ types: [ python ]
36+
- id: mypy
37+
name: mypy
38+
entry: poetry run mypy .
39+
@@ -42,11 +35,6 @@ repos:
40+
language: system
41+
types: [python]
42+
pass_filenames: false
43+
- - id: flake8
44+
- name: flake8
45+
- entry: poetry run flake8
46+
- language: system
47+
- types: [python]
48+
- id: kacl-verify
49+
name: kacl-verify
50+
entry: poetry run kacl-cli verify

LICENCE.rej

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
diff a/LICENCE b/LICENCE (rejected hunks)
2+
@@ -1,6 +1,6 @@
3+
The MIT License (MIT)
4+
5+
-Copyright (c) 2021 Jerry Pussinen <[email protected]>
6+
+Copyright (c) 2024 Jerry Pussinen <[email protected]>
7+
8+
Permission is hereby granted, free of charge, to any person obtaining a copy of
9+
this software and associated documentation files (the "Software"), to deal in

README.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ The `least_duration` algorithm walks the list of tests and assigns each test to
9696
* Clone this repository
9797
* Requirements:
9898
* [Poetry](https://python-poetry.org/)
99-
* Python 3.7+
99+
* Python 3.8+
100100
* Create a virtual environment and install the dependencies
101101

102102
```sh
@@ -117,9 +117,8 @@ pytest
117117

118118
### Documentation
119119

120-
The documentation is automatically generated from the content of the [docs directory](./docs) and from the docstrings
121-
of the public signatures of the source code. The documentation is updated and published as a [Github project page
122-
](https://pages.github.com/) automatically as part each release.
120+
The documentation is automatically generated from the content of the [docs directory](https://github.com/jerry-git/pytest-split/tree/master/docs) and from the docstrings
121+
of the public signatures of the source code. The documentation is updated and published as a [Github Pages page](https://pages.github.com/) automatically as part each release.
123122

124123
### Releasing
125124

README.md.rej

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
diff a/README.md b/README.md (rejected hunks)
2+
@@ -66,7 +65,7 @@ Find the draft release from the
3+
4+
### Pre-commit
5+
6+
-Pre-commit hooks run all the auto-formatters (e.g. `black`, `isort`), linters (e.g. `mypy`, `flake8`), and other quality
7+
+Pre-commit hooks run all the auto-formatting (`ruff format`), linters (e.g. `ruff` and `mypy`), and other quality
8+
checks to make sure the changeset is in good shape before a commit/push happens.
9+
10+
You can install the hooks with (runs for each commit):

mkdocs.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ plugins:
2828
default_handler: python
2929
handlers:
3030
python:
31-
rendering:
31+
options:
3232
show_signature_annotations: true
3333
show_source: true
3434
show_submodules: true
35-
watch:
36-
- src/pytest_split

poetry.lock

+12-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml.rej

+124
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
diff a/pyproject.toml b/pyproject.toml (rejected hunks)
2+
@@ -18,9 +18,11 @@ classifiers = [
3+
"Operating System :: OS Independent",
4+
"Programming Language :: Python",
5+
"Programming Language :: Python :: 3",
6+
- "Programming Language :: Python :: 3.7",
7+
"Programming Language :: Python :: 3.8",
8+
"Programming Language :: Python :: 3.9",
9+
+ "Programming Language :: Python :: 3.10",
10+
+ "Programming Language :: Python :: 3.11",
11+
+ "Programming Language :: Python :: 3.12",
12+
"Topic :: Software Development :: Libraries :: Python Modules",
13+
"Typing :: Typed",
14+
]
15+
@@ -30,43 +32,54 @@ packages = [
16+
]
17+
18+
[tool.poetry.dependencies]
19+
-python = ">=3.7.1, <4.0"
20+
-
21+
-[tool.poetry.dev-dependencies]
22+
-autoflake = "*"
23+
-black = "*"
24+
-flake8 = "*"
25+
-flake8-bugbear = "*"
26+
-flake8-builtins = "*"
27+
-flake8-comprehensions = "*"
28+
-flake8-debugger = "*"
29+
-flake8-eradicate = "*"
30+
-flake8-logging-format = "*"
31+
-isort = "*"
32+
-mkdocstrings = {version = ">=0.18", extras = ["python"]}
33+
+python = ">=3.8.1, <4.0"
34+
+
35+
+[tool.poetry.group.dev.dependencies]
36+
+mkdocstrings = {version = ">=0.23", extras = ["python"]}
37+
mkdocs-material = "*"
38+
mypy = "*"
39+
-pep8-naming = "*"
40+
pre-commit = "*"
41+
pymdown-extensions = "*"
42+
pytest = "*"
43+
pytest-github-actions-annotate-failures = "*"
44+
pytest-cov = "*"
45+
python-kacl = "*"
46+
-pyupgrade = "*"
47+
-tryceratops = "*"
48+
+ruff = ">=0.2.0"
49+
50+
[build-system]
51+
requires = ["poetry-core>=1.0.0"]
52+
build-backend = "poetry.core.masonry.api"
53+
54+
-[tool.isort]
55+
-profile = "black"
56+
-src_paths = ["src", "tests"]
57+
+[tool.ruff]
58+
+target-version = "py38" # The lowest supported version
59+
+
60+
+[tool.ruff.lint]
61+
+# By default, enable all the lint rules.
62+
+# Add to the ignore list below if you don't want some rules.
63+
+# If you need some ignores for certain modules, see tool.ruff.lint.per-file-ignores below.
64+
+# For individual ignore cases, prefer inline `# noqa`s within the code.
65+
+select = ["ALL"]
66+
+ignore = [
67+
+ "ANN", # Type hints related, let mypy handle these.
68+
+ "D", # Docstrings related, way too strict to our taste
69+
+ ]
70+
+
71+
+[tool.ruff.lint.per-file-ignores]
72+
+"tests/**" = [
73+
+ "S101", # "Use of `assert` detected"
74+
+ "ARG", # "Unused function argument". Fixtures are often unused.
75+
+ "S105", # "Possible hardcoded password".
76+
+]
77+
+
78+
+[tool.ruff.lint.mccabe]
79+
+max-complexity = 10
80+
81+
-[tool.black]
82+
-target-version = ["py37", "py38", "py39"]
83+
-include = '\.pyi?$'
84+
+[tool.ruff.lint.pep8-naming]
85+
+classmethod-decorators = [
86+
+ "classmethod",
87+
+ "pydantic.validator",
88+
+ "pydantic.root_validator",
89+
+]
90+
91+
[tool.pytest.ini_options]
92+
addopts = """\
93+
@@ -84,12 +97,23 @@ exclude_lines = [
94+
]
95+
96+
[tool.mypy]
97+
+# This is the global mypy configuration.
98+
+# Avoid changing this!
99+
+strict = true # See all the enabled flags `mypy --help | grep -A 10 'Strict mode'`
100+
disallow_any_unimported = true
101+
-disallow_untyped_defs = true
102+
-no_implicit_optional = true
103+
-strict_equality = true
104+
-warn_unused_ignores = true
105+
-warn_redundant_casts = true
106+
-warn_return_any = true
107+
-check_untyped_defs = true
108+
-show_error_codes = true
109+
+
110+
+# If you need to ignore something for some specific module,
111+
+# add overrides for them. Avoid changing the global config!
112+
+# For example:
113+
+# [[tool.mypy.overrides]]
114+
+# module = [
115+
+# "my_unpyted_dependency1.*",
116+
+# "my_unpyted_dependency2.*"
117+
+# ]
118+
+# ignore_missing_imports = true
119+
+
120+
+# [[tool.mypy.overrides]]
121+
+# module = [
122+
+# "tests/my_thing/test_my_thing",
123+
+# ]
124+
+# disallow_untyped_defs = false

0 commit comments

Comments
 (0)