Skip to content

[TEST] Bartek's Lab #629

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 45 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
f2c297a
Try converting project to pyproject.toml and uv
Ickerday Jul 28, 2025
81a4e95
Update project URLs
Ickerday Jul 28, 2025
1ebcdc6
Remove unused packages and add flake8 found in tox.ini
Ickerday Jul 28, 2025
4502606
Update name, remove setup.py
Ickerday Jul 28, 2025
dae08b0
Extract deps into dev deps
Ickerday Jul 28, 2025
69bb731
Move versioning to pyproject.toml, adjust version extracting to use i…
Ickerday Jul 28, 2025
0c2b2a5
Try fix CI/CD
Ickerday Jul 29, 2025
7b320c4
Try fix build #2
Ickerday Jul 29, 2025
343713e
Reformat README
Ickerday Jul 31, 2025
b59c407
Remove Commands.conf.spec.xlsx
Ickerday Jul 31, 2025
338170e
Remove .env
Ickerday Jul 31, 2025
01774fa
Add missing deps
Ickerday Jul 31, 2025
7bd53fc
Fiddle around with CI/CD
Ickerday Jul 31, 2025
db6b3ee
Add miscellaneous changes
Ickerday Jul 31, 2025
2c386a9
Fiddle around with CI/CD #2
Ickerday Jul 31, 2025
f154e90
Fiddle around with CI/CD #3
Ickerday Jul 31, 2025
9fed603
Fiddle around with CI/CD #4
Ickerday Jul 31, 2025
0cfbaae
Fiddle around with CI/CD #5
Ickerday Jul 31, 2025
e51e42f
Fiddle around with CI/CD #6
Ickerday Jul 31, 2025
a865779
Fiddle around with CI/CD #7
Ickerday Jul 31, 2025
c8ee057
Change default Splunk version in .env.template to v10
Ickerday Jul 31, 2025
a0498aa
Fiddle around with CI/CD #8
Ickerday Aug 4, 2025
79d2dd5
Move tox config to pyproject.toml, return to old version accessing st…
Ickerday Aug 5, 2025
fa7fb74
Assorted small changes
Ickerday Aug 5, 2025
4cef846
Try caching virtualenvs in GitHub Actions
Ickerday Aug 5, 2025
1bf86e6
Fix not using venv after restoring cache
Ickerday Aug 5, 2025
9ce725d
Add caching .tox as well
Ickerday Aug 5, 2025
18b97df
Test cache
Ickerday Aug 5, 2025
c114d78
Fix build breaking if the cache is invalid
Ickerday Aug 5, 2025
5770ac3
Back out of caching for now
Ickerday Aug 5, 2025
bbff0d6
Add `build` package as release won't work without it
Ickerday Aug 5, 2025
5297914
Pin GH Action versions to specific commits
Ickerday Aug 5, 2025
caeba73
Format GH templates
Ickerday Aug 5, 2025
bb5f45c
Try another approach to splitting dependencies in pyproject.toml
Ickerday Aug 5, 2025
0e0f2a5
Finally figure out how dependency groups are managed in pip?
Ickerday Aug 5, 2025
8855231
Add matrix to release.yml for easier configuration in the future, add…
Ickerday Aug 5, 2025
4a8bb2d
Try using an older Splunk version to determine cause of CI failures
Ickerday Aug 5, 2025
89ca01b
Change `where` calls to `type -a`
Ickerday Aug 5, 2025
5114df6
Fix wrong Splunk version in .env.template
Ickerday Aug 5, 2025
728c67a
Reformat .env.template, add new Splunk 10 env variable to docker-compose
Ickerday Aug 6, 2025
3af9355
Change .env template name, add Docker health check ot test.yml
Ickerday Aug 6, 2025
5f74aab
Add quotes to port mappings
Ickerday Aug 6, 2025
ec11167
Enable only Python 3.7, 3.9 and splunk 8.2 and 9.4
Ickerday Aug 6, 2025
c09e8de
Set release.yml to use Python 3.9
Ickerday Aug 6, 2025
13fbd86
Readd Python 3.7 to tox
Ickerday Aug 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .env → .env.test
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
# Access scheme (default: https)
scheme=https
# Splunk host (default: localhost)
host=localhost
# Splunk admin port (default: 8089)
port=8089

# Splunk username
username=admin
# Splunk password
password=changed!
# Access scheme (default: https)
scheme=https
# Your version of Splunk (default: 6.2)
version=9.0

# Your version of Splunk (default: latest)
version=latest

# Bearer token for authentication
#splunkToken="<Bearer-token>"
# splunkToken="<Bearer-token>"
# Session key for authentication
#token="<Session-Key>"
# token="<Session-Key>"
16 changes: 9 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,14 +24,16 @@ A clear and concise description of what you expected to happen.
If applicable, add logs or screenshots to help explain your problem.

**Splunk (please complete the following information):**

- Version: [e.g. 8.0.5]
- OS: [e.g. Ubuntu 20.04.1]
- Deployment: [e.g. single-instance]

