-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
201 lines (182 loc) · 6.53 KB
/
pyproject.toml
File metadata and controls
201 lines (182 loc) · 6.53 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
[build-system]
requires = ["hatchling>=1.27"]
build-backend = "hatchling.build"
[project]
name = "simtabi-release-kit"
version = "0.4.0"
description = "Multi-registry publishing automation. PyPI, npm, Docker, Homebrew, Maven, RubyGems, Cargo, NuGet, Packagist, plus seven git hosts. Fluent OOP, config-driven, OIDC-first."
readme = "README.md"
license = { file = "LICENSE" }
authors = [{ name = "Simtabi LLC", email = "opensource@simtabi.com" }]
maintainers = [{ name = "Imani Manyara", email = "imani@simtabi.com" }]
requires-python = ">=3.11"
keywords = [
"release", "publish", "pypi", "npm", "docker", "homebrew",
"ci-cd", "github-actions", "oidc", "automation"
]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Build Tools",
"Topic :: System :: Software Distribution",
]
# Base install: enough for the CLI to run + the PyPI / GitHub paths.
# Per-platform clients install on demand via extras (below).
dependencies = [
"typer>=0.12",
"pydantic>=2.7",
"structlog>=24.1",
"httpx>=0.27",
"keyring>=24.3",
"python-dotenv>=1.0",
"tomli; python_version<'3.11'", # we floor at 3.11 so this is belt-and-braces
"platformdirs>=4.2",
]
[project.optional-dependencies]
# Per-platform extras keep the base install lean.
aws = ["boto3>=1.34"]
gcp = ["google-cloud-artifactregistry>=1.13"]
azure = ["azure-containerregistry>=1.2", "azure-identity>=1.16"]
docker = [] # uses subprocess to `docker` CLI; no python client needed
twine = ["twine>=5.0", "build>=1.2"]
github = [] # uses gh CLI + REST via httpx
gitlab = [] # uses REST via httpx
all = [
"boto3>=1.34",
"google-cloud-artifactregistry>=1.13",
"azure-containerregistry>=1.2",
"azure-identity>=1.16",
"twine>=5.0",
"build>=1.2",
]
dev = [
"pytest>=8.2",
"pytest-cov>=5.0",
"pytest-asyncio>=0.23",
"respx>=0.21",
"ruff>=0.6",
"mypy>=1.10",
"pre-commit>=3.7",
"types-PyYAML",
"jsonschema>=4.21", # validates the bundled release-kit.schema.json
]
[project.scripts]
release-kit = "release_kit.cli.app:app"
[project.urls]
Homepage = "https://opensource.simtabi.com/products/release-kit"
Documentation = "https://opensource.simtabi.com/documentation/release-kit"
Repository = "https://github.com/simtabi/release-kit"
Issues = "https://github.com/simtabi/release-kit/issues"
Changelog = "https://github.com/simtabi/release-kit/blob/main/CHANGELOG.md"
# Plugin discovery: third parties can add platforms without forking.
[project.entry-points."release_kit.platforms"]
pypi = "release_kit.platforms.registries.pypi:PyPI"
dockerhub = "release_kit.platforms.registries.dockerhub:DockerHub"
ghcr = "release_kit.platforms.registries.ghcr:GHCR"
npm = "release_kit.platforms.registries.npm:Npm"
homebrew = "release_kit.platforms.registries.homebrew:Homebrew"
github = "release_kit.platforms.git_hosts.github:GitHub"
gitlab = "release_kit.platforms.git_hosts.gitlab:GitLab"
gitlab-registry = "release_kit.platforms.registries.gitlab_registry:GitLabRegistry"
aws-ecr = "release_kit.platforms.registries.aws_ecr:AWSElasticContainerRegistry"
gar = "release_kit.platforms.registries.gar:GoogleArtifactRegistry"
acr = "release_kit.platforms.registries.acr:AzureContainerRegistry"
npm-github = "release_kit.platforms.registries.npm_github:NpmGitHubPackages"
npm-gitlab = "release_kit.platforms.registries.npm_gitlab:NpmGitLabRegistry"
rubygems = "release_kit.platforms.registries.rubygems:RubyGems"
cargo = "release_kit.platforms.registries.cargo:CratesIo"
nuget = "release_kit.platforms.registries.nuget:NuGet"
packagist = "release_kit.platforms.registries.packagist:Packagist"
maven-central = "release_kit.platforms.registries.maven_central:MavenCentral"
github-enterprise-cloud = "release_kit.platforms.git_hosts.github_enterprise:GitHubEnterpriseCloud"
github-enterprise-server = "release_kit.platforms.git_hosts.github_enterprise:GitHubEnterpriseServer"
gitlab-self-managed = "release_kit.platforms.git_hosts.gitlab_self_managed:GitLabSelfManaged"
bitbucket = "release_kit.platforms.git_hosts.bitbucket:BitbucketCloud"
bitbucket-dc = "release_kit.platforms.git_hosts.bitbucket_dc:BitbucketDataCenter"
gitea = "release_kit.platforms.git_hosts.gitea:Gitea"
azure-devops = "release_kit.platforms.git_hosts.azure_devops:AzureDevOps"
conda-forge = "release_kit.platforms.registries.conda_forge:CondaForge"
[tool.hatch.build]
include = [
"src/release_kit/**/*.py",
"src/release_kit/schema/*.json",
"src/release_kit/py.typed",
]
exclude = [
"**/__pycache__",
"**/.pytest_cache",
"**/*.pyc",
]
[tool.hatch.build.targets.wheel]
packages = ["src/release_kit"]
[tool.hatch.build.targets.sdist]
include = [
"src/",
"tests/",
"docs/",
"README.md",
"CHANGELOG.md",
"LICENSE",
"pyproject.toml",
"Makefile",
".env-example",
]
[tool.ruff]
line-length = 100
target-version = "py311"
src = ["src", "tests"]
extend-exclude = ["docs/playbook/**"]
[tool.ruff.lint]
select = [
"E", "F", "W", "I", "N", "UP", "B", "SIM", "RUF", "C4", "PT",
]
ignore = ["E501"] # line-length handled separately
[tool.ruff.lint.per-file-ignores]
# clean_env is a setup-only fixture intentionally named without _
# prefix so it's visible at test call sites as a setup marker.
"tests/conftest.py" = ["PT004"]
[tool.mypy]
python_version = "3.11"
strict = true
warn_return_any = true
warn_unused_ignores = true
disallow_untyped_decorators = true
exclude = ["tests/fixtures/.*"]
[[tool.mypy.overrides]]
module = ["respx.*", "keyring.*"]
ignore_missing_imports = true
[tool.pytest.ini_options]
minversion = "8.0"
testpaths = ["tests"]
addopts = [
"-ra",
"--strict-markers",
"--strict-config",
"--cov=release_kit",
"--cov-report=term-missing:skip-covered",
"--cov-fail-under=70",
]
markers = [
"integration: requires network + real credentials; gated by env vars; skipped by default",
"slow: takes > 1s",
]
[tool.coverage.run]
branch = true
source = ["src/release_kit"]
omit = [
"*/cli/app.py", # CLI is exercised via subprocess integration tests; not unit-coverable
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
]