Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the latest greatest Python deps #1618

Merged
merged 3 commits into from
Jul 9, 2024
Merged
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
21,586 changes: 10,998 additions & 10,588 deletions pixi.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test-ribasim-api = "pytest --basetemp=python/ribasim_api/tests/temp --junitxml=r

[feature.dev.tasks]
# Installation
install-julia = "juliaup add 1.10.4 && juliaup override set 1.10.4"
install-julia = "juliaup add 1.10.4 && juliaup override unset && juliaup override set 1.10.4"
install-pre-commit = "pre-commit install"
install-ci = { depends_on = ["install-julia", "update-registry-julia"] }
install = { depends_on = [
Expand Down Expand Up @@ -156,9 +156,9 @@ netCDF4 = "*"
numpy = "*"
pandas = "*"
pandas-stubs = "*"
pandera = ">=0.18"
pandera = ">=0.20"
pip = "*"
pyarrow = "<15"
pyarrow = "*"
pydantic = ">=2"
pyogrio = "*"
pytest = "*"
Expand Down
2 changes: 1 addition & 1 deletion python/ribasim/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies = [
"matplotlib",
"numpy",
"pandas",
"pandera >= 0.18",
"pandera >= 0.20",
"pyarrow",
"pydantic ~= 2.0",
"pyogrio",
Expand Down
2 changes: 1 addition & 1 deletion python/ribasim/ribasim/geometry/edge.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class NodeData(NamedTuple):
geometry: Point


class EdgeSchema(pa.SchemaModel):
class EdgeSchema(pa.DataFrameModel):
name: Series[str] = pa.Field(default="")
from_node_type: Series[str] = pa.Field(nullable=True)
from_node_id: Series[Int32] = pa.Field(default=0, coerce=True)
Expand Down
2 changes: 1 addition & 1 deletion python/ribasim/ribasim/geometry/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
__all__ = ("NodeTable",)


class NodeSchema(pa.SchemaModel):
class NodeSchema(pa.DataFrameModel):
node_id: Series[Int32] = pa.Field(ge=0)
name: Series[str] = pa.Field(default="")
node_type: Series[str] = pa.Field(default="")
Expand Down
5 changes: 4 additions & 1 deletion python/ribasim/tests/test_edge.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ def test_validation(edge):

with pytest.raises(ValidationError):
df = gpd.GeoDataFrame(
data={"from_node_id": [1, 1], "to_node_id": [None, 3]},
data={
"from_node_id": [1, 1],
"to_node_id": ["foo", 3],
}, # None is coerced to 0 without errors
geometry=[None, None],
)
EdgeTable(df=df)
Expand Down
Loading