Pyecore

Latest version: v0.15.1

Safety actively analyzes 628918 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 10 of 11

0.4.0

Added

- Added option to auto-register generated package in global registry, see the
`--auto-register-package` option.
- Added option to specify a user module, from where mixin classes. These mixins must then implement
all end-user specific code like operations and derived attributes. See the `--user-module`
command line option.

Fixed

- EDatatype registration.
- Various derived attribute fixes.


Changelog
---------

0.3.0

+++++

**Features**

- Add new class to ease dynamic metamodel handling. The dynamic metamodel
manipulation is a little bit cumbersome when it comes to extract all the
existing EClass from a loaded EPackage. A new class is provided:
'DynamicEPackage' which constructs, using reflection, an object that has
direct references to each EClass/sub-EPackage by name. This greatly helps the
user to easily call and get EClass from a freshly loaded dynamic EPackage.


**Bugfixes**

- Fix missing double notification raised for eopposite references. When an
eopposite reference were set, the notification system were called three times:
one for the main feature (the feature on which the add/remove/set/unset have
been made by the user) and two for the eopposite. The first eopposite
notification were normal, but the second one was a residual notification sent
by the algorithm. This new commit simply removes the extra-notifications and
adds new tests to detect these issues.


**Miscellaneous**

- Add better semantic differentiation for ``EBag`` and ``ESet`` collections.
- Add slicing support for ``EList``.
- Add missing ``ordered`` and ``unique`` parameters for ``EAttribute``.

0.2.0

+++++

**Features**

- Add new static metamodel code generator (moltob contribution, thanks!). The
new generator gives more flexibility to the user as it allows the direct
assignment of attributes/references values from the constructor. The feature
reduces the amount of LOC required to create a fully initialized instance and
also helps for the instance creation as IDE smart-completion feature can
propose the attributes/references to the user.

**Miscellaneous**

- Fix some PEP8/Pylint refactoring and docstrings.
- Small performance improvement in the ``EcoreUtils.isinstance``.

0.1.5

+++++

**Bugfixes**

- Fix missing types from Ecore (moltob contribution, thanks!). These types are
the `E*Object` types for numbers. The modification had been done in the
``ecore.py`` file as these are default Ecore types and not XML types (or
coming from another EMF lib). This commit increases the compatibility with
existing ``.ecore`` files.

0.1.4

+++++

**Features**

- Add support for object deletion in PyEcore. The delete feature allows the user
to remove parts of the model. Those parts can be a simple element or a sub-graph
if a container object is deleted. The delete tries to keep up to date a special
list that gathers the non-inverse navigable relation. When called, the method
gathers all the EReferences of the object to delete and these special relations.
It then update the pointed references. There is a special behavior if the object
to delete is a proxy. If unresolved, the proxy can only be removed from the
main location, but not from the remote one. If resolved, the proxy keep the
classical behavior. This behavior tries to match the EMF-Java one: https://www.eclipse.org/forums/index.php/t/127567/

**Bugfixes**

- Fix double resources loading in same ``ResourceSet``. When two ``get_resource(...)``
call with the same URI as parameter were done in the same ``ResourceSet``,
two different resources were returned. The new behavior ensure that once the
resource had been loaded, a second call to ``get_resource(...)`` with the
same URI will return the resource created in the first place.

**Miscellaneous**

- Make use of ``ChainMap`` for ``global_registry`` management (simplify code).
- Raise a better exception when a 'broken' proxy is resolved.
- Add small performances improvement.

0.1.3

+++++

**Features**

- Add support for object proxies. The PyEcore proxy works a little bit differently from the Java EMF proxy, once
the proxy is resolved, the proxy is not removed but is used a a transparent
proxy (at the moment) and is not an issue anymore for type checking. Proxies are
used for cross-document references.

- Remove resource-less objects from XMI serialization. This is a first step
towards objects removal. The added behavior allows the user to "remove"
elements in a way. If an element is not contained in a resource anymore, the
reference towards the object is not serialized. This way, anytime an object is
removed from a container and let 'in the void', XMI serialization will get rid
of it. However, this new addition requires that the Ecore metamodel is always
loaded in the global_registry (in case someone wants to serialize ecore files)
as a metamodel can references basic types (EString, EBoolean) which are
basically not contained in a resource.

**Bugfixes**

- Fix bug on EStructuralFeature owner assignment when EClass is updated.

Page 10 of 11

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.