Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
KB-perByte authored Jan 6, 2025
2 parents b9e09b2 + 2e742e5 commit 869a92c
Show file tree
Hide file tree
Showing 87 changed files with 1,525 additions and 882 deletions.
3 changes: 3 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

profile: production
67 changes: 67 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
[flake8]

builtins = _

# Print the total number of errors:
count = true

# Don't even try to analyze these:
extend-exclude =
# No need to traverse egg info dir
*.egg-info,
# tool cache dirs
*_cache
# project env vars
.env,
# GitHub configs
.github,
# Cache files of MyPy
.mypy_cache,
# Cache files of pytest
.pytest_cache,
# Temp dir of pytest-testmon
.tmontmp,
# Occasional virtualenv dir
.venv
# VS Code
.vscode,
# Temporary build dir
build,
# This contains sdists and wheels of ansible-navigator that we don't want to check
dist,
# Metadata of `pip wheel` cmd is autogenerated
pip-wheel-metadata,
# adjacent venv
venv
# ansible won't let me
__init__.py

# IMPORTANT: avoid using ignore option, always use extend-ignore instead
# Completely and unconditionally ignore the following errors:
extend-ignore =
F841,
# line-length
E501,
# module level import not at top of file
E402

# Accessibility/large fonts and PEP8 unfriendly:
max-line-length = 120

# Allow certain violations in certain files:
# Please keep both sections of this list sorted, as it will be easier for others to find and add entries in the future
per-file-ignores =
# The following ignores have been researched and should be considered permanent
# each should be preceeded with an explanation of each of the error codes
# If other ignores are added for a specific file in the section following this,
# these will need to be added to that line as well.


# S101: Allow the use of assert within the tests directory, since tests require it.
tests/**.py: S101

# The following were present during the initial implementation.
# They are expected to be fixed and unignored over time.

# Count the number of occurrences of each error/warning code and print a report:
statistics = true
Empty file added .github/CODEOWNERS
Empty file.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
labels:
- "skip-changelog"
3 changes: 3 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
# see https://github.com/ansible-community/devtools
_extends: ansible-community/devtools
11 changes: 11 additions & 0 deletions .github/workflows/check_label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: "Check label"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on: # yamllint disable-line rule:truthy
pull_request_target:
types: [opened, labeled, unlabeled, synchronize]
jobs:
check_label:
uses: ansible/ansible-content-actions/.github/workflows/check_label.yaml@main
14 changes: 14 additions & 0 deletions .github/workflows/codecoverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: "Code coverage"

on: # yamllint disable-line rule:truthy
pull_request:
branches: [ main ]

jobs:
codecoverage:
uses: ansible-network/github_actions/.github/workflows/coverage_network_devices.yml@main
with:
collection_pre_install: >-
git+https://github.com/ansible-collections/ansible.utils.git
git+https://github.com/ansible-collections/ansible.netcommon.git
18 changes: 18 additions & 0 deletions .github/workflows/draft_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: "Draft release"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on: # yamllint disable-line rule:truthy
workflow_dispatch:
env:
NAMESPACE: ${{ github.repository_owner }}
COLLECTION_NAME: asa
ANSIBLE_COLLECTIONS_PATHS: ./
jobs:
update_release_draft:
uses: ansible/ansible-content-actions/.github/workflows/draft_release.yaml@main
with:
repo: ${{ github.event.pull_request.head.repo.full_name }}
secrets:
BOT_PAT: ${{ secrets.BOT_PAT }}
14 changes: 14 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: "Release collection"
on: # yamllint disable-line rule:truthy
release:
types: [published]

jobs:
release:
uses: ansible/ansible-content-actions/.github/workflows/release.yaml@main
with:
environment: release
secrets:
ah_token: ${{ secrets.AH_TOKEN }}
ansible_galaxy_api_key: ${{ secrets.ANSIBLE_GALAXY_API_KEY }}
45 changes: 0 additions & 45 deletions .github/workflows/test.yml

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
name: "CI"

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on: # yamllint disable-line rule:truthy
pull_request:
branches: [main]
workflow_dispatch:
schedule:
- cron: '0 0 * * *'

jobs:
changelog:
uses: ansible/ansible-content-actions/.github/workflows/changelog.yaml@main
if: github.event_name == 'pull_request'
build-import:
uses: ansible/ansible-content-actions/.github/workflows/build_import.yaml@main
ansible-lint:
uses: ansible/ansible-content-actions/.github/workflows/ansible_lint.yaml@main
sanity:
uses: ansible/ansible-content-actions/.github/workflows/sanity.yaml@main
unit-galaxy:
uses: ansible/ansible-content-actions/.github/workflows/unit.yaml@main
unit-source:
uses: ansible-network/github_actions/.github/workflows/unit_source.yml@main
with:
collection_pre_install: >-
git+https://github.com/ansible-collections/ansible.utils.git
git+https://github.com/ansible-collections/ansible.netcommon.git
all_green:
if: ${{ always() }}
needs:
- changelog
- build-import
- sanity
- unit-galaxy
- unit-source
- ansible-lint
runs-on: ubuntu-latest
steps:
- run: >-
python -c "assert 'failure' not in
set([
'${{ needs.changelog.result }}',
'${{ needs.sanity.result }}',
'${{ needs.unit-galaxy.result }}'
'${{ needs.ansible-lint.result }}'
'${{ needs.unit-source.result }}'
])"
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,10 @@ venv.bak/

# mypy
.mypy_cache/

# ide
*.code-workspace
.vscode/
.DS_Store

changelogs/.plugin-cache.yaml
23 changes: 16 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ repos:
- repo: https://github.com/ansible-network/collection_prep
rev: 1.1.1
hooks:
- id: autoversion
# - id: autoversion # removed as being handled by GHA push and release drafter
- id: update-docs

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v5.0.0
hooks:
- id: check-merge-conflict
- id: check-symlinks
Expand All @@ -18,25 +18,34 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/asottile/add-trailing-comma
rev: v2.2.3
rev: v3.1.0
hooks:
- id: add-trailing-comma

- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.0-alpha.6"
- repo: https://github.com/pycontribs/mirrors-prettier
rev: "v3.4.2"
hooks:
- id: prettier
entry: env CI=1 bash -c "prettier --list-different . || ec=$? && prettier --loglevel=error --write . && exit $ec"
pass_filenames: false
args: []
additional_dependencies:
- prettier
- prettier-plugin-toml

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
name: Sort import statements using isort
args: ["--filter-files"]

- repo: https://github.com/psf/black
rev: 22.6.0
rev: 24.10.0
hooks:
- id: black

- repo: https://github.com/pycqa/flake8
rev: 7.1.1
hooks:
- id: flake8
Loading

0 comments on commit 869a92c

Please sign in to comment.