Skip to content

Commit

Permalink
Run a model without compression (#1150)
Browse files Browse the repository at this point in the history
#1147 missed a test model to run the no-compression path.

I see from the filesize that it is working. Ideally we'd confirm that in
a test, but getting that out of Arrow.jl internals seems too finicky to
be worth it.
  • Loading branch information
visr authored Feb 20, 2024
1 parent bb8d738 commit 703b8e6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion core/src/write.jl
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ end
function write_arrow(
path::AbstractString,
table::NamedTuple,
compress::TranscodingStreams.Codec,
compress::Union{ZstdCompressor, Nothing},
)::Nothing
# ensure DateTime is encoded in a compatible manner
# https://github.com/apache/arrow-julia/issues/303
Expand Down
30 changes: 15 additions & 15 deletions python/ribasim/ribasim/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,6 @@ class Config:
coerce = True


class TargetLevelStaticSchema(_BaseSchema):
node_id: Series[int] = pa.Field(nullable=False)
min_level: Series[float] = pa.Field(nullable=False)
max_level: Series[float] = pa.Field(nullable=False)
priority: Series[int] = pa.Field(nullable=False)


class TargetLevelTimeSchema(_BaseSchema):
node_id: Series[int] = pa.Field(nullable=False)
time: Series[Timestamp] = pa.Field(nullable=False)
min_level: Series[float] = pa.Field(nullable=False)
max_level: Series[float] = pa.Field(nullable=False)
priority: Series[int] = pa.Field(nullable=False)


class BasinProfileSchema(_BaseSchema):
node_id: Series[int] = pa.Field(nullable=False)
area: Series[float] = pa.Field(nullable=False)
Expand Down Expand Up @@ -184,6 +169,21 @@ class TabulatedRatingCurveTimeSchema(_BaseSchema):
flow_rate: Series[float] = pa.Field(nullable=False)


class TargetLevelStaticSchema(_BaseSchema):
node_id: Series[int] = pa.Field(nullable=False)
min_level: Series[float] = pa.Field(nullable=False)
max_level: Series[float] = pa.Field(nullable=False)
priority: Series[int] = pa.Field(nullable=False)


class TargetLevelTimeSchema(_BaseSchema):
node_id: Series[int] = pa.Field(nullable=False)
time: Series[Timestamp] = pa.Field(nullable=False)
min_level: Series[float] = pa.Field(nullable=False)
max_level: Series[float] = pa.Field(nullable=False)
priority: Series[int] = pa.Field(nullable=False)


class TerminalStaticSchema(_BaseSchema):
node_id: Series[int] = pa.Field(nullable=False)

Expand Down
2 changes: 1 addition & 1 deletion python/ribasim_testmodels/ribasim_testmodels/trivial.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,6 @@ def trivial_model() -> ribasim.Model:
tabulated_rating_curve=rating_curve,
starttime="2020-01-01 00:00:00",
endtime="2021-01-01 00:00:00",
results=ribasim.Results(subgrid=True),
results=ribasim.Results(subgrid=True, compression=False),
)
return model

0 comments on commit 703b8e6

Please sign in to comment.