**SDK (please complete the following information):**
- Version: [e.g. 1.6.14]
- Language Runtime Version: [e.g. Python 3.7]
- OS: [e.g. MacOS 10.15.7]

- Version: [e.g. 1.6.14]
- Language Runtime Version: [e.g. Python 3.7]
- OS: [e.g. MacOS 10.15.7]

**Additional context**
Add any other context about the problem here.
9 changes: 3 additions & 6 deletions .github/ISSUE_TEMPLATE/custom.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
---
name: Custom issue template
about: Describe this issue template's purpose here.
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---


7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---

**Is your feature request related to a problem? Please describe.**
Expand Down
9 changes: 4 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE/pr_template.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
---
name: Pull Request Template
about: Create a Pull Request to contribute to the SDK
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---

## Description of PR

Provide the **context and motivation** for this PR.
Provide the **context and motivation** for this PR.
Briefly explain the **type of changes** (bug fix, feature request, doc update, etc.) made in this PR. Provide reference to issue # fixed, if applicable.

Describe the approach to the solution, the changes made, and any resulting change in behavior or impact to the user.
Expand Down
54 changes: 28 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,45 @@
name: Release
name: Publish release
on:
release:
types: [published]
workflow_dispatch:
inputs:
dry-run:
type: boolean
required: true
default: true

jobs:
publish:
name: Deploy Release to PyPI
runs-on: ubuntu-latest
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.9]
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: 3.7
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install twine
run: pip install . --group build
- name: Build package
run: python setup.py sdist
run: python -m build
- name: Publish package to PyPI
uses: pypa/[email protected]
if: ${{ inputs.dry-run == 'false' }}
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc
with:
user: __token__
password: ${{ secrets.pypi_password }}
- name: Install tox
run: pip install tox
- name: Generate API docs
password: ${{ secrets.PYPI_PASSWORD }}
- name: Generate API reference docs
run: |
rm -rf ./docs/_build
tox -e docs
- name : Docs Upload
uses: actions/upload-artifact@v3
python -m tox -e docs
- name: Upload API reference docs
if: ${{ inputs.dry-run == 'false' }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: python_sdk_docs
path: docs/_build/html
# Test upload
# - name: Publish package to TestPyPI
# uses: pypa/gh-action-pypi-publish@master
# with:
# user: __token__
# password: ${{ secrets.test_pypi_password }}
# repository_url: https://test.pypi.org/legacy/
77 changes: 37 additions & 40 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,48 @@
name: Python CI
name: Run test suite

on:
[ push, workflow_dispatch ]
on: [push, workflow_dispatch]

jobs:
build:

test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
python: [ 3.9, 3.13 ]
os: [ubuntu-latest]
python-version:
- 3.7
- 3.9
# - 3.13
splunk-version:
- "8.1"
- "8.2"
- "latest"
include:
- os: ubuntu-22.04
python: 3.7
splunk-version: "8.1"
- os: ubuntu-22.04
python: 3.7
splunk-version: "8.2"
- os: ubuntu-22.04
python: 3.7
splunk-version: "latest"

- "9.3"
# - "9.4"
# - "latest"
fail-fast: false

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Run docker compose
run: SPLUNK_VERSION=${{matrix.splunk-version}} docker compose up -d

- name: Setup Python
uses: actions/setup-python@v4
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Set up environment variables
run: cp ./.env.test ./.env
- name: Launch Splunk ${{ matrix.splunk-version }}
run: SPLUNK_VERSION=${{ matrix.splunk-version }} docker compose up -d
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: ${{ matrix.python }}

- name: Install tox
run: pip install tox

- name: Test Execution
run: tox -e py
fossa-scan:
uses: splunk/oss-scanning-public/.github/workflows/oss-scan.yml@main
secrets: inherit
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: type -a python && python -m pip install tox
# - name: Run Docker health check
# # This probably solves nothing
# run: |
# timeout 30s make wait_up
# if [ $? -eq 124 ]; then
# echo "Splunk failed to start within 30 seconds."
# docker compose logs
# exit 1
# fi
- name: Run test suite
run: type -a python && python -m tox -e py
# [BJ] I'll uncomment this step after I finish fiddling
# fossa-scan:
# uses: splunk/oss-scanning-public/.github/workflows/oss-scan.yml@main
# secrets: inherit
9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*coverage_html_report*
.coverage
.coverage.*
.python-version
.vscode
__stdout__
docs/_build
Expand All @@ -17,12 +16,16 @@ coverage_report
test.log
tests/searchcommands_data/log/
tests/searchcommands_data/output/
Test Results*.html
tests/searchcommands/data/app/app.log
tests/searchcommands/apps/app_with_logging_configuration/*.log
Test Results*.html
splunk_sdk.egg-info/
.splunkrc
dist/
tests/searchcommands/apps/app_with_logging_configuration/*.log
*.observed
venv/
.venv/
.mypy_cache/
.tox
test-reports/
.env
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.9.23
Loading
Loading