Skip to content

Commit 25b6c59

Browse files
committed
Start using pyproject.toml (sort of)
On the path to being compatible with PEPs 518 & 517. - the pyproject.toml isn't used for build or dependencies yet, still use setuptools (w/ setup.py) for that. - dependencies (both runtime and dev) are specified in requirements.txt - pyproject.toml is used for most of the tools now, except pytest (see: pytest-dev/pytest#1556) and mypy (see: python/mypy#5205)
1 parent ed1360a commit 25b6c59

File tree

3 files changed

+65
-1
lines changed

3 files changed

+65
-1
lines changed

pyproject.toml

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
[project]
2+
name = "SENTINEL-archive"
3+
version = "0.1.dev0"
4+
description = "A datapackage (https://frictionlessdata.io/specs/data-package/) implementation for the SENTINEL project."
5+
repository = "https://github.com/sentinel-energy/sentinel-archive"
6+
keywords = ["datapackage", "SENTINEL", "archive"]
7+
classifiers = [
8+
"Development Status :: 2 - Pre-Alpha",
9+
"Intended Audience :: Science/Research",
10+
"Topic :: Scientific/Engineering",
11+
"Programming Language :: Python",
12+
"Programming Language :: Python :: 3",
13+
"Programming Language :: Python :: 3 :: Only"
14+
]
15+
16+
[dependencies]
17+
18+
[dev-dependencies]
19+
20+
[build-system]
21+
requires = ["setuptools>=42", "setuptools_scm[toml]>=3.4" ]
22+
build-backend = "setuptools.build_meta"
23+
24+
# [tool.setuptools_scm]
25+
# write_to = "sark/version.py"
26+
27+
[tool.pytest]
28+
# not yet supported, see: https://github.com/pytest-dev/pytest/issues/1556
29+
30+
[tool.coverage.run]
31+
omit = ["sark/cli.py"]
32+
33+
# [tool.mypy]
34+
# ignore_missing_imports = "True"
35+
36+
[tool.black]
37+
line-length = 79
38+
include = '\.pyi?$'
39+
exclude = '''
40+
/(
41+
\.eggs
42+
| \.git
43+
| \.github
44+
| \.mypy_cache
45+
| \.pytest_cache
46+
| \.vscode
47+
| _build
48+
| build
49+
| dist
50+
| .*\.egg-info
51+
52+
# directories without python source files
53+
| testing/data
54+
| tmp
55+
| htmlcov
56+
| dsts
57+
)/
58+
'''

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
coverage
1+
coverage[toml]
22
datapackage
33
flake8
44
glom

setup.cfg

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[tool:pytest]
2+
addopts = -ra -q --cov=sark
3+
# --doctest-modules --doctest-continue-on-failure
4+
5+
[mypy]
6+
ignore_missing_imports = True

0 commit comments

Comments
 (0)