Skip to content

fix python format

fix python format #304

Workflow file for this run

# SPDX-FileCopyrightText: 2022 The dune-iga developers [email protected]
# SPDX-License-Identifier: CC0-1.0
name: CodeStyle
on:
push:
pull_request:
types: [ opened ]
branches:
- main
env:
CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules
jobs:
format-check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v2
with:
path: "**/cpm_modules"
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
- uses: actions/checkout@v2
with:
path: 'repo'
- name: Install format dependencies
run: |
pip install clang-format==18.1.8
clang-format --version
pip install cmake_format==0.6.13 pyyaml
pip install black==24.4.2
- name: configure
run: cmake -S "cmake/FormatTarget" -Bbuild -DADD_FORMATTARGET=TRUE
- name: check style
run: |
cmake --build build --target format
cmake --build build --target check-format
python -m black . --check
REUSE:
name: REUSE Compliance Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v1
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: codespell-project/actions-codespell@master
with:
check_filenames: true
skip: ./docs/literature.bib,./codespellignore
ignore_words_file: codespellignore
lint-markdown:
name: Check for markdown errors
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: articulate/actions-markdownlint@v1
with:
config: doc/markdownlint-config.yaml
files: '**/*.md'
lint-filenames:
name: Lint filenames
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Validating lowercase file names
uses: scheduleonce/[email protected]
with:
path: '{./dune/**,./python/**}'
pattern: '^[a-z0-9_\-]+(\.hh|\.cpp|\.inl|\.py|\.py\.in|\.cc|\.ibra|)$|CMakeLists\.txt'
# match all lowercase names with extensions .hh/.cpp/.inl/.py/.py.in/.cc/.ibra and ignore CMakeLists.txt