Skip to content

Commit

Permalink
Merge branch 'dependencies' into dependabot/pip/requirements/dependen…
Browse files Browse the repository at this point in the history
…cies/furo-2024.1.29
  • Loading branch information
mcflugen committed Apr 24, 2024
2 parents c16e668 + f28a771 commit c36d7b5
Show file tree
Hide file tree
Showing 328 changed files with 2,295 additions and 1,808 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
python -m cibuildwheel --only ${{ matrix.cibw-only }} --print-build-identifiers
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.2
uses: pypa/cibuildwheel@v2.17.0
with:
only: ${{ matrix.cibw-only }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
python -m cibuildwheel --only ${{ matrix.cibw-only }} --print-build-identifiers
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.2
uses: pypa/cibuildwheel@v2.17.0
with:
only: ${{ matrix.cibw-only }}

Expand Down
20 changes: 12 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
language: pygrep

- repo: https://github.com/psf/black
rev: 23.11.0
rev: 24.4.0
hooks:
- id: black
name: black
Expand All @@ -41,18 +41,21 @@ repos:
hooks:
- id: blackdoc
description: "Black for doctests"
additional_dependencies: ["black==24.4.0"]
- id: blackdoc-autoupdate-black


- repo: https://github.com/pycqa/flake8
rev: 6.1.0
rev: 7.0.0
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear
- flake8-bugbear!=24.4.21
- flake8-comprehensions
- flake8-simplify

- repo: https://github.com/nbQA-dev/nbQA
rev: 1.7.1
rev: 1.8.5
hooks:
- id: nbqa-pyupgrade
args: ["--py310-plus"]
Expand All @@ -65,30 +68,31 @@ repos:
)
- repo: https://github.com/kynan/nbstripout
rev: 0.6.1
rev: 0.7.1
hooks:
- id: nbstripout
description: Strip output from jupyter notebooks
args: [--drop-empty-cells]

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
rev: v3.15.2
hooks:
- id: pyupgrade
args: [--py310-plus]

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
args: [--force-single-line-imports]
types: [python]
- id: isort
name: isort (cython)
types: [cython]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-builtin-literals
- id: check-added-large-files
Expand Down
6 changes: 3 additions & 3 deletions docs/source/user_guide/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ It's also possible to set the boundary conditions "by hand", if you know the ID
my_fixed_node = mg.find_nearest_node((1.2, 2.3))
my_fixed_node
9
grid.status_at_node[
my_fixed_node
] = grid.BC_NODE_IS_FIXED_GRADIENT # to fix the node closest to (1.2, 2.3)
grid.status_at_node[my_fixed_node] = (
grid.BC_NODE_IS_FIXED_GRADIENT
) # to fix the node closest to (1.2, 2.3)
See also:

Expand Down
1 change: 1 addition & 0 deletions docs/source/user_guide/overland_flow_user_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ To build an OverlandFlow model, first the necessary Landlab components and utili
Written by Jordan Adams, August 2016
"""
## Landlab components
from landlab.components import OverlandFlow, SinkFiller # SinkFiller is optional
Expand Down
26 changes: 14 additions & 12 deletions landlab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,26 @@

from ._registry import registry
from ._version import __version__
from .core.errors import MissingKeyError, ParameterValueError
from .core.errors import MissingKeyError
from .core.errors import ParameterValueError
from .core.model_component import Component
from .core.model_parameter_loader import load_params
from .core.utils import ExampleData
from .field import FieldError
from .grid import (
FramedVoronoiGrid,
HexModelGrid,
ModelGrid,
NetworkModelGrid,
RadialModelGrid,
RasterModelGrid,
VoronoiDelaunayGrid,
create_grid,
)
from .grid import FramedVoronoiGrid
from .grid import HexModelGrid
from .grid import ModelGrid
from .grid import NetworkModelGrid
from .grid import RadialModelGrid
from .grid import RasterModelGrid
from .grid import VoronoiDelaunayGrid
from .grid import create_grid
from .grid.linkstatus import LinkStatus
from .grid.nodestatus import NodeStatus
from .plot import imshow_grid, imshow_grid_at_node, imshowhs_grid, imshowhs_grid_at_node
from .plot import imshow_grid
from .plot import imshow_grid_at_node
from .plot import imshowhs_grid
from .plot import imshowhs_grid_at_node

with contextlib.suppress(TypeError):
set_printoptions(legacy="1.13")
Expand Down
1 change: 0 additions & 1 deletion landlab/_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@


class ComponentRegistry:

"""A registry for instantiated landlab components."""

def __init__(self, objs=None):
Expand Down
3 changes: 2 additions & 1 deletion landlab/bmi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from .bmi_bridge import TimeStepper, wrap_as_bmi
from .bmi_bridge import TimeStepper
from .bmi_bridge import wrap_as_bmi

__all__ = ["TimeStepper", "wrap_as_bmi"]
11 changes: 6 additions & 5 deletions landlab/bmi/bmi_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
exposes a Basic Modelling Interface.
"""

