Merge branch 'master' into sh_merge_master

This commit is contained in:
Ralf W. Grosse-Kunstleve 2023-06-17 07:13:12 -07:00
commit eb510d5131
5 changed files with 59 additions and 51 deletions

View File

@ -17,6 +17,7 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
env: env:
PIP_BREAK_SYSTEM_PACKAGES: 1
PIP_ONLY_BINARY: numpy PIP_ONLY_BINARY: numpy
FORCE_COLOR: 3 FORCE_COLOR: 3
PYTEST_TIMEOUT: 300 PYTEST_TIMEOUT: 300
@ -456,16 +457,16 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
include: include:
- { gcc: 7, std: 11 } - { gcc: 7, std: 11, container_suffix: "" }
- { gcc: 7, std: 17 } - { gcc: 7, std: 17, container_suffix: "" }
- { gcc: 8, std: 14 } - { gcc: 8, std: 14, container_suffix: "" }
- { gcc: 8, std: 17 } - { gcc: 8, std: 17, container_suffix: "" }
- { gcc: 10, std: 17 } - { gcc: 10, std: 17, container_suffix: "-bullseye" }
- { gcc: 11, std: 20 } - { gcc: 11, std: 20, container_suffix: "" }
- { gcc: 12, std: 20 } - { gcc: 12, std: 20, container_suffix: "" }
name: "🐍 3 • GCC ${{ matrix.gcc }} • C++${{ matrix.std }}• x64" name: "🐍 3 • GCC ${{ matrix.gcc }} • C++${{ matrix.std }}• x64"
container: "gcc:${{ matrix.gcc }}" container: "gcc:${{ matrix.gcc }}${{ matrix.container_suffix }}"
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3

View File

@ -14,6 +14,7 @@ permissions:
contents: read contents: read
env: env:
PIP_BREAK_SYSTEM_PACKAGES: 1
# For cmake: # For cmake:
VERBOSE: 1 VERBOSE: 1

View File

@ -17,6 +17,7 @@ permissions:
contents: read contents: read
env: env:
PIP_BREAK_SYSTEM_PACKAGES: 1
PIP_ONLY_BINARY: numpy PIP_ONLY_BINARY: numpy
jobs: jobs:

View File

@ -12,6 +12,7 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
env: env:
PIP_BREAK_SYSTEM_PACKAGES: 1
PIP_ONLY_BINARY: ":all:" PIP_ONLY_BINARY: ":all:"
# For cmake: # For cmake:
VERBOSE: 1 VERBOSE: 1

View File

@ -22,6 +22,48 @@ ci:
exclude: ^tools/JoinPaths.cmake$ exclude: ^tools/JoinPaths.cmake$
repos: repos:
# Clang format the codebase automatically
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: "v16.0.4"
hooks:
- id: clang-format
types_or: [c++, c, cuda]
# Black, the code formatter, natively supports pre-commit
- repo: https://github.com/psf/black
rev: "23.3.0" # Keep in sync with blacken-docs
hooks:
- id: black
# Ruff, the Python auto-correcting linter written in Rust
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.270
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
# Check static types with mypy
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.3.0"
hooks:
- id: mypy
args: []
exclude: ^(tests|docs)/
additional_dependencies:
- markdown-it-py<3 # Drop this together with dropping Python 3.7 support.
- nox
- rich
# CMake formatting
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: "v0.6.13"
hooks:
- id: cmake-format
additional_dependencies: [pyyaml]
types: [file]
files: (\.cmake|CMakeLists.txt)(.in)?$
# Standard hooks # Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.4.0" rev: "v4.4.0"
@ -40,12 +82,6 @@ repos:
- id: trailing-whitespace - id: trailing-whitespace
exclude: \.patch?$ exclude: \.patch?$
# Black, the code formatter, natively supports pre-commit
- repo: https://github.com/psf/black
rev: "23.3.0" # Keep in sync with blacken-docs
hooks:
- id: black
# Also code format the docs # Also code format the docs
- repo: https://github.com/asottile/blacken-docs - repo: https://github.com/asottile/blacken-docs
rev: "1.13.0" rev: "1.13.0"
@ -68,13 +104,6 @@ repos:
- id: fix-ligatures - id: fix-ligatures
- id: fix-smartquotes - id: fix-smartquotes
# Ruff, the Python auto-correcting linter written in Rust
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.270
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
# Checking for common mistakes # Checking for common mistakes
- repo: https://github.com/pre-commit/pygrep-hooks - repo: https://github.com/pre-commit/pygrep-hooks
rev: "v1.10.0" rev: "v1.10.0"
@ -83,31 +112,6 @@ repos:
- id: rst-directive-colons - id: rst-directive-colons
- id: rst-inline-touching-normal - id: rst-inline-touching-normal
# PyLint has native support - not always usable, but works for us
- repo: https://github.com/PyCQA/pylint
rev: "v3.0.0a6"
hooks:
- id: pylint
files: ^pybind11
# CMake formatting
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: "v0.6.13"
hooks:
- id: cmake-format
additional_dependencies: [pyyaml]
types: [file]
files: (\.cmake|CMakeLists.txt)(.in)?$
# Check static types with mypy
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.3.0"
hooks:
- id: mypy
args: []
exclude: ^(tests|docs)/
additional_dependencies: [nox, rich]
# Checks the manifest for missing files (native support) # Checks the manifest for missing files (native support)
- repo: https://github.com/mgedmin/check-manifest - repo: https://github.com/mgedmin/check-manifest
rev: "0.49" rev: "0.49"
@ -142,9 +146,9 @@ repos:
entry: PyBind|Numpy|Cmake|CCache|PyTest entry: PyBind|Numpy|Cmake|CCache|PyTest
exclude: ^\.pre-commit-config.yaml$ exclude: ^\.pre-commit-config.yaml$
# Clang format the codebase automatically # PyLint has native support - not always usable, but works for us
- repo: https://github.com/pre-commit/mirrors-clang-format - repo: https://github.com/PyCQA/pylint
rev: "v16.0.4" rev: "v3.0.0a6"
hooks: hooks:
- id: clang-format - id: pylint
types_or: [c++, c, cuda] files: ^pybind11