Skip to content

Commit f83af55

Browse files
authored
Modernize project to use pyproject.toml, review .gitignore and untrack any ignored files, update README (#660)
* Add pyproject.toml * Add a properly fleshed-out .gitignore file * Add .vscode to .gitignore * Remove pytest from deps * Remove tox.ini * Simplify .gitignore a bit * Remove XLSX file * Remove test report generation, clean up tox config, remove setuptools from dependencies * Update release workflow to use pyproject.toml * Format Markdown files * Add CD workflow for Test PyPI * Remove .gitattributes as we don't store any binary files that use Git LFS * Clean up Makefile * Remove .pylintrc * Remove scripts/ * Remove tests/README.md * Update README
1 parent 6a131b7 commit f83af55

23 files changed

+2551
-819
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
22
name: Bug report
33
about: Create a report to help us improve
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
4+
title: ""
5+
labels: ""
6+
assignees: ""
87
---
98

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

1312
**To Reproduce**
1413
Steps to reproduce the behavior:
14+
1515
1. Go to '...'
16-
2. Click on '....'
17-
3. Scroll down to '....'
16+
2. Click on '...'
17+
3. Scroll down to '...'
1818
4. See error
1919

2020
**Expected behavior**
@@ -24,14 +24,16 @@ A clear and concise description of what you expected to happen.
2424
If applicable, add logs or screenshots to help explain your problem.
2525

2626
**Splunk (please complete the following information):**
27+
2728
- Version: [e.g. 8.0.5]
2829
- OS: [e.g. Ubuntu 20.04.1]
2930
- Deployment: [e.g. single-instance]
3031

3132
**SDK (please complete the following information):**
32-
- Version: [e.g. 1.6.14]
33-
- Language Runtime Version: [e.g. Python 3.7]
34-
- OS: [e.g. MacOS 10.15.7]
33+
34+
- Version: [e.g. 1.6.14]
35+
- Language Runtime Version: [e.g. Python 3.7]
36+
- OS: [e.g. MacOS 10.15.7]
3537

3638
**Additional context**
3739
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/custom.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
---
22
name: Custom issue template
33
about: Describe this issue template's purpose here.
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
4+
title: ""
5+
labels: ""
6+
assignees: ""
87
---
9-
10-

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
name: Feature request
33
about: Suggest an idea for this project
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
4+
title: ""
5+
labels: ""
6+
assignees: ""
87
---
98

109
**Is your feature request related to a problem? Please describe.**

.github/PULL_REQUEST_TEMPLATE/pr_template.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
---
22
name: Pull Request Template
33
about: Create a Pull Request to contribute to the SDK
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
4+
title: ""
5+
labels: ""
6+
assignees: ""
87
---
98

109
## Description of PR
1110

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

1514
Describe the approach to the solution, the changes made, and any resulting change in behavior or impact to the user.

.github/workflows/cd.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: CD
2+
on: [workflow_dispatch]
3+
4+
jobs:
5+
test-pypi-deploy:
6+
name: Deploy to Test PyPI
7+
runs-on: ubuntu-latest
8+
permissions:
9+
id-token: write
10+
environment:
11+
name: splunk-test-pypi
12+
steps:
13+
- name: Checkout source
14+
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
15+
- name: Set up Python
16+
uses: actions/setup-python@3d1e2d2ca0a067f27da6fec484fce7f5256def85
17+
with:
18+
python-version: 3.9
19+
- name: Install dependencies
20+
run: pip install build
21+
- name: Build package
22+
run: python -m build
23+
- name: Publish package to Test PyPI
24+
uses: pypa/gh-action-pypi-publish@d417ba7e7683fa9104c42abe611c1f2c93c0727d
25+
with:
26+
user: __token__
27+
password: ${{ secrets.TEST_PYPI_PASSWORD }}
28+
repository-url: https://test.pypi.org/legacy/

.github/workflows/fossa.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: Fossa OSS Scan
22
on: [push]
3+
34
jobs:
45
fossa-scan:
56
uses: splunk/oss-scanning-public/.github/workflows/oss-scan.yml@main

.github/workflows/release.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,28 @@ on:
55

66
jobs:
77
publish:
8-
name: Deploy Release to PyPI
9-
# Last version with Python 3.7 binaries available
10-
runs-on: ubuntu-22.04
8+
name: Deploy release to PyPI
9+
runs-on: ubuntu-latest
10+
permissions:
11+
id-token: write
12+
environment:
13+
name: splunk-pypi
1114
steps:
1215
- name: Checkout source
1316
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
1417
- name: Set up Python
1518
uses: actions/setup-python@3d1e2d2ca0a067f27da6fec484fce7f5256def85
1619
with:
17-
python-version: 3.7
20+
python-version: 3.9
1821
- name: Install dependencies
19-
run: pip install twine
22+
run: pip install build
2023
- name: Build package
21-
run: python setup.py sdist bdist_wheel
24+
run: python -m build
2225
- name: Publish package to PyPI
2326
uses: pypa/gh-action-pypi-publish@d417ba7e7683fa9104c42abe611c1f2c93c0727d
2427
with:
2528
user: __token__
26-
password: ${{ secrets.pypi_password }}
29+
password: ${{ secrets.PYPI_PASSWORD }}
2730
- name: Install tox
2831
run: pip install tox
2932
- name: Generate API docs
@@ -35,10 +38,3 @@ jobs:
3538
with:
3639
name: python_sdk_docs
3740
path: docs/_build/html
38-
# Test upload
39-
# - name: Publish package to TestPyPI
40-
# uses: pypa/gh-action-pypi-publish@d417ba7e7683fa9104c42abe611c1f2c93c0727d
41-
# with:
42-
# user: __token__
43-
# password: ${{ secrets.test_pypi_password }}
44-
# repository_url: https://test.pypi.org/legacy/

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ jobs:
3232
- name: Install tox
3333
run: pip install tox
3434
- name: Test Execution
35-
run: tox -e py
35+
run: tox -e py -- ./tests

0 commit comments

Comments
 (0)