Releases: pyecore/pyecore
0.15.1
Features
- Add new JSON options to register a special encoder/decoder for
JsonResource
- Add possibility to "reaffect"
EStructuralFeatures
that are collections. This implies that considering a referencemyref
for an instanceobj
, thenobj.myref = [*instances]
is not allowed. The collection is not replaced per-say, but the collectionmyref
is emptied, and the elements of the collection on the right-side of the affectation are inserted in themyref
collection.
Bugfixes
- Fix issue with JSON resources not using
to_string(...)
forEDataType
instances - Fix issue with multiple re-loading and writing of a resource in the same target file
Miscellaneous
- Deprecate Python 3.7 (needs a special version of
lxml
) - Fix/update english of the README.rst
En memoria de Rosa Nallely Murillo Vazquez (03/12/2023) quien fue una investigadora muy creativa, una increíble química, y tuve suerte de ser su esposo.
0.14.0
Features
- Add json resource in global registry. The json resource is now registered by default, it's not necessary anymore to explicitly register it
- Add argument passing to
Resource
instances from aResourceSet
. This feature allows the user to pass arguments to a resource when usingget_resources
orcreate_resources
from aResourceSet
.
Bugfixes
- Fix issue with file protocol starting with
file:/
. - Fix deserialization of boolean in json resources.
- Fix enum literals serialization in json resources. Depending on the "level" where's defined the EnumerationLiteral, the serialization should be different: (1) if serialization happens at the metamodel level, all the internal information of the EnumerationLiteral should be written in the json file, (2) if serialization happens at the model level (a model uses a literal defined in the metamodel it conforms to), the EnumerationLiteral should be serialized only by its name.
Miscellaneous
- Pass from "beta" to "stable".
- Add pypy 3.9 and 3.10 as target test Python VM.
- Fix CHANGELOG.rst.
0.13.2
0.13.1
0.13.0
- Add support for
EGeneric
super types - Add alternative MRO computation in some cases
- Add attribute handling in
DynamicEPackage
- Add support for item deletion in ordered sets
- Add preservation of order for XMI/JSON serialization and deserialization
- Fix issue with (de)serialization of references in JSON
- Fix missing f-string in JSON resources
- Fix
URI.relative_from_me
method for resources (de)serialization - Fix missing import of
chain
- Drop Python 3.5 support
- Some performance improvement
0.12.0
8.0
Features
-
Add first support for
EDerivedCollection
. The derived collections are
obtained from many features that are also marked as derived. A derived
collection does not stores nor gets direct information, instead it fetches
information from other collection, compute a result and store it. In the
realisation, a derived collection will inherits from a generic derived
collection that only proposed an empty implementation. Then, the
implementation must be manually added. -
Add multi-root support for XMI and JSON resources. XMI and JSON with multiple
roots can now be serialized and deserialized. Their handling is pretty
transparent as the addition of a new root goes through theappend(...)
method. -
Add a
remove(...)
method on resources. This method is pretty much the
opposite of theappend(...)
method on resources, it simply remove a
root from the resource.
Bugfixes
-
Exception when a wrong type value was inserted in a reference for generated
code. The call to theEcoreUtils.isinstance
method were raising an
exception as the last part of the code tries to deal with an unexisting
methods from the generated class. -
Fix
EProxy
'force resolve' for static metamodels. When a proxy is set
towards a static metaclass, the proxy resolution tries to handle the
inverse reference list which only exists in the.eClass
"level".
Consequently, when a static metaclass is used, the correspondingEClass
instance must be used.
Miscellaneous
- Add new module for basic values and collections. This module contains the
ECollection
andEValue
classes. These class were formerly in the
ecore
module, but due to further development, it is better to have it
into a dedicated place. This modification is retrocompatible and invisible
for existing manual/generated code.
0.7.12
Features
- Add option for specific XMI "type" field serialization. XMI uses a special
field to encode the type of the element. This field is almost always named:
xsi:type
, but in some cases,xmi:type
is used instead. To deal with such
cases, an option is now available:XMIOptions.OPTION_USE_XMI_TYPE
.
Bugfixes
- Add missing 'type' field for XMI href serialization. The 'xsi:type' field is
required when a crossreference is serialized. This field is used to check if
the resolved resource has the right type (not really, but it help). This
field is kinda optional at the moment for PyEcore, but required for Java-EMF,
otherwise the EMF will not be able to create the right proxy for the
crossreferenced resource.
0.7.1
Feature
- Add XMLTypes implementation
- Add very basic EMF Editing Domain implementation
- Add basic support for OrderedSet's'
__setitem__
method - Add
__iadd__
support for collections - Add del obj.attr support for EObject attributes/references
- Add support for dir on EObject
- Add **kwargs support for dynamic EClass
- Add new class decorator for PyEcore metaclass definition
- Add JSON resource serializer
Bugfixes
- Fix missing EDatatypes registration in their respective EPackage
- Fix resource creation if model loading fails for ResourceSet
- Fix load error when metamodel prefix is empty
- Improve OrderedSet insert/pop methods
- Fix missing containement attribute for eParameters relation
- Fix JsonResource serializer performances
0.7.0
Feature
- Add XMLTypes implementation
- Add very basic EMF Editing Domain implementation
- Add basic support for OrderedSet's'
__setitem__
method - Add
__iadd__
support for collections - Add del obj.attr support for EObject attributes/references
- Add support for dir on EObject
- Add **kwargs support for dynamic EClass
- Add new class decorator for PyEcore metaclass definition
- Add JSON resource serializer
Bugfixes
- Fix missing EDatatypes registration in their respective EPackage
- Fix resource creation if model loading fails for ResourceSet
- Fix load error when metamodel prefix is empty
- Improve OrderedSet insert/pop methods
- Fix missing containement attribute for eParameters relation