Install and run pre-commit

这个提交包含在:
nmannall
2024-01-22 16:46:33 +00:00
父节点 bed5ae79c3
当前提交 0c0c61e340
共有 11 个文件被更改,包括 18 次插入17 次删除

查看文件

@@ -1,4 +1,5 @@
# See https://pre-commit.com for more information
exclude: '\S*.map'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0

查看文件

@@ -24,5 +24,3 @@ python:
sphinx:
configuration: docs/source/conf.py

查看文件

@@ -56,7 +56,7 @@ class FractalSurface:
self.nz = zf - zs
self.dtype = np.dtype(np.complex128)
self.seed = seed
self.dimension = dimension # Fractal dimension from: http://dx.doi.org/10.1017/CBO9781139174695
self.dimension = dimension # Fractal dimension from: http://dx.doi.org/10.1017/CBO9781139174695
self.weighting = np.array([1, 1], dtype=np.float64)
self.fractalrange = (0, 0)
self.filldepth = 0
@@ -157,7 +157,7 @@ class FractalVolume:
self.averaging = False
self.dtype = np.dtype(np.complex128)
self.seed = seed
self.dimension = dimension # Fractal dimension from: http://dx.doi.org/10.1017/CBO9781139174695
self.dimension = dimension # Fractal dimension from: http://dx.doi.org/10.1017/CBO9781139174695
self.weighting = np.array([1, 1, 1], dtype=np.float64)
self.nbins = 0
self.fractalsurfaces = []

查看文件

@@ -14,6 +14,7 @@ scipy
humanize
# mpi4py
numpy-stl
pre-commit
# pycuda
# pyopencl
terminaltables

查看文件

@@ -19,16 +19,15 @@
import logging
import sys
from pathlib import Path
from colorama import Fore, Style
import h5py
import matplotlib.pyplot as plt
import numpy as np
from colorama import Fore, Style
import gprMax
from testing.analytical_solutions import hertzian_dipole_fs
from gprMax.utilities.logging import logging_config
from testing.analytical_solutions import hertzian_dipole_fs
logger = logging.getLogger(__name__)
logging_config(name=__name__)

查看文件

@@ -1,5 +1,5 @@
from matplotlib import pyplot as plt
import numpy as np
from matplotlib import pyplot as plt
def _plot_data(subplots, time, data, label=None, colour="r", line_style="-"):

查看文件

@@ -71,7 +71,7 @@ def get_output_data(filename, rxnumber, rxcomponent):
return outputdata, dt
def merge_files(outputfiles, merged_outputfile=None, removefiles=False):
def merge_files(outputfiles, merged_outputfile=None, removefiles=False):
"""Merges traces (A-scans) from multiple output files into one new file,
then optionally removes the series of output files.
@@ -138,7 +138,9 @@ if __name__ == "__main__":
usage="cd gprMax; python -m tools.outputfiles_merge basefilename",
)
parser.add_argument("basefilename", help="base name of output file series including path")
parser.add_argument("-o", "--output-file", default=None, type=str, required=False, help="location to save merged file")
parser.add_argument(
"-o", "--output-file", default=None, type=str, required=False, help="location to save merged file"
)
parser.add_argument(
"--remove-files", action="store_true", default=False, help="flag to remove individual output files after merge"
)