chore(deps): update ansible-core requirement from <2.14,>=2.12 to >=2.12,<2.15 (#134)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mohamed El Mouctar HAIDARA <elmhaidara@gmail.com>
This commit is contained in:
dependabot[bot] 2023-04-12 16:25:35 +02:00 committed by GitHub
parent 31a264b285
commit 68e137e762
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 29 additions and 14 deletions

View file

@ -14,15 +14,14 @@ jobs:
pytest:
name: Tests Py${{ matrix.python-version }} - Ansible ${{ matrix.ansible-version }}
env:
MATRIX_JOB_IDENTIFIER: py${{ matrix.python-version }}-ansible${{ matrix.ansible-version }}
SVG_FILES_PATH: tests/generated-svgs
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ 3.8, 3.9 ]
python-version: [ '3.9', '3.10' ]
# See https://www.ansible.com/blog/ansible-3.0.0-qa and https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html
ansible-version: [ 2.12.9, 2.13.4 ]
ansible-version: [ '2.13.*', '2.14.*' ]
steps:
@ -38,7 +37,7 @@ jobs:
- name: Install prereqs
run: |
pip install -q ansible-core==${{ matrix.ansible-version }} virtualenv setuptools wheel coveralls
pip install -q ansible-core=='${{ matrix.ansible-version }}' virtualenv setuptools wheel coveralls
pip install -qr tests/requirements_tests.txt
pip freeze
sudo apt-get install -yq graphviz
@ -50,6 +49,12 @@ jobs:
COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.ref }}
run: make test
- name: Set variables
run: |
matrix_ansible_version='${{ matrix.ansible-version }}'
clean_version=${matrix_ansible_version//.\*/} # Remove '.*' from the version name
echo "MATRIX_JOB_IDENTIFIER=py${{ matrix.python-version }}-ansible-${clean_version}" >> $GITHUB_ENV
- name: Upload generated SVGs as artefacts
uses: actions/upload-artifact@v3
with:

View file

@ -1,4 +1,4 @@
# Copyright (C) 2022 Mohamed El Mouctar HAIDARA
# Copyright (C) 2023 Mohamed El Mouctar HAIDARA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -21,7 +21,7 @@ from ansible.cli import CLI
from ansible.cli.arguments import option_helpers
from ansible.errors import AnsibleOptionsError
from ansible.release import __version__ as ansible_version
from ansible.utils.display import Display, initialize_locale
from ansible.utils.display import Display
from ansibleplaybookgrapher import __prog__, __version__
from ansibleplaybookgrapher.graphbuilder import (
@ -32,7 +32,6 @@ from ansibleplaybookgrapher.postprocessor import GraphVizPostProcessor
# The display is a singleton. This instruction will NOT return a new instance.
# We explicitly set the verbosity after the init.
display = Display()
@ -54,8 +53,6 @@ class PlaybookGrapherCLI(CLI):
def run(self):
super().run()
# Required to fix the warning "ansible.utils.display.initialize_locale has not been called..."
initialize_locale()
display.verbosity = self.options.verbosity
grapher = Grapher(self.options.playbook_filenames)
grapher.parse(

View file

@ -1,4 +1,4 @@
# Copyright (C) 2022 Mohamed El Mouctar HAIDARA
# Copyright (C) 2023 Mohamed El Mouctar HAIDARA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -175,7 +175,6 @@ class PlaybookParser(BaseParser):
playbook_root_node = PlaybookNode(self.playbook_filename, raw_object=playbook)
# loop through the plays
for play in playbook.get_plays():
# the load basedir is relative to the playbook path
if play._included_path is not None:
self.data_loader.set_basedir(play._included_path)
@ -317,7 +316,6 @@ class PlaybookParser(BaseParser):
# loop through the tasks
for task_or_block in block.block:
if hasattr(task_or_block, "loop") and task_or_block.loop:
display.warning(
"Looping on tasks or roles are not supported for the moment. "

View file

@ -1,4 +1,4 @@
ansible-core>=2.12,<2.14
ansible-core>=2.12,<2.15
graphviz>=0.18,<1
colour<1
lxml<5

View file

@ -1,3 +1,18 @@
# Copyright (C) 2023 Mohamed El Mouctar HAIDARA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
import sys
from setuptools import setup, find_packages
@ -58,8 +73,8 @@ setup(
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Environment :: Console",
"Topic :: Utilities",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
],
entry_points={"console_scripts": [f"{__prog__} = ansibleplaybookgrapher.cli:main"]},
)