Skip to content

Commit 4abe4ef

Browse files
committed
[CHANGELOG] Add previous releases
1 parent d31c0c8 commit 4abe4ef

File tree

1 file changed

+230
-0
lines changed

1 file changed

+230
-0
lines changed

CHANGELOG.md

Lines changed: 230 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,234 @@
22

33
Used to collect all changes and references until the next release.
44

5+
# Version 1.4.0
6+
## Breaking changes
57

8+
The switch from odML version 1.3 to 1.4 contains many cool updates which should make work more comfortable, but also includes some breaking changes.
9+
10+
### Update of the odML file format version
11+
- The odML format version number in odML files has changed from "1" to "1.1".
12+
13+
### Changes in odML classes
14+
- The odML class hierarchy has been flattened:
15+
- removing `base._baseobj` class, leaving `BaseObject` as the root odML class.
16+
- removing `doc.Document` class, leaving `BaseDocument` as the only odML Document class.
17+
- removing `section.Section` class, leaving `BaseSection` as the only odML Section class.
18+
- removing `property.Property` class leaving `BaseProperty` as the only odML Property class.
19+
- `baseobject` and `sectionable` are renamed to `BaseObject` and `Sectionable` respectively.
20+
- `base.SafeList` and `base.SmartList` have been merged, `base.SafeList` has been removed.
21+
- `base.SmartList` can now only contain Sections or Properties. See #272.
22+
- The `reorder` method is moved from the `base` to the `Section` class. See #267.
23+
24+
### Changes in Value handling:
25+
- The `Value` class has been removed.
26+
- `Property.value` now always holds a list of uniform values. `Property.value` always
27+
returns a copy of the actual value list. See #227.
28+
- Values can only be changed directly via the `__setitem__` method of a `Property`
29+
- `Value` attributes `uncertainty`, `unit`, `dtype` and `reference` have been moved to
30+
`Property` and now apply to all values of the `Property.value` list.
31+
- The `Value` attributes `filename`, `encoder` and `checksum` have been removed.
32+
33+
### DType changes:
34+
- The `binary` dtype has been removed. Providing binary content via odML files is
35+
discouraged in favor of providing a reference to the origin files using the `URL`
36+
dtype instead.
37+
38+
### Mapping
39+
- Any `mapping` functionality has been removed.
40+
41+
### Minor breaking changes
42+
- `XMLReader.fromFile()` and `.fromString()` have been renamed to `.from_file()` and `.from_string()` respectively.
43+
44+
45+
## Features and changes
46+
47+
### Required odML entity attributes handling
48+
- Required attributes of odML entities in `odml.format` where changed: `Section.name`,
49+
`Section.type` and `Property.name` are the only attributes set to be required for
50+
their respective odML entities. See #240.
51+
- `Section.name` and `Property.name` can now be `None` on init. If this is the case, the
52+
entities' `id` value is used as `name` value.
53+
- Hardcoded checks for existing `name` attributes in the XML Parser are removed. Only
54+
attributes set as required in `format` are now used to check for missing required odML
55+
entity attributes. See #241.
56+
- The `name` attribute of a `Section` or a `Property` can now only be rewritten if there
57+
is no sibling with the same name on the same hierarchical level. See #283.
58+
59+
### Addition of the 'id' attribute
60+
- `Document`, `Section` and `Property` now have an `id` attribute to uniquely identify any
61+
entity. If no valid id is provided when an entity is initialized, an id is
62+
automatically generated and assigned.
63+
- Adding the `new_id()` method to `Document`, `Section` and `Property` which generates
64+
and sets a new valid id for any entity. See #262.
65+
66+
### Changes in DType handling
67+
- Setting a dtype now also supports odML style tuple types. See #254.
68+
- DTypes now always return the defined default values if a value is `None` or `""`.
69+
- Any boolean dtype value other than `"false", "f", 0, False, "true", "t", 1` or `True`
70+
will now raise a `ValueError`. See #224
71+
72+
### 'base.Sectionable' (Document and Section) changes
73+
- Adds a `base.Sectionable.extend` method for child Sections and Properties. See #237.
74+
- Refactors the `base.Sectionable.insert` and `.append` methods. Only proper
75+
`BaseSections` with a unique name can be added to the Section child list of a
76+
`Sectionable`.
77+
- Appending multiple Sections or Properties has been removed from the `append` method to
78+
mirror Property `append` functionality and since `extend` now serves this need.
79+
80+
### 'Section' and 'Property' merge
81+
- `Property` now provides a `merge` method to merge two properties. This will sync all but
82+
the dependency and dependencyValue attributes. ValueErrors are raised, if information
83+
is set in both properties but are in conflict. See #221.
84+
- Adds a `Section.merge_check()` method which validates whether a Section including all
85+
its sub-sections and sub-properties can properly be merged. A `ValueError` is raised
86+
if any potential merge problem arises. This is necessary since a recursive Section
87+
merge cannot be easily rolled back once begun.
88+
- A Section merge imports `reference` and `definition` from the "source" Section if they
89+
were `None` in the "destination" Section. See #273.
90+
- Adds a `strict` flag to any `merge` method. Now all `Section` and `Property` attribute
91+
checks during a merge will only be done, if `strict=True`. On `strict=False` a
92+
`Section` or `Property` attribute will only be replaced with the "source" value, if
93+
the "destination" value is `None`. Otherwise the "destination" value will be kept and
94+
the "source" value lost. See #270.
95+
96+
### Changes of 'Section' and 'Property' clone
97+
- When a `Section` or a `Property` is cloned, a new id is set for the clone and of any
98+
cloned children. See #259.
99+
100+
### 'Document' changes
101+
- Tuples of Sections can now no longer be used with `Document.append` since
102+
`Document.extend` should be used to add multiple new Sections to a Document.
103+
104+
### 'Section' changes
105+
- Adds a `Section.extend` method.
106+
107+
### 'Property' changes
108+
- `Property` has the new attribute `value_origin` which may contain the origin of the
109+
property's value e.g. a filename.
110+
- `Property` init now supports setting all attributes as well as its parent.
111+
- `Property` now provides `append`, `extend` and `remove` methods to change the actual
112+
value list. This approach is required to ensure DType checks when adding new values
113+
to an existing list. See #223.
114+
- Only valid dtypes can now be set on `Property` init. See #253.
115+
116+
### Terminology changes
117+
- The default odML terminology repository is set to `http://portal.g-node.org/odml/terminologies/v1.1/terminologies.xml`.
118+
119+
### Changes in Tools and IO
120+
- The `XMLParser` can now be run in warning mode: any errors encountered during parsing
121+
will just print a warning, but will not stop and exit during the parsing process.
122+
- An odML document can now only be saved, if the validation does not show any errors.
123+
Saving an invalid document will stop the process before saving and print all
124+
encountered errors.
125+
- All parsers are now more relaxed when encountering unsupported or missing tags and only
126+
print warnings instead of ending with an exception. Warnings are collected and can be
127+
accessed via the parser object.
128+
- When trying to open a file with any of the odML parsers, the document format version
129+
number is checked. If the version number does not match the supported one, file
130+
loading will fail with an exception.
131+
132+
## New tools
133+
- Added the `tools.RDFWriter` and `toosl.RDFReader` classes, which enable the export of
134+
odML documents to RDF and also provides the used ontology OWL file at `doc/odml_terminology/`.
135+
- Added the `tools.ODMLWriter` and `tools.ODMLReader` classes which serve as an easy
136+
entry point to saving and loading for all the supported file formats `XML`, `YAML`,
137+
`JSON` and `RDF`.
138+
- Added the `tools.DictWriter` and `tools.DictReader` classes which convert Python
139+
dictionary data to odML data and vice versa, which in turn is required for both YAML
140+
and JSON format loading and saving.
141+
- Removed the `tools.jsonparser` file which is no longer required due to the classes in
142+
`tools.odmlparser` and `tools.dict_parser`.
143+
- Added the `tools.FormatConverter` class which enables batch conversion of one odML
144+
format into another.
145+
- Added the `tools.VersionConverter` class which enables conversion of pre-v1.4 odML files
146+
into valid v1.4 odML.
147+
- The `VersionConverter` converts `XML`, `JSON` and `YAML` based odML files of odML file
148+
version 1.0 to odML file version 1.1.
149+
- Only attributes supported by `Document`, `Section` and `Property` are exported. Any
150+
non supported attribute will produce a warning message, the content will be
151+
discarded.
152+
- The value content is moved from a `Value` object to its parent `Property` value list.
153+
- The first encountered `unit` or `uncertainty` of values of a `Property` will be moved
154+
to its parent `Property`. Any differing subsequent `unit` or `uncertainty` of
155+
values of the same `Property` will produce a warning message, the content will be
156+
discarded.
157+
- The first `filename` attribute content of a `Value` is moved to the `value_origin`
158+
attribute of its parent `Property`.
159+
- Any g-node terminology URL in `repository` or `link` is updated from v1.0 to their
160+
v1.1 counterparts if available.
161+
- A `VersionConverter` object provides a `.conversion_log` list attribute to access all
162+
info and warning messages after a conversion has taken place. See #234.
163+
164+
## Fixes
165+
- Various installation issues have been resolved for Linux and MacOS.
166+
- `False` as well as `F` are now properly converted to bool values in both
167+
Python 2 and 3. See #222.
168+
- Fixes saving datetime related values to JSON. See #248.
169+
- odML style custom tuples can now properly be saved using the `XMLParser`.
170+
- `Document` now properly uses the dtypes date setter on init. See #249.
171+
- Fixes load errors on Empty and `None` boolean and datetime related values. See #245.
172+
- Excludes `id` when comparing odML entities for equality. See #260.
173+
- When a `Property` is cloned, the parent of the clone is now properly set to `None`.
174+
- Avoids an `AttributeError` on `get_path()` when a `Property` has no parent. See #256.
175+
- Avoids an `AttributeError` on `get_merged_equivalent()` when a `Property`
176+
has no parent. See #257.
177+
- Avoids an error on `Property.append()`, if the dtype was not set. See #266.
178+
- Makes sure that `Property.append()` exits on empty values but accepts `0` and `False`.
179+
- Sets `Property.uncertainty` to `None` if an empty string is passed to it.
180+
- Changes the `Property.__init__` set attributes order: In the previous set attribute
181+
order, the repository attribute was overwritten with `None` by the `super.__init__`
182+
after it had been set.
183+
- Fixes set `Property.parent = None` bugs in `remove()` and `insert()` methods.
184+
- Consistently use relative imports to address circular imports and remove code that
185+
circumvents previous circular import errors in the `ODMLParser` class. See #199.
186+
- Consistently uses `BaseSection` or `BaseDocument` for isinstance checks throughout
187+
`base` instead of a mixture of `BaseSection` and `Section`.
188+
189+
190+
# Version 1.3.4
191+
192+
## Fixes
193+
- Potential installation issues due to import from `info.py`.
194+
195+
196+
# Version 1.3.3
197+
## Features
198+
199+
- Terminology caching and loading update.
200+
- Terminology section access and type listing functions.
201+
- Define and use common format version number for all parsers.
202+
- Supported format version check: When trying to open a file with any of the odml parsers,
203+
first the document format version number is checked. If the found version number does
204+
not match the supported one, file loading will fail an exception, since this is the
205+
oldest format version. If anyone tries to open a newer format, they should first
206+
update their odML package and not use this one.
207+
- Document saving: An odML document can now only be saved, if the validation does not show
208+
any errors. Saving an invalid document will exit while printing all encountered
209+
errors.
210+
- Parser: All parsers are now more relaxed when encountering unsupported tags or missing
211+
tags and only print warnings instead of ending with an exception. Warnings are
212+
collected and can be accessed via the parser object (required for display in
213+
[odml-ui](https://github.com/G-Node/odml-ui) to avoid potential loss of information).
214+
- Package and format information added or updated: `Version`, `Format version`, `Contact`,
215+
`Homepage`, `Author`, PyPI `Classifiers`, `Copyright`.
216+
- Removes the license text from `setup.py`. The license text interfered with the PyPI
217+
process in a way, that the description was not displayed on PyPI.
218+
- Removes the image folder from the project, since they are exclusively used in the
219+
outsourced [odml-ui](https://github.com/G-Node/odml-ui) project.
220+
221+
## Fixes
222+
- Fixes a bug that prohibits the parsing of `json` or `yaml` files; #191.
223+
- Fixes a bug that fails parsing of `json` or `yaml` files when `Section.repository`, `Section.link` or `Section.include` are present; #194.
224+
225+
226+
# Version 1.3.2
227+
- Expose load, save, and display functions to top level module
228+
- These functions accept a `backend` argument that specifies the parser or writer.
229+
Can be one of `XML`, `JSON`, or `YAML`.
230+
231+
232+
# Version 1.3.1
233+
- move ui to a separate repository https://github.com/g-node/odml-ui
234+
- python3 compatibility
235+
- add json and yaml storage backends

0 commit comments

Comments
 (0)