Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…0.4.4
  • Loading branch information
salt-extensions-renovatebot[bot] authored Sep 25, 2024
1 parent 67d6f6e commit 00a2ee9
Show file tree
Hide file tree
Showing 31 changed files with 1,177 additions and 314 deletions.
7 changes: 6 additions & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Autogenerated. Do not edit this by hand, use `copier update`.
---
_commit: 0.2.7
_commit: 0.4.4
_src_path: https://github.com/lkubb/salt-extension-copier
author: EITR Technologies, LLC
author_email: [email protected]
coc_contact: ''
copyright_begin: 2024
docs_url: ''
integration_name: Splunk
license: apache
loaders:
- module
Expand All @@ -14,10 +17,12 @@ no_saltext_namespace: false
package_name: splunk
project_name: splunk
python_requires: '3.8'
relax_pylint: false
salt_version: '3005'
source_url: https://github.com/salt-extensions/saltext-splunk
ssh_fixtures: false
summary: Salt Extension for interacting with Splunk
test_containers: false
tracker_url: https://github.com/salt-extensions/saltext-splunk/issues
url: https://github.com/salt-extensions/saltext-splunk
workflows: basic
7 changes: 7 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
layout_saltext() {
VIRTUAL_ENV="$(python3 tools/initialize.py --print-venv)"
PATH_add "$VIRTUAL_ENV/bin"
export VIRTUAL_ENV
}

layout_saltext
48 changes: 33 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Set Cache Key
Expand All @@ -34,7 +34,7 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Python 3.8 For Nox
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8

Expand All @@ -49,10 +49,16 @@ jobs:
- name: Build Docs
env:
SKIP_REQUIREMENTS_INSTALL: YES
SKIP_REQUIREMENTS_INSTALL: true
run: |
nox --force-color -e docs
- name: Upload built docs as artifact
uses: actions/upload-artifact@v4
with:
name: html-docs
path: docs/_build/html

