Coder Social home page Coder Social logo

accordproject / models Goto Github PK

View Code? Open in Web Editor NEW
29.0 10.0 42.0 2.96 MB

Accord Project Model Repository

Home Page: https://models.accordproject.org

License: Apache License 2.0

JavaScript 47.29% CSS 20.21% Nunjucks 32.50%
composer models hyperledger accordproject legaltech smart-contracts blockchain corda ethereum concerto

models's Introduction

Accord Project Model Repository

GitHub license Accord Project

This repository hosts all Accord Project models. Models are captured using the Concerto modeling language; a platform and runtime neutral typed schema language.

The build system for this repository publishes the models to: https://models.accordproject.org

Environment Variables used by the build system:

  • SERVER_ROOT : the root URL for the server. Used when generating absolute hyperlinks.
  • FORCE_PUBLISH : disabled the download of external models and model validation. Should be used with care!

Accord Project Logo

GitHub license Join the Accord Project Discord

Accord Project is an open source, non-profit, initiative working to transform contract management and contract automation by digitizing contracts. Accord Project operates under the umbrella of the Linux Foundation. The technical charter for the Accord Project can be found here.

Learn More About Accord Project

Contributing

The Accord Project technology is being developed as open source. All the software packages are being actively maintained on GitHub and we encourage organizations and individuals to contribute requirements, documentation, issues, new templates, and code.

Find out what’s coming on our blog.

Join the Accord Project Technology Working Group Discord channel to get involved!

For code contributions, read our CONTRIBUTING guide and information for DEVELOPERS.

README Badge

Using Accord Project? Add a README badge to let everyone know: accord project

