Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,13 @@ repos:
types_or: [c++, c, cuda]
args: ["-style=file", "--verbose"]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.4
hooks:
# enable the linter:
- id: ruff
args: ["--fix", "--show-fixes"]
# we currently do **NOT** enable the formatter (while I generally think it's a good
# idea, we definitely need buy-in)
#- id: ruff-format

26 changes: 26 additions & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# this is useful with pre-commit (when we want to exclude files)
force-exclude = true

# do not add any files to this list. We are only introducing this parameter so that
# we can start using ruff as soon as possible. We plan to gradually remove all files
# from this list
extend-exclude = [
"./python_scripts/dask_single_machine_template.py",
"./python_scripts/combine_test_files.py",
"./python_scripts/concat_particles.py",
"./python_scripts/h5AttrsFuncs.py",
"./python_scripts/tools.py",
"./python_scripts/concat_3d_data.py",
"./python_scripts/concat_2d_data.py",
"./python_scripts/compress_snapshots.py",
"./python_scripts/data_compress_particles.py",
"./python_scripts/load_cholla_snapshot.py",
"./python_scripts/move_files.py",
"./python_scripts/dask_distributed_template.py",
"./python_scripts/plot_sod.py",
"./python_scripts/concat_internals.py",
"./python_scripts/numdiff.py",
"./python_scripts/Projection_Slice_Tutorial.ipynb",
"./python_scripts/data_compress_grid.py",
"./docs/sphinx/source/conf.py",
]
2 changes: 0 additions & 2 deletions python_scripts/concat.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@
support other types of fields.
"""

import numpy as np

import argparse
import datetime
from functools import partial
import os
import pathlib

import concat_internals
from concat_2d_data import concat_2d_dataset
Expand Down
1 change: 0 additions & 1 deletion tools/analyze_tidy_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"""

import numpy as np
import pandas as pd
import pathlib
import subprocess

Expand Down