1- # Utils PEP 621 is enhanced or some fancy build
2- # system comes up with a clever mechanism to
3- # itegrate it all. For now poetry works best.
4-
5-
6- # ###################
7- # Build System #
8- # ###################
9-
10- [build-system ]
11- requires = [" poetry-core" ]
12- build-backend = " poetry.core.masonry.api"
13-
14-
151# ###################
162# Metadata #
173# ###################
184
19- [tool . poetry ]
5+ [project ]
206name = " validators"
217version = " 0.21.1"
228description = " Python Data Validation for Humans™"
23- authors = [" Konsta Vesterinen < konsta@fastmonkeys.com> " ]
24- license = " MIT "
9+ authors = [{ name = " Konsta Vesterinen" , email = " konsta@fastmonkeys.com" } ]
10+ requires-python = " >=3.8 "
2511readme = " README.md"
26- repository = " https://github.com/python-validators/validators "
12+ license = { text = " MIT " }
2713keywords = [" validation" , " validator" , " python-validator" ]
2814classifiers = [
2915 " Development Status :: 4 - Beta" ,
@@ -40,136 +26,106 @@ classifiers = [
4026 " Programming Language :: Python :: Implementation :: CPython" ,
4127 " Topic :: Software Development :: Libraries :: Python Modules" ,
4228]
43- include = [" CHANGES.md" , " docs/*" , " docs/validators.1" , " validators/py.typed" ]
44-
4529
4630# ###################
4731# Dependencies #
4832# ###################
4933
50- [tool .poetry .dependencies ]
51- python = " ^3.8"
52- eth-hash = {extras = [" pycryptodome" ], version = " ^0.5.2" }
53-
54- [tool .poetry .group .docs ]
55- optional = true
34+ dependencies = []
5635
57- [tool .poetry .group .docs .dependencies ]
58- mkdocs = " ^1.4.2"
59- mkdocs-material = " ^9.1.6"
60- mkdocstrings = { extras = [" python" ], version = " ^0.21.2" }
61- pyaml = " ^21.10.1"
62-
63- [tool .poetry .group .hooks ]
64- optional = true
65-
66- [tool .poetry .group .hooks .dependencies ]
67- pre-commit = " ^3.2.2"
68-
69- [tool .poetry .group .sast ]
70- optional = true
71-
72- [tool .poetry .group .sast .dependencies ]
73- bandit = " ^1.7.5"
74-
75- [tool .poetry .group .sphinx ]
76- optional = true
77-
78- [tool .poetry .group .sphinx .dependencies ]
79- sphinx = " ^6.1.3"
80- myst-parser = " ^1.0.0"
81- pypandoc-binary = " ^1.11"
82-
83- [tool .poetry .group .testing ]
84- optional = true
85-
86- [tool .poetry .group .testing .dependencies ]
87- pytest = " ^7.3.0"
88-
89- [tool .poetry .group .tooling ]
90- optional = true
36+ [project .optional-dependencies ]
37+ docs-offline = [" myst-parser>=2.0.0" , " pypandoc-binary>=1.11" , " sphinx>=7.1.1" ]
38+ docs-online = [
39+ " mkdocs>=1.5.1" ,
40+ " mkdocs-material>=9.1.21" ,
41+ " mkdocstrings[python]>=0.22.0" ,
42+ " pyaml>=23.7.0" ,
43+ ]
44+ hooks = [" pre-commit>=3.3.3" ]
45+ runner = [" tox>=4.6.4" ]
46+ sast = [" bandit[toml]>=1.7.5" ]
47+ testing = [" pytest>=7.4.0" ]
48+ tooling = [" black>=23.7.0" , " ruff>=0.0.280" , " pyright>=1.1.318" ]
9149
92- [tool .poetry .group .tooling .dependencies ]
93- black = " ^23.3.0"
94- flake8 = " ^5.0.4"
95- flake8-docstrings = " ^1.7.0"
96- isort = " ^5.12.0"
97- pyright = " ^1.1.302"
98- tox = " ^4.4.11"
50+ # ###################
51+ # Build System #
52+ # ###################
9953
54+ [build-system ]
55+ requires = [" setuptools>=61" , " wheel" ]
56+ build-backend = " setuptools.build_meta"
10057
10158# ###################
10259# Configurations #
10360# ###################
10461
62+ [tool .bandit ]
63+ exclude_dirs = [
64+ " .github" ,
65+ " .pytest_cache" ,
66+ " .tox" ,
67+ " .venv" ,
68+ " .vscode" ,
69+ " site" ,
70+ " tests" ,
71+ ]
72+
10573[tool .black ]
10674line-length = 100
10775target-version = [" py38" , " py39" , " py310" , " py311" ]
10876
109- [tool .bandit ]
110- exclude_dirs = [" .github" , " .pytest_cache" , " .tox" , " .vscode" , " site" , " tests" ]
111-
112- [tool .isort ]
113- ensure_newline_before_comments = true
114- force_grid_wrap = 0
115- force_sort_within_sections = true
116- import_heading_firstparty = " local"
117- import_heading_localfolder = " local"
118- import_heading_stdlib = " standard"
119- import_heading_thirdparty = " external"
120- include_trailing_comma = true
121- known_local_folder = [" validators" ]
122- length_sort = true
123- line_length = 100
124- multi_line_output = 3
125- profile = " black"
126- reverse_relative = true
127- reverse_sort = true
128- skip_gitignore = true
129- use_parentheses = true
130-
13177[tool .pyright ]
132- include = [" validators " , " tests" ]
133- exclude = [" **/__pycache__" , " .pytest_cache/" , " .tox/" , " site/" ]
78+ include = [" src " , " tests" ]
79+ exclude = [" **/__pycache__" , " .pytest_cache/" , " .tox/" , " .venv/ " , " site/" ]
13480pythonVersion = " 3.8"
13581pythonPlatform = " All"
13682typeCheckingMode = " strict"
13783
84+ [tool .ruff ]
85+ select = [" E" , " F" , " I" , " N" , " D" ]
86+ line-length = 100
87+ target-version = " py38"
88+ extend-exclude = [" **/__pycache__" , " .pytest_cache" , " site" ]
89+
90+ [tool .ruff .isort ]
91+ # case-sensitive = true
92+ combine-as-imports = true
93+ force-sort-within-sections = true
94+ force-wrap-aliases = true
95+ known-local-folder = [" src" ]
96+ relative-imports-order = " closest-to-furthest"
97+
98+ [tool .ruff .pydocstyle ]
99+ convention = " google"
100+
138101[tool .tox ]
139102legacy_tox_ini = """
140103[tox]
141- min_version = 4.0
142- env_list =
143- py{38,39,310,311}
144- format_black
145- format_isort
146- lint
147- type_check
104+ requires =
105+ tox>=4
106+ env_list = lint, type, format, sast, py{38,39,310,311}
148107
149- [testenv]
150- description = run unit tests
151- deps = pytest
152- commands = pytest
108+ [testenv:lint]
109+ description = ruff linter
110+ deps = ruff
111+ commands = ruff check .
112+
113+ [testenv:type]
114+ description = pyright type checker
115+ deps = pyright
116+ commands = pyright .
153117
154- [testenv:format_black ]
155- description = run formatter
118+ [testenv:format ]
119+ description = code formatter
156120deps = black
157121commands = black .
158122
159- [testenv:format_isort]
160- description = run formatter
161- deps = isort
162- commands = isort .
123+ [testenv:sast]
124+ deps = bandit[toml]
125+ commands = bandit -c pyproject.toml -r .
163126
164- [testenv:lint]
165- description = run linters
166- deps = flake8
167- commands = flake8
168-
169- [testenv:type_check]
170- description = run type checker
171- deps =
172- pyright
173- pytest
174- commands = pyright
127+ [testenv]
128+ description = unit tests
129+ deps = pytest
130+ commands = pytest .
175131"""
0 commit comments