Recent Releases of tfs-pandas
tfs-pandas - 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 https://github.com/pylhc/tfs/pull/135
Full Changelog: https://github.com/pylhc/tfs/compare/v3.9.0...v4.0.0
- Python
Published by fsoubelet over 1 year ago
tfs-pandas - 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 https://github.com/pylhc/tfs/pull/136
Full Changelog: https://github.com/pylhc/tfs/compare/v3.8.2...v3.9.0
- Python
Published by fsoubelet over 1 year ago
tfs-pandas - 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 https://github.com/pylhc/tfs/pull/132
- Use dicts instead of OrderedDicts by @fsoubelet in https://github.com/pylhc/tfs/pull/133
Full Changelog: https://github.com/pylhc/tfs/compare/v3.8.1...v3.8.2
- Python
Published by fsoubelet almost 2 years ago
tfs-pandas - 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 https://github.com/pylhc/tfs/pull/131
Full Changelog: https://github.com/pylhc/tfs/compare/v3.8.0...v3.8.1
- Python
Published by fsoubelet almost 2 years ago
tfs-pandas - 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 https://github.com/pylhc/tfs/pull/128
Full Changelog: https://github.com/pylhc/tfs/compare/v3.7.3...v3.8.0
- Python
Published by fsoubelet almost 2 years ago
tfs-pandas - 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 https://github.com/pylhc/tfs/pull/127
- [Fix] Series-like writing by @fsoubelet in https://github.com/pylhc/tfs/pull/130
Full Changelog: https://github.com/pylhc/tfs/compare/v3.7.2...v3.7.3
- Python
Published by fsoubelet about 2 years ago
tfs-pandas - 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
- Fixing pandas v2.1.0 compatibility by @JoschD in https://github.com/pylhc/tfs/pull/126
Full Changelog: https://github.com/pylhc/tfs/compare/v3.7.1...v3.7.2
- Python
Published by JoschD over 2 years ago
tfs-pandas - 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 https://github.com/pylhc/tfs/pull/123
- Pandas dependency version restriction by @fsoubelet in https://github.com/pylhc/tfs/pull/125
Full Changelog: https://github.com/pylhc/tfs/compare/v3.7.0...v3.7.1
- Python
Published by fsoubelet over 2 years ago
tfs-pandas - 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
- TFSCollections cleaned and with paths by @JoschD in https://github.com/pylhc/tfs/pull/122
Full Changelog: https://github.com/pylhc/tfs/compare/v3.6.0...v3.7.0
- Python
Published by fsoubelet about 3 years ago
tfs-pandas - 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 https://github.com/pylhc/tfs/pull/120
Full Changelog: https://github.com/pylhc/tfs/compare/v3.5.3...v3.6.0
- Python
Published by fsoubelet about 3 years ago
tfs-pandas - Release 3.5.3
This is a patch fixing a mistake in the previous patch.
- Changed:
- Fixed a wrong deprecation of the
.mergemethod ofTfsDataFrames.
- Fixed a wrong deprecation of the
What's Changed
- 3.5.3 with no warning for merge method by @fsoubelet in https://github.com/pylhc/tfs/pull/121
Full Changelog: https://github.com/pylhc/tfs/compare/v3.5.2...v3.5.3
- Python
Published by fsoubelet about 3 years ago
tfs-pandas - Release 3.5.2
Release 3.5.2 is a dependency compatibility patch.
As of pandas 2.0 the append and join methods have been removed from pandas.DataFrame. This fails the corresponding compatibility methods of TfsDataFrames.
This patch version forces pandas<2.0 to guarantee the compatibility methods provided for TfsDataFrames work. They will be removed in the next version to enable compatibility with pandas 2.x.
In the future users should use the compatibility tfs.frame.concat instead.
- Changed:
- The
pandasversion dependency is pinned to<2.0 - A warning was added to the documentation of the
appendandjoinmethods ofTfsDataFrames. - A warning is now logged when the
appendorjoinmethods ofTfsDataFramesare used, redirecting the users totfs.frame.concat.
- The
What's Changed
- Pandas 2.x restraint by @fsoubelet in https://github.com/pylhc/tfs/pull/119
Full Changelog: https://github.com/pylhc/tfs/compare/v3.5.1...v3.5.2
- Python
Published by fsoubelet about 3 years ago
tfs-pandas - Release 3.5.1
Release 3.5.1 patches a single bug
- Fixed:
- Allow reading of empty lines in headers again.
What's Changed
- Bug/fix empty lines skipping by @JoschD in https://github.com/pylhc/tfs/pull/118
Full Changelog: https://github.com/pylhc/tfs/compare/v3.5.0...v3.5.1
- Python
Published by JoschD about 3 years ago
tfs-pandas - Release 3.5.0
Release 3.5.0 adds some functionality and a bugfix.
Fixed:
- Any empty strings ("") in a file's columns will now properly be read as such and not converted to
NaN.
- Any empty strings ("") in a file's columns will now properly be read as such and not converted to
Added:
- It is now possible to only read the headers of a file by using a new function,
read_headers. The function API is not exported at the top level of the package but is available to import fromtfs.reader.
- It is now possible to only read the headers of a file by using a new function,
What's Changed
- [Fix]: Properly read empty strings and allow reading headers only by @fsoubelet in https://github.com/pylhc/tfs/pull/116
Full Changelog: https://github.com/pylhc/tfs/compare/v3.4.0...v3.5.0
- Python
Published by fsoubelet about 3 years ago
tfs-pandas - Release 3.4.0
Release 3.4.0 adds the functionality to read and write compressed files to tfs-pandas.
Just use tfs.read/tfs.write normally with compressed files and enjoy.
What's Changed
- Python 3.11 in Github Workflows and Readme additions by @fsoubelet in https://github.com/pylhc/tfs/pull/111
- [Feature]: reading and writing compressed files by @fsoubelet in https://github.com/pylhc/tfs/pull/113
Full Changelog: https://github.com/pylhc/tfs/compare/v3.3.1...v3.4.0
- Python
Published by fsoubelet over 3 years ago
tfs-pandas - Release 3.3.1
Release 3.3.1 brings a slight performance improvement in file loading.
- Changed:
- The column types are assigned at read time and not later on, which should speed up loading for large data frames and/or slower machines.
What's Changed
- Assign column types at read time by @fsoubelet in https://github.com/pylhc/tfs/pull/110
Full Changelog: https://github.com/pylhc/tfs/compare/v3.3.0...v3.3.1
- Python
Published by fsoubelet over 3 years ago
tfs-pandas - Release 3.3.0
Release 3.3.0 adds features regarding data frame validation and quality of life improvements.
Added:
- The option is now given to the user to skip data frame validation after reading from file / before writing to file. Validation is left on by default, but can be turned off with a boolean argument.
Changes:
- The
tfs.frame.validatefunction has seen its internal logic reworked to be more efficient and users performing validation on large data frames should notice a significant performance improvement. - The documentation has been expanded and improved, with notably the addition of example code snippets.
- The
Related PRs
- Optional validation step (and documentation improvements) by @fsoubelet in https://github.com/pylhc/tfs/pull/107
- Faster dataframe validation by @fsoubelet in https://github.com/pylhc/tfs/pull/109
Full Changelog: https://github.com/pylhc/tfs/compare/3.2.1...v3.3.0
- Python
Published by fsoubelet over 3 years ago
tfs-pandas - Release 3.2.1
- removed check for spaces in headers
- Python
Published by JoschD over 3 years ago
tfs-pandas - Release 3.2.0
Release 3.2.0 added a new feature:
- added hdf5 read/write by @JoschD in https://github.com/pylhc/tfs/pull/101
- fully dropped Python 3.6 support
Full Changelog: https://github.com/pylhc/tfs/compare/3.1.0...3.2.0
- Python
Published by JoschD about 4 years ago
tfs-pandas - Release 3.1.0
Release 3.1.0 is a change of behavior.
Fixed:
- Removed dependency on deprecated
numpy.strin favor of the built-instr.
- Removed dependency on deprecated
Changed:
- When an error occurs while reading files and checking dataframes, the error information is now either logged with a
debuglevel (instead of previouslyerror) or simply held into the raised exception.
- When an error occurs while reading files and checking dataframes, the error information is now either logged with a
- Python
Published by fsoubelet over 4 years ago
tfs-pandas - Release 3.0.2
Release 3.0.2 is a patch release.
- Fixed:
- The string representation of empty headers used to wrongly print
None, and will now correctly be an empty string.
- The string representation of empty headers used to wrongly print
- Python
Published by fsoubelet over 4 years ago
tfs-pandas - Release 3.0.1
Release 3.0.1 is a patch release.
- Fixed:
- Merging functionality from
TfsDataFrame.append,TfsDataFrame.join,TfsDataFrame.mergeandtfs.concatdo not crash anymore when encountering apandas.DataFrame(or more fortfs.concat) in their input. Signatures have been updated and tests were added for this behavior.
- Merging functionality from
- Python
Published by fsoubelet over 4 years ago
tfs-pandas - Release 3.0.0
Release 3.0.0: Breaking changes and long-term bug fix.
A long-standing issue where merging functionality used on TfsDataFrame (through .merge or pandas.concat for instance) would cause them to be cast back to pandas.DataFrame and lose their headers has been patched.
Breaking changes:
- The internal API has been reworked for clarity and consistency. Note that anyone previously using the high-level exports
tfs.read,tfs.writeandtfs.TfsDataFramewill not be affected.
- The internal API has been reworked for clarity and consistency. Note that anyone previously using the high-level exports
Added:
- The
TfsDataFrameclass now has new.append,.joinand.mergemethods wrapping the inherited methods of the same name and fixing the aforementioned issue. - A
tfs.frame.concatfunction, exported astfs.concat, has been added to wrappandas.concatand fix the aforementioned issue. - A
tfs.frame.merge_headersfunction has been added. - Top level exports are now:
tfs.TfsDataFrame,tfs.read,tfs.writeandtfs.concat.
- The
Changes:
- The
tfs.frame.validatefunction is now a public-facing documented API and may be used stably. - The
write_tfsfunction now appends anEOL(\n) at the end of the file when writing out for visual clarity and readability. This is a purely cosmetic and does not change functionality / compatibility of the files. - Documentation and README have been updated and cleared up.
- The
Please do refer to the documentation for the use of the new merging functionality to be aware of caveats, especially when merging headers.
- Python
Published by fsoubelet over 4 years ago
tfs-pandas - Release 2.1.0
Release 2.1.0 is a QoL change, bringing much faster loading of TFS files for users.
- Changes:
- The parsing in
read_tfshas been reworked to make use ofpandas's C engine, resulting in drastic performance improvements when loading files. No functionality was lost or changed.
- The parsing in
- Python
Published by fsoubelet almost 5 years ago
tfs-pandas - Release 2.0.3
Fixed:
- Took care of a
numpydeprecation warning when usingnp.str, which should not appear anymore for users.
- Took care of a
Changes:
- Prior to version
2.0.3, reading and writing would raise aTfsFormatErrorin case of non-unique indices or columns. From now on, this behavior is an option inread_tfsandwrite_tfscallednon_unique_behaviorwhich by default is set to log a warning. If explicitely asked by the user, the failed check will raise aTfsFormatError.
- Prior to version
- Python
Published by fsoubelet almost 5 years ago
tfs-pandas - Release 2.0.2
- Fixed:
- Proper error on non-string columns
- Writing numeric-only mixed type dataframes bug
- Python
Published by JoschD over 5 years ago
tfs-pandas - Release 2.0.1
- Fixed:
- No longer warns on MAD-X styled string column types (
%[num]s). - Documentation is up-to-date, and plays nicely with
Sphinx's parsing.
- No longer warns on MAD-X styled string column types (
- Python
Published by fsoubelet over 5 years ago
tfs-pandas - v2.0.0
Release 2.0.0: Breaking changes, fixes and more
Breaking changes: - FixedColumn, FixedColumnCollection and FixedTfs have been removed from the package - Objects are not converted to strings upon read anymore, and will raise an error - Minimum pandas version is 1.0
Fixes: - No longer writes an empty line to file in case of empty headers - "Planed" dataframes capitalize plane key attributes to be consistent with other pylhc packages, however they can be accessed with and without capitalizing your query
Changes: - Minimum required numpy version is now 1.19 - Full tests across supported Python versions and operating systems have been implemented - Significant digits function can return the result as floats if ask to
Miscellaneous: - Removed unused test dependencies - Removed setup_requires as it is deprecated - Reworked setup.py to be consistent with that of pylhc/omc3 - Improved testing and test coverage - Improved logging - Type hinting, docstrings and formatting
- Python
Published by fsoubelet over 5 years ago