generated from linkml/linkml-template
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathpyproject.toml
More file actions
146 lines (134 loc) · 5.44 KB
/
pyproject.toml
File metadata and controls
146 lines (134 loc) · 5.44 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
142
143
144
145
146
[project]
name = "nmdc_schema"
dynamic = ["version"]
description = "Schema resources for the National Microbiome Data Collaborative (NMDC)"
readme = "README.md"
license = "MIT"
requires-python = ">=3.10,<4.0"
authors = [
{ name = "Bill Duncan", email = "wdduncan@gmail.com" },
{ name = "Chris Mungall", email = "cjmungall@lbl.gov" },
{ name = "Mark Andrew Miller", email = "MAM@lbl.gov" },
{ name = "Patrick Kalita", email = "pkalita@lbl.gov" },
{ name = "Sujay Patil", email = "spatil@lbl.gov" },
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3 :: Only",
]
keywords = ["NMDC", "schema", "metadata", "microbiome"]
# Upper bound policy (PR #2888): 1.0+ packages cap at next major, pre-1.0 at next minor.
dependencies = [
"click>=8.0.0,<9.0.0",
"click-log>=0.4.0,<0.5.0",
"deprecated>=1.0.0,<2.0.0",
"jsonasobj2>=1.0.0,<2.0.0",
"jsonschema>=4.0.0,<5.0.0",
"linkml>=1.9.0,<2.0.0",
"linkml-runtime>=1.9.0,<2.0.0",
"python-dotenv>=0.21.0,<2.0.0",
"pyyaml>=6.0.0,<7.0.0",
"rdflib>=6.2.0,<8.0.0",
"requests>=2.0.0,<3.0.0",
"pymdown-extensions>=10.16.1,<11.0.0",
"pymongo>=4.7.2,<5.0.0",
]
[project.urls]
Homepage = "https://microbiomedata.github.io/nmdc-schema/"
Documentation = "https://microbiomedata.github.io/nmdc-schema/"
Repository = "https://github.com/microbiomedata/nmdc-schema"
# scripts should have click clis
# click parameters/options should be written out with hyphens
# click parameters/options should use consistent names
# only package-backed, stable CLIs should be listed in project.scripts
# prefer invoking repo-local scripts from Makefiles via `poetry run python src/scripts/<name>.py`
# use underscores to delimit file name
# use hyphens to delimit CLI alias
# scripts/aliases should be illustrated in a Makefile
# Makefile targets should make use of $< etc for input and $@ for output
# input and output files should use hyphens as delimiters in their names
# check usages of these features in other NMDC code before changing
# be intentional about output location: prefer destination by purpose (`docs/`, `local/`, `project/`, package artifacts), not a blanket `assets/` default
# cli entry points should probably all be main or cli unless there's a compelling reason to do otherwise
[project.scripts]
create-migrator = "nmdc_schema.migrators.cli.create_migrator:create_migrator"
run-migrator = "nmdc_schema.migrators.cli.run_migrator:run_migrator"
migration-recursion = "nmdc_schema.migration_recursion:main"
pure-export = "nmdc_schema.dump_single_modality:cli"
# Units analysis uses yq queries in units/Makefile (Python scripts removed)
[dependency-groups]
dev = [
"autopep8>=2.2.0,<3.0.0",
"bandit>=1.7.8,<2.0.0",
"black>=26.3.1,<27.0.0",
"exhaustion-check>=0.1.1,<0.2.0", # for exhaustion-check, pretty-sort-yaml (also get-first-of-first)
"fastjsonschema>=2.20.0,<3.0.0",
"flake8>=7.0.0,<8.0.0",
"isort>=5.13.2,<9.0.0",
"mkdocs>=1.4.2,<2.0.0",
"mkdocs-material>=9.0.12,<10.0.0",
"mkdocs-mermaid2-plugin>=0.6.0,<2.0.0",
"mkdocs-redirects>=1.2.1,<2.0.0",
"mypy>=1.10.0,<2.0.0",
"pandas>=2.2.3,<4.0.0",
"psycopg2-binary>=2.9.10,<3.0.0",
"pydocstyle>=6.3.0,<7.0.0",
"pylint>=3.2.2,<5.0.0",
"pyroma>=4.2,<6.0",
"pytest>=8.4.2,<10.0.0",
# We use `refscan` to generate diagrams of inter-collection relationships
# and diagrams of inter-class relationships.
# Reference: https://github.com/microbiomedata/refscan
"refscan>=0.2.3,<0.5.0",
"ruff>=0.4.7,<1.0.0",
"schemasheets>=0.1.24,<0.5.0",
"sheets-and-friends>=0.5.0,<0.6.0", # for do_shuttle (and possibly more)
"ucumvert>=0.2.2,<0.4.0",
"vulture>=2.11,<3.0.0",
]
deps = [
"deptry>=0.23.0,<1.0.0",
]
[tool.poetry]
version = "0.0.0"
packages = [
{ include = "nmdc_schema" }, # this is the package Poetry would have included by default
{ include = "migrators", from = "nmdc_schema" },
{ include = "adapters", from = "nmdc_schema/migrators" },
]
[tool.poetry-dynamic-versioning]
# We need poetry-dynamic-versioning to update the version in the src schema file,
# then generate project artifacts from that schema with the real version populated,
# and then perform any build or publish actions. Since this requires running
# `poetry dynamic-versioning` manually before `poetry build`, we set enable = false.
enable = false
vcs = "git"
style = "pep440"
[tool.poetry-dynamic-versioning.substitution]
files = [
"src/schema/nmdc.yaml"
]
patterns = [
"(^\\s*__version__\\s*(?::.*?)?=\\s*['\\\"])[^'\\\"]*(['\\\"])",
"(^version:\\s*['\\\"]?)[^'\\\"]*?(['\\\"]?)$"
]
[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
build-backend = "poetry_dynamic_versioning.backend"
[tool.pytest.ini_options]
# Only run tests in tests/ directory to match original unittest discover behavior
# (excludes MongoDB integration tests and other tests outside tests/)
# Module independence is checked by check_schema_self_containment.py instead
testpaths = ["tests"]
[tool.deptry]
extend_exclude = [
"nmdc_schema/nmdc_pydantic.py"
]
# These are transitive dependencies but we pin them directly
# to ensure users get security fixes from Dependabot alerts
per_rule_ignores = {DEP002 = ["pymdown-extensions"]}
# linkml 1.10.0+ monorepo includes linkml-runtime
[tool.deptry.package_module_name_map]
linkml = ["linkml", "linkml_runtime"]