From aeaae71382c7b4c0c9ecb9253bbc5c44113d6655 Mon Sep 17 00:00:00 2001 From: Stefan Negru Date: Tue, 7 Nov 2023 20:47:58 +0200 Subject: [PATCH] update to python 3.11 --- .github/workflows/codeql-analysis.yml | 58 ++++++++++----------- .github/workflows/dependabot-auto-merge.yml | 2 +- .github/workflows/dependency-review.yml | 6 +-- .github/workflows/style.yml | 34 ++++++------ .github/workflows/unit.yml | 42 +++++++-------- README.md | 2 +- tox.ini | 5 +- 7 files changed, 74 insertions(+), 75 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 613a0b9..3f4d2b8 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -13,12 +13,12 @@ name: "CodeQL" on: push: - branches: [ master ] + branches: [master] pull_request: # The branches below must be a subset of the branches above - branches: [ master ] + branches: [master] schedule: - - cron: '20 4 * * 3' + - cron: "20 4 * * 3" jobs: analyze: @@ -28,40 +28,40 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'python' ] + language: ["python"] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] # Learn more: # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed steps: - - name: Checkout repository - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v4 - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl + # ℹī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language + # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language - #- run: | - # make bootstrap - # make release + #- run: | + # make bootstrap + # make release - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index da342d2..c6ae3b4 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -22,7 +22,7 @@ jobs: with: github-token: "${{ secrets.GITHUB_TOKEN }}" - name: Enable auto-merge for Dependabot PRs - if: ${{ steps.metadata.outputs.package-ecosystem == 'pip' || steps.metadata.outputs.package-ecosystem == 'github_actions' }} + if: ${{ steps.metadata.outputs.package-ecosystem == 'pip' || steps.metadata.outputs.package-ecosystem == 'github_actions' }} run: gh pr review --approve "$PR_URL" && gh pr merge --auto --merge "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 6812c1d..870728b 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -4,7 +4,7 @@ # # Source repository: https://github.com/actions/dependency-review-action # Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement -name: 'Dependency Review' +name: "Dependency Review" on: [pull_request] permissions: @@ -14,9 +14,9 @@ jobs: dependency-review: runs-on: ubuntu-latest steps: - - name: 'Checkout Repository' + - name: "Checkout Repository" uses: actions/checkout@v4 - - name: 'Dependency Review' + - name: "Dependency Review" uses: actions/dependency-review-action@v3 with: fail-on-severity: moderate diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index c33d0c2..4a583b4 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -8,23 +8,23 @@ jobs: max-parallel: 4 matrix: os: [ubuntu-latest] - python-version: [3.7, 3.8, 3.9] - + python-version: ["3.11"] + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install tox tox-gh-actions - - name: Test flake8 syntax with tox - run: tox -e flake8 - - name: Black formatting check - run: tox -e black - - name: Type hints check - run: tox -e mypy + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox tox-gh-actions + - name: Test flake8 syntax with tox + run: tox -e flake8 + - name: Black formatting check + run: tox -e black + - name: Type hints check + run: tox -e mypy diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 51fd313..54b7f69 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -8,27 +8,27 @@ jobs: max-parallel: 4 matrix: os: [ubuntu-latest] - python-version: [3.8, 3.9] - + python-version: ["3.11"] + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install libcurl-devel - run: | - sudo apt update - sudo apt-get install libcurl4-openssl-dev - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install tox tox-gh-actions - - name: Run unit tests for python 3.8 - if: ${{ matrix.python-version == '3.8' }} - run: tox -e py38 - - name: Run unit tests for python 3.9 - if: ${{ matrix.python-version == '3.9' }} - run: tox -e py39 + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install libcurl-devel + run: | + sudo apt update + sudo apt-get install libcurl4-openssl-dev + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox tox-gh-actions + - name: Run unit tests for python 3.11 + if: ${{ matrix.python-version == '3.11' }} + run: tox -e py38 + - name: Run unit tests for python 3.11 + if: ${{ matrix.python-version == '3.11' }} + run: tox -e py39 diff --git a/README.md b/README.md index b054e5b..83f1fbf 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Command-line tool for validating a given XML file against a specific XSD Schema. ### Installing -Note: The tool requires Python 3.7+ +Note: The tool requires Python 3.11+ Clone the project and install with `pip`: ``` diff --git a/tox.ini b/tox.ini index 67b4b0b..9462b4d 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] -envlist = py{38,39}, flake8, black, mypy +envlist = py{311}, flake8, black, mypy skipsdist=True [flake8] @@ -48,5 +48,4 @@ commands = [gh-actions] python = - 3.8: flake8, py38, mypy, black - 3.9: flake8, py38, mypy, black + 3.11: flake8, py38, mypy, black