Skip to content

Commit

Permalink
Merge pull request #445 from MC-kit/devel
Browse files Browse the repository at this point in the history
enable python 3.13
  • Loading branch information
dvp2015 authored Oct 28, 2024
2 parents e1befea + eb51ac2 commit 5501ef3
Show file tree
Hide file tree
Showing 18 changed files with 7,047 additions and 7,123 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Create Repository Labels

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
push:
branches:
Expand All @@ -10,30 +14,26 @@ on:
- .github/labels.yml
- .github/workflows/labeler.yml
pull_request:
branches:
- main
- master
- devel
paths:
- .github/labels.yaml
- .github/workflows/labeler.yml
schedule:
- cron: "0 0 * * TUE"

jobs:
labels:
labeler:
name: Sycnchronize repository labels
runs-on: ubuntu-latest
steps:
- name: Check out the repository
- name: Checkout
uses: actions/checkout@v4

- name: Sync GitHub Issue Labels
- name: Run labeler
uses: crazy-max/ghaction-github-labeler@v5
with:
github-token: ${{ secrets.MCKIT_GITHUB_TOKEN }}
skip-delete: true
dry-run: ${{ github.event_name != 'pull_request' }}
dry-run: ${{ github.event_name == 'pull_request' }}
exclude: |
help*
*issue
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Release

env:
PYTHON_VERSION: '3.11'
PYTHON_VERSION: '3.13'

on:
workflow_dispatch:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ concurrency:
cancel-in-progress: true

env:
DEFAULT_PYTHON: "3.12"
DEFAULT_PYTHON: "3.13"

jobs:

Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest ]
python-version: [ '3.10', '3.11', '3.12' ]
python-version: [ '3.10', '3.11', '3.12', '3.13' ]

steps:

Expand Down Expand Up @@ -179,6 +179,8 @@ jobs:
with:
name: coverage-data-${{ runner.os }}-${{ matrix.python-version }}
path: ".coverage.*"
include-hidden-files: true
if-no-files-found: error

coverage:
runs-on: ubuntu-latest
Expand Down
83 changes: 50 additions & 33 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@
# https://github.com/pre-commit/pre-commit for more information
# https://pre-commit.com/hooks.html for more hooks
default_language_version:
python: python3.12
python: python3.13

repos:

# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.5.0"
rev: "v5.0.0"
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
exclude: notebooks
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
exclude: notebooks # jupytext creates python scripts with shebangs but without permissions
Expand All @@ -37,19 +39,28 @@ repos:
- id: end-of-file-fixer
exclude: data|.ipynb$|^\.
- id: name-tests-test
exclude: common.py|help*.*py
args:
- --pytest-test-first
- id: mixed-line-ending
- id: pretty-format-json
args: [--autofix, --no-ensure-ascii, --no-sort-keys]
exclude: data|\.ipynb$
- id: requirements-txt-fixer
- id: trailing-whitespace
exclude: data|.ipynb$
exclude: data|\.ipynb$

# Changes tabs to spaces
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: "v1.5.4"
rev: "v1.5.5"
hooks:
- id: remove-tabs

- repo: https://github.com/pre-commit/pre-commit
rev: v4.0.1
hooks:
- id: validate_manifest

# Format doc strings
- repo: https://github.com/DanielNoord/pydocstringformatter
rev: "v0.7.3"
Expand All @@ -68,34 +79,6 @@ repos:
- --py310-plus
language: system
types: [ python ]
stages: [ manual ]

# Security check
- id: bandit
name: bandit
entry: bandit
args: ["-c", "pyproject.toml"]
language: system
types: [ python ]
exclude: ^notebooks|^extern
stages: [ manual ]

# Lint and fix Python code (including import sort)
- id: ruff
name: ruff
entry: ruff check --force-exclude --fix --config pyproject.toml
language: system
types: [ python ]
exclude: ^notebooks|^extern

# Format Python code
- id: ruff
name: ruff-format
entry: ruff format --force-exclude --config pyproject.toml
language: system
types: [ python ]
exclude: ^notebooks|^extern


# Lint SQL code
- id: sqlfluff-lint
Expand All @@ -111,9 +94,43 @@ repos:
language: system
types: [ sql ]

# # Format Python code
# - id: ruff
# name: ruff-format
# entry: ruff format --force-exclude --config pyproject.toml
# language: system
# types: [ python ]
# exclude: ^notebooks|^extern
#
# # Lint and fix Python code (including import sort)
# - id: ruff
# name: ruff
# entry: ruff check --force-exclude --fix --config pyproject.toml
# language: system
# types: [ python ]
# exclude: ^notebooks|^extern

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.0
hooks:
- id: ruff
exclude: ^notebooks|^extern
- id: ruff-format
exclude: ^notebooks|^extern|ipynb$

- repo: https://github.com/python-poetry/poetry
rev: "1.8.0"
hooks:
- id: poetry-check
- id: poetry-lock
stages: [ manual ]
- id: poetry-install
stages: [ manual ]

# Check for common shell mistakes
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: "v0.9.0.6"
rev: "v0.10.0.1"
hooks:
- id: shellcheck
args: [ --external-sources ]
stages: [ manual ]
Loading

0 comments on commit 5501ef3

Please sign in to comment.