Changelog

1.0.2

Changed

  • How DefTree determines if a string is a string, int or float, fix for bigger numbers with science annotation

1.0.1

Added

  • Added Element.add_element(name)
  • Added Element.add_attribute(name, value)
  • Added Element.set_attribute(name, value)
  • Added Element.elements() - for getting top level elements of Element
  • Added Element.attribute() - for getting top level attribute of Element
  • Exposed deftree.dump and deftree.validate in the documentation
  • Added DefTree.get_document_path() to get the path of the document that was parsed
  • Attribute are now sub classed into different types this to make it easier when editing values as Defold is picky

Changed

  • Element.iter_all() is now Element.iter()
  • Element.iter_find_elements(name) is now Element.iter_elements(name)
  • Changed how attributes reports their value. They should now be easier to work with, without any need add quotationmarks and such.

Removed

  • Removed SubElement() factory, now use element.add_element()
  • Removed Element.iter_attributes()
  • Removed Element.iter_find_attributes()
  • Removed NaiveDefParser as it was obsolete and inferior
  • Removed Example folder

0.2.0

Added

  • Raises ParseError when reading invalid documents

Changed

  • Updated docstrings to be easier to read.
  • Refactored internal usage of a level variable to track how deep the item were in the tree

Removed

  • Removed Element.add(), use Element.append() Element.insert()
  • Removed Element.items(), use Element.iter_all()

0.1.1

Added

  • Licence to github repository
  • Setup files for PyPi to github repository
  • Example usage
  • Unittesting with unittest
  • Coverage exclusion for usage with Coverage.py
  • Using __all__ to define public api, in case of wild import

Changed

  • Elements __setitem__ raises exception on invalid types
  • Elements __next__ implementation was broken
  • serialize() is now a class method

0.1.0

Added

  • First release of DefTree