Skip to content

Commit bb5f45c

Browse files
committed
Try another approach to splitting dependencies in pyproject.toml
1 parent caeba73 commit bb5f45c

File tree

6 files changed

+62
-45
lines changed

6 files changed

+62
-45
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
with:
1616
python-version: 3.9
1717
- name: Install dependencies
18-
run: pip install .
18+
run: pip install ".[build]"
1919
- name: Build package
2020
run: python -m build
2121
- name: Publish package to PyPI

.github/workflows/test.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ jobs:
1010
os: [ubuntu-latest]
1111
python-version: [3.9, 3.13]
1212
splunk-version: ["9.3", "9.4", "latest"]
13-
1413
fail-fast: false
15-
1614
steps:
1715
- name: Checkout repo
1816
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
@@ -25,7 +23,7 @@ jobs:
2523
with:
2624
python-version: ${{ matrix.python-version }}
2725
- name: Install Python dependencies to venv
28-
run: pip install .
26+
run: pip install ".[test]"
2927
- name: Run test suite
3028
run: python -m tox -e py
3129
# [BJ] I'll obviously uncomment this step after I finish fiddling

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ services:
77
- SPLUNK_START_ARGS=--accept-license
88
- SPLUNK_HEC_TOKEN=11111111-1111-1111-1111-1111111111113
99
- SPLUNK_PASSWORD=changed!
10-
- SPLUNK_APPS_URL=https://github.com/splunk/sdk-app-collection/releases/download/v1.1.0/sdkappcollection.tgz
10+
- SPLUNK_APPS_URL=https://github.com/splunk/sdk-app-collection/releases/latest/download/sdkappcollection.tgz
1111
ports:
1212
- 8000:8000
1313
- 8088:8088

pyproject.toml

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,42 @@
22
requires = ["setuptools"]
33
build-backend = "setuptools.build_meta"
44

5+
[tool.setuptools.dynamic]
6+
version = { attr = "splunklib.__version__" }
7+
58
[project.urls]
69
HOMEPAGE = "https://pypi.org/project/splunk-sdk"
7-
DOCS = "https://docs.splunk.com/Documentation/PythonSDK/2.0.0"
10+
DOCS = "https://docs.splunk.com/Documentation/PythonSDK/2.1.0"
811
REPO = "http://github.com/splunk/splunk-sdk-python.git"
912

1013
[project]
1114
name = "splunk-sdk"
15+
dynamic = ["version"]
1216
description = "The Splunk Software Development Kit for Python"
1317
readme = "README.md"
1418
requires-python = ">=3.9.23"
1519
license = { file = "LICENSE" }
1620
authors = [{ name = "Splunk, Inc.", email = "[email protected]" }]
17-
dynamic = ["version"]
1821
classifiers = [
19-
"Programming Language :: Python",
20-
"Development Status :: 6 - Mature",
21-
"Environment :: Other Environment",
22-
"Intended Audience :: Developers",
23-
"Operating System :: OS Independent",
24-
"Topic :: Software Development :: Libraries :: Python Modules",
25-
"Topic :: Software Development :: Libraries :: Application Frameworks",
22+
"Programming Language :: Python",
23+
"Development Status :: 6 - Mature",
24+
"Environment :: Other Environment",
25+
"Intended Audience :: Developers",
26+
"Operating System :: OS Independent",
27+
"Topic :: Software Development :: Libraries :: Python Modules",
28+
"Topic :: Software Development :: Libraries :: Application Frameworks",
2629
]
2730

28-
dependencies = [
29-
"build>=1.3.0",
30-
"deprecation>=2.1.0",
31-
"mypy>=1.17.1",
32-
"python-dotenv>=1.1.1",
33-
"ruff>=0.12.7",
34-
"setuptools>=80.9.0",
35-
"tox>=4.28.3",
36-
]
31+
dependencies = ["deprecation", "python-dotenv"]
3732

38-
# TODO :(
39-
# [dependency-groups]
40-
# dev = []
33+
[project.optional-dependencies]
34+
test = ["tox"]
35+
lint = ["mypy", "ruff"]
36+
build = ["build", "setuptools", "splunk-sdk[test]"]
37+
all = ["splunk-sdk[test, lint, build]"]
4138

42-
[tool.setuptools.dynamic]
43-
version = { attr = "splunklib.__version__" }
39+
[tool.uv]
40+
# default-groups = ["test", "lint", "build"]
4441

4542
# https://docs.astral.sh/ruff/configuration/
4643
[tool.ruff]
@@ -53,13 +50,14 @@ indent-style = "space"
5350
line-ending = "auto"
5451

5552
[tool.ruff.lint]
53+
pydocstyle.convention = "google"
5654
fixable = ["ALL"]
5755
select = [
58-
"F", # pyflakes
59-
"E", # pycodestyle
60-
"I", # isort
61-
"ANN", # flake8 type annotations
62-
"RUF", # ruff-specific rules
56+
"F", # pyflakes
57+
"E", # pycodestyle
58+
"I", # isort
59+
"ANN", # flake8 type annotations
60+
"RUF", # ruff-specific rules
6361
]
6462

6563
[tool.tox]
@@ -70,6 +68,7 @@ envlist = clean,docs,py39,313
7068
skipsdist = {env:TOXBUILD:false}
7169
7270
# TODO: Replace with ruff
71+
# https://docs.astral.sh/ruff/settings/
7372
[testenv:pep8]
7473
deps = flake8
7574
flake8-import-order

splunk-sdk-python.code-workspace

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"passenv",
2323
"posargs",
2424
"pycodestyle",
25+
"pydocstyle",
2526
"pyflakes",
2627
"pypa",
2728
"pypi",

uv.lock

Lines changed: 31 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)