Skip to content

Commit e36f9f7

Browse files
committed
chore: Convert to pyproject.toml
1 parent 44c7088 commit e36f9f7

File tree

4 files changed

+78
-85
lines changed

4 files changed

+78
-85
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
src/schema.json
2+
13
site/
24
.DS_Store
35
.idea

tools/schemacode/MANIFEST.in

Lines changed: 0 additions & 1 deletion
This file was deleted.

tools/schemacode/pyproject.toml

Lines changed: 76 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,94 @@
11
[build-system]
2-
requires = ["setuptools"]
2+
requires = ["setuptools>=61.2"]
33
build-backend = "setuptools.build_meta"
44

5+
[project]
6+
name = "bidsschematools"
7+
description = "Python tools for working with the BIDS schema."
8+
authors = [{name = "bids-standard developers"}]
9+
maintainers = [{name = "bids-standard developers", email = "[email protected]"}]
10+
license = {text = "MIT"}
11+
readme = "README.md"
12+
requires-python = ">=3.8"
13+
dependencies = [
14+
"click",
15+
"pyyaml",
16+
'importlib_resources; python_version < "3.9"',
17+
"jsonschema",
18+
]
19+
classifiers = [
20+
"Development Status :: 4 - Beta",
21+
"Intended Audience :: Science/Research",
22+
"Topic :: Scientific/Engineering :: Information Analysis",
23+
"License :: OSI Approved :: MIT License",
24+
"Programming Language :: Python :: 3.8",
25+
"Programming Language :: Python :: 3.9",
26+
"Programming Language :: Python :: 3.10",
27+
"Programming Language :: Python :: 3.11",
28+
]
29+
dynamic = ["version"]
30+
31+
[project.optional-dependencies]
32+
doc = [
33+
"sphinx>=1.5.3",
34+
"sphinx_rtd_theme",
35+
]
36+
render = [
37+
"tabulate",
38+
"pandas",
39+
"markdown-it-py",
40+
]
41+
expressions = ["pyparsing"]
42+
tests = [
43+
"codecov",
44+
"coverage[toml]",
45+
"flake8",
46+
"flake8-black",
47+
"flake8-isort",
48+
"pytest",
49+
"pytest-cov",
50+
]
51+
all = [
52+
"bidsschematools[doc,render,tests,expressions]",
53+
]
54+
55+
[project.scripts]
56+
bst = "bidsschematools.__main__:cli"
57+
58+
[project.urls]
59+
Homepage = "https://github.com/bids-standard/bids-specification"
60+
61+
[tool.setuptools.package-data]
62+
bidsschematools = [
63+
"data/metaschema.json",
64+
"data/schema.json",
65+
"data/schema/BIDS_VERSION",
66+
"data/schema/SCHEMA_VERSION",
67+
"data/schema/**/*.yaml",
68+
"tests/data/*",
69+
]
70+
71+
[tool.setuptools.dynamic]
72+
version = {file = ["src/bidsschematools/data/schema/SCHEMA_VERSION"]}
73+
574
[tool.black]
675
line-length = 99
7-
target-version = ['py37']
876
include = '\.pyi?$'
9-
exclude = '''
10-
(
11-
/(
12-
\.eggs # exclude a few common directories in the
13-
| \.git # root of the project
14-
| \.github
15-
| \.hg
16-
| \.pytest_cache
17-
| _build
18-
| build
19-
| dist
20-
)/
21-
)
22-
'''
2377

2478
[tool.isort]
2579
profile = "black"
2680
multi_line_output = 3
2781

2882
[tool.pytest.ini_options]
83+
addopts = "-ra --strict-markers --strict-config"
84+
log_cli = true
85+
log_cli_level = "INFO"
2986
markers = [
3087
"validate_schema: tests that validate the schema itself",
3188
]
89+
minversion = "6.0"
90+
xfail_strict = true
91+
3292

3393
[tool.coverage.paths]
3494
source = [

tools/schemacode/setup.cfg

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,7 @@
1-
[metadata]
2-
name = bidsschematools
3-
version = file:src/bidsschematools/data/schema/SCHEMA_VERSION
4-
url = https://github.com/bids-standard/bids-specification
5-
author = bids-standard developers
6-
author_email = [email protected]
7-
description = Python tools for working with the BIDS schema.
8-
long_description = file:README.md
9-
long_description_content_type = text/markdown; charset=UTF-8; variant=GFM
10-
license = MIT
11-
classifiers =
12-
Development Status :: 4 - Beta
13-
Intended Audience :: Science/Research
14-
Topic :: Scientific/Engineering :: Information Analysis
15-
License :: OSI Approved :: MIT License
16-
Programming Language :: Python :: 3.8
17-
Programming Language :: Python :: 3.9
18-
Programming Language :: Python :: 3.10
19-
Programming Language :: Python :: 3.11
20-
21-
[options]
22-
python_requires = >=3.8
23-
install_requires =
24-
click
25-
pyyaml
26-
importlib_resources; python_version < "3.9"
27-
jsonschema
28-
zip_safe = false
29-
30-
[options.extras_require]
31-
doc =
32-
sphinx>=1.5.3
33-
sphinx_rtd_theme
34-
render =
35-
tabulate
36-
pandas
37-
markdown-it-py
38-
expressions =
39-
pyparsing
40-
tests =
41-
codecov
42-
coverage[toml]
43-
flake8
44-
flake8-black
45-
flake8-isort
46-
pytest
47-
pytest-cov
48-
all =
49-
%(doc)s
50-
%(render)s
51-
%(tests)s
52-
%(expressions)s
53-
54-
[options.package_data]
55-
bidsschematools =
56-
data/metaschema.json
57-
data/schema/BIDS_VERSION
58-
data/schema/SCHEMA_VERSION
59-
data/schema/**/*.yaml
60-
tests/data/*
61-
62-
[options.entry_points]
63-
console_scripts =
64-
bst=bidsschematools.__main__:cli
65-
661
[flake8]
672
max-line-length = 99
683
exclude = *build/
694
ignore = E203,E402,E722,W503
705
per-file-ignores =
716
*/__init__.py : F401
727
docstring-convention = numpy
73-
74-
[tool:pytest]
75-
log_cli = true

0 commit comments

Comments
 (0)