Skip to content

Commit

Permalink
Merge pull request #38 from webknjaz/feature/shared-awx-stuff
Browse files Browse the repository at this point in the history
Use awx-shared code from `awx_plugins.interfaces`, not awx
  • Loading branch information
webknjaz authored Oct 2, 2024
2 parents 5bdae38 + 2a3bfda commit 4b19be2
Show file tree
Hide file tree
Showing 73 changed files with 311 additions and 87 deletions.
3 changes: 2 additions & 1 deletion .isort.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ honor_noqa = true
include_trailing_comma = true
indent = 4
known_frameworks = awx, django
known_platforms = awx_plugins.interfaces
known_testing = hypothesis, pytest
line_length = 79
lines_after_imports = 2
# https://pycqa.github.io/isort/#multi-line-output-modes
multi_line_output = 3
no_lines_before = LOCALFOLDER
sections = FUTURE, STDLIB, TESTING, FRAMEWORKS, THIRDPARTY, FIRSTPARTY, LOCALFOLDER
sections = FUTURE, STDLIB, TESTING, FRAMEWORKS, PLATFORMS, THIRDPARTY, FIRSTPARTY, LOCALFOLDER
use_parentheses = true
verbose = true
3 changes: 0 additions & 3 deletions .mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,3 @@ strict_optional = true
warn_no_return = true
warn_redundant_casts = true
warn_unused_ignores = true

