-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
129 lines (100 loc) · 3.32 KB
/
Copy pathpyproject.toml
File metadata and controls
129 lines (100 loc) · 3.32 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
# SPDX-FileCopyrightText: 2024-present Marc Love <copyright@marclove.com>
#
# SPDX-License-Identifier: MIT
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "pythreads"
dynamic = ["version"]
description = "A Python wrapper of Meta's Threads API"
readme = "README.md"
requires-python = ">=3.8"
license = { file = "LICENSE.txt" }
keywords = ["threads", "meta", "sdk"]
authors = [{ name = "Marc Love", email = "copyright@marclove.com" }]
maintainers = [{ name = "Marc Love", email = "copyright@marclove.com" }]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"aiohttp>=3.9,<3.11",
"python-dotenv==1.0.*",
"requests==2.32.*",
"requests-oauthlib==2.0.*",
]
[project.urls]
Homepage = "https://github.com/marclove/pythreads"
Documentation = "https://github.com/marclove/pythreads#readme"
Repository = "https://github.com/marclove/pythreads"
Issues = "https://github.com/marclove/pythreads/issues"
[tool.hatch.version]
path = "src/pythreads/__about__.py"
[tool.hatch.build.targets.sdist]
exclude = [".github/*", ".env.template"]
### Environments ###
[tool.hatch.envs.default]
python = "3.12"
[tool.hatch.envs.docs]
extra-dependencies = ["sphinx", "furo", "myst-parser"]
[tool.hatch.envs.docs.scripts]
build = "cd docs && make html"
# Lint environment
[tool.hatch.envs.lint]
extra-dependencies = [
"pyright>=1.1.371",
"ruff",
"pytest",
] # pytest needed for linting checks
[tool.hatch.envs.lint.scripts]
pyright-run = "pyright {args:.}"
ruff-run = "ruff check --fix {args:.}"
watch = "ruff check --watch {args:.}"
all = ["pyright-run", "ruff-run"]
# Code coverage environment
[tool.hatch.envs.coverage]
extra-dependencies = ["coverage[toml]", "pytest", "pytest-cov"]
[tool.hatch.envs.coverage.scripts]
all = 'pytest -m "not smoke" --cov-config=pyproject.toml --cov=src/pythreads'
generate = 'coverage html'
clean = "coverage erase"
# Test environments
[[tool.hatch.envs.test.matrix]]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
[tool.hatch.envs.test]
extra-dependencies = ["pytest"]
[tool.hatch.envs.test.scripts]
all = 'pytest -m "not smoke" {args:.}'
smoke = 'pytest -m "smoke" {args:.}'
[tool.hatch.envs.smoke-test]
extra-dependencies = ["pytest"]
[tool.hatch.envs.smoke-test.scripts]
all = 'pytest -m "smoke" {args:.}'
### Testing ###
[tool.pytest.ini_options]
addopts = "-s -v --strict-markers"
markers = [
"smoke: makes real requests to the Threads API and requires real credentials",
]
### Coverage ###
[tool.coverage.run]
branch = true
parallel = true
omit = ["src/pythreads/__about__.py"]
[tool.coverage.paths]
pythreads = ["src/pythreads", "*/pythreads/src/pythreads"]
tests = ["tests", "*/pythreads/tests"]
[tool.coverage.report]
exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"]