diff --git a/examples/mpi_parallel_run.py b/examples/mpi_parallel_run.py index 0177b047..6c9c5951 100644 --- a/examples/mpi_parallel_run.py +++ b/examples/mpi_parallel_run.py @@ -2,7 +2,7 @@ Use multiprocessing via MPI =========================== -Use multiple cores to solve a PDE. The implementation here uses the `Message Passing +Use multiple cores to solve a PDE. The implementation here uses the `Message Passing Interface (MPI) `_, and the script thus needs to be run using :code:`mpiexec -n 2 python mpi_parallel_run.py`, where `2` denotes the number of cores used. Note that macOS might require an additional hint diff --git a/examples/pde_custom_class.py b/examples/pde_custom_class.py index 7e9ca974..4e35bc8b 100644 --- a/examples/pde_custom_class.py +++ b/examples/pde_custom_class.py @@ -4,7 +4,7 @@ This example implements a scalar PDE using a custom class. We here consider the `Kuramoto–Sivashinsky equation -`_, which for instance +`_, which for instance describes the dynamics of flame fronts: .. math:: diff --git a/examples/pde_custom_expression.py b/examples/pde_custom_expression.py index 19e402be..10702b8f 100644 --- a/examples/pde_custom_expression.py +++ b/examples/pde_custom_expression.py @@ -4,7 +4,7 @@ This example implements a scalar PDE using the :class:`~pde.pdes.pde.PDE`. We here consider the `Kuramoto–Sivashinsky equation -`_, which for instance +`_, which for instance describes the dynamics of flame fronts: .. math:: diff --git a/examples/pde_custom_numba.py b/examples/pde_custom_numba.py index 4e390089..f67b5398 100644 --- a/examples/pde_custom_numba.py +++ b/examples/pde_custom_numba.py @@ -4,7 +4,7 @@ This example implements a scalar PDE using a custom class with a numba-compiled method for accelerated calculations. We here consider the `Kuramoto–Sivashinsky equation -`_, which for instance +`_, which for instance describes the dynamics of flame fronts: .. math:: diff --git a/examples/pde_heterogeneous_diffusion.py b/examples/pde_heterogeneous_diffusion.py index ff9867c3..7e341b5a 100644 --- a/examples/pde_heterogeneous_diffusion.py +++ b/examples/pde_heterogeneous_diffusion.py @@ -16,7 +16,7 @@ Note that the naive implementation, :code:`PDE({"c": "divergence((1.01 + tanh(x)) * gradient(c))"})`, has numerical instabilities. This is because two finite difference approximations are nested. To -arrive at a more stable numerical scheme, it is advisable to expand the divergence, +arrive at a more stable numerical scheme, it is advisable to expand the divergence, .. math:: \partial_t c = D \nabla^2 c + \nabla D . \nabla c diff --git a/examples/pde_schroedinger.py b/examples/pde_schroedinger.py index 66f2c266..0b4971a2 100644 --- a/examples/pde_schroedinger.py +++ b/examples/pde_schroedinger.py @@ -3,7 +3,7 @@ ====================== This example implements a complex PDE using the :class:`~pde.pdes.pde.PDE`. We here -chose the `Schrödinger equation `_ +chose the `Schrödinger equation `_ without a spatial potential in non-dimensional form: .. math:: diff --git a/examples/plot_cylindrical_field.py b/examples/plot_cylindrical_field.py index ca4a4336..e58d3a63 100644 --- a/examples/plot_cylindrical_field.py +++ b/examples/plot_cylindrical_field.py @@ -2,7 +2,7 @@ Plotting a scalar field in cylindrical coordinates ================================================== -This example shows how to initialize and visualize the scalar field +This example shows how to initialize and visualize the scalar field :math:`u = \sqrt{z} \, \exp(-r^2)` in cylindrical coordinates. """ diff --git a/examples/plot_vector_field.py b/examples/plot_vector_field.py index 13367d2a..c5a1e87c 100644 --- a/examples/plot_vector_field.py +++ b/examples/plot_vector_field.py @@ -2,7 +2,7 @@ Plotting a vector field ======================= -This example shows how to initialize and visualize the vector field +This example shows how to initialize and visualize the vector field :math:`\boldsymbol u = \bigl(\sin(x), \cos(x)\bigr)`. """ diff --git a/examples/post_step_hook.py b/examples/post_step_hook.py index 74e347ab..ad490f14 100644 --- a/examples/post_step_hook.py +++ b/examples/post_step_hook.py @@ -11,7 +11,6 @@ class CustomPDE(PDEBase): - def make_post_step_hook(self, state): """Create a hook function that is called after every time step.""" diff --git a/examples/py_modelrunner.py b/examples/py_modelrunner.py index 02c60140..a966e79f 100755 --- a/examples/py_modelrunner.py +++ b/examples/py_modelrunner.py @@ -5,13 +5,14 @@ This example shows how `py-pde` can be combined with :mod:`modelrunner`. The magic first line allows running this example as a script using :code:`./py_modelrunner.py`, which -runs the function defined below and stores all results in the file `data.hdf5`. +runs the function defined below and stores all results in the file `data.hdf5`. The results can be read by the following code .. code-block:: python from modelrunner import Result + r = Result.from_file("data.hdf5") r.result.plot() # plots the final state r.storage["trajectory"] # allows accessing the stored trajectory diff --git a/examples/trajectory_io.py b/examples/trajectory_io.py index f4b00116..19481be7 100644 --- a/examples/trajectory_io.py +++ b/examples/trajectory_io.py @@ -3,7 +3,7 @@ =================================== This example illustrates how to store intermediate data to a file for later -post-processing. The storage frequency is an argument to the tracker. +post-processing. The storage frequency is an argument to the tracker. """ from tempfile import NamedTemporaryFile diff --git a/examples/tutorial/Tutorial 1 - Grids and fields.ipynb b/examples/tutorial/Tutorial 1 - Grids and fields.ipynb index 74289a54..635ba43a 100644 --- a/examples/tutorial/Tutorial 1 - Grids and fields.ipynb +++ b/examples/tutorial/Tutorial 1 - Grids and fields.ipynb @@ -17,6 +17,7 @@ "source": [ "# import packages\n", "import sys\n", + "\n", "import numpy as np\n", "\n", "sys.path.append(\"../..\") # add the pde package to the python path\n", diff --git a/examples/tutorial/Tutorial 2 - Solving pre-defined partial differential equations.ipynb b/examples/tutorial/Tutorial 2 - Solving pre-defined partial differential equations.ipynb index 13ac0c50..61ad7cb6 100644 --- a/examples/tutorial/Tutorial 2 - Solving pre-defined partial differential equations.ipynb +++ b/examples/tutorial/Tutorial 2 - Solving pre-defined partial differential equations.ipynb @@ -17,6 +17,7 @@ "source": [ "# import packages\n", "import sys\n", + "\n", "import numpy as np\n", "\n", "sys.path.append(\"../..\") # add the pde package to the python path\n", diff --git a/pde/grids/base.py b/pde/grids/base.py index 039e0036..f366bef0 100644 --- a/pde/grids/base.py +++ b/pde/grids/base.py @@ -18,9 +18,8 @@ import numba as nb import numpy as np -from numba.extending import is_jitted +from numba.extending import is_jitted, register_jitable from numba.extending import overload as nb_overload -from numba.extending import register_jitable from numpy.typing import ArrayLike from ..tools.cache import cached_method, cached_property @@ -1192,8 +1191,7 @@ def register_operator( .. code-block:: python @GridClass.register_operator("operator") - def make_operator(grid: GridBase): - ... + def make_operator(grid: GridBase): ... Args: name (str): diff --git a/pde/grids/boundaries/__init__.py b/pde/grids/boundaries/__init__.py index e430407b..fe9a5c0e 100644 --- a/pde/grids/boundaries/__init__.py +++ b/pde/grids/boundaries/__init__.py @@ -58,8 +58,7 @@ .. code-block:: python - bc_y = ({"type": "mixed", "value": 2, "const": 7}, - {"curvature": 2}) + bc_y = ({"type": "mixed", "value": 2, "const": 7}, {"curvature": 2}) which enforces the condition :math:`\partial_n c + 2 c = 7` and :math:`\partial^2_n c = 2` onto the field :math:`c` on the lower and upper side diff --git a/pde/grids/boundaries/axis.py b/pde/grids/boundaries/axis.py index 719b3520..5d928209 100644 --- a/pde/grids/boundaries/axis.py +++ b/pde/grids/boundaries/axis.py @@ -3,7 +3,7 @@ This module handles the boundaries of a single axis of a grid. There are generally only two options, depending on whether the axis of the underlying -grid is defined as periodic or not. If it is periodic, the class +grid is defined as periodic or not. If it is periodic, the class :class:`~pde.grids.boundaries.axis.BoundaryPeriodic` should be used, while non-periodic axes have more option, which are represented by :class:`~pde.grids.boundaries.axis.BoundaryPair`. diff --git a/pde/grids/boundaries/local.py b/pde/grids/boundaries/local.py index dc378c49..161d6f54 100644 --- a/pde/grids/boundaries/local.py +++ b/pde/grids/boundaries/local.py @@ -13,7 +13,7 @@ Imposing the derivative of a field in the outward normal direction at the boundary * :class:`~pde.grids.boundaries.local.MixedBC`: Imposing the derivative of a field in the outward normal direction proportional to its - value at the boundary + value at the boundary * :class:`~pde.grids.boundaries.local.CurvatureBC`: Imposing the second derivative (curvature) of a field at the boundary @@ -2461,8 +2461,8 @@ class MixedBC(ConstBC1stOrderBase): .. code-block:: python - bc = {'mixed': VALUE} - bc = {'type': 'mixed', 'value': VALUE, 'const': CONST} + bc = {"mixed": VALUE} + bc = {"type": "mixed", "value": VALUE, "const": CONST} where `VALUE` corresponds to :math:`\gamma` and `CONST` to :math:`\beta`. """ @@ -2937,8 +2937,8 @@ class NormalMixedBC(MixedBC): .. code-block:: python - bc = {'mixed': VALUE} - bc = {'type': 'mixed', 'value': VALUE, 'const': CONST} + bc = {"mixed": VALUE} + bc = {"type": "mixed", "value": VALUE, "const": CONST} where `VALUE` corresponds to :math:`\gamma` and `CONST` to :math:`\beta`. """ diff --git a/pde/pdes/base.py b/pde/pdes/base.py index efba65a7..03f20c91 100644 --- a/pde/pdes/base.py +++ b/pde/pdes/base.py @@ -141,14 +141,13 @@ def make_post_step_hook(self, state: FieldBase) -> tuple[StepperHook, Any]: .. code-block:: python def make_post_step_hook(self, state): - def post_step_hook(state_data, t, post_step_data): i = state_data > 1 # get violating entries overshoot = (state_data[i] - 1).sum() # get total correction state_data[i] = 1 # limit data entries post_step_data += overshoot # accumulate total correction - return post_step_hook, 0. # hook function and initial value + return post_step_hook, 0.0 # hook function and initial value Args: state (:class:`~pde.fields.FieldBase`): diff --git a/pde/solvers/base.py b/pde/solvers/base.py index 24542b5d..c8a67233 100644 --- a/pde/solvers/base.py +++ b/pde/solvers/base.py @@ -552,7 +552,9 @@ def single_step_error_estimate( return single_step_error_estimate - def _make_adaptive_stepper(self, state: FieldBase) -> Callable[ + def _make_adaptive_stepper( + self, state: FieldBase + ) -> Callable[ [np.ndarray, float, float, float, OnlineStatistics | None, Any], tuple[float, float, int], ]: diff --git a/pde/solvers/explicit.py b/pde/solvers/explicit.py index a2471e0c..cd141f41 100644 --- a/pde/solvers/explicit.py +++ b/pde/solvers/explicit.py @@ -154,7 +154,9 @@ def _make_single_step_fixed_dt( else: raise ValueError(f"Explicit scheme `{self.scheme}` is not supported") - def _make_adaptive_euler_stepper(self, state: FieldBase) -> Callable[ + def _make_adaptive_euler_stepper( + self, state: FieldBase + ) -> Callable[ [np.ndarray, float, float, float, OnlineStatistics | None, Any], tuple[float, float, int], ]: @@ -371,7 +373,9 @@ def _make_single_step_error_estimate( # optimizations; see method `_make_adaptive_euler_stepper` raise ValueError(f"Adaptive scheme `{self.scheme}` is not supported") - def _make_adaptive_stepper(self, state: FieldBase) -> Callable[ + def _make_adaptive_stepper( + self, state: FieldBase + ) -> Callable[ [np.ndarray, float, float, float, OnlineStatistics | None, Any], tuple[float, float, int], ]: diff --git a/pde/solvers/explicit_mpi.py b/pde/solvers/explicit_mpi.py index dd603c09..a5b511b5 100644 --- a/pde/solvers/explicit_mpi.py +++ b/pde/solvers/explicit_mpi.py @@ -57,7 +57,7 @@ class ExplicitMPISolver(ExplicitSolver): result = eq.solve(state, t_range=10, dt=0.1, solver="explicit_mpi") if result is not None: # restrict the output to the main node - result.plot() + result.plot() Saving this script as `multiprocessing.py`, a parallel simulation is started by diff --git a/pde/storage/base.py b/pde/storage/base.py index fc5d6497..4bcd4e83 100644 --- a/pde/storage/base.py +++ b/pde/storage/base.py @@ -303,6 +303,7 @@ def add_to_state(state): transformed_field = state.smooth(1) return field.append(transformed_field) + storage = pde.MemoryStorage() tracker = storage.tracker(1, transformation=add_to_state) eq.solve(..., tracker=tracker) diff --git a/pde/storage/modelrunner.py b/pde/storage/modelrunner.py index 5d9e0f90..28cb240a 100644 --- a/pde/storage/modelrunner.py +++ b/pde/storage/modelrunner.py @@ -25,6 +25,7 @@ class ModelrunnerStorage(StorageBase): .. code-block:: python from modelrunner import Result + r = Result.from_file("data.hdf5") r.result.plot() # plots the final state r.storage["trajectory"] # allows accessing the stored trajectory diff --git a/pde/storage/movie.py b/pde/storage/movie.py index cb9a5ca8..a32c8e7c 100644 --- a/pde/storage/movie.py +++ b/pde/storage/movie.py @@ -617,6 +617,7 @@ def add_to_state(state): transformed_field = state.smooth(1) return field.append(transformed_field) + storage = pde.MemoryStorage() tracker = storage.tracker(1, transformation=add_to_state) eq.solve(..., tracker=tracker) diff --git a/pde/tools/cache.py b/pde/tools/cache.py index a3597b0b..ba0c23c6 100644 --- a/pde/tools/cache.py +++ b/pde/tools/cache.py @@ -408,8 +408,7 @@ def __init__( Example: An example for using the class is:: - class Foo(): - + class Foo: @cached_property() def property(self): return "Cached property" @@ -438,13 +437,12 @@ def method(self): Example: An advanced example is:: - class Foo(): - + class Foo: def get_cache(self, name): # `name` is the name of the method to cache return DictFiniteCapacity() - @cached_method(factory='get_cache') + @cached_method(factory="get_cache") def foo(self): return "Cached" @@ -592,8 +590,7 @@ class cached_property(_class_cache): Example: Here is an example for how to use the decorator:: - class Foo(): - + class Foo: @cached_property def bar(self): return "Cached" @@ -638,7 +635,6 @@ class cached_method(_class_cache): The decorator can be used like so:: class Foo: - @cached_method def bar(self): return "Cached" diff --git a/pde/tools/misc.py b/pde/tools/misc.py index 9a2b45a7..b19dfc6a 100644 --- a/pde/tools/misc.py +++ b/pde/tools/misc.py @@ -151,13 +151,13 @@ class classproperty(property): Example: The decorator can be used much like the `property` decorator:: - class Test(): - - item: str = 'World' + class Test: + item: str = "World" @classproperty def message(cls): - return 'Hello ' + cls.item + return "Hello " + cls.item + print(Test.message) """ diff --git a/pde/tools/plotting.py b/pde/tools/plotting.py index 5f77106f..50bf6646 100644 --- a/pde/tools/plotting.py +++ b/pde/tools/plotting.py @@ -212,9 +212,9 @@ def __init__(self) -> None: def _update_plot(self, reference): reference.element.set_ydata(self.data) - @plot_on_axes(update_method='_update_plot') + @plot_on_axes(update_method="_update_plot") def plot(self, ax): - line, = ax.plot(np.arange(8), self.data) + (line,) = ax.plot(np.arange(8), self.data) return PlotReference(ax, line) @@ -414,17 +414,16 @@ def _update_plot(self, reference): ref1.element.set_ydata(self.data[0]) ref2.element.set_ydata(self.data[1]) - @plot_on_figure(update_method='_update_plot') + @plot_on_figure(update_method="_update_plot") def plot(self, fig): ax1, ax2 = fig.subplots(1, 2) - l1, = ax1.plot(np.arange(8), self.data[0]) - l2, = ax2.plot(np.arange(8), self.data[1]) + (l1,) = ax1.plot(np.arange(8), self.data[0]) + (l2,) = ax2.plot(np.arange(8), self.data[1]) return [PlotReference(ax1, l1), PlotReference(ax2, l2)] @plot_on_figure - def make_plot(fig): - ... + def make_plot(fig): ... When `update_method` is not supplied, the method can still be used for diff --git a/pde/trackers/trackers.py b/pde/trackers/trackers.py index 0fae0065..16c5be9f 100644 --- a/pde/trackers/trackers.py +++ b/pde/trackers/trackers.py @@ -59,6 +59,7 @@ def check_simulation(state, time): if state.integral < 0: raise StopIteration + tracker = CallbackTracker(check_simulation, interval="0:10") Adding :code:`tracker` to the simulation will perform a check every 10 real time @@ -600,6 +601,7 @@ class DataTracker(CallbackTracker): def get_statistics(state, time): return {"mean": state.data.mean(), "variance": state.data.var()} + data_tracker = DataTracker(get_statistics, interval=10) Adding :code:`data_tracker` to the simulation will gather the statistics every diff --git a/pyproject.toml b/pyproject.toml index 334d5430..b10c6964 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,8 +4,10 @@ [project] name = "py-pde" description = "Python package for solving partial differential equations" -authors = [{ name = "David Zwicker", email = "david.zwicker@ds.mpg.de" }] -license = { text = "MIT" } +authors = [ + {name = "David Zwicker", email="david.zwicker@ds.mpg.de"} +] +license = {text = "MIT"} readme = "README.md" requires-python = ">=3.9,<3.13" dynamic = ["version"] @@ -25,14 +27,7 @@ classifiers = [ ] # Requirements for setuptools -dependencies = [ - "matplotlib>=3.1", - "numba>=0.59", - "numpy>=1.22", - "scipy>=1.10", - "sympy>=1.9", - "tqdm>=4.66", -] +dependencies = ["matplotlib>=3.1", "numba>=0.59", "numpy>=1.22", "scipy>=1.10", "sympy>=1.9", "tqdm>=4.66"] [project.optional-dependencies] io = ["h5py>=2.10", "pandas>=2", "ffmpeg-python>=0.2"] @@ -45,12 +40,15 @@ documentation = "http://py-pde.readthedocs.io" repository = "https://github.com/zwicker-group/py-pde" [build-system] -requires = ["setuptools>=61", "setuptools_scm[toml]>=6.2"] +requires = [ + "setuptools>=61", + "setuptools_scm[toml]>=6.2", +] build-backend = "setuptools.build_meta" [tool.setuptools] include-package-data = true -zip-safe = false # required for mypy to find the py.typed file +zip-safe = false # required for mypy to find the py.typed file [tool.setuptools.packages.find] include = ["pde*"] @@ -59,6 +57,19 @@ namespaces = false [tool.setuptools_scm] write_to = "pde/_version.py" +[tool.ruff] +target-version = "py39" +exclude = ["scripts/templates"] + +[tool.ruff.format] +docstring-code-format = true + +[tool.ruff.lint.isort] +section-order = ["future", "standard-library", "third-party", "first-party", "self", "local-folder"] + +[tool.ruff.lint.isort.sections] +self = ["pde", "fixtures"] + [tool.black] target_version = ["py39"] exclude = "scripts/templates" @@ -67,14 +78,7 @@ exclude = "scripts/templates" profile = "black" src_paths = ["pde", "examples", "scripts", "tests"] known_self = ["pde", "fixtures"] -sections = [ - "FUTURE", - "STDLIB", - "THIRDPARTY", - "FIRSTPARTY", - "SELF", - "LOCALFOLDER", -] +sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "SELF", "LOCALFOLDER"] [tool.pytest.ini_options] addopts = "--strict-markers" diff --git a/scripts/_templates/pyproject.toml b/scripts/_templates/pyproject.toml index 2830c821..87588e6d 100644 --- a/scripts/_templates/pyproject.toml +++ b/scripts/_templates/pyproject.toml @@ -54,6 +54,19 @@ namespaces = false [tool.setuptools_scm] write_to = "pde/_version.py" +[tool.ruff] +target-version = "py39" +exclude = ["scripts/templates"] + +[tool.ruff.format] +docstring-code-format = true + +[tool.ruff.lint.isort] +section-order = ["future", "standard-library", "third-party", "first-party", "self", "local-folder"] + +[tool.ruff.lint.isort.sections] +self = ["pde", "fixtures"] + [tool.black] target_version = ["py$MIN_PYTHON_VERSION_NODOT"] exclude = "scripts/templates" @@ -106,4 +119,4 @@ module = [ "sympy.*", "tqdm.*", ] -ignore_missing_imports = true \ No newline at end of file +ignore_missing_imports = true diff --git a/scripts/create_requirements.py b/scripts/create_requirements.py index 36facae3..497a89a0 100755 --- a/scripts/create_requirements.py +++ b/scripts/create_requirements.py @@ -163,16 +163,15 @@ def line(self, relation: str = ">=") -> str: Requirement( name="jupyter_contrib_nbextensions", version_min="0.5", tests_only=True ), - Requirement(name="black", version_min="24", tests_only=True), Requirement(name="docformatter", version_min="1.7", tests_only=True), Requirement(name="importlib-metadata", version_min="5", tests_only=True), - Requirement(name="isort", version_min="5.1", tests_only=True), Requirement(name="mypy", version_min="1.8", tests_only=True), Requirement(name="notebook", version_min="7", tests_only=True), Requirement(name="pyupgrade", version_min="3", tests_only=True), Requirement(name="pytest", version_min="5.4", tests_only=True), Requirement(name="pytest-cov", version_min="2.8", tests_only=True), Requirement(name="pytest-xdist", version_min="1.30", tests_only=True), + Requirement(name="ruff", version_min="0.6", tests_only=True), ] @@ -279,7 +278,7 @@ def write_from_template( path (:class:`Path`): The path where the requirements are written template_name (str): The name of the template requirements (list): The requirements to be written - fix_format (bool): If True, script will be formated using `black` + fix_format (bool): If True, script will be formatted using `ruff` add_warning (bool): If True, adds a warning that file is generated """ print(f"Write `{path}`") @@ -315,9 +314,9 @@ def write_from_template( fp.writelines(SETUP_WARNING.format(template_name)) fp.writelines(content) - # call black formatter on it + # call ruff formatter on it if fix_format: - sp.check_call(["black", "-q", "-t", "py38", str(path)]) + sp.check_call(["ruff", "--config", "../pyproject.toml", str(path)]) def main(): diff --git a/scripts/format_code.sh b/scripts/format_code.sh index 0d91fc60..d608f699 100755 --- a/scripts/format_code.sh +++ b/scripts/format_code.sh @@ -7,10 +7,10 @@ find . -name '*.py' -exec pyupgrade --py39-plus {} + popd > /dev/null echo "Formating import statements..." -isort .. +ruff check --select I --fix --config=../pyproject.toml .. echo "Formating docstrings..." docformatter --in-place --black --recursive .. echo "Formating source code..." -black .. \ No newline at end of file +ruff format --config=../pyproject.toml .. \ No newline at end of file diff --git a/tests/_notebooks/Test PlotTracker for different backend.ipynb b/tests/_notebooks/Test PlotTracker for different backend.ipynb index 34f1a010..a615e019 100644 --- a/tests/_notebooks/Test PlotTracker for different backend.ipynb +++ b/tests/_notebooks/Test PlotTracker for different backend.ipynb @@ -24,8 +24,8 @@ "metadata": {}, "outputs": [], "source": [ - "from pathlib import Path\n", "import tempfile\n", + "from pathlib import Path\n", "\n", "import pde" ] @@ -89,7 +89,7 @@ " backend=\"numpy\",\n", " ret_info=True,\n", " tracker=[\"progress\", plot_tracker],\n", - ");" + ")" ] }, { @@ -175,7 +175,7 @@ " backend=\"numpy\",\n", " ret_info=True,\n", " tracker=[\"progress\", plot_tracker],\n", - ");" + ")" ] }, { @@ -278,7 +278,7 @@ " backend=\"numpy\",\n", " ret_info=True,\n", " tracker=[\"progress\", plot_tracker],\n", - ");" + ")" ] }, { diff --git a/tests/requirements.txt b/tests/requirements.txt index e4695b5c..09bb15de 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,8 +1,6 @@ -r ../requirements.txt -black>=24 docformatter>=1.7 importlib-metadata>=5 -isort>=5.1 jupyter_contrib_nbextensions>=0.5 mypy>=1.8 notebook>=7 @@ -10,3 +8,4 @@ pytest>=5.4 pytest-cov>=2.8 pytest-xdist>=1.30 pyupgrade>=3 +ruff>=0.6