Giter Site home page Giter Site logo

Comments (11)

vipulbhj avatar vipulbhj commented on September 23, 2024 1

I will try to submit a PR soon

from concerto.

vipulbhj avatar vipulbhj commented on September 23, 2024

I wanna work on this, can I try this if no one else is working on it @jeromesimeon

from concerto.

dselman avatar dselman commented on September 23, 2024

The issue is that the ModelManager is created without a system model:
https://github.com/accordproject/concerto/blob/master/packages/concerto-cli/lib/commands.js#L64

In AP we use this system model:
https://github.com/accordproject/ergo/blob/master/packages/ergo-compiler/lib/apmodelmanager.js#L21

A quick fix would be to use the same system model for concerto generate but we really should remove system models altogether to ensure that models are completely self-describing and reusable.

from concerto.

vipulbhj avatar vipulbhj commented on September 23, 2024

If that is the case, I should patch this first with the above suggested approach and then once the bug is fixed we can decide how to remove system model completely.
what do you guys think ?

from concerto.

jeromesimeon avatar jeromesimeon commented on September 23, 2024

@vipulbhj Sounds like a pretty good plan.

For the first step, one question will be which system model since Accord Project has one and at least Hyperledger Composer has another, and other users may have used that capability and built their own. One possibility would be to have an option --ctoSystem which lets the user specify a system model. If we have a default system model, which should it be? I would vote for the Accord Project system model which is here: https://github.com/accordproject/models/blob/master/src/cicero/base.cto

The second step needs definitely a more complete proposal since this will affect every other project, and users. We need to decide what each kind of base type mean (Asset, Concept, Event, etc). I'll be working on this, so I'm happy to join forces!

from concerto.

jeromesimeon avatar jeromesimeon commented on September 23, 2024

For reference, the way to add the system model to the model manager is illustrated here (using the Accord Project system model): https://github.com/accordproject/ergo/blob/9e216d86c87c6b67f640e7982f0e639a792e6207/packages/ergo-compiler/lib/apmodelmanager.js#L44

from concerto.

vipulbhj avatar vipulbhj commented on September 23, 2024

Thanks for the reference material. For the first step this does sound like a good plan. I be trying to dig more in the command code today and I will try to add the option as discussed. I am relatively new here so I am gone go with your suggestion for default, if that's okay

from concerto.

jeromesimeon avatar jeromesimeon commented on September 23, 2024

That's great @vipulbhj ! If you start a PR with some of the basic idea in place for that new option, I can review while the discussion about default model takes place.

Since cicero-cli is brand new, we do not have to worry whether this breaks anyone's code.

from concerto.

jeromesimeon avatar jeromesimeon commented on September 23, 2024

Just a caveat: this will probably a short lived fix, since we'll likely remove the notion of system model soon after!

from concerto.

vipulbhj avatar vipulbhj commented on September 23, 2024

Hey @jeromesimeon, made some first rough draft changes. Mind taking a look ??

from concerto.

jeromesimeon avatar jeromesimeon commented on September 23, 2024

Fixed in #113 . Thanks for your help @vipulbhj !

from concerto.

Related Issues (20)

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.