Skip to content

Commit 1cd5c3e

Browse files
committed
Improve pyproject configuration and pre-commit setup
1 parent 7973626 commit 1cd5c3e

File tree

3 files changed

+51
-36
lines changed

3 files changed

+51
-36
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ logs
66
venv
77
mnist_model.pkl
88
*.png
9-
fit.egg-info
9+
fit.egg-info
10+
test

.pre-commit-config.yaml

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,34 @@
11
repos:
2-
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.4.0
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.5.0
44
hooks:
5-
- id: trailing-whitespace
6-
- id: end-of-file-fixer
7-
- id: check-yaml
8-
- id: check-added-large-files
9-
- id: debug-statements
10-
- id: check-merge-conflict
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-added-large-files
9+
- id: debug-statements
10+
- id: check-merge-conflict
1111

12-
- repo: https://github.com/psf/black
13-
rev: 23.3.0
12+
- repo: https://github.com/psf/black
13+
rev: 23.12.1
1414
hooks:
15-
- id: black
16-
args: [--line-length=80]
15+
- id: black
16+
args: [--line-length=88]
1717

18-
- repo: https://github.com/pycqa/flake8
19-
rev: 6.0.0
18+
- repo: https://github.com/pycqa/isort
19+
rev: 5.13.2
2020
hooks:
21-
- id: flake8
22-
args: [--max-line-length=80]
23-
additional_dependencies: [flake8-docstrings]
21+
- id: isort
22+
args: [--profile=black]
2423

25-
- repo: https://github.com/pycqa/isort
26-
rev: 5.12.0
24+
- repo: https://github.com/pycqa/flake8
25+
rev: 6.1.0
2726
hooks:
28-
- id: isort
29-
args: [--profile=black]
27+
- id: flake8
28+
args: [--max-line-length=88]
29+
30+
- repo: https://github.com/pre-commit/mirrors-mypy
31+
rev: v1.8.0
32+
hooks:
33+
- id: mypy
34+
additional_dependencies: [types-PyYAML]

pyproject.toml

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,36 @@ license = {text = "MIT"}
1111
authors = [{name = "Łukasz Bielaszewski", email = "lukaszbielaszewskibiz@gmail.com"}]
1212
requires-python = ">=3.9"
1313
dependencies = [
14-
"numpy>=1.20.0",
14+
"numpy>=1.21.0",
15+
"pyyaml>=6.0",
1516
]
1617
classifiers = [
17-
"Development Status :: Delta",
18-
"Intended Audience :: Developers, New Users into Machine Learning",
18+
"Development Status :: 4 - Beta",
19+
"Intended Audience :: Developers",
20+
"Intended Audience :: Science/Research",
1921
"License :: OSI Approved :: MIT License",
2022
"Programming Language :: Python :: 3",
2123
"Programming Language :: Python :: 3.9",
2224
"Programming Language :: Python :: 3.10",
2325
"Programming Language :: Python :: 3.11",
26+
"Programming Language :: Python :: 3.12",
2427
]
2528

2629
[project.optional-dependencies]
2730
dev = [
28-
"pytest>=6.0.0",
29-
"pytest-cov>=2.12.0",
30-
"flake8>=3.9.0",
31-
"black>=21.5b2",
31+
"pytest>=7.0.0",
32+
"pytest-cov>=4.0.0",
33+
"black>=23.0.0",
34+
"isort>=5.12.0",
35+
"flake8>=6.0.0",
36+
"mypy>=1.0.0",
3237
]
3338
examples = [
34-
"matplotlib>=3.4.0",
39+
"matplotlib>=3.5.0",
3540
"jupyter>=1.0.0",
3641
"notebook>=6.4.0",
37-
"scikit-learn>=0.24.0",
38-
"pandas>=1.2.0",
42+
"scikit-learn>=1.1.0",
43+
"pandas>=1.4.0",
3944
]
4045

4146
[project.urls]
@@ -46,12 +51,16 @@ Repository = "https://github.com/Klus3kk/fit"
4651
include = ["fit*"]
4752

4853
[tool.black]
49-
line-length = 70
54+
line-length = 88
5055

5156
[tool.isort]
5257
profile = "black"
5358

54-
[tool.mypy] # type checker
55-
python_version = "3.8"
59+
[tool.mypy]
60+
python_version = "3.9"
5661
warn_return_any = true
57-
disallow_untyped_defs = true
62+
disallow_untyped_defs = true
63+
64+
[tool.pytest.ini_options]
65+
testpaths = ["tests"]
66+
addopts = ["--cov=fit"]

0 commit comments

Comments
 (0)