-
Notifications
You must be signed in to change notification settings - Fork 6
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 hardcoded filenames. #815
Changes from 1 commit
2c07a1b
8433231
ca869bb
4d434a9
93b02d6
f864590
f87adab
594f35c
3fb911d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,9 +44,10 @@ class Compression(str, Enum): | |
|
||
|
||
class Results(BaseModel): | ||
basin: Path = Path("results/basin.arrow") | ||
flow: Path = Path("results/flow.arrow") | ||
control: Path = Path("results/control.arrow") | ||
basin: Path = Field(default=Path("basin.arrow"), exclude=True, repr=False) | ||
flow: Path = Field(default=Path("flow.arrow"), exclude=True, repr=False) | ||
control: Path = Field(default=Path("control.arrow"), exclude=True, repr=False) | ||
allocation: Path = Field(default=Path("allocation.arrow"), exclude=True, repr=False) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These need to be removed too There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've excluded them from any exports. They are here for when we need to parse the output files. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just an FYI: I just found out that TOML hates these Path objects, and complains that it cannot serialize them. However, due to the exclude_unset logic, they aren't included unless you set them yourself. For extra confusion, if you set the path (in current main) as a string, pydantic will coerce it to a Path. Then pydantic detects it has been set, and then TOML complains that it cannot serialize it. To be honest, together with issue #811, I'm getting really radicalized against exclude_unset. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's why there's
Right? Which fields are you trying to set? I don't like the unset behaviour either, but that should be a separate issue/discussion. |
||
outstate: str | None = None | ||
compression: Compression = Compression.zstd | ||
compression_level: int = 6 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To fit #799 (comment)
Those fields need to be removed as far as I can see
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These fields need to be hardcodes somewhere for core to write them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, but if you hardcode them here, it will be possible to override them with the TOML right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I now always override them.