-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpyproject.toml
More file actions
143 lines (124 loc) · 5.3 KB
/
pyproject.toml
File metadata and controls
143 lines (124 loc) · 5.3 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
[project]
authors = [{ email = "[email protected]", name = "LINKUP TECHNOLOGIES" }]
description = "A Python Client SDK for the Linkup API"
keywords = ["api", "client", "linkup", "sdk", "search"]
license = "MIT"
name = "linkup-sdk"
readme = "README.md"
requires-python = ">=3.10,<4.0"
version = "0.16.0"
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = ["httpx>=0.23.0", "pydantic>=2.0.0"]
[project.optional-dependencies]
build = ["uv>=0.11.6,<0.12.0"] # For python-semantic-release build command, used in GitHub actions
x402 = ["x402[httpx,evm]>=2.0.0"]
[project.urls]
Documentation = "https://github.com/LinkupPlatform/linkup-python-sdk#readme"
Homepage = "https://github.com/LinkupPlatform/linkup-python-sdk"
Source = "https://github.com/LinkupPlatform/linkup-python-sdk"
Tracker = "https://github.com/LinkupPlatform/linkup-python-sdk/issues"
[dependency-groups]
dev = [
"prek>=0.3.5",
"pyright>=1.1.409",
"pytest-asyncio>=1.0.0",
"pytest-cov>=6.2.1",
"pytest-mock>=3.14.1",
"pytest>=9.0.3",
"python-dotenv>=1.2.2",
"x402[httpx,evm]>=2.0.0",
]
[tool.pyright]
include = ["./src/", "./tests/"]
reportMissingParameterType = false # Redundant with Ruff ANN001
reportPrivateUsage = false # Redundant with Ruff SLF001
reportUnnecessaryIsInstance = false # Incompatible with the `if: … else: typing.assert_never(…)` pattern
reportUnusedImport = false # Redundant with Ruff F401
reportUnusedVariable = false # Redundant with Ruff F841
typeCheckingMode = "strict"
[tool.pytest.ini_options]
asyncio_default_fixture_loop_scope = "function"
[tool.coverage.report]
exclude_also = ["raise TypeError", "raise ValueError"]
show_missing = true
skip_covered = true
[tool.ruff]
line-length = 100
target-version = "py310"
unsafe-fixes = true
[tool.ruff.lint]
explicit-preview-rules = true
extend-ignore = ["D107"]
preview = true
pydocstyle = { convention = "google" }
# See rules documentation at: https://docs.astral.sh/ruff/rules/
select = [
"A", # flake8-builtins: avoid shadowing built-in names
"ANN", # flake8-annotations: check for missing type annotations
"ASYNC", # flake8-async: enforce best practices for async code
"B", # flake8-bugbear: find likely bugs and design problems in your program
"C4", # flake8-comprehensions: enforce best practices for list/set/dict comprehensions
"D", # pydocstyle: check compliance with docstring conventions
"E", # pycodestyle errors: check for PEP 8 style convention errors
"F", # pyflakes: check for Python source file errors
"FA", # flake8-future-annotations: enforce usage of future annotations when relevant
"I", # isort: enforce import sorting
"ICN", # flake8-import-conventions: enforce general import conventions
"ISC", # flake8-implicit-str-concat: check for invalid implicit or explicit string concatenation
"N", # pep8-naming: check for naming convention violations
"PERF", # perflint: check for performance anti-patterns
# pylint (PL): check for errors, enforce coding standards, looks for code smells, and make refactoring suggestions
"PLC", # pylint conventions
"PLE", # pylint errors
"PLW", # pylint warnings
"PT", # flake8-pytest-style: check common style issues and inconsistencies in pytest-based tests
"PTH", # flake8-use-pathlib: enforce usage of pathlib for path manipulations instead of os.path
"Q", # flake8-quotes: enforce consistent string quote usage
"RET", # flake8-return: enforce best practices for return statements
"RSE", # flake8-raise: enforce best practices for raise statements
"RUF", # ruff: enforce ruff specific rules
"S", # flake8-bandit: check for security issues
"SLF", # flake8-self: prevent accessing private class member
"TC", # flake8-type-checking: enforce best practices for type checking imports
"TD", # flake8-todos: check issues on TODO comment syntax
"UP", # pyupgrade: upgrade syntax for newer versions of Python
"W", # pycodestyle warnings: check for PEP 8 style convention warnings
]
[tool.ruff.lint.extend-per-file-ignores]
"src/linkup/__init__.py" = ["D104"]
"tests/**/*test.py" = ["D", "S101"]
ignore = [
"PTH123", # open() should be replaced by Path.open()
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"TD001", # Invalid TODO tag
"TD002", # Missing author in TODO
"TD003", # Missing issue link in TODO
]
[tool.ruff.lint.flake8-type-checking]
runtime-evaluated-base-classes = ["pydantic.BaseModel"]
[tool.hatch.build.targets.wheel]
packages = ["src/linkup"] # Because project and source code directory names differ
[tool.semantic_release]
allow_zero_version = true
build_command = """
python -m pip install -e '.[build]'
uv lock --upgrade-package "$PACKAGE_NAME"
git add uv.lock
uv build
"""
commit_message = "chore: release v{version}\n\nAutomatically generated by python-semantic-release\n\n[skip ci]" # [skip ci] is needed to avoid recursively calling the release CI
major_on_zero = false
version_toml = ["pyproject.toml:project.version"]
[tool.semantic_release.commit_parser_options]
parse_squash_commits = false
[tool.uv]
exclude-newer = "2 weeks" # Reduce risks of supply chain attacks
required-version = ">=0.11.6,<0.12.0"
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]