Skip to content

Commit

Permalink
chore(deps): update dependency https://github.com/lkubb/salt-extensio…
Browse files Browse the repository at this point in the history
…n-copier to v0.4.3
  • Loading branch information
salt-extensions-renovatebot[bot] authored Sep 25, 2024
1 parent abe4325 commit a09f8b6
Show file tree
Hide file tree
Showing 28 changed files with 1,050 additions and 295 deletions.
9 changes: 8 additions & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
# Autogenerated. Do not edit this by hand, use `copier update`.
---
_commit: 0.2.6
_commit: 0.4.3
_src_path: https://github.com/lkubb/salt-extension-copier
author: EITR Technologies, LLC
author_email: devops@eitr.tech
coc_contact: ''
copyright_begin: 2024
deploy_docs: rolling
docs_url: ''
integration_name: Azurerm
license: apache
loaders: []
max_salt_version: 3006
no_saltext_namespace: false
package_name: azurerm
project_name: azurerm
python_requires: '3.8'
relax_pylint: false
salt_version: '3005'
source_url: https://github.com/salt-extensions/saltext-azurerm
ssh_fixtures: false
summary: Salt Extension for interacting with Microsoft Azure
test_containers: false
tracker_url: https://github.com/salt-extensions/saltext-azurerm/issues
url: https://github.com/salt-extensions/saltext-azurerm
workflows: org
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
12 changes: 12 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<<<<<<< before updating
=======
---
>>>>>>> after updating
name: Pull Request or Push

on:
Expand All @@ -13,7 +17,15 @@ jobs:
name: CI
uses: salt-extensions/central-artifacts/.github/workflows/ci.yml@main
with:
<<<<<<< before updating
setup-vault: true
permissions:
contents: write
=======
deploy-docs: true
permissions:
contents: write
id-token: write
pages: write
>>>>>>> after updating
pull-requests: read
16 changes: 16 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<<<<<<< before updating
=======
---
>>>>>>> after updating
name: Tagged Releases

on:
Expand All @@ -16,17 +20,29 @@ jobs:

- name: Extract tag name
id: get_version
<<<<<<< before updating
run: echo "::set-output name=version::$(echo ${GITHUB_REF#refs/tags/v})"
=======
run: echo "version=${GITHUB_REF#refs/tags/v}" >> "$GITHUB_OUTPUT"
>>>>>>> after updating

call_central_workflow:
needs: get_tag_version
uses: salt-extensions/central-artifacts/.github/workflows/ci.yml@main
with:
<<<<<<< before updating
setup-vault: true
=======
deploy-docs: true
>>>>>>> after updating
release: true
version: ${{ needs.get_tag_version.outputs.version }}
permissions:
contents: write
id-token: write
<<<<<<< before updating
=======
pages: write
>>>>>>> after updating
pull-requests: read
secrets: inherit
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/azurerm/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/azurerm/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/azurerm/version.py
exclude: src/saltext/azurerm/(__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/azurerm/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/azurerm/.*\.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/azurerm/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 --------------------------------------------------------------------------
8 changes: 6 additions & 2 deletions .pre-commit-hooks/make-autodocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import subprocess
from pathlib import Path


repo_path = Path(subprocess.check_output(["git", "rev-parse", "--show-toplevel"]).decode().strip())
src_dir = repo_path / "src" / "saltext" / "azurerm"
doc_dir = repo_path / "docs"
Expand Down Expand Up @@ -34,9 +33,14 @@ def write_module(rst_path, path, use_virtualname=True):
virtualname = "``" + _find_virtualname(path) + "``"
else:
virtualname = make_import_path(path)
header_len = len(virtualname)
# The check-merge-conflict pre-commit hook chokes here:
# https://github.com/pre-commit/pre-commit-hooks/issues/100
if header_len == 7:
header_len += 1
module_contents = f"""\
{virtualname}
{'='*len(virtualname)}
{'='*header_len}
.. automodule:: {make_import_path(path)}
:members:
Expand Down
Loading

0 comments on commit a09f8b6

Please sign in to comment.