Skip to content

Commit 7258455

Browse files
committed
chore: a big update
1 parent 32e5c1b commit 7258455

File tree

11 files changed

+86
-18
lines changed

11 files changed

+86
-18
lines changed

.github/workflows/build-test-release.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ on:
55
branches:
66
- "main"
77
- "develop"
8-
tags:
9-
- "v[0-9]+.[0-9]+.[0-9]+"
108
pull_request:
119
branches: [main, develop]
1210

@@ -59,7 +57,6 @@ jobs:
5957
- uses: pre-commit/[email protected]
6058

6159
semgrep:
62-
if: github.actor != 'dependabot[bot]'
6360
uses: splunk/sast-scanning/.github/workflows/sast-scan.yml@main
6461
secrets:
6562
SEMGREP_KEY: ${{ secrets.SEMGREP_PUBLISH_TOKEN }}

.github/workflows/docs.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@ name: docs
22
on:
33
push:
44
branches:
5-
- main
5+
- "main"
6+
- "develop"
7+
pull_request:
8+
branches:
9+
- "main"
10+
- "develop"
611
jobs:
712
deploy:
813
runs-on: ubuntu-latest
@@ -17,4 +22,9 @@ jobs:
1722
- run: curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1
1823
- run: |
1924
poetry install
20-
poetry run mkdocs gh-deploy --force
25+
- name: Deploy to GitHub Pages
26+
if: github.ref_name == 'main'
27+
run: poetry run mkdocs gh-deploy --force --strict
28+
- name: Build Docs
29+
if: github.ref_name != 'main'
30+
run: poetry run mkdocs build --strict

.pre-commit-config.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.4.0
4+
hooks:
5+
- id: check-merge-conflict
6+
- id: debug-statements
27
- repo: https://github.com/asottile/pyupgrade
3-
rev: v3.1.0
8+
rev: v3.3.2
49
hooks:
510
- id: pyupgrade
611
args: [--py37-plus]
712
- repo: https://github.com/psf/black
8-
rev: 22.10.0
13+
rev: 23.3.0
914
hooks:
1015
- id: black
1116
- repo: https://github.com/myint/docformatter

.releaserc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
branches:
33
[
4-
"+([0-9])?(.{+([0-9]),x}).x",
54
"main",
65
{ name: "develop", prerelease: "beta", channel: "beta" },
76
],

README.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
1-
# README
1+
# solnlib
22

3-
Splunk Solutions SDK is an open source packaged solution for getting data into Splunk using modular inputs.
4-
This SDK is used by Splunk Add-on builder, and Splunk UCC based add-ons and is intended for use by partner
5-
developers. This SDK/Library extends the Splunk SDK for python
3+
![PyPI](https://img.shields.io/pypi/v/solnlib)
4+
![Python](https://img.shields.io/pypi/pyversions/solnlib.svg)
5+
![PyPI monthly downloads](https://img.shields.io/pypi/dm/solnlib)
6+
7+
## What is solnlib?
8+
9+
`solnlib` is an open source Python library designed to be used in Splunk technology add-ons.
10+
11+
It allows to:
12+
* interact with Splunk's KVStore to manage checkpoints
13+
* read, update and delete secrets in Splunk's credential store
14+
* manipulate with Splunk's .conf files
15+
* and many more
616

717
Documentation is available [here](https://splunk.github.io/addonfactory-solutions-library-python/).
818

@@ -14,9 +24,13 @@ If you are a part of the community use: https://splunk-usergroups.slack.com/arch
1424

1525
## Support
1626

17-
Splunk Solutions SDK is an open source product developed by Splunkers. This SDK is not "Supported Software" by Splunk, Inc. issues and defects can be reported
27+
`solnlib` is an open source product developed by Splunkers. This SDK is not "Supported Software" by Splunk, Inc. issues and defects can be reported
1828
via the public issue tracker.
1929

30+
## Contributing Guidelines
31+
32+
Go to [contributing Guidelines in the repo](docs/contributing.md) or [published version](https://splunk.github.io/solnlib/contributing/).
33+
2034
## License
2135

22-
* Configuration and documentation licensed subject to [APACHE-2.0](LICENSE)
36+
Configuration and documentation licensed subject to [APACHE-2.0](LICENSE).

docs/alerts_rest_client.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# alerts_rest_client.py
2+
3+
::: solnlib.alerts_rest_client

docs/contributing.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Contributing Guidelines
2+
3+
We welcome contributions from the community! This guide will help you understand our contribution process and requirements.
4+
5+
## Development guidelines
6+
7+
1. Small PRs ([blogpost](https://testing.googleblog.com/2024/07/in-praise-of-small-pull-requests.html))
8+
1. When fixing a bug, include a test that reproduces the issue in the same pull request (the test should fail without your changes)
9+
1. If you are refactoring, ensure adequate test coverage exists for the target area. If coverage is insufficient, create tests in a separate pull request first. This approach provides a safety net for validating current behavior and simplifies code reviews.
10+
11+
## Build and Test
12+
13+
Prerequisites:
14+
15+
- Poetry 1.5.1 [Installation guide](https://python-poetry.org/docs/#installing-with-the-official-installer)
16+
17+
### Install dependencies
18+
19+
```bash
20+
poetry install
21+
```
22+
23+
### Unit tests
24+
25+
```bash
26+
poetry run pytest tests/unit
27+
```
28+
29+
### Linting and Type-checking
30+
31+
`solnlib` uses the [`pre-commit`](https://pre-commit.com) framework for linting and type-checking.
32+
Consult with `pre-commit` documentation about what is the best way to install the software.
33+
34+
To run it locally:
35+
36+
```bash
37+
pre-commit run --all-files
38+
```

mkdocs.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
site_name: Splunk Solutions SDK
1+
site_name: solnlib
22

33
theme:
44
name: "material"
@@ -31,13 +31,16 @@ plugins:
3131
nav:
3232
- Home: index.md
3333
- Release 6.0.0: release_6_0_0.md
34+
- Contributing: contributing.md
3435
- References:
3536
- modular_input:
3637
- "checkpointer.py": modular_input/checkpointer.md
3738
- "event.py": modular_input/event.md
3839
- "event_writer.py": modular_input/event_writer.md
3940
- "modular_input.py": modular_input/modular_input.md
4041
- "acl.py": acl.md
42+
- "alerts_rest_client.py": alerts_rest_client.md
43+
- "bulletin_rest_client.py": bulletin_rest_client.md
4144
- "credentials.py": credentials.md
4245
- "conf_manager.py": conf_manager.md
4346
- "file_monitor.py": file_monitor.md

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
[tool.poetry]
1818
name = "solnlib"
19-
version = "6.1.0-beta.1"
19+
version = "6.0.1"
2020
description = "The Splunk Software Development Kit for Splunk Solutions"
2121
authors = ["Splunk <[email protected]>"]
2222
license = "Apache-2.0"

solnlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@
5656
"utils",
5757
]
5858

59-
__version__ = "6.1.0-beta.1"
59+
__version__ = "6.0.1"

0 commit comments

Comments
 (0)