Skip to content

Commit 6d0c28a

Browse files
authored
Bump all packages, update makefile, uv.lock (#113)
1 parent f4a9529 commit 6d0c28a

7 files changed

Lines changed: 421 additions & 374 deletions

File tree

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ jobs:
1212
- name: Verify uv.lock is up-to-date
1313
run: uv lock --check
1414
- name: Install dependencies with uv
15-
run: uv sync
15+
run: SDK_DEPS_GROUP="lint" make uv-sync-ci
1616
- name: Verify basedpyright baseline
1717
run: uv run --frozen basedpyright

.github/workflows/pre-release.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,22 @@ jobs:
1212
environment:
1313
name: splunk-test-pypi
1414
steps:
15-
- name: Checkout source
15+
- name: Checkout code
1616
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
17-
- name: Set up Python ${{ env.PYTHON_VERSION }}
17+
- name: Setup Python ${{ matrix.python-version }}
1818
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
1919
with:
20-
python-version: ${{ env.PYTHON_VERSION }}
20+
python-version: ${{ matrix.python-version }}
21+
cache: pip
22+
- name: Setup uv
23+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78
24+
with:
25+
activate-environment: true
26+
enable-cache: true
2127
- name: Install dependencies
22-
run: python -m pip install . --group build
28+
run: SDK_DEPS_GROUP="release" make uv-sync-ci
2329
- name: Build packages for distribution
24-
run: python -m build
30+
run: uv build
2531
- name: Publish packages to Test PyPI
2632
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e
2733
with:

.github/workflows/release.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
types: [published]
55

66
env:
7-
PYTHON_VERSION: 3.9
7+
PYTHON_VERSION: 3.13
88

99
jobs:
1010
publish-sdk-pypi:
@@ -14,16 +14,22 @@ jobs:
1414
environment:
1515
name: splunk-pypi
1616
steps:
17-
- name: Checkout source
17+
- name: Checkout code
1818
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
19-
- name: Set up Python ${{ env.PYTHON_VERSION }}
19+
- name: Setup Python ${{ matrix.python-version }}
2020
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
2121
with:
22-
python-version: ${{ env.PYTHON_VERSION }}
22+
python-version: ${{ matrix.python-version }}
23+
cache: pip
24+
- name: Setup uv
25+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78
26+
with:
27+
activate-environment: true
28+
enable-cache: true
2329
- name: Install dependencies
24-
run: python -m pip install . --group release
30+
run: SDK_DEPS_GROUP="release" make uv-sync-ci
2531
- name: Build packages for distribution
26-
run: python -m build
32+
run: uv build
2733
- name: Publish packages to PyPI
2834
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e
2935
- name: Generate API reference

.github/workflows/test.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,16 @@ jobs:
1616
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
1717
with:
1818
python-version: ${{ matrix.python-version }}
19-
cache: "pip"
19+
cache: pip
20+
- name: Setup uv
21+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78
22+
with:
23+
activate-environment: true
24+
enable-cache: true
2025
- name: Install dependencies
21-
run: python -m pip install '.[openai, anthropic]' --group test
26+
run: SDK_DEPS_GROUP="test" make uv-sync-ci
2227
- name: Download Splunk MCP Server App
23-
run: python ./scripts/download_splunk_mcp_server_app.py
28+
run: uv run ./scripts/download_splunk_mcp_server_app.py
2429
env:
2530
SPLUNKBASE_USERNAME: ${{ secrets.SPLUNKBASE_USERNAME }}
2631
SPLUNKBASE_PASSWORD: ${{ secrets.SPLUNKBASE_PASSWORD }}

Makefile

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,23 @@
33
## VIRTUALENV MANAGEMENT
44

55
# https://docs.astral.sh/uv/reference/cli/#uv-run--upgrade
6-
# --no-config skips our Splunk package index
6+
# --no-config skips Splunk's internal PyPI mirror
7+
UV_SYNC_CMD := uv sync --no-config
8+
79
.PHONY: uv-sync
810
uv-sync:
9-
uv sync --no-config
11+
$(UV_SYNC_CMD) --dev
1012

1113
.PHONY: uv-upgrade
1214
uv-upgrade:
13-
uv sync --no-config --upgrade
15+
$(UV_SYNC_CMD) --dev --upgrade
16+
17+
18+
# Workaround for make being unable to pass arguments to underlying cmd
19+
# $ SDK_DEPS_GROUP="build" make uv-sync-ci
20+
.PHONY: uv-sync-ci
21+
uv-sync-ci:
22+
uv sync --locked --group $(SDK_DEPS_GROUP)
1423

1524
.PHONY: clean
1625
clean:
@@ -22,9 +31,11 @@ docs:
2231

2332
## TESTING
2433

25-
# -ra generates a report on all failed tests
26-
# -vv lets us see what failed and why the rest of the suite is running
27-
PYTEST_CMD := python -m pytest --no-header -ra -vv
34+
# --ff lets previously failing tests go first
35+
# -ra prints a report on all failed tests after a run
36+
# -vv shows why a test failed while the rest of the suite is running
37+
PYTHON_CMD := uv run python
38+
PYTEST_CMD := $(PYTHON_CMD) -m pytest --no-header --ff -ra -vv
2839

2940
.PHONY: test
3041
test:
@@ -36,7 +47,6 @@ test-unit:
3647

3748
.PHONY: test-integration
3849
test-integration:
39-
# Previously failing tests go first
4050
$(PYTEST_CMD) --ff ./tests/integration ./tests/system
4151

4252
.PHONY: test-ai

pyproject.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,21 @@ dependencies = []
3333
# Treat the same as NPM's `dependencies`
3434
[project.optional-dependencies]
3535
compat = ["six>=1.17.0"]
36-
ai = ["mcp>=1.26.0", "pydantic>=2.12.5", "langchain>=1.2.7"]
37-
anthropic = ["splunk-sdk[ai]", "langchain-anthropic>=0.3"]
38-
openai = ["splunk-sdk[ai]", "langchain-openai>=1.1.7"]
36+
ai = ["httpx==0.28.1", "langchain>=1.2.13", "mcp>=1.26.0", "pydantic>=2.7.4"]
37+
anthropic = ["splunk-sdk[ai]>=2.1.1", "langchain-anthropic>=1.4.0"]
38+
openai = ["splunk-sdk[ai]>=2.1.1", "langchain-openai>=1.1.12"]
3939

4040
# Treat the same as NPM's `devDependencies`
4141
[dependency-groups]
4242
test = [
4343
"splunk-sdk[ai]",
4444
"pytest>=9.0.2",
45-
"pytest-cov>=7.0.0",
45+
"pytest-cov>=7.1.0",
4646
"pytest-asyncio>=1.3.0",
4747
"python-dotenv>=1.2.1",
4848
]
49-
release = ["build>=1.4.0", "jinja2>=3.1.6", "twine>=6.2.0", "sphinx>=9.1.0"]
50-
lint = ["basedpyright>=1.37.2", "ruff>=0.14.14"]
49+
release = ["build>=1.4.2", "jinja2>=3.1.6", "sphinx>=9.1.0", "twine>=6.2.0"]
50+
lint = ["basedpyright>=1.38.4", "ruff>=0.15.8"]
5151
dev = [
5252
"splunk-sdk[openai, anthropic]",
5353
{ include-group = "test" },

0 commit comments

Comments
 (0)