All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Some typos in docs, comments and examples
- Put back some translations that were removed
- Minor python tidyups
- Avoid deprecation warning from the ijson package. #458
- We no longer support Python 3.7 - security support has ended
- We no longer support Python 3.8 - security support ends 31 Oct 2024
- Ignore null characters in the input CSV file when getting non-header rows
- When unflatteneing XML, avoid errors due to namespaces causing colons in sheet names, by replacing them with dashes #456
- Use custom warnings and exceptions #450 #451
- Add example pip install command to geo dependencies missing warning #445
- When outputting XML, handle namespaces that don't cover the whole file #456
-
Don't error when there's a datetime in the header #438
-
Ignore null characters in the input CSV file when reading configuration from the header rows #446
- If
json_dict
is not a dict, return a useful error/warning #442
- Rename
_get_column_letter
import toget_colunmn_letter
for compatibility with latest openpyxl #443
- Ignore null characters in the input CSV file when getting header rows #435
- New "geo" optional python dependency and some existing python dependencies moved to it. If you were using this functionality before, you'll need to start installing "geo" to get same behaviour. #424 #433
- Flatten & Create Template: Previously, CSV filenames were truncated to 31 characters, which is the maximum length of a sheet name in Excel. Now allow CSV filenames of any length and only truncate sheet names when the output format is XLSX or ODS. #428
- flatten --sheet-prefix option does not work in ODS files #430
- Generate templates that are correct for WKT <-> geojson conversion
- WKT <-> geojson conversion for flattening and unflattening, behind an optional flag #419
- We no longer support Python 3.6
- Import backports-datetime-fromisoformat only if needed, to fix PyPy 3.7 support
- Add
--line-terminator
option toflatten
andcreate-template
- Make work with multiple versions of jsonref
- Lock to a version of jsonref<1 to avoid breaking changes in 1.0.0
- Add support for flattening an array of arrays #398
- Handle extensions in the schema xsd correctly when sorting OpenDataServices/cove#1366
- Use backports-datetime-fromisoformat only if needed, to fix PyPy 3.7 support #386
- We no longer support Python 3.5
- Don't fail when an .ods column header is empty #378
- Fix another number formatting .ods bug #383
- Reduce memory footprint of flattening #376
- Fix parsing date and number formatting from .ods files #373
- flattening: Uses much less memory by storing data in a embedded ZODB database, using ijson and using write only mode in pyopenxl.
- use-titles: Use $ref'erring title if available #368
- create-template --no-deprecated-fields: Did not work if deprecated element at same level as a $ref #185 (comment)
- Don't fail if compiled translation files (.mo) don't exist, and Django isn't installed
- Fix some incorrect assumptions about types
- Allow XML IDs to be attributes
- Don't fail if compiled translation files (.mo) don't exist
- Add Spanish translation for all strings that could appear in the CoVE web UI #362
- Fix use of titles for sheet names, to avoid KeyError when a field is missing from the schema
- Include sheet name with duplicate heading warnings.
- When
--use-titles
is specified, also use the titles for sheet names (ie. Excel tabs and CSV filenames)
- Add support for
"format": "date"
in a JSON schema
- All code has had black and isort applied. These have been added to Travis.
- Remove extra lines in CSVs under Windows #350
- Add .ods (OpenDocument Spreadsheet) file format support #326
- Drop Python 2 support #299
- Documentation on Change Logs, Versioning and PyPi updated to match current practice.
- Add BadXLSXZipFile exception type for BadZipFile exception when handling broken XLSX files related to cove issue OpenDataServices/cove#514
- Add an XML declaration to outputted XML files OpenDataServices/cove#1206
- --preserve-fields option to the cli so the user can specify which fields to keep when flattening, instead of defaulting to all of them
- Correct cell source map when hashcomments is used.
- Using --rollup with
flatten
accepts fields to roll up as input directly and via a file, as well as via a schema. - Fixed pytest version at <5 because of breaking changes to the tests.
- Ignore NoneType in json instead of giving a TypeError.
- A -v verbose option to the cli to generate more verbose output.
- A --truncation-length option to create-template and flatten
- A --no-deprecated-fields option to create-template.
- Output on the command line is by default less verbose
- openpyxl of at least 2.6 is required #287
- For Python 3, 3.5 or later is required
- (XML only) Ensure the same path isn't split across multiple sheets - #293
- While trying to decode JSON, if there is a UTF8 error raise the new exception class BadlyFormedJSONErrorUTF8. (This extends the old BadlyFormedJSONError exception, so existing code that checks sensibly should be fine.)
- Add --disable-local-refs to flatten, unflatten and create-template.
- Add --remove-empty-schema-columns flag to flatten OpenDataServices/cove#1019
- Add --xml-comment to unflatten.
- Commands from command line overridden individually by commands in the metatab. Previously all commands taken from metatab and the rest ignored if only one was added.
- In setup.py, set author and author_email to general values.
- create-template: If --output-format is xlsx, the default --output-name is template.xlsx instead of template.
- flatten: If --output-format is xlsx, the default --output-name is flattened.xlsx instead of flattened.
- Add a spreadsheet configuration variable for id_name (called IDName).
- Add --root-is-list to flatten and unflatten.
- Add --sheet-prefix to flatten.
- Add --filter-field and --filter-value to flatten.
- Added new BODS page to docs.
- Ignore elements that don't exist in the schema, whilst sorting XML. Previously an exception was raised. #218
- Fix: unflatten would crash if given a csv with an empty first row #229
- Clarified meaning of headerrows in docs. #230
- Tool can work with schemas that have refs to local files (part of #225 )
- Schema loader can work with schemas that have 'oneOf' (part of #225 )
- Sort XML according to provided schema(s) #196
- Remove Python 3.3 support https://github.com/OpenDataServices/flatten-tool/commit/636cf988ff7e5247a089b22061f0fe7767ea81b4
(As there are new features, this should have been a minor release. Just noting so we pick this up for future releases.)
(This release was documented after the release and some things may have been missed.)
- Add missing comma to CSV fixture #203
- Do not hard code iati-activities for top level for all XML #150
- Don't split text value of XML array #208
Initial Release.