From ab99edabe6e617b76df24c23a8ccc302a7b64501 Mon Sep 17 00:00:00 2001 From: Andrew Bates Date: Wed, 24 Jan 2024 10:33:36 -0500 Subject: [PATCH] ci: More ci fixes --- nautobot_design_builder/contrib/tests/test_ext.py | 7 ++++--- poetry.lock | 15 ++++++++------- pyproject.toml | 4 ++-- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/nautobot_design_builder/contrib/tests/test_ext.py b/nautobot_design_builder/contrib/tests/test_ext.py index f156d2b7..095bd1b1 100644 --- a/nautobot_design_builder/contrib/tests/test_ext.py +++ b/nautobot_design_builder/contrib/tests/test_ext.py @@ -301,9 +301,10 @@ class TestBGPExtension(TestCase): """Test BGP extension.""" def setUp(self): - # TODO: Remove this when BGP models is migrated to 2.0 - if nautobot_version >= "2.0.0": - self.skipTest("BGP Models is not supported in Nautobot 2.x") + try: + import nautobot_bgp_models.models # pylint:disable=import-outside-toplevel,unused-import,import-error # noqa: F401 + except ModuleNotFoundError: + self.skipTest("BGP Models app is not installed, skipping associated tests") super().setUp() def test_creation(self): diff --git a/poetry.lock b/poetry.lock index e197905c..e690484c 100755 --- a/poetry.lock +++ b/poetry.lock @@ -181,24 +181,24 @@ tzdata = ["tzdata"] [[package]] name = "bandit" -version = "1.7.6" +version = "1.7.7" description = "Security oriented static analyser for python code." optional = false python-versions = ">=3.8" files = [ - {file = "bandit-1.7.6-py3-none-any.whl", hash = "sha256:36da17c67fc87579a5d20c323c8d0b1643a890a2b93f00b3d1229966624694ff"}, - {file = "bandit-1.7.6.tar.gz", hash = "sha256:72ce7bc9741374d96fb2f1c9a8960829885f1243ffde743de70a19cee353e8f3"}, + {file = "bandit-1.7.7-py3-none-any.whl", hash = "sha256:17e60786a7ea3c9ec84569fd5aee09936d116cb0cb43151023258340dbffb7ed"}, + {file = "bandit-1.7.7.tar.gz", hash = "sha256:527906bec6088cb499aae31bc962864b4e77569e9d529ee51df3a93b4b8ab28a"}, ] [package.dependencies] colorama = {version = ">=0.3.9", markers = "platform_system == \"Windows\""} -GitPython = ">=3.1.30" PyYAML = ">=5.3.1" rich = "*" stevedore = ">=1.20.0" [package.extras] -test = ["beautifulsoup4 (>=4.8.0)", "coverage (>=4.5.4)", "fixtures (>=3.0.0)", "flake8 (>=4.0.0)", "pylint (==1.9.4)", "stestr (>=2.5.0)", "testscenarios (>=0.5.0)", "testtools (>=2.3.0)", "tomli (>=1.1.0)"] +baseline = ["GitPython (>=3.1.30)"] +test = ["beautifulsoup4 (>=4.8.0)", "coverage (>=4.5.4)", "fixtures (>=3.0.0)", "flake8 (>=4.0.0)", "pylint (==1.9.4)", "stestr (>=2.5.0)", "testscenarios (>=0.5.0)", "testtools (>=2.3.0)"] toml = ["tomli (>=1.1.0)"] yaml = ["PyYAML"] @@ -2100,7 +2100,7 @@ sso = ["social-auth-core[openidconnect,saml] (>=4.4.2,<4.5.0)"] name = "nautobot-bgp-models" version = "0.20.1" description = "Nautobot BGP Models Plugin" -optional = false +optional = true python-versions = ">=3.8,<3.12" files = [ {file = "nautobot_bgp_models-0.20.1-py3-none-any.whl", hash = "sha256:d670a80aa5073cb11a7d560d9282ffa1e7cc2a1810702514793ce846225fafdd"}, @@ -3656,9 +3656,10 @@ docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.link testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy (>=0.9.1)", "pytest-ruff"] [extras] +contrib = ["nautobot-bgp-models"] nautobot = ["nautobot"] [metadata] lock-version = "2.0" python-versions = ">=3.8,<3.12" -content-hash = "9e48488bcea20a1dcdb94088bdc3f229b0ecde221962f1dbf8cdd64645b86151" +content-hash = "1d57b02542b672d4ca50f193c021ca5df7080976694344c3906b5acc18c1e9c3" diff --git a/pyproject.toml b/pyproject.toml index d7c9b1d4..72eede19 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,6 +29,7 @@ packages = [ python = ">=3.8,<3.12" # Used for local development nautobot = ">=1.6.0,<=2.9999" +nautobot-bgp-models = { version = "*", optional = true } [tool.poetry.group.dev.dependencies] bandit = "*" @@ -46,8 +47,6 @@ yamllint = "*" toml = "*" Markdown = "*" -nautobot-bgp-models = "*" - # Rendering docs to HTML mkdocs = "1.5.2" # Material for MkDocs theme @@ -60,6 +59,7 @@ mkdocstrings-python = "1.5.2" [tool.poetry.extras] nautobot = ["nautobot"] +contrib = ["nautobot-bgp-models"] [tool.black] line-length = 120