pyecorecapella's People
pyecorecapella's Issues
[ImportError] Circular dependencies in __init__ EReference eType initialization
pyecoregen generates initializations of EReference.eType and EReference.eOpposite inside the init.py of each subpackage, which requires a lot of import from other packages, and increase the amount of circular dependencies.
Solution proposed : do those initializations only in the top pyEcoreCapella.init.py module
Implementation:
- generate all those initializations in an intermediate file (called cross_init.inc) in each package submodule
- at top level, create a init.inc with the import statements for each packages
- at top level, create init.py by concatenation of top init.inc and the cross_init.inc of all the packages
attached is the templates (rename txt to tpl in pyecoregen) and the patch for ecore.py
[ImportError] Circular Reference in information/communication
information.communication.SignalInstance is a subclass of information.AbstractInstance
but information imports information.communication
circular dependency error
workaround : for the moment, removing abstractInstance as super package
see patch https://github.com/cgava/pyEcoreCapella/blob/testing_init_import_star/circular-import.utf8.patch
[load] Fail to instantiate information.datatype.BooleanType
at line 79 of test.empty.project.melodymodeller
, exception in capellacore.GeneralizableElement
class, when calling for super().__init__(**kwargs)
Exception: TypeError: 'NoneType' object is not callable
`
76 <ownedDataPkgs xsi:type="org.polarsys.capella.core.data.information:DataPkg"
77 id="66759f08-414c-4fdf-90ba-fc166fe5b60b" name="Predefined Types">
78 <ownedDataTypes xsi:type="org.polarsys.capella.core.data.information.datatype:BooleanType"
79 id="be303636-11ee-4391-a46e-d837086c29e7" name="Boolean" visibility="PUBLIC">
80 <ownedLiterals xsi:type="org.polarsys.capella.core.data.information.datavalue:LiteralBooleanValue"
81 id="4e1cecad-d14a-4930-bc74-85cd6dc918e4" name="True" abstractType="#be303636-11ee-4391-a46e-d837086c29e7"
82 value="true"/>
`
[pyecoregen] sort EPackage By Name
Update the computation of imported_dict to insure that 2 generations of same ecore produce same code
[AttributeError] Some eOpposite initialization fail
some eOpposite initialization fail.
temporary workaround: apply patch https://github.com/cgava/pyEcoreCapella/blob/testing_init_import_star/undefined_eopposite.utf8.patch
Example:
InterfaceAllocator.provisionedInterfaceAllocations.eOpposite = InterfaceAllocation.allocatingInterfaceAllocator
Fail with the following Trace:
Traceback (most recent call last): File "//tests/test.py", line 4, in <module> import pyEcoreCapella as pyEcoreCapella File "//pyEcoreCapella/__init__.py", line 364, in <module> InterfaceAllocator.provisionedInterfaceAllocations.eOpposite = InterfaceAllocation.allocatingInterfaceAllocator File "//pyecore/pyecore/ecore.py", line 766, in eOpposite value._eopposite = self AttributeError: 'property' object has no attribute '_eopposite'
[ImportError] behavior module name conflicts with pyecore.behavior
detected on commit: 68a0370
Traceback (most recent call last):
File "capella2python/tests/test.py", line 7, in <module>
import pyEcoreCapella.activity as Activity
File "capella2python/pyEcoreCapella/activity/__init__.py", line 2, in <module>
from .activity import getEClassifier, eClassifiers
File "capella2python/pyEcoreCapella/activity/activity.py", line 7, in <module>
from behavior import AbstractBehavior
File "GitWS-Community/pyecore/pyecore/behavior.py", line 36, in <module>
from . import ecore
ImportError: attempted relative import with no known parent package
[log] add appropriate log system
log system (with appropriate debug for each line/node of the model) would be very usefull, when excpetions arise..
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.