-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(list parsing): Fixed errors caused by parsing certain lists with …
…keywords in the middle (#1135) * fix(list parsing): lists entered as strings are now parsed using the same code that parses them from a file. fixes some bugs with the user-constructed lists. * fix(list parsing): Changed test case to use correct format * fix(data format check) * fix(example): list initialization fix * fix(example): list initialization fix * fix(mflist input): clean up any extra "None" entries entered by the user * fix(empty scalar data): When user passes [()] activate flag.
- Loading branch information
1 parent
0f1d8c3
commit 148087e
Showing
7 changed files
with
119 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
148087e
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.
Hi @spaulins-usgs,
Not sure if it matters for anything but something in this commit (I think) changed (for e.g.) FMI package data array to no longer include the field
filein
.Where prior to this commit the
fmi.packagedata.array
looked like this:Now it looks like this:
It may not be of any consequence but possibly something to check. Obviously, if like me you had code that was using
fmi.packagedata.array.filein
things are going to break.148087e
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.
@briochh FloPy was originally including some keywords, like "filein", in the recarray but not others. This behavior was inconsistent and leading to errors in some cases. I changed FloPy's behavior to consistently omits keywords in the stored data. Sorry I understand that this can break your script, but I think the updated behavior is much more consistent and cleaner with less "None" values in the data. This change in behavior also made it much easier to fix some bugs related to some of the keywords being in the recarrays and will hopefully make it easier to maintain the FloPy code base in the future.
148087e
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.
@spaulins-usgs Small suggestion...if it's known that it is going to break something, it may be helpful to preemptively offer what the new syntax should be. As you know, one of my scripts was affected by this change as well. For me, the
tables
argument in the LAK instantiator broke. It was:What should that be changed to, again? I seem to have misplaced the corrected syntax.
148087e
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.
@emorway-usgs In the future I will make it clear that the PR could potentially break some people's code and offer new syntax. There are two possible syntaxes now for the LAK tables. One is to just input the minimal information needed in a list (no extra keywords):
tables=[0, "tabfile.txt"]
The other syntax is to input the line as it would appear in the package file:
tables=["1 TAB6 FILEIN tabfile.txt"]