Skip to content

Commit

Permalink
Add root precommit file
Browse files Browse the repository at this point in the history
  • Loading branch information
samkellerhals committed Jan 3, 2024
1 parent 1584e2c commit f576f48
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 19 deletions.
19 changes: 2 additions & 17 deletions .github/workflows/icon4py-qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,6 @@ jobs:
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r ./requirements-dev.txt
python -m pip list
- name: Run checks in icon4pytools
- name: Run checks
run: |
pre-commit run --config tools/.pre-commit-config.yaml --all-files
- name: Run checks icon4py-model-common
run: |
pre-commit run --config model/common/.pre-commit-config.yaml --all-files
- name: Run checks icon4py-model-driver
run: |
pre-commit run --config model/driver/.pre-commit-config.yaml --all-files
- name: Run checks icon4py-model-atmosphere-dycore
run: |
pre-commit run --config model/atmosphere/dycore/.pre-commit-config.yaml --all-files
- name: Run checks icon4py-model-atmosphere-diffusion
run: |
pre-commit run --config model/atmosphere/diffusion/.pre-commit-config.yaml --all-files
- name: Run checks icon4py-model-atmosphere-advection
run: |
pre-commit run --config model/atmosphere/advection/.pre-commit-config.yaml --all-files
pre-commit run
44 changes: 44 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
repos:
- repo: local
hooks:
- id: run-common-precommit
name: Run Model Common Pre-commit
entry: pre-commit run --config model/common/.pre-commit-config.yaml --all-files
language: system
pass_filenames: false
always_run: true

- id: run-driver-precommit
name: Run Model Driver Pre-commit
entry: pre-commit run --config model/driver/.pre-commit-config.yaml --all-files
language: system
pass_filenames: false
always_run: true

- id: run-atmosphere-advection-precommit
name: Run Model Atmosphere Advection Pre-commit
entry: pre-commit run --config model/atmosphere/advection/.pre-commit-config.yaml --all-files
language: system
pass_filenames: false
always_run: true

- id: run-atmosphere-diffusion-precommit
name: Run Model Atmosphere Diffusion Pre-commit
entry: pre-commit run --config model/atmosphere/diffusion/.pre-commit-config.yaml --all-files
language: system
pass_filenames: false
always_run: true

- id: run-atmosphere-dycore-precommit
name: Run Model Atmosphere Dycore Pre-commit
entry: pre-commit run --config model/atmosphere/dycore/.pre-commit-config.yaml --all-files
language: system
pass_filenames: false
always_run: true

- id: run-tools-precommit
name: Run Tools Pre-commit
entry: pre-commit run --config tools/.pre-commit-config.yaml --all-files
language: system
pass_filenames: false
always_run: true
3 changes: 1 addition & 2 deletions model/common/src/icon4py/model/common/test_utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,9 @@ def _test_execution_benchmark(self, pytestconfig, grid, backend, input_data, ben
benchmark(
self.PROGRAM.with_backend(backend),
**input_data,
offset_provider=grid.get_all_offset_providers()
offset_provider=grid.get_all_offset_providers(),
)


else:

def _test_execution_benchmark(self, pytestconfig):
Expand Down

0 comments on commit f576f48

Please sign in to comment.