Coder Social home page Coder Social logo

ttsiodras / datamodellingtools Goto Github PK

View Code? Open in Web Editor NEW
17.0 17.0 6.0 5.92 MB

The Data Modelling Tools of the European Space Agency's TASTE toolchain

Home Page: http://taste.tools

License: Other

Makefile 0.28% Python 93.74% GAP 4.66% Shell 0.14% C 0.96% Perl 0.03% Dockerfile 0.07% M4 0.11%

datamodellingtools's People

Contributors

echatzig avatar hcorg avatar lsgouveia avatar maxime-esa avatar mcejp avatar mdziezyc-n7 avatar tfabbri avatar ttsiodras avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

datamodellingtools's Issues

'hello-world' of asn1scc + sqlalchemy

Greetings!

I am attempting to get 'test.py' (https://www.thanassis.space/asn1.html) working w/ sqlalchemy.

However, I keep running into this issue:

sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) table Message has no column named fk_msgId_iid [SQL: u'INSERT INTO "Message" ("fk_msgId_iid", fk_myflag_iid, fk_value_iid, "fk_szDescription_iid", "fk_isReady_iid") VALUES (?, ?, ?, ?, ?)'] [parameters: (1, 1, 1, 1, 1)] (Background on this error at: http://sqlalche.me/e/e3q8)

I keep running into this error (lack of fk_*_iid column) under a variety of examples.
It seems to be a mismatch between sqlalchemy definitions and the generated schema.
I have attempted this with postgres as well.

I was hoping you could provide some insight. Let me know if you need more information. I attempted to sign up for the mailing list but haven't received confirmation yet.

Extremely interesting project! Thanks in advance.

Broken pip install

The build as described in README.md does not lead to a functional install on either Windows or Linux, in exactly the same way. Using Python 3.8:

PS C:\Users\Emil\Documents\tools\DataModellingTools> pip3 install --user --upgrade .
ERROR: Directory '.' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.

Practically the same message on ubuntu 20.04 LTS with Python 3.9. When I rename setup.py.in to setup.py, I am able to install it, but run into this issue, which I solved by manually installing mypy. Still, I get this in install:

\site-packages\setuptools\dist.py:472: UserWarning: The version specified ('2.2-@SCM_REVISION@') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.

So it's installing with a non-expanded version macro in the name. But that at least doesn't break the whole thing. Now when I run asn2datamodel on either linux or windows, I get this:

Traceback (most recent call last):
  File ".\asn2dataModel.py", line 27, in <module>
    from .commonPy import configMT, asnParser, cleanupNodes, verify
ImportError: attempted relative import with no known parent package

...is there something I'm missing? Is every usecase which isn't the pre-baked TASTE VM just considered deprecated?
Cheers, Emil @ esc Aerospace

Fix License

Fix the copyright and the license in all files.
Copyright has to contain Neuropublic and ESA, and license is GPL with Runtime Exception

Thanks

Absolute vs relative imports in generated Python code

We are generating a Python data model from ASN using a command similar to

asn2dataModel -toPython -o GENERATED_CODE MODEL.asn

One of the outputs is GENERATED_CODE/MODEL_asn.py.
It uses absolute imports for the DV and Stubs modules, e.g.

import DV

from Stubs import (
    myassert, Clean, DataStream, COMMON)

However, this precludes GENERATED_CODE from being used as a self-contained package; in my opinion, it would make more sense to import as

from . import DV

from .Stubs import (
    myassert, Clean, DataStream, COMMON)

What is the intended way of importing and using the MODEL_asn module? Are there specific reasons not to make the imports relative?

Incorrect data types in the generated <project_name>_getset.{c,h} files

While testing the asn2dataModel generated Python files on armv7 architecture, we discovered the discrepancy between the types as defined in the <project_name>_getset.{c, h} files and the Python implementation (i.e. Stubs.py).

All integer values are converted into a long long value and then used to call function from _getset.c file. However, enumerated (i.e. ASN ENUMERATED) and CHOICE values expect to receive an int.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.