Linux:
runs-on: ubuntu-latest
needs: Pre-Commit
Expand All @@ -73,9 +79,11 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2 # coverage: Issue detecting commit SHA

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -93,18 +101,19 @@ jobs:
- name: Test
env:
SALT_REQUIREMENT: salt==${{ matrix.salt-version }}
SKIP_REQUIREMENTS_INSTALL: YES
SKIP_REQUIREMENTS_INSTALL: true
run: |
nox --force-color -e tests-3 -- -vv tests/
- name: Create CodeCov Flags
if: always()
id: codecov-flags
run: |
echo ::set-output name=flags::$(python -c "import sys; print('{},{},salt_{}'.format('${{ runner.os }}'.replace('-latest', ''), 'py{}{}'.format(*sys.version_info), '_'.join(str(v) for v in '${{ matrix.salt-version }}'.replace('==', '_').split('.'))))")
echo flags=$(python -c "import sys; print('{},{},salt_{}'.format('${{ runner.os }}'.replace('-latest', ''), 'py{}{}'.format(*sys.version_info), '_'.join(str(v) for v in '${{ matrix.salt-version }}'.replace('==', '_').split('.'))))") >> $GITHUB_OUTPUT
- name: Upload Project Code Coverage
if: always()
continue-on-error: true
shell: bash
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand Down Expand Up @@ -137,6 +146,7 @@ jobs:
- name: Upload Tests Code Coverage
if: always()
continue-on-error: true
shell: bash
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand Down Expand Up @@ -169,7 +179,7 @@ jobs:
- name: Upload Logs
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: runtests-${{ runner.os }}-py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}.log
path: artifacts/runtests-*.log
Expand All @@ -192,9 +202,11 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -216,7 +228,7 @@ jobs:
shell: bash
env:
SALT_REQUIREMENT: salt==${{ matrix.salt-version }}
SKIP_REQUIREMENTS_INSTALL: YES
SKIP_REQUIREMENTS_INSTALL: true
run: |
export PATH="/C/Program Files (x86)/Windows Kits/10/bin/10.0.18362.0/x64;$PATH"
nox --force-color -e tests-3 -- -vv tests/
Expand All @@ -225,10 +237,11 @@ jobs:
if: always()
id: codecov-flags
run: |
echo ::set-output name=flags::$(python -c "import sys; print('{},{},salt_{}'.format('${{ runner.os }}'.replace('-latest', ''), 'py{}{}'.format(*sys.version_info), '_'.join(str(v) for v in '${{ matrix.salt-version }}'.replace('==', '_').split('.'))))")
echo flags=$(python -c "import sys; print('{},{},salt_{}'.format('${{ runner.os }}'.replace('-latest', ''), 'py{}{}'.format(*sys.version_info), '_'.join(str(v) for v in '${{ matrix.salt-version }}'.replace('==', '_').split('.'))))") >> $GITHUB_OUTPUT
- name: Upload Project Code Coverage
if: always()
continue-on-error: true
shell: bash
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand Down Expand Up @@ -261,6 +274,7 @@ jobs:
- name: Upload Tests Code Coverage
if: always()
continue-on-error: true
shell: bash
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand Down Expand Up @@ -293,7 +307,7 @@ jobs:
- name: Upload Logs
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: runtests-${{ runner.os }}-py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}.log
path: artifacts/runtests-*.log
Expand All @@ -316,9 +330,11 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -336,18 +352,19 @@ jobs:
- name: Test
env:
SALT_REQUIREMENT: salt==${{ matrix.salt-version }}
SKIP_REQUIREMENTS_INSTALL: YES
SKIP_REQUIREMENTS_INSTALL: true
run: |
nox --force-color -e tests-3 -- -vv tests/
- name: Create CodeCov Flags
if: always()
id: codecov-flags
run: |
echo ::set-output name=flags::$(python -c "import sys; print('{},{},salt_{}'.format('${{ runner.os }}'.replace('-latest', ''), 'py{}{}'.format(*sys.version_info), '_'.join(str(v) for v in '${{ matrix.salt-version }}'.replace('==', '_').split('.'))))")
echo flags=$(python -c "import sys; print('{},{},salt_{}'.format('${{ runner.os }}'.replace('-latest', ''), 'py{}{}'.format(*sys.version_info), '_'.join(str(v) for v in '${{ matrix.salt-version }}'.replace('==', '_').split('.'))))") >> $GITHUB_OUTPUT
- name: Upload Project Code Coverage
if: always()
continue-on-error: true
shell: bash
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand Down Expand Up @@ -380,6 +397,7 @@ jobs:
- name: Upload Tests Code Coverage
if: always()
continue-on-error: true
shell: bash
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand Down Expand Up @@ -412,7 +430,7 @@ jobs:
- name: Upload Logs
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: runtests-${{ runner.os }}-py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}.log
path: artifacts/runtests-*.log
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ celerybeat.pid
*.sage.py

# Environments
!.envrc
.env
.venv
env/
Expand Down
72 changes: 39 additions & 33 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
minimum_pre_commit_version: 2.4.0
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: check-merge-conflict # Check for files that contain merge conflict strings.
- id: trailing-whitespace # Trims trailing whitespace.
- id: check-merge-conflict # Check for files that contain merge conflict strings.
args: [--assume-in-merge]
- id: trailing-whitespace # Trim trailing whitespace.
args: [--markdown-linebreak-ext=md]
- id: mixed-line-ending # Replaces or checks mixed line ending.
- id: mixed-line-ending # Ensure files use UNIX-style newlines only.
args: [--fix=lf]
- id: end-of-file-fixer # Makes sure files end in a newline and only a newline.
- id: check-merge-conflict # Check for files that contain merge conflict strings.
- id: check-ast # Simply check whether files parse as valid python.
- id: end-of-file-fixer # Ensure files end with a newline.
- id: check-ast # Check whether files parse as valid Python.

