From 725dc359c75e14679dc80f990cd37bfe7373c0db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Edelbluth?= Date: Fri, 26 Aug 2022 11:50:53 +0200 Subject: [PATCH 1/6] Jenkins CI Setup --- .ci/Jenkinsfile | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ poetry.lock | 6 +++--- pyproject.toml | 5 +++-- 3 files changed, 59 insertions(+), 5 deletions(-) create mode 100644 .ci/Jenkinsfile diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile new file mode 100644 index 0000000..dd6b180 --- /dev/null +++ b/.ci/Jenkinsfile @@ -0,0 +1,53 @@ +pipeline { + + environment { + TOX_PARALLEL_NO_SPINNER = "1" + PY_COLORS = "0" + } + + agent any + + stages { + stage('Prepare') { + steps { + sh 'poetry install' + } + } + stage('Tox') { + matrix { + axes { + axis { + name 'PYTHON_VERSION' + values 'py38', 'py39', 'py310' + } + } + stages { + stage('Tox Test') { + options { + lock('single-tox-build') + } + steps { + sh 'poetry run tox -r -e ${PYTHON_VERSION}' + xunit checksName: '', tools: [JUnit(excludesPattern: '', pattern: 'test-reports/*.xml', stopProcessingIfError: true)] + cobertura autoUpdateStability: false, coberturaReportFile: 'coverage.xml', conditionalCoverageTargets: '70, 0, 0', failUnhealthy: false, failUnstable: false, lineCoverageTargets: '80, 0, 0', maxNumberOfBuilds: 0, methodCoverageTargets: '80, 0, 0', onlyStable: false + } + } + } + } + } + } + + post { + success { + cleanWs() + } + always { + withCredentials([string(credentialsId: 'jed-notification-email', variable: 'EMAIL')]) { + mail to: "${EMAIL}", + subject: "[pytest-csv-params] ${currentBuild.currentResult}: ${currentBuild.fullDisplayName}", + body: "Jenkins URL: ${env.BUILD_URL}" + } + } + } + +} \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index 2ac8f04..cbf9ed0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -118,7 +118,7 @@ python-versions = ">=3.6" [[package]] name = "charset-normalizer" -version = "2.1.0" +version = "2.1.1" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." category = "dev" optional = false @@ -1051,7 +1051,7 @@ python-versions = ">=3.5" [[package]] name = "urllib3" -version = "1.26.11" +version = "1.26.12" description = "HTTP library with thread-safe connection pooling, file post, and more." category = "dev" optional = false @@ -1059,7 +1059,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, [package.extras] brotli = ["brotlicffi (>=0.8.0)", "brotli (>=1.0.9)", "brotlipy (>=0.6.0)"] -secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"] +secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "urllib3-secure-extra", "ipaddress"] socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] diff --git a/pyproject.toml b/pyproject.toml index 7491f25..3030609 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pytest-csv-params" -version = "0.4.0" +version = "0.4.1" description = "Pytest plugin for Test Case Parametrization with CSV files" authors = ["Juergen Edelbluth "] license = "MIT" @@ -42,7 +42,7 @@ packages = [ "pytest-csv-params" = "pytest_csv_params.plugin" [tool.pytest.ini_options] -addopts = "--mypy --black --isort --pylint --pylint-rcfile=.pylintrc --cov --cov-report=term-missing --junitxml=test-reports/pytest_csv_params.xml" +addopts = "--mypy --black --isort --pylint --pylint-rcfile=.pylintrc --cov --cov-report=term-missing --cov-report=xml --junitxml=test-reports/pytest_csv_params.xml" filterwarnings=[ "ignore:.*BlackItem.*:_pytest.warning_types.PytestDeprecationWarning", "ignore:.*BlackItem.*:_pytest.warning_types.PytestRemovedIn8Warning", @@ -108,6 +108,7 @@ legacy_tox_ini = """ [tox] minversion = 3.25.0 envlist = clean,py38,py39,py310 +isolated_build = True [testenv] commands = From 755d8f92767bd81eb94b33fdb2f23d17c9ad00db Mon Sep 17 00:00:00 2001 From: Juergen Edelbluth Date: Fri, 26 Aug 2022 11:55:56 +0200 Subject: [PATCH 2/6] Better Tests labeling from Jenkins --- .ci/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile index dd6b180..bc536b7 100644 --- a/.ci/Jenkinsfile +++ b/.ci/Jenkinsfile @@ -28,7 +28,7 @@ pipeline { } steps { sh 'poetry run tox -r -e ${PYTHON_VERSION}' - xunit checksName: '', tools: [JUnit(excludesPattern: '', pattern: 'test-reports/*.xml', stopProcessingIfError: true)] + xunit checksName: "Tests ${PYTHON_VERSION}", tools: [JUnit(excludesPattern: '', pattern: 'test-reports/*.xml', stopProcessingIfError: true)] cobertura autoUpdateStability: false, coberturaReportFile: 'coverage.xml', conditionalCoverageTargets: '70, 0, 0', failUnhealthy: false, failUnstable: false, lineCoverageTargets: '80, 0, 0', maxNumberOfBuilds: 0, methodCoverageTargets: '80, 0, 0', onlyStable: false } } From 82584ab395cd768ffd88e2189c2853300d70e85c Mon Sep 17 00:00:00 2001 From: Juergen Edelbluth Date: Fri, 26 Aug 2022 12:39:45 +0200 Subject: [PATCH 3/6] E-Mail Notification --- .ci/Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile index bc536b7..f852763 100644 --- a/.ci/Jenkinsfile +++ b/.ci/Jenkinsfile @@ -39,13 +39,13 @@ pipeline { post { success { - cleanWs() + deleteDir() } always { withCredentials([string(credentialsId: 'jed-notification-email', variable: 'EMAIL')]) { mail to: "${EMAIL}", - subject: "[pytest-csv-params] ${currentBuild.currentResult}: ${currentBuild.fullDisplayName}", - body: "Jenkins URL: ${env.BUILD_URL}" + subject: "[${currentBuild.fullDisplayName}] Build #${currentBuild.number} :${currentBuild.currentResult}", + body: "Duration: ${currentBuild.durationString} / Jenkins URL: ${env.BUILD_URL}" } } } From 8a55418bb313ca6bb76071cf3651580ca18af053 Mon Sep 17 00:00:00 2001 From: Juergen Edelbluth Date: Fri, 26 Aug 2022 12:40:43 +0200 Subject: [PATCH 4/6] E-Mail Notification typo --- .ci/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile index f852763..7601059 100644 --- a/.ci/Jenkinsfile +++ b/.ci/Jenkinsfile @@ -44,7 +44,7 @@ pipeline { always { withCredentials([string(credentialsId: 'jed-notification-email', variable: 'EMAIL')]) { mail to: "${EMAIL}", - subject: "[${currentBuild.fullDisplayName}] Build #${currentBuild.number} :${currentBuild.currentResult}", + subject: "[${currentBuild.fullDisplayName}] Build #${currentBuild.number}: ${currentBuild.currentResult}", body: "Duration: ${currentBuild.durationString} / Jenkins URL: ${env.BUILD_URL}" } } From 3c0892d8eef90b8e6ea68e680c93836fc734b35b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Edelbluth?= Date: Fri, 26 Aug 2022 17:31:50 +0200 Subject: [PATCH 5/6] Poetry Preparation shortened for CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only dependencies are installed during setup, untracked packages are removed. Signed-off-by: Jürgen Edelbluth --- .ci/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile index 7601059..9f6b6b6 100644 --- a/.ci/Jenkinsfile +++ b/.ci/Jenkinsfile @@ -10,7 +10,7 @@ pipeline { stages { stage('Prepare') { steps { - sh 'poetry install' + sh 'poetry install --remove-untracked --no-root' } } stage('Tox') { From 5d5441c3ee08932254181fec527c92457be269b2 Mon Sep 17 00:00:00 2001 From: Juergen Edelbluth Date: Sun, 28 Aug 2022 14:23:28 +0200 Subject: [PATCH 6/6] Preparing Release 1.0.0 (Issue: #7) - Latest dependency-update - Minor documentation tweaks - Project classifiers mapped to "Production/Stable" --- README.md | 11 ++++++----- docs/conf.py | 1 + docs/index.md | 9 +++++---- docs/pages/changelog.md | 15 +++++++++++++++ poetry.lock | 15 +++++++++------ pyproject.toml | 7 ++++--- 6 files changed, 40 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 6bd3258..f894827 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,14 @@ -![pytest-csv-params](docs/icon/pytest-csv-params.png) +![pytest-csv-params](https://docs.codebau.dev/pytest-plugins/pytest-csv-params/_images/pytest-csv-params.png) # pytest-csv-params A pytest plugin to parametrize data-driven tests by CSV files. -[![PyPI - Downloads](https://img.shields.io/pypi/dw/pytest-csv-params?label=PyPI%20downloads&style=for-the-badge)](https://pypi.org/project/pytest-csv-params/) -[![PyPI - Version](https://img.shields.io/pypi/v/pytest-csv-params?label=PyPI%20version&style=for-the-badge)](https://pypi.org/project/pytest-csv-params/) -[![PyPI - Status](https://img.shields.io/pypi/status/pytest-csv-params?label=PyPI%20status&style=for-the-badge)](https://pypi.org/project/pytest-csv-params/) -[![PyPI - Format](https://img.shields.io/pypi/format/pytest-csv-params?label=PyPI%20format&style=for-the-badge)](https://pypi.org/project/pytest-csv-params/) +[![Build Status](https://build.codebau.dev/buildStatus/icon?job=pytest-csv-params&style=flat)](https://git.codebau.dev/pytest-plugins/pytest-csv-params) +[![PyPI - Downloads](https://img.shields.io/pypi/dw/pytest-csv-params?label=PyPI%20downloads&style=flat&logo=pypi)](https://pypi.org/project/pytest-csv-params/) +[![PyPI - Version](https://img.shields.io/pypi/v/pytest-csv-params?label=PyPI%20version&style=flat&logo=pypi)](https://pypi.org/project/pytest-csv-params/) +[![PyPI - Status](https://img.shields.io/pypi/status/pytest-csv-params?label=PyPI%20status&style=flat&logo=pypi)](https://pypi.org/project/pytest-csv-params/) +[![PyPI - Format](https://img.shields.io/pypi/format/pytest-csv-params?label=PyPI%20format&style=flat&logo=pypi)](https://pypi.org/project/pytest-csv-params/) ## Requirements diff --git a/docs/conf.py b/docs/conf.py index 9a9fe9e..4990860 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -93,6 +93,7 @@ html_theme_options = { "css_minify": True, "html_minify": True, "master_doc": True, + "theme_color": "#008080", } myst_enable_extensions = [ diff --git a/docs/index.md b/docs/index.md index a089f85..9cb1062 100644 --- a/docs/index.md +++ b/docs/index.md @@ -9,10 +9,11 @@ # Data-driven test parametrization für pytest with CSV files -[![PyPI - Downloads](https://img.shields.io/pypi/dw/pytest-csv-params?label=PyPI%20downloads&style=for-the-badge)](https://pypi.org/project/pytest-csv-params/) -[![PyPI - Version](https://img.shields.io/pypi/v/pytest-csv-params?label=PyPI%20version&style=for-the-badge)](https://pypi.org/project/pytest-csv-params/) -[![PyPI - Status](https://img.shields.io/pypi/status/pytest-csv-params?label=PyPI%20status&style=for-the-badge)](https://pypi.org/project/pytest-csv-params/) -[![PyPI - Format](https://img.shields.io/pypi/format/pytest-csv-params?label=PyPI%20format&style=for-the-badge)](https://pypi.org/project/pytest-csv-params/) +[![Build Status](https://build.codebau.dev/buildStatus/icon?job=pytest-csv-params&style=flat)](https://git.codebau.dev/pytest-plugins/pytest-csv-params) +[![PyPI - Downloads](https://img.shields.io/pypi/dw/pytest-csv-params?label=PyPI%20downloads&style=flat&logo=pypi)](https://pypi.org/project/pytest-csv-params/) +[![PyPI - Version](https://img.shields.io/pypi/v/pytest-csv-params?label=PyPI%20version&style=flat&logo=pypi)](https://pypi.org/project/pytest-csv-params/) +[![PyPI - Status](https://img.shields.io/pypi/status/pytest-csv-params?label=PyPI%20status&style=flat&logo=pypi)](https://pypi.org/project/pytest-csv-params/) +[![PyPI - Format](https://img.shields.io/pypi/format/pytest-csv-params?label=PyPI%20format&style=flat&logo=pypi)](https://pypi.org/project/pytest-csv-params/) This pytest plugin allows you to parametrize your pytest tests by CSV files. Manage your test data independently of your tests. This site guides you through [installation](pages/install) and [usage](pages/guide). diff --git a/docs/pages/changelog.md b/docs/pages/changelog.md index ec23266..675ec77 100644 --- a/docs/pages/changelog.md +++ b/docs/pages/changelog.md @@ -1,5 +1,20 @@ # Changelog +## Version 1.0.0 + +Breaking Changes: ✓ None + +Changes: + +- Cleanup of codebase for the big step of going to version 1.0 +- Project marked as "stable" +- Some minor documentation changes +- Dependencies updated +- Fine-tuning of the tox/test configuration for running on CI + +[Downloads](https://git.codebau.dev/pytest-plugins/pytest-csv-params/releases/tag/v1.0.0) | +[Technical Changelog](https://git.codebau.dev/pytest-plugins/pytest-csv-params/compare/v0.4.0...v1.0.0) + ## Version 0.4.0 Breaking Changes: ✓ None diff --git a/poetry.lock b/poetry.lock index cbf9ed0..16353d4 100644 --- a/poetry.lock +++ b/poetry.lock @@ -8,16 +8,19 @@ python-versions = "*" [[package]] name = "astroid" -version = "2.11.7" +version = "2.12.4" description = "An abstract syntax tree for Python with inference support." category = "dev" optional = false -python-versions = ">=3.6.2" +python-versions = ">=3.7.2" [package.dependencies] lazy-object-proxy = ">=1.4.0" typing-extensions = {version = ">=3.10", markers = "python_version < \"3.10\""} -wrapt = ">=1.11,<2" +wrapt = [ + {version = ">=1.11,<2", markers = "python_version < \"3.11\""}, + {version = ">=1.14,<2", markers = "python_version >= \"3.11\""}, +] [[package]] name = "atomicwrites" @@ -192,7 +195,7 @@ graph = ["objgraph (>=1.7.2)"] [[package]] name = "distlib" -version = "0.3.5" +version = "0.3.6" description = "Distribution utilities" category = "dev" optional = false @@ -532,14 +535,14 @@ plugins = ["importlib-metadata"] [[package]] name = "pylint" -version = "2.14.5" +version = "2.15.0" description = "python code static checker" category = "dev" optional = false python-versions = ">=3.7.2" [package.dependencies] -astroid = ">=2.11.6,<=2.12.0-dev0" +astroid = ">=2.12.4,<=2.14.0-dev0" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} dill = ">=0.2" isort = ">=4.2.5,<6" diff --git a/pyproject.toml b/pyproject.toml index 3030609..adf024f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pytest-csv-params" -version = "0.4.1" +version = "0.4.2" description = "Pytest plugin for Test Case Parametrization with CSV files" authors = ["Juergen Edelbluth "] license = "MIT" @@ -8,11 +8,12 @@ repository = "https://git.codebau.dev/pytest-plugins/pytest-csv-params" homepage = "https://git.codebau.dev/pytest-plugins/pytest-csv-params" readme = "README.md" keywords = [ - "py.test", "pytest", "csv", "params", "parametrize", "pytest-plugin", + "py.test", "pytest", "csv", "params", "parametrize", "pytest-plugin", "ddt", "data-driven" ] classifiers = [ - "Development Status :: 4 - Beta", + "Development Status :: 5 - Production/Stable", "Environment :: Plugins", + "Environment :: Console", "Framework :: Pytest", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License",