Skip to content

Commit

Permalink
New Version 2 codebase (#169)
Browse files Browse the repository at this point in the history
initial v2 code commit
---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
cidrblock and pre-commit-ci[bot] authored May 9, 2023
1 parent 62579e3 commit 5bf495a
Show file tree
Hide file tree
Showing 147 changed files with 1,863 additions and 3,286 deletions.
17 changes: 17 additions & 0 deletions .config/dictionary.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
autouse
basepython
cidrblock
delenv
devel
endgroup
envtmpdir
envtmpdir
fileh
nocolor
passenv
setenv
testenv
toxfile
toxinidir
workdir
xdist
6 changes: 6 additions & 0 deletions .config/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
black
pytest
ruff
pre-commit
mypy
types-pyyaml
6 changes: 6 additions & 0 deletions .config/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
coverage
devpi_process
pre-commit
pytest
pytest_mock
pytest-xdist
5 changes: 5 additions & 0 deletions .config/requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pytest
pytest-ansible>=3.1.0
pytest-xdist
pyyaml
tox>4.4.8
8 changes: 0 additions & 8 deletions .coveragerc

This file was deleted.

7 changes: 7 additions & 0 deletions .darglint
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[darglint]
# NOTE: All `darglint` styles except for `sphinx` hit ridiculously low
# NOTE: performance on some of the in-project Python modules.
# Refs:
# * https://github.com/terrencepreilly/darglint/issues/186
docstring_style = sphinx
strictness = full
56 changes: 56 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[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
# project tox directory
.tox

# IMPORTANT: avoid using ignore option, always use extend-ignore instead
# Completely and unconditionally ignore the following errors:
extend-ignore = F, E203

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

# 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.


# Count the number of occurrences of each error/warning code and print a report:
statistics = true
1 change: 0 additions & 1 deletion .github/CODEOWNERS

This file was deleted.

12 changes: 0 additions & 12 deletions .github/dependabot.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/labels.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/release-drafter.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/release-drafter.yml

This file was deleted.

70 changes: 70 additions & 0 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: tox-ansible

on:
pull_request:
branches:
- main
- "releases/**"
- "stable/**"
workflow_call:

jobs:
tox-matrix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.0
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install tox-ansible, includes tox
run: python -m pip install git+https://github.com/tox-dev/tox-ansible.git@uplift_v2

- name: Generate matrix
id: generate-matrix
run: |
python -m tox --ansible --gh-matrix --conf tox-ansible.ini
outputs:
envlist: ${{ steps.generate-matrix.outputs.envlist }}

test:
needs: tox-matrix
strategy:
fail-fast: false
matrix:
entry: ${{ fromJson(needs.tox-matrix.outputs.envlist) }}
name: ${{ matrix.entry.name }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.0
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

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

- name: Install deps
run: python -m pip install -r test-requirements.txt

- name: Run tox test
run: python -m tox --ansible -e ${{ matrix.entry.name }} --conf tox-ansible.ini
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

test_passed:
needs: test
runs-on: ubuntu-latest
steps:
- run: >-
python -c "assert set([
'${{ needs.test.result }}',
]) == {'success'}"
Loading

0 comments on commit 5bf495a

Please sign in to comment.