Skip to content

Version 5.0.0

Choose a tag to compare

@eivindjahren eivindjahren released this 10 Nov 12:36
· 14 commits to main since this release

What's Changed

Version 5.0.0 now type-checks with strict mypy and distributes type stubs!

Version 5 includes a number of breaking changes in order to make this work:

  • It is no longer possible to give a dict as input to write. This is in order to be consistent
    with the Iterable type. Before you could write
resfo.write(
     "my_grid.fegrid",
     {"FILEHEAD": [1], "GRIDHEAD": [10,10,10]},
     fileformat=resfo.Format.FORMATTED
)

However, since dict is an iterable, this does not work well with types. Instead you will now explicitly call items on the dictionary:

resfo.write(
     "my_grid.fegrid",
     {"FILEHEAD": [1], "GRIDHEAD": [10,10,10]}.items(),
     fileformat=resfo.Format.FORMATTED
)
  • The sentinel value Mess is now of type MessType so that checking for the value
    should be done as if isinstance(x, MessType) rather than if x is MESS. Although both
    produces the same behavior, only the second type checks correctly.

  • resfo no longer supports python 3.8 & python 3.9.

bug fixes

  • Raise resfo.ResfoParsingError when eof is reached while reading an Array rather than ValueError.

Full Changelog: v4.3.0...v5.0.0-b0