You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Fixed a regression where the writing of a `pd.Series`-like object to disk was raising an error. It is now possible again.
7
+
3
8
## Version 3.7.2
4
9
5
10
- Fixed:
6
-
- fixing the issues with `pandas` >= `v2.1.0` (see `tfs-pandas``v3.7.1`) by overwriting the `_constructor_from_mgr` function.
11
+
- fixing the issues with `pandas` >= `v2.1.0` (see `tfs-pandas``v3.7.1`) by overwriting the `_constructor_from_mgr` function.
7
12
8
13
## Version 3.7.1
9
14
10
15
- Changed:
11
-
- The dependency on `pandas` was restricted to avoid the latest version, `2.1.0` and above as a temporary workaround to an attribute access bug that arose with it.
16
+
- The dependency on `pandas` was restricted to avoid the latest version, `2.1.0` and above as a temporary workaround to an attribute access bug that arose with it.
12
17
13
18
## Version 3.7.0
14
19
15
20
Minor API changes to the `TFSCollections`:
16
-
- the old `write_to` and `get_filename` are renamed to `_write_to` and `_get_filename` as they
21
+
22
+
- the old `write_to` and `get_filename` are renamed to `_write_to` and `_get_filename` as they
17
23
could only be accessed internally (due to the input parameters not available to the user).
18
24
This also means, that - in case they are overwritten by a user's implementation - they need to be renamed there!!
19
25
20
-
- The column which is set as index can now also be defined manually, by overwriting the attribute `INDEX`, which defaults to `"NAME"`.
26
+
- The column which is set as index can now also be defined manually, by overwriting the attribute `INDEX`, which defaults to `"NAME"`.
21
27
22
-
- New Functions of `TFSCollection` Instances:
23
-
-`get_filename(name)`: Returns the associated filename to the property with name `name`.
24
-
-`get_path(name)`: Return the actual file path of the property `name`
25
-
-`flush()`: Write the current state of the TFSDataFrames into their respective files.
26
-
-`write_tfs(filename, data_frame)`: Write the `data_frame` to `self.directory` with the given `filename`.
28
+
- New Functions of `TFSCollection` Instances:
29
+
-`get_filename(name)`: Returns the associated filename to the property with name `name`.
30
+
-`get_path(name)`: Return the actual file path of the property `name`
31
+
-`flush()`: Write the current state of the TFSDataFrames into their respective files.
32
+
-`write_tfs(filename, data_frame)`: Write the `data_frame` to `self.directory` with the given `filename`.
27
33
28
-
- New Special Properties of `TFSCollection` Instances:
29
-
-`defined_properties`: Tuple of strings of the defined properties on this instance.
30
-
-`filenames` is a convenience wrapper for `get_filename()`:
31
-
- When called (`filenames(exist: bool)`) returns a dictionary of the defined properties and their associated filenames.
34
+
- New Special Properties of `TFSCollection` Instances:
35
+
-`defined_properties`: Tuple of strings of the defined properties on this instance.
36
+
-`filenames` is a convenience wrapper for `get_filename()`:
37
+
- When called (`filenames(exist: bool)`) returns a dictionary of the defined properties and their associated filenames.
32
38
The `exist` boolean filters between existing files or filenames for all properties.
33
-
- Can also be used either `filenames.name` or `filenames[name]` to call `get_filename(name)` on the instance.
39
+
- Can also be used either `filenames.name` or `filenames[name]` to call `get_filename(name)` on the instance.
34
40
35
-
- Moved the define-properties functions directly into the `Tfs`-attribute marker class.
36
-
- Return of `None` for the `MaybeCall` class in case of attribute not found (instead of empty function, which didn't make sense).
41
+
- Moved the define-properties functions directly into the `Tfs`-attribute marker class.
42
+
- Return of `None` for the `MaybeCall` class in case of attribute not found (instead of empty function, which didn't make sense).
37
43
38
44
## Version 3.6.0
39
45
@@ -56,177 +62,184 @@ Minor API changes to the `TFSCollections`:
56
62
## Version 3.5.1
57
63
58
64
- Fixed:
59
-
- Allow reading of empty lines in headers again.
65
+
- Allow reading of empty lines in headers again.
60
66
61
67
## Version 3.5.0
62
68
63
69
- Fixed:
64
-
- Any empty strings ("") in a file's columns will now properly be read as such and not converted to `NaN`.
70
+
- Any empty strings ("") in a file's columns will now properly be read as such and not converted to `NaN`.
65
71
66
72
- Added:
67
73
- 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 from `tfs.reader`.
68
74
69
75
## Version 3.4.0
70
76
71
77
- Added:
72
-
- The `read_tfs` and `write_tfs` functions can now handle reading / writing compressed files, see documentation for details.
78
+
- The `read_tfs` and `write_tfs` functions can now handle reading / writing compressed files, see documentation for details.
73
79
74
80
## Version 3.3.1
75
81
76
82
- Changed:
77
-
- Column types are now assigned at read time instead of later on, which should improve performance for large data frames.
83
+
- Column types are now assigned at read time instead of later on, which should improve performance for large data frames.
78
84
79
85
## Version 3.3.0
80
86
81
87
- Added:
82
-
- 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.
88
+
- 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.
83
89
84
90
- Changes:
85
-
- The `tfs.frame.validate` function has seen its internal logic reworked to be more efficient and users performing validation on large data frames should notice a significant performance improvement.
86
-
- The documentation has been expanded and improved, with notably the addition of example code snippets.
91
+
- The `tfs.frame.validate` function has seen its internal logic reworked to be more efficient and users performing validation on large data frames should notice a significant performance improvement.
92
+
- The documentation has been expanded and improved, with notably the addition of example code snippets.
87
93
88
94
## Version 3.2.1
89
95
90
96
- Changed:
91
-
- Allow spaces in header names.
97
+
- Allow spaces in header names.
92
98
93
99
## Version 3.2.0
94
100
95
-
- Added:
96
-
- HDF5 read/write.
101
+
- Added:
102
+
- HDF5 read/write.
97
103
98
104
- Changed:
99
105
- The minimum required Python version is now `3.7`.
100
106
101
107
## Version 3.1.0
102
108
103
109
- Fixed:
104
-
- Removed dependency on depricated `numpy.str`
110
+
- Removed dependency on depricated `numpy.str`
105
111
106
112
- Changed:
107
-
- No logging of error messages internally for reading files and checking dataframes.
113
+
- No logging of error messages internally for reading files and checking dataframes.
108
114
Instead logging is either moved to `debug`-level or all info is now in the error message itself
109
115
to be handled externally by the user.
110
116
111
117
## Version 3.0.2
112
118
113
119
- Fixed:
114
-
- String representation of empty headers is fixed (accidentally printed 'None' before).
120
+
- String representation of empty headers is fixed (accidentally printed 'None' before).
115
121
116
122
## Version 3.0.1
117
123
118
124
- Fixed:
119
-
- Merging functionality from `TfsDataFrame.append`, `TfsDataFrame.join`, `TfsDataFrame.merge` and `tfs.concat` do not crash anymore when encountering a `pandas.DataFrame` (or more for `tfs.concat`) in their input. Signatures have been updated and tests were added for this behavior.
125
+
- Merging functionality from `TfsDataFrame.append`, `TfsDataFrame.join`, `TfsDataFrame.merge` and `tfs.concat` do not crash anymore when encountering a `pandas.DataFrame` (or more for `tfs.concat`) in their input. Signatures have been updated and tests were added for this behavior.
120
126
121
127
## Version 3.0.0
122
128
123
129
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.
124
130
125
131
- Breaking changes:
126
-
- The internal API has been reworked for clarity and consistency. Note that anyone previously using the high-level exports `tfs.read`, `tfs.write` and `tfs.TfsDataFrame`**will not be affected**.
132
+
- The internal API has been reworked for clarity and consistency. Note that anyone previously using the high-level exports `tfs.read`, `tfs.write` and `tfs.TfsDataFrame`**will not be affected**.
127
133
128
134
- Added:
129
-
- The `TfsDataFrame` class now has new `.append`, `.join` and `.merge` methods wrapping the inherited methods of the same name and fixing the aforementioned issue.
130
-
- A `tfs.frame.concat` function, exported as `tfs.concat`, has been added to wrap `pandas.concat` and fix the aforementioned issue.
131
-
- A `tfs.frame.merge_headers` function has been added.
132
-
- Top level exports are now: `tfs.TfsDataFrame`, `tfs.read`, `tfs.write` and `tfs.concat`.
135
+
- The `TfsDataFrame` class now has new `.append`, `.join` and `.merge` methods wrapping the inherited methods of the same name and fixing the aforementioned issue.
136
+
- A `tfs.frame.concat` function, exported as `tfs.concat`, has been added to wrap `pandas.concat` and fix the aforementioned issue.
137
+
- A `tfs.frame.merge_headers` function has been added.
138
+
- Top level exports are now: `tfs.TfsDataFrame`, `tfs.read`, `tfs.write` and `tfs.concat`.
133
139
134
140
- Changes:
135
-
- The `tfs.frame.validate` function is now a public-facing documented API and may be used stably.
136
-
- The `write_tfs` function now appends an `EOL` (`\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.
137
-
- Documentation and README have been updated and cleared up.
141
+
- The `tfs.frame.validate` function is now a public-facing documented API and may be used stably.
142
+
- The `write_tfs` function now appends an `EOL` (`\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.
143
+
- Documentation and README have been updated and cleared up.
138
144
139
145
Please do refer to the documentation for the use of the new merging functionality to be aware of caveats, especially when merging headers.
140
146
141
-
142
147
## Version 2.1.0
143
148
144
149
- Changes:
145
-
- The parsing in `read_tfs` has been reworked to make use of `pandas`'s C engine, resulting in drastic performance improvements when loading files. No functionality was lost or changed.
150
+
- The parsing in `read_tfs` has been reworked to make use of `pandas`'s C engine, resulting in drastic performance improvements when loading files. No functionality was lost or changed.
146
151
147
152
## Version 2.0.3
148
153
149
154
- Fixed:
150
-
- Took care of a numpy deprecation warning when using `np.str`, which should not appear anymore for users.
155
+
- Took care of a numpy deprecation warning when using `np.str`, which should not appear anymore for users.
151
156
152
157
- Changes:
153
-
- Prior to version `2.0.3`, reading and writing would raise a `TfsFormatError` in case of non-unique indices or columns. From now on, this behavior is an option in `read_tfs` and `write_tfs`called `non_unique_bahvior` which by default is set to log a warning. If explicitely asked by the user, the failed check will raise a `TfsFormatError`.
158
+
- Prior to version `2.0.3`, reading and writing would raise a `TfsFormatError` in case of non-unique indices or columns. From now on, this behavior is an option in `read_tfs` and `write_tfs`called `non_unique_bahvior` which by default is set to log a warning. If explicitely asked by the user, the failed check will raise a `TfsFormatError`.
154
159
155
160
## Version 2.0.2
161
+
156
162
- Fixed:
157
-
- Proper error on non-string columns
158
-
- Writing numeric-only mixed type dataframes bug
163
+
- Proper error on non-string columns
164
+
- Writing numeric-only mixed type dataframes bug
159
165
160
166
## Version 2.0.1
167
+
161
168
- Fixed:
162
-
- No longer warns on MAD-X styled string column types (`%[num]s`).
163
-
- Documentation is up-to-date, and plays nicely with `Sphinx`'s parsing.
164
-
- Fix a wrong type hint.
169
+
- No longer warns on MAD-X styled string column types (`%[num]s`).
170
+
- Documentation is up-to-date, and plays nicely with `Sphinx`'s parsing.
171
+
- Fix a wrong type hint.
165
172
166
173
## Version 2.0.0
174
+
167
175
- Breaking Changes:
168
-
-`FixedColumn`, `FixedColumnCollection` and `FixedTfs` have been removed from the package
169
-
- Objects are not converted to strings upon read anymore, and will raise an error
170
-
- Minimum pandas version is 1.0
176
+
-`FixedColumn`, `FixedColumnCollection` and `FixedTfs` have been removed from the package
177
+
- Objects are not converted to strings upon read anymore, and will raise an error
178
+
- Minimum pandas version is 1.0
171
179
172
180
- Fixed:
173
-
- No longer writes an empty line to file in case of empty headers
174
-
- "Planed" dataframes capitalize plane key attributes to be consistent with other `pylhc` packages, however they can be accessed with and without capitalizing your query.
181
+
- No longer writes an empty line to file in case of empty headers
182
+
- "Planed" dataframes capitalize plane key attributes to be consistent with other `pylhc` packages, however they can be accessed with and without capitalizing your query.
175
183
176
184
- Changes:
177
-
- Minimum required `numpy` version is now 1.19
178
-
- TfsDataFrames now automatically cast themselves to pandas datatypes using `.convert_dtypes()`
179
-
- Lighter dependency matrix
180
-
- Full testing of supported Python versions across linux, macOS and windows systems through Github Actions
185
+
- Minimum required `numpy` version is now 1.19
186
+
- TfsDataFrames now automatically cast themselves to pandas datatypes using `.convert_dtypes()`
187
+
- Lighter dependency matrix
188
+
- Full testing of supported Python versions across linux, macOS and windows systems through Github Actions
181
189
182
190
## Version 1.0.5
191
+
183
192
- Fixed:
184
-
- Bug with testing for headers, also in pandas DataFrames
185
-
- Same testing method for all data-frame comparisons
186
-
- Some minor fixes
193
+
- Bug with testing for headers, also in pandas DataFrames
194
+
- Same testing method for all data-frame comparisons
195
+
- Some minor fixes
187
196
188
197
- Added:
189
-
- Testing of writing of pandas DataFrames
190
-
198
+
- Testing of writing of pandas DataFrames
191
199
192
200
## Version 1.0.4
193
-
- Added:
194
-
- support for pathlib Paths
195
-
- strings with spaces support (all strings in data are quoted)
196
-
- more validation checks (no spaces in header/columns)
197
-
- nicer string representation
198
-
- left-align of index-column
199
201
200
-
- Removed:
201
-
-`.indx` from class (use `index="NAME"` instead)
202
+
- Added:
203
+
- support for pathlib Paths
204
+
- strings with spaces support (all strings in data are quoted)
205
+
- more validation checks (no spaces in header/columns)
206
+
- nicer string representation
207
+
- left-align of index-column
208
+
209
+
- Removed:
210
+
-`.indx` from class (use `index="NAME"` instead)
202
211
203
-
- Fixed:
204
-
- Writing of empty dataframes
205
-
- Doc imports
206
-
- Minor bugfixes
212
+
- Fixed:
213
+
- Writing of empty dataframes
214
+
- Doc imports
215
+
- Minor bugfixes
207
216
208
217
## Version 1.0.3
209
-
- Fixed:
210
-
- From relative to absolute imports (IMPORTANT FIX!!)
218
+
219
+
- Fixed:
220
+
- From relative to absolute imports (IMPORTANT FIX!!)
211
221
212
222
## Version 1.0.2
213
-
- Fixed:
214
-
- Additional index column after writing is removed again
215
-
- Renamded sigificant_numbers to significant_digits
216
-
- significant_digits throws proper error if zero-error is given
217
223
218
-
- Added:
219
-
- Fixed Dataframe Class
220
-
- Type Annotations
224
+
- Fixed:
225
+
- Additional index column after writing is removed again
226
+
- Renamded sigificant_numbers to significant_digits
227
+
- significant_digits throws proper error if zero-error is given
0 commit comments