[mypy-awx.*] # This can be removed once AWX can be added as a dependency or eliminated for good
ignore_missing_imports = true
15 changes: 12 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,12 @@ repos:
alias: mypy-py313
name: MyPy, for Python 3.13
additional_dependencies:
- >- # standard interface declarations for AWX plugins
awx_plugins.interfaces
@ git+https://github.com/ansible/awx_plugins.interfaces.git
- azure-identity # needed by credentials.azure_kv
- azure-keyvault # needed by credentials.azure_kv
- boto3-stubs # needed by credentials.awx_secretsmanager
- django-stubs # needed by credentials.injectors and inventory.plugins
- lxml # dep of `--txt-report`, `--cobertura-xml-report` & `--html-report`
- msrestazure # needed by credentials.azure_kv
- pytest
Expand All @@ -209,10 +211,12 @@ repos:
alias: mypy-py312
name: MyPy, for Python 3.12
additional_dependencies:
- >- # standard interface declarations for AWX plugins
awx_plugins.interfaces
@ git+https://github.com/ansible/awx_plugins.interfaces.git
- azure-identity # needed by credentials.azure_kv
- azure-keyvault # needed by credentials.azure_kv
- boto3-stubs # needed by credentials.awx_secretsmanager
- django-stubs # needed by credentials.injectors and inventory.plugins
- lxml # dep of `--txt-report`, `--cobertura-xml-report` & `--html-report`
- msrestazure # needed by credentials.azure_kv
- pytest
Expand All @@ -233,10 +237,12 @@ repos:
alias: mypy-py311
name: MyPy, for Python 3.11
additional_dependencies:
- >- # standard interface declarations for AWX plugins
awx_plugins.interfaces
@ git+https://github.com/ansible/awx_plugins.interfaces.git
- azure-identity # needed by credentials.azure_kv
- azure-keyvault # needed by credentials.azure_kv
- boto3-stubs # needed by credentials.awx_secretsmanager
- django-stubs # needed by credentials.injectors and inventory.plugins
- lxml # dep of `--txt-report`, `--cobertura-xml-report` & `--html-report`
- msrestazure # needed by credentials.azure_kv
- pytest
Expand All @@ -259,6 +265,9 @@ repos:
hooks:
- id: pylint
additional_dependencies:
- >- # standard interface declarations for AWX plugins
awx_plugins.interfaces
@ git+https://github.com/ansible/awx_plugins.interfaces.git
- azure-identity # needed by credentials.azure_kv
- azure-keyvault # needed by credentials.azure_kv
- boto3 # needed by credentials.awx_secretsmanager
Expand Down
2 changes: 2 additions & 0 deletions .pylintrc.toml
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,8 @@ known-third-party = [

# Couples of modules and preferred modules, separated by a comma.
preferred-modules = [
"awx:awx_plugins.interfaces",
"django:awx_plugins.interfaces",
"unittest:pytest",
]

Expand Down
2 changes: 2 additions & 0 deletions dependencies/direct/py-constraints.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@
# remain in Git. #
# #
###############################################################################

awx_plugins.interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
4 changes: 4 additions & 0 deletions dependencies/lock-files/build-docs-cp311-darwin-arm64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
4 changes: 4 additions & 0 deletions dependencies/lock-files/build-docs-cp311-darwin-x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
4 changes: 4 additions & 0 deletions dependencies/lock-files/build-docs-cp311-linux-x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
4 changes: 4 additions & 0 deletions dependencies/lock-files/build-docs-cp312-darwin-arm64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
4 changes: 4 additions & 0 deletions dependencies/lock-files/build-docs-cp312-darwin-x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
4 changes: 4 additions & 0 deletions dependencies/lock-files/build-docs-cp312-linux-x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
4 changes: 4 additions & 0 deletions dependencies/lock-files/build-docs-cp313-darwin-arm64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
4 changes: 4 additions & 0 deletions dependencies/lock-files/build-docs-cp313-darwin-x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
4 changes: 4 additions & 0 deletions dependencies/lock-files/build-docs-cp313-linux-x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
4 changes: 4 additions & 0 deletions dependencies/lock-files/coverage-docs-cp311-darwin-arm64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
4 changes: 4 additions & 0 deletions dependencies/lock-files/coverage-docs-cp311-darwin-x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
4 changes: 4 additions & 0 deletions dependencies/lock-files/coverage-docs-cp311-linux-x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
4 changes: 4 additions & 0 deletions dependencies/lock-files/coverage-docs-cp312-darwin-arm64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
4 changes: 4 additions & 0 deletions dependencies/lock-files/coverage-docs-cp312-darwin-x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
4 changes: 4 additions & 0 deletions dependencies/lock-files/coverage-docs-cp312-linux-x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
4 changes: 4 additions & 0 deletions dependencies/lock-files/coverage-docs-cp313-darwin-arm64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
4 changes: 4 additions & 0 deletions dependencies/lock-files/coverage-docs-cp313-darwin-x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
4 changes: 4 additions & 0 deletions dependencies/lock-files/coverage-docs-cp313-linux-x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
4 changes: 4 additions & 0 deletions dependencies/lock-files/doctest-docs-cp311-darwin-arm64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
4 changes: 4 additions & 0 deletions dependencies/lock-files/doctest-docs-cp311-darwin-x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
4 changes: 4 additions & 0 deletions dependencies/lock-files/doctest-docs-cp311-linux-x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
4 changes: 4 additions & 0 deletions dependencies/lock-files/doctest-docs-cp312-darwin-arm64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
4 changes: 4 additions & 0 deletions dependencies/lock-files/doctest-docs-cp312-darwin-x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
4 changes: 4 additions & 0 deletions dependencies/lock-files/doctest-docs-cp312-linux-x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
4 changes: 4 additions & 0 deletions dependencies/lock-files/doctest-docs-cp313-darwin-arm64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
4 changes: 4 additions & 0 deletions dependencies/lock-files/doctest-docs-cp313-darwin-x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
4 changes: 4 additions & 0 deletions dependencies/lock-files/doctest-docs-cp313-linux-x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
4 changes: 4 additions & 0 deletions dependencies/lock-files/linkcheck-docs-cp311-darwin-arm64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alabaster==1.0.0
# via sphinx
asgiref==3.8.1
# via django
awx-plugins-interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git
# via
# -c dependencies/direct/py-constraints.in
# awx-plugins-core (pyproject.toml)
azure-core==1.31.0
# via
# azure-identity
Expand Down
Loading

0 comments on commit 4b19be2

Please sign in to comment.