[![accord project](https://img.shields.io/badge/powered%20by-accord%20project-19C6C8.svg)](https://www.accordproject.org/)

License

Accord Project source code files are made available under the Apache License, Version 2.0. Accord Project documentation files are made available under the Creative Commons Attribution 4.0 International License (CC-BY-4.0).

Copyright 2018-2019 Clause, Inc. All trademarks are the property of their respective owners. See LF Projects Trademark Policy.

models's People

Contributors

aniruddha-shriwant avatar arshadkazmi42 avatar barkhaaroraa avatar bucs-fan813 avatar daniloff200 avatar debsubhro avatar dependabot[bot] avatar dianalease avatar dselman avatar hshadab avatar irmerk avatar javiercanossini avatar jcarpenter67 avatar jeromesimeon avatar jonathan-casey avatar lukehedger avatar martinhalford avatar michael-grover avatar michizhou avatar mttrbrts avatar niallroche avatar parammittal16 avatar peterhunn avatar ragi-dayananda avatar schmitty890 avatar sidhyatikku avatar sumitkharche avatar tc5022 avatar vaibhav111tandon avatar vishals99 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

models's Issues

DevOps pipeline and model hosting

I think this gives us the control we need to have a versioned, testable DevOps pipeline for the models
In time the generated static site hosted on Netlify for the models can get more elaborate, allowing html/uml generation for the models, search etc. (edited)

Import prefix is missing

Bug Report 🐛

We've lost the URL prefix for the from imports. I think there's an env var you have to set for that when you generate.

Expected Behavior

Imports should use fully-qualified URLs:

import com.docusign.connect.EnvelopeStatusCode from https://models.accordproject.org/docusign/connect.cto

Current Behavior

import com.docusign.connect.EnvelopeStatusCode from /docusign/connect.cto

Possible Solution

Set the environment variable for the host name and regenerate.

Steps to Reproduce

  1. Browse a model at https://models.accordproject.org

Base/Cicero Accord Project Models Revisions for version 1.0

The Accord Project base models in https://github.com/accordproject/models/tree/master/src/cicero
were designed very early on before we had a lot of experience with the programming model, with the Ergo type system, etc.

Before we go to Cicero 1.0 we should do a review of those models, decide whether any change would be useful/needed.

This revision should be aligned with whatever decision we make on whether we keep or remove support for Concerto systems models. (See accordproject/concerto#62)

Also, this revision should ideally address the use of a slightly different base model for Ergo type checking. (See accordproject/ergo#698)

Fix readme typo

Describe the bug
A clear and concise description of what the bug is.

Readme typo

To Reproduce
Steps to reproduce the behavior:

Fix readme typo

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

base.cto does not build properly

The ./src/base.cto file does not get processed and published. The build process report the following error:

11:23:36 AM: Error handling /opt/build/repo/src/cicero/base.cto
11:23:36 AM: Namespace org.accordproject.base specified in file /opt/build/repo/src/cicero/base.cto is already declared in file base.cto

I believe because the same namespace/cto file is baked in Cicero at:
https://github.com/accordproject/cicero/blob/master/packages/cicero-core/src/ciceromodelmanager.js

Should the base.cto file be removed from the repository?

JSON Schemas do not get generated in some cases

A couple of models (org.isda.cdm.cto and patent.cto) and fail on JSON schema generation, with the following errors:

11:26:07 AM: RangeError: Maximum call stack size exceeded
11:26:08 AM:     at Array.forEach (<anonymous>)
11:26:08 AM:     at JSONSchemaVisitor.visitEnumDeclaration (/opt/build/repo/node_modules/composer-concerto-tools/lib/codegen/fromcto/jsonschema/jsonschemavisitor.js:363:41)
11:26:08 AM:     at JSONSchemaVisitor.visit (/opt/build/repo/node_modules/composer-concerto-tools/lib/codegen/fromcto/jsonschema/jsonschemavisitor.js:58:25)
11:26:08 AM:     at EnumDeclaration.accept (/opt/build/repo/node_modules/composer-concerto/lib/introspect/decorated.js:65:24)
11:26:08 AM:     at JSONSchemaVisitor.visitField (/opt/build/repo/node_modules/composer-concerto-tools/lib/codegen/fromcto/jsonschema/jsonschemavisitor.js:330:31)
11:26:08 AM:     at JSONSchemaVisitor.visit (/opt/build/repo/node_modules/composer-concerto-tools/lib/codegen/fromcto/jsonschema/jsonschemavisitor.js:64:25)
11:26:08 AM:     at Field.accept (/opt/build/repo/node_modules/composer-concerto/lib/introspect/decorated.js:65:24)
11:26:09 AM:     at classDeclaration.getProperties.forEach (/opt/build/repo/node_modules/composer-concerto-tools/lib/codegen/fromcto/jsonschema/jsonschemavisitor.js:250:66)
11:26:09 AM:     at Array.forEach (<anonymous>)
11:26:09 AM:     at JSONSchemaVisitor.visitClassDeclarationCommon (/opt/build/repo/node_modules/composer-concerto-tools/lib/codegen/fromcto/jsonschema/jsonschemavisitor.js:247:42)

Versioning for models

Models should be versioned so changes do not break existing templates. This may be particularly sensitive since we refer/access them using URI.

Footer items turn invisible on hover

When the user hovers over green hyperlinks in the footer of models.accordproject.org and templates.accordproject.org such as "ACCORD PROJECT" and "APACHE-2.0", the text turns black, rendering it nearly invisible. Change the hover effect so that the hyperlinks turns white on hover.

Make sure this does not change the hover effect of all of the other hyperlinks on the page that aren't in the footer.

image

Add button to download GraphQL

Feature Request 🛍️

Now that concerto-tools supports conversion of Concerto models to GraphQL it would be useful to be able to download models in GraphQL format from models.accordproject.org.

Use Case

Make it easier for people using GraphQL to adopt Concerto.

Possible Solution

Add a download button to download the GraphQL representation of all of the models.

Define key terms and definitions in a contract/clause

Is your feature request related to a problem? Please describe.
It would be great if we could add a data type whose function will be to define the key terms or definition used throughout the contract. An example of such terms:
Screenshot from 2020-03-31 04-45-09

Describe the solution you'd like
We can add a data type which shall define these terms.

Describe alternatives you've considered
I am although not sure if this should be a data type or we can just place it at the beginning of the contract (it exists in the beginning usually) and parse it using cicero.

CORS support for models.accordproject.org

Add `_redirects` file for netlify

Feature Request 🛍️

This is redirected from accordproject/cicero-template-library#245
As models are hosted by this repo hence fixing the above-mentioned issue from cicero-template-library here makes sense
See @mttrbrts's comment here

Use Case

As this link (https://models.accordproject.org/v2.0/time.html) is outdated it was causing an error in the template's model dependency
You may see the list of templates having an error here

Possible Solution

Making a _redirects file in the publish directory
The docs for Netlify redirects is here https://docs.netlify.com/routing/redirects/
I Will make a PR for this soon...

XMLSchema Visitor doesn't handle * imports

Create a CTO file that imports all types from a namespace using import ... *.

The visitor will fail with an error similar to below.

Generating XmlSchema for /Users/dselman/dev/models/build/markdown/ciceromark: Type * is not defined in namespace org.accordproject.commonmark

Logo update to match techdocs

Describe the bug
Logo on models page (models.accordproject.org) should be updated to be consistent with the new logo on techdocs page (docs.accordproject.org).

Migration to Cicero 1.0 & Outage - 2020-03-103

Discussion 🗣

On 2020-03-03 we had an outage of models.accordproject.org. This is a report of what happened and lessons learned.

Detailed Description

We merged #121 to master, which updates the build script to build and validate the models files using Concerto v1, as well as using Concerto v0.82.x.

Initially there was a short outage because the updated run.js build script now requires Node >= 12.x and while this was used locally, Netlify was using an older Node.js runtime. This was quickly resolved by adding a .nvmrc file to the root of the repository, indicating to Netlify which version of Node.js to use. The engines statement in package.json was also updated.

The more serious issue was that while run.js was updated to either build using Concerto v0.82 or Concerto v1, it cannot build using both, meaning that models that are incompatible with the Concerto version were skipped during the build.

The impact was that once the library had been built and published using Concerto v1, the cicero/runtime.cto file was skipped in the build - which is required to archive existing Cicero templates.

Note that unlike the cicero-template-library repo within this repo we do not check-in and version the results of running the build. They are created by the build, and then the results are served as static files by Netlify.

# Lessons

  1. Deploy model changes for v1 to a v1 branch, not to master
  2. Investigate whether it is possible to test the results of the running the build, prior to publication by Netlify. For example, how many namespaces do we expect, or how many model files?

Questions

  1. Model repository changes can break existing templates - however it is not clear how we can run those tests prior to publication of the models.
  2. How do we want to host v0.82 & v1.0 compatible models? If we want to use the same site, then we will need to commit the results of running the build, as we do for templates
  3. How do we want to indicate the graph of v1 compatible models? We could create new namespaces, version the files, or create a new domain?

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.