Skip to content

Commit

Permalink
Update poetry to fix tomlkit issue (#1306) (#1310)
Browse files Browse the repository at this point in the history
* Update poetry to fix tomlkit issue (#1306)

* Update poetry to fix tomlkit issue

* tox: use pip to install poetry

* fix poetry.lock file

* poetry add pytest
  • Loading branch information
myakove committed Jul 27, 2023
1 parent e2cbe06 commit 9ce9fb6
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 52 deletions.
73 changes: 36 additions & 37 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,51 +16,50 @@ exclude = '''
line_length = 88
profile = "black"


[build-system]
requires = ["setuptools>=61.2"]
build-backend = "setuptools.build_meta"

[project]
[tool.poetry]
name = "openshift-python-wrapper"
authors = [
{name = "Meni Yakove", email = "myakove@gmail.com"},
{name = "Ruth Netser", email = "rnetser@gmail.com"}
]
version = "0.0.0"
description = "Wrapper around https://github.com/openshift/openshift-restclient-python"
authors = ["Meni Yakove <myakove@gmail.com>", "Ruth Netser <rnetser@gmail.com>"]
readme = "README.md"
license = "Apache-2.0"
packages = [{include = "ocp_resources"}]
homepage = "https://github.com/RedHatQE/openshift-python-wrapper"
documentation = "https://openshift-python-wrapper.readthedocs.io/en/latest/"
keywords = ["Openshift", "Kubevirt", "CNV"]
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
requires-python = ">=3.7"
keywords = ["Openshift", "Kubevirt", "CNV"]
dependencies = [
"openshift",
"xmltodict",
"urllib3",
"colorlog",
"packaging",
"kubernetes",
"python-simple-logger",
"python-benedict"
]
dynamic = ["version"]
# ...
[tool.setuptools.dynamic]
version = {file = "VERSION"}

[project.readme]
file = "README.md"
content-type = "text/markdown"

[project.urls]
Homepage = "https://github.com/RedHatQE/openshift-python-wrapper"
[tool.poetry.urls]
Download = "https://pypi.org/project/openshift-python-wrapper/"
"Bug Tracker" = "https://github.com/RedHatQE/openshift-python-wrapper/issues"
Documentation = "https://openshift-python-wrapper.readthedocs.io/en/latest/"

[tool.setuptools]
include-package-data = true
[tool.poetry.group.dev.dependencies]
ipdb = "^0.13.13"


[tool.poetry.group.tests.dependencies]
pytest = "^7.4.0"

[tool.poetry-dynamic-versioning.substitution]
files = ["VERSION"]

[tool.poetry-dynamic-versioning]
enable = true
pattern = "((?P<epoch>\\d+)!)?(?P<base>\\d+(\\.\\d+)*)"

[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
build-backend = "poetry_dynamic_versioning.backend"

[tool.setuptools.packages.find]
include = ["ocp_resources"]
[tool.poetry.dependencies]
python = "^3.8"
openshift = "^0.13.2"
xmltodict = "^0.13.0"
colorlog = "^6.7.0"
kubernetes = "^27.2.0"
python-benedict = "^0.32.0"
packaging = "^23.1"
python-simple-logger = "^1.0.5"
31 changes: 16 additions & 15 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{38,39,310,311}, unittests, validate-resources
envlist = py{38,39,310,311}, unittests, validate-resources, tests
skipsdist = True

[flake8]
Expand All @@ -16,32 +16,33 @@ setenv =
PYTHONPATH = {toxinidir}
passenv =
KUBECONFIG
deps =
pytest
commands =
pip install .
pip install jinja2 PyYaml
pytest tests
pip install poetry
poetry install
poetry run pytest -o log_cli=true tests/test_resources.py -k 'not kubevirt'
allowlist_externals =
poetry

[testenv:unittests]
basepython = python3
setenv =
PYTHONPATH = {toxinidir}
deps =
pytest
commands =
pip install .
pytest tests/unittests
pip install poetry
poetry install
poetry run pytest -o log_cli=true tests/unittests
allowlist_externals =
poetry

[testenv:validate-resources]
basepython = python3
setenv =
PYTHONPATH = {toxinidir}
passenv =
KUBECONFIG
deps =
pytest
requests
commands =
pip install .
pytest tests/test_validate_resources.py
pip install poetry
poetry install
poetry run pytest tests/test_validate_resources.py
allowlist_externals =
poetry

0 comments on commit 9ce9fb6

Please sign in to comment.