-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpyproject.toml
More file actions
120 lines (111 loc) · 4.09 KB
/
pyproject.toml
File metadata and controls
120 lines (111 loc) · 4.09 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
[project]
name = "datacommons-platform"
version = "0.0.1"
description = 'The Data Commons Platform is an open source semantic graph database for modeling, querying, and analyzing interconnected data.'
readme = "README.md"
requires-python = ">=3.11"
license = "Apache-2.0"
license-files = ["LICENSE"]
keywords = []
authors = []
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
"datacommons-cli",
]
[dependency-groups]
dev = [
{include-group = "lint"},
{include-group = "test"}
]
lint = [
"pre-commit>=4.5.1",
"ruff>=0.15.0",
]
test = [
"pytest>=9.0.2",
]
[project.urls]
Documentation = "https://github.com/datacommonsorg/datacommons#readme"
Issues = "https://github.com/datacommonsorg/datacommons/issues"
Source = "https://github.com/datacommonsorg/datacommons"
[tool.uv.sources]
datacommons-api = { workspace = true }
datacommons-db = { workspace = true }
datacommons-schema = { workspace = true }
datacommons-cli = { workspace = true }
[tool.uv.workspace]
members = ["packages/*"]
[tool.coverage.run]
source = ["datacommons"]
branch = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if __name__ == .__main__.:",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"pass",
"@abstractmethod",
]
[tool.ruff.lint]
# Visit https://docs.astral.sh/ruff/rules/ for detailed rule descriptions.
extend-select = [
"ERA", # removes commented-out code from Python files.
"FAST", # linting FastAPI specifics
"YTT", # Flake8 checks for misuse of `sys.version` or `sys.version_info`
"ANN", # Flake8 Type Annotation Checks
"S", # Automated security testing with bandit and flake8.
"BLE", # A flake8 extension that checks for blind except: statements
"FBT", # A flake8 plugin to detect boolean traps.
"B", # flake8-bugbear finds likely bugs and design problems.
"A", # flake8-builtins detects shadowed python builtins
"COM", # flake8 lint for trailing commas.
"C4", # flake8 plugin to help write better list/set/dict comprehensions
"ISC", # flake8 plugin to encourage correct string literal concatenation
"LOG", # flake8 plugin checks for issues with standard library logging module
"G", # flake8 plugin to encourage better formatting of built-in logging strings
"PIE", # flake8 misc lints
"PT", # flake8 plugin checks common pitfalls with pytest-based tests
"RET", # encourages good return practices
"SIM", # flake8-simplify checks common simplification patterns
"TID", # flake8-tidy-imports encourages tidier imports
"TD", # flake8-todos lints TODOs throughout the project for consistency
"TC", # flake8 plugin for managing type-checking imports & forward references
"ARG", # flake8-unused-arguments warns on unused function arguments
"PTH", # flake8-use-pathlib encourages pathlib over os.path
"I", # isort sorts Python imports
"N", # check PEP-8 naming conventions
"PERF", # Pylint extension with performance anti-patterns
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes analyzes and detects various errors
"PL", # pylint
"Q", # defaults to double quotes
"UP", # Encourage syntax supported by newer python versions
# "CPY", # check for copyright headers # uncomment once graduated from preview
]
extend-ignore = [
"TD003", # missing-todo-link: Missing issue link for this TODO
"PLC", # pylint conventions
"PLR", # pylint refactor
"COM812", # missing-trailing-comma may conflict with formatter
"E501", # line-too-long
]
[tool.ruff.lint.per-file-ignores]
"packages/*/tests/**/*.py" = [
"S101", # Allow using `assert` in pytests
"ANN001", # Ignore missing type annotations in test files
"ANN201", # Ignore missing return types in public test functions
"ANN202", # Ignore missing return types in private test functions
"PLR2004"
]
# Explicitly define PyPI as the default index
[[tool.uv.index]]
url = "https://pypi.org/simple"