Releases: pylhc/tfs
Release 4.0.0 - MAD-NG Compatibility
Version 4.0 of tfs-pandas is a major release bringing compatibility with MAD-NG features in TFS files and tables, apart from the most exotic ones (more on that later).
We also bring new documentation pages regarding the TFS format, code compatibilities, and the new features.
Please have a look at the documentation should you intent to use tfs-pandas 4.0, as there are a few (now documented) caveats.
Important:
- Support for
Python 3.9has been dropped. The minimum required Python version is now3.10. - DataFrame validation is now OFF by default, both when reading from and writing to file. It is up to the user to ask for a given validation mode.
- Minimum supported
MAD-NGversion is1.0.0, due to synchronized development of some feature details. The correspondingpymadngversion is0.6.0.
Added:
- Handling of boolean-type and complex-type header values (
MAD-NGfeature). - Handling of bolean-type and complex-type columns (
MAD-NGfeature). - Handling of nullable-type
nilvalues in headers and columns (MAD-NGfeature). - Compatibility modes for dataframe validation. The
tfs.frame.validatefunction now expects this, and valid choices areMADX,MAD-X,MADNGandMAD-NG(case-insensitive, see API documentation). - Many new exceptions have been created for raised errors, which will be more specific. They all inherit from the previously raised
TfsFormatError, so user code that was catching it will still work.
Changed:
- By default,
TfsDataFramevalidation is now skipped on reading. - By default,
TfsDataFramevalidation is now skipped on writing. - By default,
TfsDataFramevalidation inMAD-Xrequires headers to be present in the dataframe.
Fixed:
- Writing a dataframe with no headers (not empty headers), e.g. a
pandas.DataFrame- now works correctly.
Documentation:
- The documentation has been updated to reflect the new features and changes.
- The documentation now includes a new page on the
TFSformat itself. - The documentation now includes a new page on compatibility modes for
TfsDataFramevalidation. - A great deal of internal documentation has been added to the codebase.
Relevant Changes
- MAD-NG Features and Compatibility Modes by @fsoubelet in #135
Full Changelog: v3.9.0...v4.0.0
Release 3.9.0
Release 3.9.0 brings a helper function into the public API for testing purposes.
Additions
- A module,
tfs.testing, has been added and made publicly available. It provides an assert function to compare TfsDataFrame similar to that provided by pandas, destined for unit tests.
What's Changed
- Unit Testing Helper by @fsoubelet in #136
Full Changelog: v3.8.2...v3.9.0
Release 3.8.2
Release 3.8.2 brings two minor changes, which are fully transparent to the user.
Changes
- The headers of a
TfsDataFrameare now stored as adictand no longer anOrderedDict. This should save some memory. - Removed a workaround function for some
pandasbehaviour which is no longer necessary due to the higher minimumpandasversion.
What's Changed
- Remove unnecessary function and lots of linting by @fsoubelet in #132
- Use dicts instead of OrderedDicts by @fsoubelet in #133
Full Changelog: v3.8.1...v3.8.2
Release 3.8.1
Release 3.8.1 is a patch version fixing compatibility with numpy 2.x. Please note there is a caveat (read below) on Python 3.9 when installing tfs-pandas with the hdf5 extra.
Important Changes:
- The minimum required
numpyversion is nownumpy 1.24.
Fixes
- The package's HDF functionality is fully compatible with
numpy 2.xonPython >= 3.10thanks to apytablescompatibility release. - The package's HDF functionality limits to
numpy < 2onPython 3.9due to the lack of compatibility frompytableson this versions.
What's Changed
- Migrate to pyproject.toml by @fsoubelet in #131
Full Changelog: v3.8.0...v3.8.1
Release 3.8.0
Release 3.8.0 is a new minor version fixing warnings, updating to newer versions of our dependencies, and changing some minimum requirements.
Important Changes:
- The minimum required
pandasversion is nowpandas 2.1. - Support for
Python 3.8has been dropped. The minimum required Python version is now3.9.
Fixes
- Solved a
DeprecationWarningappearing when writing aTfsDataFrameto disk due to the use of.applymap, byusing the now recommended.mapmethod. - Solved a
DeprecationWarningappearing when reading a file from disk due to the use ofdelim_whitespacein our reader, by using the now recommendedsepoption. - Solved a
FutureWarningappearing when validating aTfsDataFramedue to the use of thepd.option_context('mode.use_inf_as_na', True)context manager during validation by explicitely casting infinite values toNaNs. - Solved a
FutureWarningappearing when validating aTfsDataFramedue to object downcasting happening during validation by explicitely infering dtypes first.
What's Changed
- Deprecations and FutureWarnings Fixes by @fsoubelet in #128
Full Changelog: v3.7.3...v3.8.0
Release 3.7.3
This is a patch release which fixes a regression introduced in a previous release.
- Fixed:
- Fixed a regression where the writing of a
pd.Series-like object to disk was raising an error. It is now possible again.
- Fixed a regression where the writing of a
What's Changed
- CI Fix by @fsoubelet in #127
- [Fix] Series-like writing by @fsoubelet in #130
Full Changelog: v3.7.2...v3.7.3
Release 3.7.2
This is a patch release, assuring compatibility again with pandas >= 2.1.0.
- Fixed:
- fixing the issues with
pandas>=v2.1.0(seetfs-pandasv3.7.1) by overwriting the_constructor_from_mgrfunction.
- fixing the issues with
What's Changed
Full Changelog: v3.7.1...v3.7.2
Release 3.7.1
Release 3.7.1 is a patch release to circumvent an issue with the latest pandas release, 2.1.0, which would cause an infinite recursion . This version and above are now prohibited in the dependencies while we investigate with the pandas devs.
What's Changed
- Migrate to common workflows by @fsoubelet in #123
- Pandas dependency version restriction by @fsoubelet in #125
Full Changelog: v3.7.0...v3.7.1
Release 3.7.0
Release 3.7.0 adds some functionality with a reworked TfsCollection class.
-
Changed:
- The old
write_toandget_filenameof theTfsCollectionclass have been renamed to_write_toand_get_filenameas they
could only be accessed internally (due to the input parameters not available to the user). - The column which is set as index can now also be defined manually by overwriting the
INDEXattribute, which defaults to"NAME". - The define properties functions have been moved into the
Tfs-attribute marker class. - The
MaybeCallclass returnsNonein case of attribute not found, instead of previously an empty function.
- The old
-
Added:
- A
get_filename(name)function toTfsCollectionwhich returns the associated filename to the property with namename. - A
get_path(name)function toTfsCollectionwhich returns the actual file path of the propertyname. - A
flush()function toTfsCollectionwhich writes the current state of the TfsDataFrames into their respective files. - A
write_tfs(filename, data_frame)function toTfsCollectionwhich writes thedata_frametoself.directorywith the givenfilename. - A
defined_propertiesproperty toTfsCollectionwhich returns a tuple of strings of the defined properties on this instance. - A
filenamesproperty toTfsCollectionwhich is a convenience wrapper forget_filename():
- A
For details see the API documentation.
What's Changed
Full Changelog: v3.6.0...v3.7.0
Release 3.6.0
Release 3.6.0 is a version compatibility release with pandas 2.0.
-
Removed:
- The
appendandjoinmethods ofTfsDataFramehave been removed.
- The
-
Changed:
- The dependency version on
pandashas been restored to>=1.0.0as the above removal restores compatibility withpandas2.0.
- The dependency version on
What's Changed
- Release 3.6.0 and removal of TfsDataFrame methods by @fsoubelet in #120
Full Changelog: v3.5.3...v3.6.0