-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpyproject.toml
More file actions
142 lines (124 loc) · 4.07 KB
/
pyproject.toml
File metadata and controls
142 lines (124 loc) · 4.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# ---- managed by somesy, see .somesy.toml ----
[project]
name = "fair-python-cookiecutter"
version = "1.0.0"
description = "An opinionated cookiecutter template to kickstart a modern best-practice Python project with FAIR metadata."
readme = "README.md"
keywords = [
"fair",
"metadata",
"python",
"cookiecutter",
"template",
]
classifiers = [
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
]
requires-python = ">=3.9"
dependencies = [
"cookiecutter>=2.6.0",
"typer[all]>=0.12.3",
"pydantic>=2.8.2",
"typing-extensions>=4.12.2",
"pydantic-yaml>=1.3.0",
"spdx-lookup>=0.3.3",
"platformdirs>=4.2.2",
"importlib-resources>=6.4.0",
"importlib-metadata (>=8.6.1,<9.0.0)",
]
authors = [
{name = "Anton Pirogov",email = "a.pirogov@fz-juelich.de"},
{name = "Mustafa Soylu",email = "m.soylu@fz-juelich.de"},
]
maintainers = [
{name = "Mustafa Soylu",email = "m.soylu@fz-juelich.de"},
]
license = {text = "MIT"}
[project.urls]
homepage = "https://materials-data-science-and-informatics.github.io/fair-python-cookiecutter"
repository = "https://github.com/Materials-Data-Science-and-Informatics/fair-python-cookiecutter"
documentation = "https://materials-data-science-and-informatics.github.io/fair-python-cookiecutter"
[tool.poetry]
# the Python packages that will be included in a built distribution:
packages = [{include = "fair_python_cookiecutter", from = "src"}]
# always include basic info for humans and core metadata in the distribution,
# include files related to test and documentation only in sdist:
include = [
"*.md", "LICENSE", "LICENSES", "REUSE.toml", "CITATION.cff", "codemeta.json",
"mkdocs.yml", "docs", "tests",
{ path = "mkdocs.yml", format = "sdist" },
{ path = "docs", format = "sdist" },
{ path = "tests", format = "sdist" },
]
[tool.poetry.group.dev.dependencies]
poethepoet = "^0.32.2"
pre-commit = "^3.5.0"
pytest = "^8.3.2"
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
mkdocs = "^1.6.1"
mkdocstrings = {extras = ["python"], version = "^0.25.2"}
mkdocs-material = "^9.5.30"
mkdocs-gen-files = "^0.5.0"
mkdocs-literate-nav = "^0.6.1"
mkdocs-section-index = "^0.3.9"
mkdocs-macros-plugin = "^1.0.5"
mkdocs-autorefs = "^1.4.0"
markdown-include = "^0.8.1"
pymdown-extensions = "^10.9"
markdown-exec = {extras = ["ansi"], version = "^1.9.3"}
mkdocs-coverage = "^1.1.0"
mike = "^2.1.2"
anybadge = "^1.14.0"
interrogate = "^1.7.0"
black = "^24.4.2"
[project.scripts]
fair-python-cookiecutter = "fair_python_cookiecutter.cli:app"
[build-system]
requires = ["poetry-core>=2.0"]
build-backend = "poetry.core.masonry.api"
# NOTE: You can run the following with "poetry poe TASK"
[tool.poe.tasks]
init-dev = { shell = "pre-commit install" }
lint = "pre-commit run" # pass --all-files to check everything
test = "pytest" # pass --cov to also collect coverage info
docs = "mkdocs build" # run this to generate local documentation
# Tool Configurations
# -------------------
[tool.pytest.ini_options]
pythonpath = ["src"]
addopts = "--ignore='src/fair_python_cookiecutter/template'"
# addopts = "--cov-report=term-missing:skip-covered"
filterwarnings = [
"ignore::DeprecationWarning:pkg_resources.*",
"ignore::DeprecationWarning:pyshacl.*",
# Example:
# "ignore::DeprecationWarning:importlib_metadata.*",
]
[tool.coverage.run]
source = ["fair_python_cookiecutter"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
[tool.ruff.lint]
# see here: https://docs.astral.sh/ruff/rules/
# ruff by default works like a mix of flake8, autoflake and black
# we extend default linter rules to substitute:
# flake8-bugbear, pydocstyle, isort, flake8-bandit
extend-select = ["B", "D", "I", "S"]
ignore = ["D203", "D213", "D407", "B008", "S101", "D102", "D103"]
[tool.ruff.lint.per-file-ignores]
"**/{tests,docs}/*" = ["ALL"]