diff --git a/.github/workflows/flake8.yaml b/.github/workflows/flake8.yaml index 48ecaf8..44ad42f 100644 --- a/.github/workflows/flake8.yaml +++ b/.github/workflows/flake8.yaml @@ -36,6 +36,4 @@ jobs: - name: Run flake8 lint uses: py-actions/flake8@v2 with: - max-line-length: 88 path: sz_tools - plugins: flake8-black diff --git a/.github/workflows/mypy.yaml b/.github/workflows/mypy.yaml index 276e561..4dfd44b 100644 --- a/.github/workflows/mypy.yaml +++ b/.github/workflows/mypy.yaml @@ -44,4 +44,4 @@ jobs: - name: Run mypy tests run: | # shellcheck disable=SC2046 - mypy --strict $(git ls-files '*.py' ':!:docs/source/*') + mypy $(git ls-files '*.py' ':!:docs/source/*') diff --git a/.github/workflows/pylint.yaml b/.github/workflows/pylint.yaml index 38eae63..9007ebd 100644 --- a/.github/workflows/pylint.yaml +++ b/.github/workflows/pylint.yaml @@ -42,7 +42,7 @@ jobs: python -m pip install --upgrade pip python -m pip install --group all . - - name: Analysing the code with pylint + - name: Analyzing the code with pylint run: | # shellcheck disable=SC2046 pylint $(git ls-files '*.py' ':!:docs/source/*') diff --git a/.github/workflows/pytest-darwin.yaml b/.github/workflows/pytest-darwin.yaml index 6ed1611..e4a06e1 100644 --- a/.github/workflows/pytest-darwin.yaml +++ b/.github/workflows/pytest-darwin.yaml @@ -96,21 +96,3 @@ jobs: with: name: "coverage-${{ matrix.python-version }}-${{ matrix.senzingsdk-version }}" path: "coverage.${{ matrix.python-version }}-${{ matrix.senzingsdk-version }}" - - coverage: - if: github.event_name == 'pull_request' - name: Coverage - needs: pytest-darwin - permissions: - pull-requests: write - contents: write - uses: senzing-factory/build-resources/.github/workflows/python-coverage-comment.yaml@v3 - - slack-notification: - needs: [pytest-darwin] - if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.pytest-darwin.result ) && github.event_name == 'schedule' }} - secrets: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} - uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v3 - with: - job-status: ${{ needs.pytest-darwin.result }} diff --git a/.github/workflows/pytest-linux.yaml b/.github/workflows/pytest-linux.yaml index 2a7e870..53f3735 100644 --- a/.github/workflows/pytest-linux.yaml +++ b/.github/workflows/pytest-linux.yaml @@ -7,6 +7,7 @@ on: branches: [main] schedule: - cron: "15 7 * * *" + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} @@ -96,21 +97,3 @@ jobs: with: name: "coverage-${{ matrix.python-version }}-${{ matrix.senzingsdk-version }}" path: "coverage.${{ matrix.python-version }}-${{ matrix.senzingsdk-version }}" - - coverage: - if: github.event_name == 'pull_request' - name: Coverage - needs: pytest-linux - permissions: - pull-requests: write - contents: write - uses: senzing-factory/build-resources/.github/workflows/python-coverage-comment.yaml@v3 - - slack-notification: - needs: [pytest-linux] - if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.pytest-linux.result ) && (github.ref_name == github.event.repository.default_branch || github.event_name == 'schedule') }} - secrets: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} - uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v3 - with: - job-status: ${{ needs.pytest-linux.result }} diff --git a/.github/workflows/pytest-windows.yaml b/.github/workflows/pytest-windows.yaml index 3597b6a..6c9705d 100644 --- a/.github/workflows/pytest-windows.yaml +++ b/.github/workflows/pytest-windows.yaml @@ -59,7 +59,7 @@ jobs: with: senzingsdk-version: ${{ matrix.senzingsdk-version }} - - name: Add to "Path" environment variable + - name: Set environment variables run: | Add-Content "$env:GITHUB_PATH" "$Env:USERPROFILE\Senzing\er\lib" @@ -90,21 +90,3 @@ jobs: with: name: "coverage-${{ matrix.python-version }}-${{ matrix.senzingsdk-version }}" path: "coverage.${{ matrix.python-version }}-${{ matrix.senzingsdk-version }}" - - coverage: - if: github.event_name == 'pull_request' - name: Coverage - needs: pytest-windows - permissions: - pull-requests: write - contents: write - uses: senzing-factory/build-resources/.github/workflows/python-coverage-comment.yaml@v3 - - slack-notification: - needs: [pytest-windows] - if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.pytest-windows.result ) && github.event_name == 'schedule' }} - secrets: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} - uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v3 - with: - job-status: ${{ needs.pytest-windows.result }} diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 224f9e3..d7c7f88 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -5,7 +5,6 @@ "abspath", "addconfig", "alnum", - "Analysing", "ANONSUPPORT", "Anytown", "applehelp", @@ -370,4 +369,4 @@ "data/**", "development-requirements.txt" ] -} \ No newline at end of file +} diff --git a/Makefile b/Makefile index b066e8f..dc18594 100755 --- a/Makefile +++ b/Makefile @@ -66,7 +66,7 @@ venv: venv-osarch-specific dependencies-for-development: venv dependencies-for-development-osarch-specific $(activate-venv); \ python3 -m pip install --upgrade pip; \ - python3 -m pip install --group all + python3 -m pip install --group all . .PHONY: dependencies @@ -198,7 +198,7 @@ isort: mypy: $(info ${\n}) $(info --- mypy -----------------------------------------------------------------------) - @$(activate-venv); mypy --strict $(shell git ls-files '*.py' ':!:docs/source/*') + @$(activate-venv); mypy $(shell git ls-files '*.py' ':!:docs/source/*') .PHONY: prettier prettier: diff --git a/pyproject.toml b/pyproject.toml index c14e345..deee523 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,7 @@ development = [ "pytest==9.0.2; python_version > '3.11'", "twine==6.2.0", "typing_extensions==4.15.0; python_version < '3.11'", - "virtualenv==20.36.0", + "virtualenv==20.36.1", "wheel==0.45.1", ] documentation = [ @@ -91,7 +91,7 @@ test = [ ] [tool.setuptools.packages.find] -where = ["src"] +where = ["sz_tools"] [tool.bandit] skips = ["B101", "B108", "B404", "B602", "B605", "B608"] @@ -105,7 +105,7 @@ max-line-length = 120 [tool.isort] profile = "black" -src_paths = ["examples", "src", "tests"] +src_paths = ["examples", "tests"] [tool.mypy] exclude = ['.venv', 'g2_tools'] diff --git a/sz_tools/_tool_helpers.py b/sz_tools/_tool_helpers.py index 2957c5e..e78a695 100644 --- a/sz_tools/_tool_helpers.py +++ b/sz_tools/_tool_helpers.py @@ -14,11 +14,10 @@ import time import tty from contextlib import suppress -from dataclasses import dataclass from itertools import product from pathlib import Path from signal import SIGALRM, alarm, signal -from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Tuple, TypeVar, Union +from typing import TYPE_CHECKING, Any, Dict, Iterable, List, TypeVar, Union from senzing import SzEngineFlags, SzError, constants