Skip to content

Add type hints in Python #424

Add type hints in Python

Add type hints in Python #424

Workflow file for this run

name: Style
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
pull_request:
push:
branches:
- "main"
workflow_dispatch:
jobs:
clang-tidy:
name: Check C++ Code Style
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
- name: Create Python Environment
uses: prefix-dev/setup-pixi@1b2de7f3351f171c8b4dfeb558c639cb58ed4ec0 # v0.9.5
with:
pixi-version: v0.54.1
cache: false
environments: py313
activate-environment: true
- name: Configure compile_commands.json
run: |
cmake -S . -B build -GNinja -DCMAKE_EXPORT_COMPILE_COMMANDS=True
- name: clang-tidy
run: git ls-files | grep -E '^freud.*(.h|.hpp|.hh|.cc|.cpp)$' | xargs clang-tidy-18 -fix -p build --warnings-as-errors=*
- run: git diff --color
prek:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: prek
uses: j178/prek-action@53276d8b0d10f8b6672aa85b4588c6921d0370cc # v2.0.1
with:
prek-version: '0.3.8'
# This job is used to provide a single requirement for branch merge conditions.
tests_complete:
name: All style checks
if: always()
needs: [clang-tidy, prek]
runs-on: ubuntu-24.04
steps:
- run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
- name: Done
run: exit 0