# ----- Formatting ---------------------------------------------------------------------------->
- repo: https://github.com/saltstack/pre-commit-remove-import-headers
Expand All @@ -24,15 +24,15 @@ repos:
- id: check-cli-examples
name: Check CLI examples on execution modules
entry: python .pre-commit-hooks/check-cli-examples.py
language: system
language: python
files: ^src/saltext/splunk/modules/.*\.py$

- repo: local
hooks:
- id: check-docs
name: Check rST doc files exist for modules/states
entry: python .pre-commit-hooks/make-autodocs.py
language: system
language: python
pass_filenames: false

- repo: https://github.com/s0undt3ch/salt-rewrite
Expand All @@ -56,7 +56,7 @@ repos:
args: [--silent, -E, fix_docstrings]

- repo: https://github.com/asottile/pyupgrade
rev: v2.37.2
rev: v3.16.0
hooks:
- id: pyupgrade
name: Rewrite Code to be Py3.8+
Expand All @@ -65,43 +65,43 @@ repos:
]
exclude: src/saltext/splunk/version.py

- repo: https://github.com/asottile/reorder_python_imports
rev: v3.10.0
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: reorder-python-imports
- id: isort
args: [
--py38-plus,
--py 38,
]
exclude: src/saltext/splunk/version.py
exclude: src/saltext/splunk/(__init__|version).py

- repo: https://github.com/psf/black
rev: 22.6.0
rev: 24.8.0
hooks:
- id: black
args: [-l 100]
exclude: src/saltext/splunk/version.py

- repo: https://github.com/adamchainz/blacken-docs
rev: v1.12.1
rev: 1.18.0
hooks:
- id: blacken-docs
args: [--skip-errors]
files: ^(docs/.*\.rst|src/saltext/splunk/.*\.py)$
additional_dependencies:
- black==22.6.0
- black==24.2.0
# <---- Formatting -----------------------------------------------------------------------------

# ----- Security ------------------------------------------------------------------------------>
- repo: https://github.com/PyCQA/bandit
rev: "1.7.4"
rev: 1.7.9
hooks:
- id: bandit
alias: bandit-salt
name: Run bandit against the code base
args: [--silent, -lll, --skip, B701]
exclude: src/saltext/splunk/version.py
- repo: https://github.com/PyCQA/bandit
rev: "1.7.4"
rev: 1.7.9
hooks:
- id: bandit
alias: bandit-tests
Expand All @@ -111,29 +111,35 @@ repos:
# <---- Security -------------------------------------------------------------------------------

# ----- Code Analysis ------------------------------------------------------------------------->
- repo: https://github.com/saltstack/mirrors-nox
rev: v2021.6.12

- repo: local
hooks:
- id: nox
alias: lint-src
name: Lint Source Code
language: python
entry: nox -e lint-code-pre-commit --
files: ^((setup|noxfile)|src/.*)\.py$
require_serial: true
args:
- -e
- lint-code-pre-commit
- --
additional_dependencies:
- nox==2024.4.15
- uv==0.4.0 # Makes this hook much faster

- repo: https://github.com/saltstack/mirrors-nox
rev: v2021.6.12
hooks:
- id: nox
alias: lint-tests
name: Lint Tests
language: python
entry: nox -e lint-tests-pre-commit --
files: ^tests/.*\.py$
require_serial: true
args:
- -e
- lint-tests-pre-commit
- --
additional_dependencies:
- nox==2024.4.15
- uv==0.4.0 # Makes this hook much faster

- repo: https://github.com/Mateusz-Grzelinski/actionlint-py
rev: 1ca29a1b5d949b3586800190ad6cc98317cb43b8 # v1.7.1.15
hooks:
- id: actionlint
additional_dependencies:
- shellcheck-py>=0.9.0.5
# <---- Code Analysis --------------------------------------------------------------------------
Loading

0 comments on commit 00a2ee9

Please sign in to comment.