import inspect

import numpy as np
Expand All @@ -20,7 +21,8 @@
from ..core import load_params
from ..core.model_component import Component
from ..framework.decorators import snake_case
from ..grid import HexModelGrid, RasterModelGrid
from ..grid import HexModelGrid
from ..grid import RasterModelGrid
from ..grid.create import create_grid

BMI_LOCATION = {
Expand All @@ -45,7 +47,6 @@


class TimeStepper:

"""Step through time.
Parameters
Expand Down Expand Up @@ -358,9 +359,9 @@ def initialize(self, config_file):
self._clock = TimeStepper(**clock_params)

self._base = self._cls(grid, **params.pop(snake_case(cls.__name__), {}))
self._base.grid.at_node[
"boundary_condition_flag"
] = self._base.grid.status_at_node
self._base.grid.at_node["boundary_condition_flag"] = (
self._base.grid.status_at_node
)

def update(self):
"""Update the component one time step."""
Expand Down
31 changes: 15 additions & 16 deletions landlab/ca/boundaries/hex_lattice_tectonicizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,21 @@
@author: gtucker
"""

from numpy import (
amax,
arange,
array,
cos,
logical_and,
logical_or,
logical_xor,
pi,
sqrt,
tan,
where,
zeros,
)

from landlab import HexModelGrid, LinkStatus
from numpy import amax
from numpy import arange
from numpy import array
from numpy import cos
from numpy import logical_and
from numpy import logical_or
from numpy import logical_xor
from numpy import pi
from numpy import sqrt
from numpy import tan
from numpy import where
from numpy import zeros

from landlab import HexModelGrid
from landlab import LinkStatus
from landlab.core.utils import as_id_array

from ..cfuncs import get_next_event_new # , update_link_state_new
Expand Down
13 changes: 4 additions & 9 deletions landlab/ca/celllab_cts.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,10 @@
import pylab as plt

import landlab
from landlab.ca.cfuncs import (
PriorityQueue,
get_next_event_new,
push_transitions_to_event_queue,
run_cts_new,
)
from landlab.ca.cfuncs import PriorityQueue
from landlab.ca.cfuncs import get_next_event_new
from landlab.ca.cfuncs import push_transitions_to_event_queue
from landlab.ca.cfuncs import run_cts_new
from landlab.grid.nodestatus import NodeStatus

_NEVER = 1e50
Expand All @@ -139,7 +137,6 @@


class Transition:

"""A transition from one state to another.
Represents a transition from one state ("from_state") to another
Expand Down Expand Up @@ -206,7 +203,6 @@ def __init__(


class CAPlotter:

"""Handle display of a CellLab-CTS grid.
CAPlotter() constructor keeps a reference to the CA model, and
Expand Down Expand Up @@ -302,7 +298,6 @@ def finalize(self):


class CellLabCTSModel:

"""Link-type (or doublet-type) cellular automaton model.
A CellLabCTSModel implements a link-type (or doublet-type) cellular
Expand Down
1 change: 0 additions & 1 deletion landlab/ca/oriented_hex_cts.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@


class OrientedHexCTS(CellLabCTSModel):

"""Oriented hex-grid CellLab-CTS model.
OrientedHexCTS constructor: sets number of orientations to 3 and calls
Expand Down
1 change: 0 additions & 1 deletion landlab/ca/oriented_raster_cts.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@


class OrientedRasterCTS(CellLabCTSModel):

"""Oriented raster CellLab-CTS model.
RasterCTS constructor: sets number of orientations to 2 and calls
Expand Down
3 changes: 2 additions & 1 deletion landlab/cmd/authors.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import os
import subprocess
import textwrap
from collections import ChainMap, UserDict
from collections import ChainMap
from collections import UserDict

try:
import tomllib
Expand Down
21 changes: 11 additions & 10 deletions landlab/cmd/landlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@
import numpy as np
import rich_click as click

from landlab import (
FramedVoronoiGrid,
HexModelGrid,
ModelGrid,
RadialModelGrid,
RasterModelGrid,
VoronoiDelaunayGrid,
)

from .authors import AuthorList, AuthorsConfig, AuthorsSubprocessError, GitLog
from landlab import FramedVoronoiGrid
from landlab import HexModelGrid
from landlab import ModelGrid
from landlab import RadialModelGrid
from landlab import RasterModelGrid
from landlab import VoronoiDelaunayGrid

from .authors import AuthorList
from .authors import AuthorsConfig
from .authors import AuthorsSubprocessError
from .authors import GitLog

GRIDS = [
ModelGrid,
Expand Down
Loading

0 comments on commit c36d7b5

Please sign in to comment.