Skip to content

Commit

Permalink
Merge branch 'main' into symbolic-jacobian-sparsity
Browse files Browse the repository at this point in the history
  • Loading branch information
SouthEndMusic committed Aug 5, 2024
2 parents aab4085 + 4191351 commit 81420e5
Show file tree
Hide file tree
Showing 10 changed files with 10,067 additions and 6,919 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
exclude: '.teamcity'
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.0
rev: v0.5.5
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
Expand All @@ -26,6 +26,6 @@ repos:
hooks:
- id: nbstripout
- repo: https://github.com/crate-ci/typos
rev: v1.22.9
rev: v1.23.6
hooks:
- id: typos
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
"julia.lint.disabledDirs": [
".pixi"
],
"julia.lint.run": true
"julia.lint.run": true,
"files.insertFinalNewline": true
}
1 change: 1 addition & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ extra_checks = True
disallow_subclassing_any = True
disallow_untyped_decorators = True
disallow_any_generics = True
mypy_path = .pixi/envs/$PIXI_ENVIRONMENT_NAME/Library/python,.pixi/envs/$PIXI_ENVIRONMENT_NAME/share/qgis/python

# Ignore errors for imported packages.
[mypy-console.*]
Expand Down
1 change: 1 addition & 0 deletions open-vscode.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pixi run --environment=dev code . | exit
16,966 changes: 10,055 additions & 6,911 deletions pixi.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion python/ribasim_api/tests/test_bmi.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,9 @@ def test_get_value_ptr_subgrid(libribasim, two_basin, tmp_path):
libribasim.update_until(86400.0)

# Subgrid level
libribasim.update_subgrid_level()
actual_subgrid_level = libribasim.get_value_ptr("basin.subgrid_level")
expected_subgrid_level = np.array([np.nan, np.nan])
expected_subgrid_level = np.array([2.17, 0.006142])
assert_array_almost_equal(actual_subgrid_level, expected_subgrid_level)


Expand Down
2 changes: 1 addition & 1 deletion ribasim_qgis/ribasim_qgis.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from qgis.PyQt.QtWidgets import QAction


class RibasimDockWidget(QgsDockWidget): # type: ignore
class RibasimDockWidget(QgsDockWidget):
def closeEvent(self, event) -> None:
# TODO: if we implement talking to a Julia server, shut it down here.
event.accept()
Expand Down
2 changes: 1 addition & 1 deletion ribasim_qgis/scripts/qgis_testrunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def __get_test_function(test_module_name):
from qgis.PyQt.QtCore import QDir


class QgsProjectBadLayerDefaultHandler(QgsProjectBadLayerHandler): # type: ignore
class QgsProjectBadLayerDefaultHandler(QgsProjectBadLayerHandler):
def handleBadLayers(self, layers, dom):
pass

Expand Down
2 changes: 1 addition & 1 deletion ribasim_qgis/tests/core/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
)


class TestModel(unittest.TestCase): # type: ignore
class TestModel(unittest.TestCase):
tests_folder_path = Path(__file__).parent.parent.resolve()
data_folder_path = tests_folder_path / "data"

Expand Down
2 changes: 1 addition & 1 deletion ribasim_qgis/ui_tests/test_load_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from qgis.utils import iface, plugins


class TestPlugin(unittest.TestCase): # type: ignore
class TestPlugin(unittest.TestCase):
def test_plugin_is_loaded(self):
"""Test plugin is properly loaded and appears in QGIS plugins."""
plugin = plugins.get("ribasim_qgis")
Expand Down

0 comments on commit 81420e5

Please sign in to comment.