From b3654dc7e1512dbef149995fb23c567349231281 Mon Sep 17 00:00:00 2001 From: Pit Nahrstedt Date: Wed, 20 Sep 2023 22:09:39 +0200 Subject: [PATCH 01/15] =?UTF-8?q?=E2=9A=A1pre-commit=20updates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 18 +++++++++++++++++ requirements-dev.txt | 43 +++++++++++++++++++++++++++++++++++++++++ requirements.txt | 25 ++++++++++++++++++++++++ 3 files changed, 86 insertions(+) create mode 100644 requirements-dev.txt create mode 100644 requirements.txt diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c680bb3..f790927 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -42,6 +42,24 @@ repos: "-sn", # Don't display the score "--rcfile=pyproject.toml" ] + - repo: local + hooks: + - id: update-requirements-txt + name: update-requirements-txt + description: 'Generate requirements.txt based on poetry.lock' + entry: poetry + args: [export, --without-hashes, --without, dev, --format, requirements.txt, --output, requirements.txt] + language: system + pass_filenames: false + - repo: local + hooks: + - id: update-requirements-txt + name: update-requirements-txt + description: 'Generate requirements.txt based on poetry.lock' + entry: poetry + args: [export, --without-hashes, --with, dev, --format, requirements.txt, --output, requirements-dev.txt] + language: system + pass_filenames: false ci: autofix_commit_msg: 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks autoupdate_commit_msg: ⬆️ [pre-commit.ci] pre-commit autoupdate diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000..9517fcd --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,43 @@ +astroid==2.15.6 ; python_version >= "3.11" and python_version < "3.13" +autoflake==2.2.1 ; python_version >= "3.11" and python_version < "3.13" +black==23.9.1 ; python_version >= "3.11" and python_version < "3.13" +cfgv==3.4.0 ; python_version >= "3.11" and python_version < "3.13" +click==8.1.7 ; python_version >= "3.11" and python_version < "3.13" +colorama==0.4.6 ; python_version >= "3.11" and python_version < "3.13" and (sys_platform == "win32" or platform_system == "Windows") +coverage[toml]==7.3.1 ; python_version >= "3.11" and python_version < "3.13" +dill==0.3.7 ; python_version >= "3.11" and python_version < "3.13" +distlib==0.3.7 ; python_version >= "3.11" and python_version < "3.13" +filelock==3.12.4 ; python_version >= "3.11" and python_version < "3.13" +identify==2.5.29 ; python_version >= "3.11" and python_version < "3.13" +iniconfig==2.0.0 ; python_version >= "3.11" and python_version < "3.13" +isort==5.12.0 ; python_version >= "3.11" and python_version < "3.13" +lazy-object-proxy==1.9.0 ; python_version >= "3.11" and python_version < "3.13" +mccabe==0.7.0 ; python_version >= "3.11" and python_version < "3.13" +multimethod==1.9.1 ; python_version >= "3.11" and python_version < "3.13" +mypy-extensions==1.0.0 ; python_version >= "3.11" and python_version < "3.13" +nodeenv==1.8.0 ; python_version >= "3.11" and python_version < "3.13" +numpy==1.26.0 ; python_version >= "3.11" and python_version < "3.13" +packaging==23.1 ; python_version >= "3.11" and python_version < "3.13" +pandas==2.1.0 ; python_version >= "3.11" and python_version < "3.13" +pandera==0.16.1 ; python_version >= "3.11" and python_version < "3.13" +pathspec==0.11.2 ; python_version >= "3.11" and python_version < "3.13" +platformdirs==3.10.0 ; python_version >= "3.11" and python_version < "3.13" +pluggy==1.3.0 ; python_version >= "3.11" and python_version < "3.13" +pre-commit==3.4.0 ; python_version >= "3.11" and python_version < "3.13" +pydantic==1.10.12 ; python_version >= "3.11" and python_version < "3.13" +pyflakes==3.1.0 ; python_version >= "3.11" and python_version < "3.13" +pylint==2.17.5 ; python_version >= "3.11" and python_version < "3.13" +pytest-cov==4.1.0 ; python_version >= "3.11" and python_version < "3.13" +pytest==7.4.2 ; python_version >= "3.11" and python_version < "3.13" +python-dateutil==2.8.2 ; python_version >= "3.11" and python_version < "3.13" +pytz==2023.3.post1 ; python_version >= "3.11" and python_version < "3.13" +pyyaml==6.0.1 ; python_version >= "3.11" and python_version < "3.13" +setuptools==68.2.2 ; python_version >= "3.11" and python_version < "3.13" +six==1.16.0 ; python_version >= "3.11" and python_version < "3.13" +tomlkit==0.12.1 ; python_version >= "3.11" and python_version < "3.13" +typeguard==4.1.5 ; python_version >= "3.11" and python_version < "3.13" +typing-extensions==4.7.1 ; python_version >= "3.11" and python_version < "3.13" +typing-inspect==0.9.0 ; python_version >= "3.11" and python_version < "3.13" +tzdata==2023.3 ; python_version >= "3.11" and python_version < "3.13" +virtualenv==20.24.5 ; python_version >= "3.11" and python_version < "3.13" +wrapt==1.15.0 ; python_version >= "3.11" and python_version < "3.13" diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..404e408 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,25 @@ +cfgv==3.4.0 ; python_version >= "3.11" and python_version < "3.13" +distlib==0.3.7 ; python_version >= "3.11" and python_version < "3.13" +filelock==3.12.4 ; python_version >= "3.11" and python_version < "3.13" +identify==2.5.29 ; python_version >= "3.11" and python_version < "3.13" +multimethod==1.9.1 ; python_version >= "3.11" and python_version < "3.13" +mypy-extensions==1.0.0 ; python_version >= "3.11" and python_version < "3.13" +nodeenv==1.8.0 ; python_version >= "3.11" and python_version < "3.13" +numpy==1.26.0 ; python_version >= "3.11" and python_version < "3.13" +packaging==23.1 ; python_version >= "3.11" and python_version < "3.13" +pandas==2.1.0 ; python_version >= "3.11" and python_version < "3.13" +pandera==0.16.1 ; python_version >= "3.11" and python_version < "3.13" +platformdirs==3.10.0 ; python_version >= "3.11" and python_version < "3.13" +pre-commit==3.4.0 ; python_version >= "3.11" and python_version < "3.13" +pydantic==1.10.12 ; python_version >= "3.11" and python_version < "3.13" +python-dateutil==2.8.2 ; python_version >= "3.11" and python_version < "3.13" +pytz==2023.3.post1 ; python_version >= "3.11" and python_version < "3.13" +pyyaml==6.0.1 ; python_version >= "3.11" and python_version < "3.13" +setuptools==68.2.2 ; python_version >= "3.11" and python_version < "3.13" +six==1.16.0 ; python_version >= "3.11" and python_version < "3.13" +typeguard==4.1.5 ; python_version >= "3.11" and python_version < "3.13" +typing-extensions==4.7.1 ; python_version >= "3.11" and python_version < "3.13" +typing-inspect==0.9.0 ; python_version >= "3.11" and python_version < "3.13" +tzdata==2023.3 ; python_version >= "3.11" and python_version < "3.13" +virtualenv==20.24.5 ; python_version >= "3.11" and python_version < "3.13" +wrapt==1.15.0 ; python_version >= "3.11" and python_version < "3.13" From 284b0b0391d62ff7ee2f41bae091a10e0d24c9d9 Mon Sep 17 00:00:00 2001 From: Pit Nahrstedt Date: Wed, 20 Sep 2023 22:10:11 +0200 Subject: [PATCH 02/15] =?UTF-8?q?=F0=9F=91=B7Adding=20CI=20build=20system.?= =?UTF-8?q?...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pipeline.yml | 99 ++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 .github/workflows/pipeline.yml diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml new file mode 100644 index 0000000..b8b1ddc --- /dev/null +++ b/.github/workflows/pipeline.yml @@ -0,0 +1,99 @@ +name: Pipeline + +on: + push: + branches: + - main + - dev + - bugfix + - "release/*" + pull_request: + branches: + - main + - dev + - bugfix + - "release/*" + +jobs: + lint: + name: Linters (${{ matrix.python-version }}) + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11"] + defaults: + run: + shell: bash -l {0} + + steps: + - uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - uses: actions/cache@v3 + with: + path: ~/.cache/pip # ubuntu location + key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + - name: Install dependencies + run: python -m pip install pre_commit + - name: Pip info + run: python -m pip list + + - name: Sort Imports + run: pre-commit run isort --all-files + + - name: Black + if: always() + run: pre-commit run black --all-files + + - name: Pylint + if: always() + run: pre-commit run pylint --all-files + + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + pydantic-version: ["pydantic-v1", "pydantic-v2"] + fail-fast: false + steps: + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: echo "$GITHUB_CONTEXT" + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + # Issue ref: https://github.com/actions/setup-python/issues/436 + # cache: "pip" + # cache-dependency-path: pyproject.toml + - uses: actions/cache@v3 + id: cache + with: + path: ${{ env.pythonLocation }} + key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ matrix.pydantic-version }}-${{ hashFiles('pyproject.toml', 'requirements-dev.txt') }}-test-v05 + - name: Install Dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: pip install -r requirements-dev.txt + - name: Install Pydantic v1 + if: matrix.pydantic-version == 'pydantic-v1' + run: pip install "pydantic>=1.10.0,<2.0.0" + - name: Install Pydantic v2 + if: matrix.pydantic-version == 'pydantic-v2' + run: pip install "pydantic>=2.0.2,<3.0.0" + - run: mkdir coverage + - name: Test + run: pytest tests + - name: Store coverage files + uses: actions/upload-artifact@v3 + with: + name: coverage + path: coverage From b2f2a073b062fd12fdbe42a67afaf886a03af5ed Mon Sep 17 00:00:00 2001 From: Pit Nahrstedt Date: Wed, 20 Sep 2023 22:21:07 +0200 Subject: [PATCH 03/15] =?UTF-8?q?=F0=9F=91=B7Adding=20CI=20build=20system.?= =?UTF-8?q?...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pipeline.yml | 14 ++++---------- .pre-commit-config.yaml | 4 ++-- .../requirements-dev.txt | 0 requirements.txt => requirements/requirements.txt | 0 4 files changed, 6 insertions(+), 12 deletions(-) rename requirements-dev.txt => requirements/requirements-dev.txt (100%) rename requirements.txt => requirements/requirements.txt (100%) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index b8b1ddc..8d0609a 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -59,8 +59,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] - pydantic-version: ["pydantic-v1", "pydantic-v2"] + python-version: [ 3.8, 3.9, "3.11" ] + os: [ macos-latest, ubuntu-latest, windows-latest ] fail-fast: false steps: - name: Dump GitHub context @@ -79,19 +79,13 @@ jobs: id: cache with: path: ${{ env.pythonLocation }} - key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ matrix.pydantic-version }}-${{ hashFiles('pyproject.toml', 'requirements-dev.txt') }}-test-v05 + key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-dev.txt') }}-test-v05 - name: Install Dependencies if: steps.cache.outputs.cache-hit != 'true' run: pip install -r requirements-dev.txt - - name: Install Pydantic v1 - if: matrix.pydantic-version == 'pydantic-v1' - run: pip install "pydantic>=1.10.0,<2.0.0" - - name: Install Pydantic v2 - if: matrix.pydantic-version == 'pydantic-v2' - run: pip install "pydantic>=2.0.2,<3.0.0" - run: mkdir coverage - name: Test - run: pytest tests + run: python -m pytest tests - name: Store coverage files uses: actions/upload-artifact@v3 with: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f790927..f134824 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,7 +48,7 @@ repos: name: update-requirements-txt description: 'Generate requirements.txt based on poetry.lock' entry: poetry - args: [export, --without-hashes, --without, dev, --format, requirements.txt, --output, requirements.txt] + args: [export, --without-hashes, --without, dev, --format, requirements.txt, --output, requirements/requirements.txt] language: system pass_filenames: false - repo: local @@ -57,7 +57,7 @@ repos: name: update-requirements-txt description: 'Generate requirements.txt based on poetry.lock' entry: poetry - args: [export, --without-hashes, --with, dev, --format, requirements.txt, --output, requirements-dev.txt] + args: [export, --without-hashes, --with, dev, --format, requirements.txt, --output, requirements/requirements-dev.txt] language: system pass_filenames: false ci: diff --git a/requirements-dev.txt b/requirements/requirements-dev.txt similarity index 100% rename from requirements-dev.txt rename to requirements/requirements-dev.txt diff --git a/requirements.txt b/requirements/requirements.txt similarity index 100% rename from requirements.txt rename to requirements/requirements.txt From 648d05226779b7925220c48744af13c95fb19e37 Mon Sep 17 00:00:00 2001 From: Pit Nahrstedt Date: Wed, 20 Sep 2023 22:22:03 +0200 Subject: [PATCH 04/15] =?UTF-8?q?=F0=9F=91=B7Fixed=20invalid=20path=20to?= =?UTF-8?q?=20requirements=20in=20pipeline.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 8d0609a..2918b76 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -79,7 +79,7 @@ jobs: id: cache with: path: ${{ env.pythonLocation }} - key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-dev.txt') }}-test-v05 + key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements/requirements-dev.txt') }}-test-v05 - name: Install Dependencies if: steps.cache.outputs.cache-hit != 'true' run: pip install -r requirements-dev.txt From 2b90fad0942804633b0ae2faac464d0b4fdce807 Mon Sep 17 00:00:00 2001 From: Pit Nahrstedt Date: Wed, 20 Sep 2023 22:25:05 +0200 Subject: [PATCH 05/15] =?UTF-8?q?=F0=9F=91=B7Fixed=20invalid=20path=20to?= =?UTF-8?q?=20requirements=20in=20pipeline.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pipeline.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 2918b76..38a812e 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -80,9 +80,11 @@ jobs: with: path: ${{ env.pythonLocation }} key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements/requirements-dev.txt') }}-test-v05 + - name: Install Dependencies + run: python -m pip install --upgrade pip - name: Install Dependencies if: steps.cache.outputs.cache-hit != 'true' - run: pip install -r requirements-dev.txt + run: python -m pip install -r requirements/requirements-dev.txt - run: mkdir coverage - name: Test run: python -m pytest tests From db36458b4175650557bb3f64564d9e0d2b2f50f8 Mon Sep 17 00:00:00 2001 From: Pit Nahrstedt Date: Wed, 20 Sep 2023 22:33:05 +0200 Subject: [PATCH 06/15] =?UTF-8?q?=F0=9F=91=B7updated=20job=20`linting`=20i?= =?UTF-8?q?n=20github=20workflow=20pipeline?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pipeline.yml | 38 ++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 38a812e..7db6fbb 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -15,47 +15,49 @@ on: - "release/*" jobs: - lint: - name: Linters (${{ matrix.python-version }}) + linting: + name: Linter (${{ matrix.python-version }}) runs-on: ubuntu-latest strategy: fail-fast: true matrix: python-version: ["3.8", "3.9", "3.10", "3.11"] - defaults: - run: - shell: bash -l {0} - steps: + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: echo "$GITHUB_CONTEXT" - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ matrix.python-version }} + - name: Update pip + run: python -m pip install -U pip - uses: actions/cache@v3 + id: cache with: - path: ~/.cache/pip # ubuntu location - key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - - name: Install dependencies - run: python -m pip install pre_commit + path: ${{ env.pythonLocation }} + key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements/requirements-dev.txt') }}-test-v05 + - name: Install Dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: pip install -r requirements/requirements-dev.txt + - name: Install pre-commit + run: pip install pre_commit + - name: Lint + run: bash scripts/lint.sh - name: Pip info run: python -m pip list - - name: Sort Imports run: pre-commit run isort --all-files - - name: Black if: always() run: pre-commit run black --all-files - - name: Pylint if: always() run: pre-commit run pylint --all-files - test: + testing: runs-on: ubuntu-latest strategy: matrix: From 6da2da15d725d36ec887891c67d8b69a8f91c7b5 Mon Sep 17 00:00:00 2001 From: Pit Nahrstedt Date: Wed, 20 Sep 2023 22:36:39 +0200 Subject: [PATCH 07/15] =?UTF-8?q?=F0=9F=91=B7updated=20job=20`linting`=20i?= =?UTF-8?q?n=20github=20workflow=20pipeline?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pipeline.yml | 4 +- poetry.lock | 100 +++++++++++++++++++++++++++--- pyproject.toml | 2 +- requirements/requirements-dev.txt | 90 ++++++++++++++------------- requirements/requirements.txt | 52 ++++++++-------- 5 files changed, 166 insertions(+), 82 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 7db6fbb..140e8e4 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -21,7 +21,7 @@ jobs: strategy: fail-fast: true matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11"] steps: - name: Dump GitHub context env: @@ -44,8 +44,6 @@ jobs: run: pip install -r requirements/requirements-dev.txt - name: Install pre-commit run: pip install pre_commit - - name: Lint - run: bash scripts/lint.sh - name: Pip info run: python -m pip list - name: Sort Imports diff --git a/poetry.lock b/poetry.lock index 7a1b525..f7ae68f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -13,7 +13,11 @@ files = [ [package.dependencies] lazy-object-proxy = ">=1.4.0" -wrapt = {version = ">=1.14,<2", markers = "python_version >= \"3.11\""} +typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.11\""} +wrapt = [ + {version = ">=1.11,<2", markers = "python_version < \"3.11\""}, + {version = ">=1.14,<2", markers = "python_version >= \"3.11\""}, +] [[package]] name = "autoflake" @@ -28,6 +32,7 @@ files = [ [package.dependencies] pyflakes = ">=3.0.0" +tomli = {version = ">=2.0.1", markers = "python_version < \"3.11\""} [[package]] name = "black" @@ -66,6 +71,8 @@ mypy-extensions = ">=0.4.3" packaging = ">=22.0" pathspec = ">=0.9.0" platformdirs = ">=2" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} +typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} [package.extras] colorama = ["colorama (>=0.4.3)"] @@ -170,6 +177,9 @@ files = [ {file = "coverage-7.3.1.tar.gz", hash = "sha256:6cb7fe1581deb67b782c153136541e20901aa312ceedaf1467dcb35255787952"}, ] +[package.dependencies] +tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.11.0a6\" and extra == \"toml\""} + [package.extras] toml = ["tomli"] @@ -198,6 +208,20 @@ files = [ {file = "distlib-0.3.7.tar.gz", hash = "sha256:9dafe54b34a028eafd95039d5e5d4851a13734540f1331060d31c9916e7147a8"}, ] +[[package]] +name = "exceptiongroup" +version = "1.1.3" +description = "Backport of PEP 654 (exception groups)" +optional = false +python-versions = ">=3.7" +files = [ + {file = "exceptiongroup-1.1.3-py3-none-any.whl", hash = "sha256:343280667a4585d195ca1cf9cef84a4e178c4b6cf2274caef9859782b567d5e3"}, + {file = "exceptiongroup-1.1.3.tar.gz", hash = "sha256:097acd85d473d75af5bb98e41b61ff7fe35efe6675e4f9370ec6ec5126d160e9"}, +] + +[package.extras] +test = ["pytest (>=6)"] + [[package]] name = "filelock" version = "3.12.4" @@ -228,6 +252,25 @@ files = [ [package.extras] license = ["ukkonen"] +[[package]] +name = "importlib-metadata" +version = "6.8.0" +description = "Read metadata from Python packages" +optional = false +python-versions = ">=3.8" +files = [ + {file = "importlib_metadata-6.8.0-py3-none-any.whl", hash = "sha256:3ebb78df84a805d7698245025b975d9d67053cd94c79245ba4b3eb694abe68bb"}, + {file = "importlib_metadata-6.8.0.tar.gz", hash = "sha256:dbace7892d8c0c4ac1ad096662232f831d4e64f4c4545bd53016a3e9d4654743"}, +] + +[package.dependencies] +zipp = ">=0.5" + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +perf = ["ipython"] +testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)", "pytest-ruff"] + [[package]] name = "iniconfig" version = "2.0.0" @@ -429,7 +472,10 @@ files = [ ] [package.dependencies] -numpy = {version = ">=1.23.2", markers = "python_version >= \"3.11\""} +numpy = [ + {version = ">=1.22.4", markers = "python_version < \"3.11\""}, + {version = ">=1.23.2", markers = "python_version >= \"3.11\""}, +] python-dateutil = ">=2.8.2" pytz = ">=2020.1" tzdata = ">=2022.1" @@ -629,11 +675,16 @@ files = [ [package.dependencies] astroid = ">=2.15.6,<=2.17.0-dev0" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} -dill = {version = ">=0.3.6", markers = "python_version >= \"3.11\""} +dill = [ + {version = ">=0.2", markers = "python_version < \"3.11\""}, + {version = ">=0.3.6", markers = "python_version >= \"3.11\""}, +] isort = ">=4.2.5,<6" mccabe = ">=0.6,<0.8" platformdirs = ">=2.2.0" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} tomlkit = ">=0.10.1" +typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\""} [package.extras] spelling = ["pyenchant (>=3.2,<4.0)"] @@ -652,9 +703,11 @@ files = [ [package.dependencies] colorama = {version = "*", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" pluggy = ">=0.12,<2.0" +tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} [package.extras] testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] @@ -788,6 +841,17 @@ files = [ {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] +[[package]] +name = "tomli" +version = "2.0.1" +description = "A lil' TOML parser" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, +] + [[package]] name = "tomlkit" version = "0.12.1" @@ -811,6 +875,7 @@ files = [ ] [package.dependencies] +importlib-metadata = {version = ">=3.6", markers = "python_version < \"3.10\""} typing-extensions = {version = ">=4.7.0", markers = "python_version < \"3.12\""} [package.extras] @@ -819,13 +884,13 @@ test = ["coverage[toml] (>=7)", "mypy (>=1.2.0)", "pytest (>=7)"] [[package]] name = "typing-extensions" -version = "4.7.1" -description = "Backported and Experimental Type Hints for Python 3.7+" +version = "4.8.0" +description = "Backported and Experimental Type Hints for Python 3.8+" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "typing_extensions-4.7.1-py3-none-any.whl", hash = "sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36"}, - {file = "typing_extensions-4.7.1.tar.gz", hash = "sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2"}, + {file = "typing_extensions-4.8.0-py3-none-any.whl", hash = "sha256:8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0"}, + {file = "typing_extensions-4.8.0.tar.gz", hash = "sha256:df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef"}, ] [[package]] @@ -958,7 +1023,22 @@ files = [ {file = "wrapt-1.15.0.tar.gz", hash = "sha256:d06730c6aed78cee4126234cf2d071e01b44b915e725a6cb439a879ec9754a3a"}, ] +[[package]] +name = "zipp" +version = "3.17.0" +description = "Backport of pathlib-compatible object wrapper for zip files" +optional = false +python-versions = ">=3.8" +files = [ + {file = "zipp-3.17.0-py3-none-any.whl", hash = "sha256:0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31"}, + {file = "zipp-3.17.0.tar.gz", hash = "sha256:84e64a1c28cf7e91ed2078bb8cc8c259cb19b76942096c8d7b84947690cabaf0"}, +] + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] +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"] + [metadata] lock-version = "2.0" -python-versions = "^3.11, <3.13" -content-hash = "3bae897a0fc8b40caa46a6f8b485fffadb156dcd8d19b25ed3c7c351f11a5e69" +python-versions = "^3.9, <3.13" +content-hash = "5e68773a078fc1b6d90dfe55629962729308102c04b3cedb6ae1860dba21d01a" diff --git a/pyproject.toml b/pyproject.toml index c663091..7da43d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ Homepage = "https://github.com/Luanee/pandera-report" [tool.poetry.dependencies] -python = "^3.11, <3.13" +python = "^3.9, <3.13" pandas = "^2.1.0" pandera = "0.16.1" pre-commit = "^3.4.0" diff --git a/requirements/requirements-dev.txt b/requirements/requirements-dev.txt index 9517fcd..bb59da0 100644 --- a/requirements/requirements-dev.txt +++ b/requirements/requirements-dev.txt @@ -1,43 +1,47 @@ -astroid==2.15.6 ; python_version >= "3.11" and python_version < "3.13" -autoflake==2.2.1 ; python_version >= "3.11" and python_version < "3.13" -black==23.9.1 ; python_version >= "3.11" and python_version < "3.13" -cfgv==3.4.0 ; python_version >= "3.11" and python_version < "3.13" -click==8.1.7 ; python_version >= "3.11" and python_version < "3.13" -colorama==0.4.6 ; python_version >= "3.11" and python_version < "3.13" and (sys_platform == "win32" or platform_system == "Windows") -coverage[toml]==7.3.1 ; python_version >= "3.11" and python_version < "3.13" -dill==0.3.7 ; python_version >= "3.11" and python_version < "3.13" -distlib==0.3.7 ; python_version >= "3.11" and python_version < "3.13" -filelock==3.12.4 ; python_version >= "3.11" and python_version < "3.13" -identify==2.5.29 ; python_version >= "3.11" and python_version < "3.13" -iniconfig==2.0.0 ; python_version >= "3.11" and python_version < "3.13" -isort==5.12.0 ; python_version >= "3.11" and python_version < "3.13" -lazy-object-proxy==1.9.0 ; python_version >= "3.11" and python_version < "3.13" -mccabe==0.7.0 ; python_version >= "3.11" and python_version < "3.13" -multimethod==1.9.1 ; python_version >= "3.11" and python_version < "3.13" -mypy-extensions==1.0.0 ; python_version >= "3.11" and python_version < "3.13" -nodeenv==1.8.0 ; python_version >= "3.11" and python_version < "3.13" -numpy==1.26.0 ; python_version >= "3.11" and python_version < "3.13" -packaging==23.1 ; python_version >= "3.11" and python_version < "3.13" -pandas==2.1.0 ; python_version >= "3.11" and python_version < "3.13" -pandera==0.16.1 ; python_version >= "3.11" and python_version < "3.13" -pathspec==0.11.2 ; python_version >= "3.11" and python_version < "3.13" -platformdirs==3.10.0 ; python_version >= "3.11" and python_version < "3.13" -pluggy==1.3.0 ; python_version >= "3.11" and python_version < "3.13" -pre-commit==3.4.0 ; python_version >= "3.11" and python_version < "3.13" -pydantic==1.10.12 ; python_version >= "3.11" and python_version < "3.13" -pyflakes==3.1.0 ; python_version >= "3.11" and python_version < "3.13" -pylint==2.17.5 ; python_version >= "3.11" and python_version < "3.13" -pytest-cov==4.1.0 ; python_version >= "3.11" and python_version < "3.13" -pytest==7.4.2 ; python_version >= "3.11" and python_version < "3.13" -python-dateutil==2.8.2 ; python_version >= "3.11" and python_version < "3.13" -pytz==2023.3.post1 ; python_version >= "3.11" and python_version < "3.13" -pyyaml==6.0.1 ; python_version >= "3.11" and python_version < "3.13" -setuptools==68.2.2 ; python_version >= "3.11" and python_version < "3.13" -six==1.16.0 ; python_version >= "3.11" and python_version < "3.13" -tomlkit==0.12.1 ; python_version >= "3.11" and python_version < "3.13" -typeguard==4.1.5 ; python_version >= "3.11" and python_version < "3.13" -typing-extensions==4.7.1 ; python_version >= "3.11" and python_version < "3.13" -typing-inspect==0.9.0 ; python_version >= "3.11" and python_version < "3.13" -tzdata==2023.3 ; python_version >= "3.11" and python_version < "3.13" -virtualenv==20.24.5 ; python_version >= "3.11" and python_version < "3.13" -wrapt==1.15.0 ; python_version >= "3.11" and python_version < "3.13" +astroid==2.15.6 ; python_version >= "3.9" and python_version < "3.13" +autoflake==2.2.1 ; python_version >= "3.9" and python_version < "3.13" +black==23.9.1 ; python_version >= "3.9" and python_version < "3.13" +cfgv==3.4.0 ; python_version >= "3.9" and python_version < "3.13" +click==8.1.7 ; python_version >= "3.9" and python_version < "3.13" +colorama==0.4.6 ; python_version >= "3.9" and python_version < "3.13" and (sys_platform == "win32" or platform_system == "Windows") +coverage[toml]==7.3.1 ; python_version >= "3.9" and python_version < "3.13" +dill==0.3.7 ; python_version >= "3.9" and python_version < "3.13" +distlib==0.3.7 ; python_version >= "3.9" and python_version < "3.13" +exceptiongroup==1.1.3 ; python_version >= "3.9" and python_version < "3.11" +filelock==3.12.4 ; python_version >= "3.9" and python_version < "3.13" +identify==2.5.29 ; python_version >= "3.9" and python_version < "3.13" +importlib-metadata==6.8.0 ; python_version >= "3.9" and python_version < "3.10" +iniconfig==2.0.0 ; python_version >= "3.9" and python_version < "3.13" +isort==5.12.0 ; python_version >= "3.9" and python_version < "3.13" +lazy-object-proxy==1.9.0 ; python_version >= "3.9" and python_version < "3.13" +mccabe==0.7.0 ; python_version >= "3.9" and python_version < "3.13" +multimethod==1.9.1 ; python_version >= "3.9" and python_version < "3.13" +mypy-extensions==1.0.0 ; python_version >= "3.9" and python_version < "3.13" +nodeenv==1.8.0 ; python_version >= "3.9" and python_version < "3.13" +numpy==1.26.0 ; python_version >= "3.9" and python_version < "3.13" +packaging==23.1 ; python_version >= "3.9" and python_version < "3.13" +pandas==2.1.0 ; python_version >= "3.9" and python_version < "3.13" +pandera==0.16.1 ; python_version >= "3.9" and python_version < "3.13" +pathspec==0.11.2 ; python_version >= "3.9" and python_version < "3.13" +platformdirs==3.10.0 ; python_version >= "3.9" and python_version < "3.13" +pluggy==1.3.0 ; python_version >= "3.9" and python_version < "3.13" +pre-commit==3.4.0 ; python_version >= "3.9" and python_version < "3.13" +pydantic==1.10.12 ; python_version >= "3.9" and python_version < "3.13" +pyflakes==3.1.0 ; python_version >= "3.9" and python_version < "3.13" +pylint==2.17.5 ; python_version >= "3.9" and python_version < "3.13" +pytest-cov==4.1.0 ; python_version >= "3.9" and python_version < "3.13" +pytest==7.4.2 ; python_version >= "3.9" and python_version < "3.13" +python-dateutil==2.8.2 ; python_version >= "3.9" and python_version < "3.13" +pytz==2023.3.post1 ; python_version >= "3.9" and python_version < "3.13" +pyyaml==6.0.1 ; python_version >= "3.9" and python_version < "3.13" +setuptools==68.2.2 ; python_version >= "3.9" and python_version < "3.13" +six==1.16.0 ; python_version >= "3.9" and python_version < "3.13" +tomli==2.0.1 ; python_version >= "3.9" and python_version < "3.11" +tomlkit==0.12.1 ; python_version >= "3.9" and python_version < "3.13" +typeguard==4.1.5 ; python_version >= "3.9" and python_version < "3.13" +typing-extensions==4.8.0 ; python_version >= "3.9" and python_version < "3.13" +typing-inspect==0.9.0 ; python_version >= "3.9" and python_version < "3.13" +tzdata==2023.3 ; python_version >= "3.9" and python_version < "3.13" +virtualenv==20.24.5 ; python_version >= "3.9" and python_version < "3.13" +wrapt==1.15.0 ; python_version >= "3.9" and python_version < "3.13" +zipp==3.17.0 ; python_version >= "3.9" and python_version < "3.10" diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 404e408..cd8aa84 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,25 +1,27 @@ -cfgv==3.4.0 ; python_version >= "3.11" and python_version < "3.13" -distlib==0.3.7 ; python_version >= "3.11" and python_version < "3.13" -filelock==3.12.4 ; python_version >= "3.11" and python_version < "3.13" -identify==2.5.29 ; python_version >= "3.11" and python_version < "3.13" -multimethod==1.9.1 ; python_version >= "3.11" and python_version < "3.13" -mypy-extensions==1.0.0 ; python_version >= "3.11" and python_version < "3.13" -nodeenv==1.8.0 ; python_version >= "3.11" and python_version < "3.13" -numpy==1.26.0 ; python_version >= "3.11" and python_version < "3.13" -packaging==23.1 ; python_version >= "3.11" and python_version < "3.13" -pandas==2.1.0 ; python_version >= "3.11" and python_version < "3.13" -pandera==0.16.1 ; python_version >= "3.11" and python_version < "3.13" -platformdirs==3.10.0 ; python_version >= "3.11" and python_version < "3.13" -pre-commit==3.4.0 ; python_version >= "3.11" and python_version < "3.13" -pydantic==1.10.12 ; python_version >= "3.11" and python_version < "3.13" -python-dateutil==2.8.2 ; python_version >= "3.11" and python_version < "3.13" -pytz==2023.3.post1 ; python_version >= "3.11" and python_version < "3.13" -pyyaml==6.0.1 ; python_version >= "3.11" and python_version < "3.13" -setuptools==68.2.2 ; python_version >= "3.11" and python_version < "3.13" -six==1.16.0 ; python_version >= "3.11" and python_version < "3.13" -typeguard==4.1.5 ; python_version >= "3.11" and python_version < "3.13" -typing-extensions==4.7.1 ; python_version >= "3.11" and python_version < "3.13" -typing-inspect==0.9.0 ; python_version >= "3.11" and python_version < "3.13" -tzdata==2023.3 ; python_version >= "3.11" and python_version < "3.13" -virtualenv==20.24.5 ; python_version >= "3.11" and python_version < "3.13" -wrapt==1.15.0 ; python_version >= "3.11" and python_version < "3.13" +cfgv==3.4.0 ; python_version >= "3.9" and python_version < "3.13" +distlib==0.3.7 ; python_version >= "3.9" and python_version < "3.13" +filelock==3.12.4 ; python_version >= "3.9" and python_version < "3.13" +identify==2.5.29 ; python_version >= "3.9" and python_version < "3.13" +importlib-metadata==6.8.0 ; python_version >= "3.9" and python_version < "3.10" +multimethod==1.9.1 ; python_version >= "3.9" and python_version < "3.13" +mypy-extensions==1.0.0 ; python_version >= "3.9" and python_version < "3.13" +nodeenv==1.8.0 ; python_version >= "3.9" and python_version < "3.13" +numpy==1.26.0 ; python_version >= "3.9" and python_version < "3.13" +packaging==23.1 ; python_version >= "3.9" and python_version < "3.13" +pandas==2.1.0 ; python_version >= "3.9" and python_version < "3.13" +pandera==0.16.1 ; python_version >= "3.9" and python_version < "3.13" +platformdirs==3.10.0 ; python_version >= "3.9" and python_version < "3.13" +pre-commit==3.4.0 ; python_version >= "3.9" and python_version < "3.13" +pydantic==1.10.12 ; python_version >= "3.9" and python_version < "3.13" +python-dateutil==2.8.2 ; python_version >= "3.9" and python_version < "3.13" +pytz==2023.3.post1 ; python_version >= "3.9" and python_version < "3.13" +pyyaml==6.0.1 ; python_version >= "3.9" and python_version < "3.13" +setuptools==68.2.2 ; python_version >= "3.9" and python_version < "3.13" +six==1.16.0 ; python_version >= "3.9" and python_version < "3.13" +typeguard==4.1.5 ; python_version >= "3.9" and python_version < "3.13" +typing-extensions==4.8.0 ; python_version >= "3.9" and python_version < "3.13" +typing-inspect==0.9.0 ; python_version >= "3.9" and python_version < "3.13" +tzdata==2023.3 ; python_version >= "3.9" and python_version < "3.13" +virtualenv==20.24.5 ; python_version >= "3.9" and python_version < "3.13" +wrapt==1.15.0 ; python_version >= "3.9" and python_version < "3.13" +zipp==3.17.0 ; python_version >= "3.9" and python_version < "3.10" From 105f3223bb0a1a41466d96f4d707ac112b85145d Mon Sep 17 00:00:00 2001 From: Pit Nahrstedt Date: Wed, 20 Sep 2023 22:39:01 +0200 Subject: [PATCH 08/15] =?UTF-8?q?=F0=9F=91=B7updated=20job=20`linting`=20i?= =?UTF-8?q?n=20github=20workflow=20pipeline?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 140e8e4..c83905d 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -59,7 +59,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ 3.8, 3.9, "3.11" ] + python-version: [ "3.9","3.10", "3.11" ] os: [ macos-latest, ubuntu-latest, windows-latest ] fail-fast: false steps: From 91b27e0a1c906861a54266a2f661177959efc0c7 Mon Sep 17 00:00:00 2001 From: Pit Nahrstedt Date: Wed, 20 Sep 2023 22:43:54 +0200 Subject: [PATCH 09/15] =?UTF-8?q?=F0=9F=91=95=20Fixed=20linting=20for=20ba?= =?UTF-8?q?ckwards=20compatibility=20of=20union=20types?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pandera_report/validator.py | 3 ++- tests/test_validator.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pandera_report/validator.py b/pandera_report/validator.py index 577b33e..b7be373 100644 --- a/pandera_report/validator.py +++ b/pandera_report/validator.py @@ -5,6 +5,7 @@ Optional, Type, TypedDict, + Union, ) import pandas as pd @@ -56,7 +57,7 @@ def columns(self) -> TypedDict: """ return self._columns - def validate(self, schema: Type[pa.DataFrameModel] | pa.DataFrameSchema, df: pd.DataFrame) -> pd.DataFrame: + def validate(self, schema: Union[Type[pa.DataFrameModel], pa.DataFrameSchema], df: pd.DataFrame) -> pd.DataFrame: """ Validate a DataFrame using a Pandera schema and generate a quality report. diff --git a/tests/test_validator.py b/tests/test_validator.py index 85a4972..8125942 100644 --- a/tests/test_validator.py +++ b/tests/test_validator.py @@ -3,6 +3,7 @@ cast, Optional, Type, + Union, ) import pandas as pd @@ -60,7 +61,7 @@ def custom_check(cls, value: Series[str]): ) def test_validator_validate( df_fixture: str, - schema: Type[pa.DataFrameModel] | pa.DataFrameSchema, + schema: Union[Type[pa.DataFrameModel], pa.DataFrameSchema], quality_report: bool, lazy: bool, columns: Optional[QualityColumnsOptions], From 349363730071dcfc7bafefe75829a763fbeac7f9 Mon Sep 17 00:00:00 2001 From: Pit Nahrstedt Date: Wed, 20 Sep 2023 22:48:12 +0200 Subject: [PATCH 10/15] =?UTF-8?q?=F0=9F=91=B7Updated=20job=20`testing`=20t?= =?UTF-8?q?o=20create=20coverage=20report?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pipeline.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index c83905d..f83fc4e 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -57,6 +57,8 @@ jobs: testing: runs-on: ubuntu-latest + env: + PYTEST_FLAGS: --cov=pandera_report --cov-report=term-missing --cov-report=xml --cov-append strategy: matrix: python-version: [ "3.9","3.10", "3.11" ] @@ -87,7 +89,7 @@ jobs: run: python -m pip install -r requirements/requirements-dev.txt - run: mkdir coverage - name: Test - run: python -m pytest tests + run: python -m pytest tests ${{ env.PYTEST_FLAGS }} - name: Store coverage files uses: actions/upload-artifact@v3 with: From e9129007e58afe0215b5287d2984b0ba72234a61 Mon Sep 17 00:00:00 2001 From: Pit Nahrstedt Date: Wed, 20 Sep 2023 22:57:59 +0200 Subject: [PATCH 11/15] =?UTF-8?q?=F0=9F=91=B7Updated=20job=20`testing`=20t?= =?UTF-8?q?o=20create=20coverage=20report?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pipeline.yml | 5 +---- pyproject.toml | 7 ++++++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index f83fc4e..93a96d3 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -58,7 +58,7 @@ jobs: testing: runs-on: ubuntu-latest env: - PYTEST_FLAGS: --cov=pandera_report --cov-report=term-missing --cov-report=xml --cov-append + PYTEST_FLAGS: --cov=pandera_report --cov=tests --cov-report=term-missing --cov-report=xml --cov-append --cov-branch strategy: matrix: python-version: [ "3.9","3.10", "3.11" ] @@ -92,6 +92,3 @@ jobs: run: python -m pytest tests ${{ env.PYTEST_FLAGS }} - name: Store coverage files uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage diff --git a/pyproject.toml b/pyproject.toml index 7da43d4..53dc293 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -99,6 +99,8 @@ addopts = ''' -p no:warnings --strict-markers --tb=short + --cov-report=xml + --cov-report term-missing --cov=pandera_report --cov=tests --cov-branch @@ -122,12 +124,15 @@ fail_under=80 [tool.coverage.run] branch = true -source = ["pandera_report"] +source = ["pandera_report", "tests"] omit = [ "__init__.py", # Exclude test files from coverage analysis "tests/*", # Exclude test files from coverage analysis ] +[tool.coverage.html] +directory = "coverage" + [tool.pylint.MASTER] ignore-patterns = 'tests/,test_(.)*\.py,conftest.py' From 964e857d5a1b19e21c20f009cec2191ac3f91825 Mon Sep 17 00:00:00 2001 From: Pit Nahrstedt Date: Wed, 20 Sep 2023 23:02:52 +0200 Subject: [PATCH 12/15] =?UTF-8?q?=F0=9F=91=B7Updated=20job=20`testing`=20t?= =?UTF-8?q?o=20create=20coverage=20report?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pipeline.yml | 5 ++++- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 93a96d3..6e729be 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -58,7 +58,7 @@ jobs: testing: runs-on: ubuntu-latest env: - PYTEST_FLAGS: --cov=pandera_report --cov=tests --cov-report=term-missing --cov-report=xml --cov-append --cov-branch + PYTEST_FLAGS: --cov=pandera_report --cov=tests --cov-report=term-missing --cov-report=xml:coverage/coverage.xml --cov-append --cov-branch strategy: matrix: python-version: [ "3.9","3.10", "3.11" ] @@ -92,3 +92,6 @@ jobs: run: python -m pytest tests ${{ env.PYTEST_FLAGS }} - name: Store coverage files uses: actions/upload-artifact@v3 + with: + name: coverage + path: coverage/coverage.xml diff --git a/pyproject.toml b/pyproject.toml index 53dc293..9fd0078 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -99,7 +99,7 @@ addopts = ''' -p no:warnings --strict-markers --tb=short - --cov-report=xml + --cov-report=xml:coverage/coverage.xml --cov-report term-missing --cov=pandera_report --cov=tests From 4b6f2e9a68c56f5d1dc570b4eae9c5a06dbf47b9 Mon Sep 17 00:00:00 2001 From: Pit Nahrstedt Date: Wed, 20 Sep 2023 23:15:04 +0200 Subject: [PATCH 13/15] =?UTF-8?q?=F0=9F=91=B7Updated=20job=20`testing`=20t?= =?UTF-8?q?o=20create=20coverage=20report?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pipeline.yml | 10 ---------- .pre-commit-config.yaml | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 6e729be..e8f96f8 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -42,18 +42,8 @@ jobs: - name: Install Dependencies if: steps.cache.outputs.cache-hit != 'true' run: pip install -r requirements/requirements-dev.txt - - name: Install pre-commit - run: pip install pre_commit - name: Pip info run: python -m pip list - - name: Sort Imports - run: pre-commit run isort --all-files - - name: Black - if: always() - run: pre-commit run black --all-files - - name: Pylint - if: always() - run: pre-commit run pylint --all-files testing: runs-on: ubuntu-latest diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f134824..95bff00 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -62,4 +62,4 @@ repos: pass_filenames: false ci: autofix_commit_msg: 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks - autoupdate_commit_msg: ⬆️ [pre-commit.ci] pre-commit autoupdate + autoupdate_commit_msg: ⬆️ [pre-commit.ci] Auto update from pre-commit hooks From 54cb6eb5279fc32fb4b029f68eddbe980952fa15 Mon Sep 17 00:00:00 2001 From: Pit Nahrstedt Date: Wed, 20 Sep 2023 23:21:51 +0200 Subject: [PATCH 14/15] =?UTF-8?q?=F0=9F=91=B7Updated=20job=20`testing`=20t?= =?UTF-8?q?o=20create=20coverage=20report?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pipeline.yml | 10 ++++++++++ .pre-commit-config.yaml | 14 ++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index e8f96f8..4744932 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -44,6 +44,16 @@ jobs: run: pip install -r requirements/requirements-dev.txt - name: Pip info run: python -m pip list + - name: iSort + run: pre-commit run isort --all-files + + - name: Black + if: always() + run: pre-commit run black --all-files + + - name: Pylint + if: always() + run: pre-commit run pylint --all-files testing: runs-on: ubuntu-latest diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 95bff00..333f939 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,18 +30,12 @@ repos: rev: 23.3.0 hooks: - id: black - - repo: local + - repo: https://github.com/pycqa/pylint + rev: v2.17.3 hooks: - id: pylint - name: pylint - entry: poetry run pylint - language: system - types: [python] - args: [ - "-rn", # Only display messages - "-sn", # Don't display the score - "--rcfile=pyproject.toml" - ] + args: ["--disable=import-error", "--rcfile=pyproject.toml"] + - repo: local hooks: - id: update-requirements-txt From 6d3d3b355c99a344fb2f53e213b460719740cb25 Mon Sep 17 00:00:00 2001 From: Pit Nahrstedt Date: Wed, 20 Sep 2023 23:25:05 +0200 Subject: [PATCH 15/15] =?UTF-8?q?=F0=9F=91=B7Updated=20job=20`testing`=20t?= =?UTF-8?q?o=20create=20coverage=20report?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pipeline.yml | 2 -- .pre-commit-config.yaml | 2 -- 2 files changed, 4 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 4744932..7d099f9 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -46,11 +46,9 @@ jobs: run: python -m pip list - name: iSort run: pre-commit run isort --all-files - - name: Black if: always() run: pre-commit run black --all-files - - name: Pylint if: always() run: pre-commit run pylint --all-files diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 333f939..a918847 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,5 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks -default_language_version: - python: python3.11 repos: - repo: https://github.com/pre-commit/pre-commit-hooks