accordproject / cicero-template-library Goto Github PK
View Code? Open in Web Editor NEWAccord Project Template Library
Home Page: https://templates.accordproject.org
License: Apache License 2.0
Accord Project Template Library
Home Page: https://templates.accordproject.org
License: Apache License 2.0
Some of the new *-tr
and *-ru
templates have the same package.json file which confuses the scripts creating the archive.
Also it might be good to haves JavaScript tests for those new templates.
Working with a micropublish of the new Cicero parser and the generated template, crashing on load
Load without crashing
TypeError: Cannot read property 'slice' of undefined
at index.esm.js:1
at Oe (index.esm.js:1)
at index.esm.js:1
at renderWithHooks (react-dom.development.js:14803)
at updateForwardRef (react-dom.development.js:16816)
at beginWork (react-dom.development.js:18645)
at HTMLUnknownElement.callCallback (react-dom.development.js:188)
at Object.invokeGuardedCallbackDev (react-dom.development.js:237)
at invokeGuardedCallback (react-dom.development.js:292)
at beginWork$1 (react-dom.development.js:23203)
This may be in the rendering for the ClauseComponent
in web-components
https://parserv2--templates-accordproject.netlify.app/archives/[email protected]
in storybookDescribe the bug
https://templates.accordproject.org/[email protected]. The link to the time model returns a 404.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Link should use https://models.accordproject.org/[email protected]
js-release-0.20
branch
acceptance-of-delivery/grammar/template.tem.md
.md
files have markdownThis issue can provide for multiple pull requests.
If not, it would be helpful to indicate that. Does there need to be an Ergo component for running the contract?
the current version of the latedeliveryandpenalty clause compares the delivery date against the current date and time, where previously it was checked against the 'deliveredAt' date and time. Perhaps the logic could be improved to check for the presence of deliveredAt and only use the current time if it is there is no deliveredAt specified
.md
files have markdownThis issue can provide for multiple pull requests.
Cannot read property 'forEach' of undefined
Need to perform an empty check here or use alternative to forEach.
I was exploring the website and found the copyright year 2018-2022 on the documentation page so updating the same in template library pages.
As described in accordproject/technical-steering-committee#4
Please follow the conventions in accordproject/concerto#236
.travis.yml
and .travis
directories in repo.github/workflows
directory based on those in ./concerto/.github/workflows
./scripts
replace by those found in ./concerto/scripts
package.json
notable adjustments: remove some of the old scripts, We should re-implement the Perishable-Goods template to be stateful. This would allow sensor readings to be submitted one by one (or in small batches). The min/max values would be kept in state. When the shipment is received a payment obligation is emitted and the contract state is set to COMPLETED. If sensor readings are received after the due date of the contract notifications can be emitted that the contract is late.
The templates are starting to suffer from duplication of common types. They need to be refactored to import shared definitions of these types.
The following common types have been identified in the existing templates:
Describe the bug
Links are broken in the README
. Some examples:
Additional context
Note that the code of conduct should link here.
The link for Cicero Documentation on all of the Template Documentations is broken.
Link to the Page: https://templates.accordproject.org/[email protected] (url)
Previous link : https://docs.accordproject.org/docs/cicero.html
The new link should be: https://docs.accordproject.org/docs/started-installation.html
what is your suggestion @irmerk @jeromesimeon what should be the new link for the Cicero Documenation Reference?
Is your feature request related to a problem? Please describe.
[{buyer}] shall pay to [{seller}] a penalty
-- the two placeholders should be swapped
Describe the solution you'd like
Template text should be fixed so that seller pays buyer a penalty
Describe alternatives you've considered
N/A
Additional context
Similar problem with minilatedeliveryandpenalty-payment
, minilatedeliveryandpenalty-capped
, simplelatedeliveryandpenalty
templates
Hi, This is Eason.
I am the GSoC Student at Accord Project working on Automatic Identification And Classification of Contract Data Types with NLP Models.
Currently, I'm working on data mining for contract template library to analyze and prepare data for Deep Learning.
And I will report some bug I found durning my work.
I found a bug at ~/src/supply-agreement-loc/text/grammar.tem.md
and ~/src/supply-agreement-loc/text/sample.md
around line 85
the text currently is : the {[exporter}} consents in writing, or
I expect it is: the {{exporter}} consents in writing, or
It should be {{
not {[
Also, I want to know what should I do if I found similar bug afterward.
Can I send PR directly?
Or Should I open an issue like this one?
Thanks for your attention.
This is not exactly a bug, more a topic for discussion and a problem for me.
For the ContractPen (contractpen.com) project I have developed an importer which imports this code into ContractPen data models. In the case of Eat Apples it is difficult to determine which class is the request class by looking at the model code alone.
https://github.com/accordproject/cicero-template-library/blob/master/src/eat-apples/models/model.cto
Although I can determine it by looking at the Ergo code, my opinion - it would be nice to require request classes to be marked as request somehow, either by inheritance or other.
Describe the bug
Link is broken in the README :
https://docs.accordproject.org/docs/cicero-tutorial.html#creating-a-new-template
https://templates.accordproject.org/[email protected]
I noticed old versions of templates donβt show newer versions in their versions drop down menu. I wonder if thatβs something we should update, so all templates shows every version in its versions dropdown menu. If someone is linked to an old version, there may be no way for them to know thereβs a newer version.
Hi, Iβm exploring template studio and found a invalid link:
https://templates.accordproject.org/[email protected]
Which at https://templates.accordproject.org/
It should work
It work If the URL is https://templates.accordproject.org/[email protected]
https://templates.accordproject.org/[email protected]
Change the URL link. maybe from docusign-connect's package.json
.
Cicero now has support for https://cucumber.io for testing templates. This means we can start migrating templates to that new syntax.
Current work migrating templates is on the following branch: https://github.com/accordproject/cicero-template-library/tree/js-feature-cucumber
Here is the list of templates to be migrated:
Describe the bug
The test uses a fixed time and the local timezone of the system running the test, which leads to discrepancies with calculation of the compounded interest. This is not an issue in production, but my timezone is the Indian Standard TIme (IST) or UTC +5:30, so the test fails.
To Reproduce
Steps to reproduce the behavior:
/cicero-template-library/src/promissory-note/
npm run test
Expected behavior
The test was supposed to pass with expected value being equal to actual value.
Desktop (please complete the following information):
Additional context
N/A
Lawyers would like to contribute to this library. In order of importance, lawyers would like to:
The link here https://docs.accordproject.org/docs/cicero.html is giving page not found, what should be in here.
Create a build process that publishes the templates to templates.accordproject.org.
Run unit tests for each template
We can build archives for each template (which will resolve all the external dependencies, so they load fast and are validated).
We can name each archive using the fqn of the template model, plus the version number from package.json.
Save all versions of a valid template to cheap and reliable object/document storage
Generate an HTML overview page for each archive in object store, based on the README, package.json (compatible Cicero version) model info etc (edited)
We can link from the template HTML page to the model HTML page for external dependencies.
We can also publish an index.json file with metadata so that tools can quickly find templates based on metadata. (edited)
Add Template.fromArchive(url)
to load a template from a URL
Working with a micropublish of the new Cicero parser and the generated template, crashing on load
Successful render
Uncaught (in promise) Error: Inconsistent values for variable shipment: SHIP_001 and Grade I, Size 4, Zutano Mexican Avocados
https://parserv2--templates-accordproject.netlify.app/archives/[email protected]
in storybookA user should be able to download specific compiled archives in addition to or instead of the source code archive
Specific:
We are building a Cicero Word Add-In. Within the desktop version of Word, the embedded MS Edge browser which handles add-ins cannot seem to handle the action of fromUrl
and fromArchive
, which compiles Ergo into Javascript. Aside from utilizing web workers, accessing a pre-compiled archive from URL would be useful.
Hypothetical:
A user should be able to access compiled versions of the archive for their specific use case (ES6, WASM, etc.)
Adjust the build script for the templates to publish an ES6 compiled archive now, and further versions in the future. This will require strict semantic versioning.
Uncertain if Word is indeed using Edge for Add-Ins. Word online in the Edge browser works without issue. Also uncertain if web workers would solve the issue.
Working with a micropublish of the new Cicero parser and the generated template, crashing on load
Successful parse
Initial parse error
https://parserv2--templates-accordproject.netlify.app/archives/[email protected]
in storybookWorking with a micropublish of the new Cicero parser and the generated template, crashing on load
Hide and reveal optional variables (with nothing else in optional)
When hiding one of the optional variables, receive ParseException
:
Uncaught (in promise) ParseException: Parse error at line 42 column 39
Floating Rate Day Count Fraction: "30"
Expected: ' '
at _throwParseError (http://localhost:9009/vendors~main.9a1e714796444341673e.bundle.js:59473:11)
at TemplateMarkTransformer.dataFromCiceroMark (http://localhost:9009/vendors~main.9a1e714796444341673e.bundle.js:59560:13)
at Clause.parse (http://localhost:9009/vendors~main.9a1e714796444341673e.bundle.js:1643:42)
at http://localhost:9009/main.9a1e714796444341673e.bundle.js:1073:18
at http://localhost:9009/main.9a1e714796444341673e.bundle.js:1107:5
at invokeFunc (http://localhost:9009/vendors~main.9a1e714796444341673e.bundle.js:287115:23)
at trailingEdge (http://localhost:9009/vendors~main.9a1e714796444341673e.bundle.js:287164:18)
at timerExpired (http://localhost:9009/vendors~main.9a1e714796444341673e.bundle.js:287152:18)
https://parserv2--templates-accordproject.netlify.app/[email protected]
in storybookAn Open in VSCode
option can be set up along side Open in Template Studio
to let users access templates from the Cicero-template-library repository on GitHub.dev
Working with a micropublish of the new Cicero parser and the generated template, crashing on load
Successful parse
Initial parse error
https://parserv2--templates-accordproject.netlify.app/archives/[email protected]
in storybookDescribe the bug
This is a parse error in the car rental template in the template library
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No error should have occurred.
Desktop (please complete the following information):
https://github.com/accordproject/cicero-template-library/tree/cicero-0.20.10
In this branch we have added a line that says "Author: [logo] [author]" . I am requesting some minor styling changes. It currently looks like this:
We want it to look more like this:
The changes are:
This logic seems to be backwards:
To make sure cicero execute
always works, we should make sure all the tests scripts include at least one test which checks execution from the default files request.json
, sample.txt
and state.json
.
Running the demand forecast template raises an internal moment error/warning:
bash-3.2$ cicero execute --template ./ --dsl ./sample.txt --data ./data.json
cicero execute --template ./ --dsl ./sample.txt --data ./data.json
08:44:45 - info: Logging initialized. 2018-04-18T12:44:45.483Z
08:44:46 - info: CICERO-ENGINE {"request":{"$class":"org.accordproject.demandforecast.ForecastRequest","supplyForecast":1200,"transactionId":"9e1e672c-2b5d-4638-964f-6c1b7bbab75b","timestamp":"2018-04-18T12:44:46.449Z"},"response":{"$class":"org.accordproject.demandforecast.BindingResponse","transactionId":"6a3c51a0-e53f-4d20-ad2c-32d32fec8422","timestamp":"2018-04-18T12:44:46.453Z"},"data":{"$class":"org.accordproject.demandforecast.TemplateModel","purchaser":"PETER","supplier":"DAN","effectiveDate":"04/02/2018","minimumPercentage":85}}
Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
Arguments:
[0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: 04/02/2018, _f: undefined, _strict: undefined, _locale: [object Object]
Error
at Function.createFromInputFallback (/Users/jeromesimeon/git/cicero/node_modules/moment/moment.js:324:94)
at configFromString (/Users/jeromesimeon/git/cicero/node_modules/moment/moment.js:2366:11)
at configFromInput (/Users/jeromesimeon/git/cicero/node_modules/moment/moment.js:2592:9)
at prepareConfig (/Users/jeromesimeon/git/cicero/node_modules/moment/moment.js:2575:9)
at createFromConfig (/Users/jeromesimeon/git/cicero/node_modules/moment/moment.js:2542:40)
at createLocalOrUTC (/Users/jeromesimeon/git/cicero/node_modules/moment/moment.js:2629:12)
at createLocal (/Users/jeromesimeon/git/cicero/node_modules/moment/moment.js:2633:12)
at Moment.isBefore (/Users/jeromesimeon/git/cicero/node_modules/moment/moment.js:3200:48)
at Object.apply (/Users/jeromesimeon/git/cicero/node_modules/vm2/lib/contextify.js:288:34)
at execute (vm.js:26:13)
08:44:46 - info: {"clause":"demandforecast@0.0.6-4e8927e99afa2d81afcc6ec5241225dd88ce1b72cfa2359dda195d4c2dc0adc8","request":{"$class":"org.accordproject.demandforecast.ForecastRequest","supplyForecast":1200},"response":{"$class":"org.accordproject.demandforecast.BindingResponse","requiredPurchase":1020,"year":2018,"quarter":2,"transactionId":"6a3c51a0-e53f-4d20-ad2c-32d32fec8422","timestamp":"2018-04-18T12:44:46.453Z"}}```
While the system recovers, this should probably be fixed either directly in the logic or in the Cicero grammar visitor for parsing dates.
Currently running 12 steps (1 failed, 11 passed)
on supplyagreement
. When testing, there was an external .js
file for state and another for request.
State:
{
"$class": "org.accordproject.supplyagreement.AgreementState",
"stateId": "org.accordproject.supplyagreement.AgreementState#1",
"purchaseObligation" : null,
"deliveryObligation" : null,
"paymentObligation" : null
}
Request:
{
"$class": "org.accordproject.supplyagreement.ForecastRequest",
"supplyForecast": 1200.0
}
When command is run cicero execute -βrequest req1.js -βstate state1.js
, this returns:
{
"clause": "supplyagreement@0.8.1-1b83eed11769be2306c88e8cd56f4b89cfde8644f74db0a7d70ce0b044781a49",
"request": {
"$class": "org.accordproject.supplyagreement.ForecastRequest",
"supplyForecast": 1200
},
"response": {
"$class": "org.accordproject.supplyagreement.ForecastResponse",
"transactionId": "f4b88cdb-ec55-41d1-bd55-6c6f1648d2ab",
"timestamp": "2019-02-20T22:52:04.398Z"
},
"state": {
"$class": "org.accordproject.supplyagreement.AgreementState",
"purchaseObligation": {
"$class": "org.accordproject.supplyagreement.PurchaseObligation",
"requiredPurchase": 1020,
"year": 2019,
"quarter": 1,
"party": "PETER"
},
"stateId": "org.accordproject.supplyagreement.AgreementState#1"
},
"emit": []
}
So, taking that state:
"$class": "org.accordproject.supplyagreement.AgreementState",
"purchaseObligation": {
"$class": "org.accordproject.supplyagreement.PurchaseObligation",
"requiredPurchase": 1020,
"year": 2019,
"quarter": 1,
"party": "PETER"
},
"stateId": "org.accordproject.supplyagreement.AgreementState#1"
And listing it as the Then the new state of the contract should be
result in the logic.feature
file.
Still receiving this error message:
β Then the new state of the contract should be # ../../node_modules/@accordproject/cicero-engine/lib/steps.js:189
"""
{
"$class": "org.accordproject.supplyagreement.AgreementState",
"purchaseObligation": {
"$class": "org.accordproject.supplyagreement.PurchaseObligation",
"requiredPurchase": 1020.0,
"year": 2019,
"quarter": 1,
"party": "PETER"
},
"stateId": "org.accordproject.supplyagreement.AgreementState#1"
}
"""
{}
Error
at orgXaccordprojectXsupplyagreementXSupplyAgreement_demandforecast (vm.js:61:11)
at __dispatch (vm.js:1218:17)
at vm.js:1198:9
at ContextifyScript.Script.runInContext (vm.js:59:29)
at VM.run (/Users/jolenelanglinais/Code/Clause/CucumberWkShp/cicero-template-library/node_modules/vm2/lib/main.js:211:72)
at Engine.execute (/Users/jolenelanglinais/Code/Clause/CucumberWkShp/cicero-template-library/node_modules/@accordproject/cicero-engine/lib/engine.js:233:27)
at send (/Users/jolenelanglinais/Code/Clause/CucumberWkShp/cicero-template-library/node_modules/@accordproject/cicero-engine/lib/steps.js:53:19)
at World.<anonymous> (/Users/jolenelanglinais/Code/Clause/CucumberWkShp/cicero-template-library/node_modules/@accordproject/cicero-engine/lib/steps.js:196:16)
Is your feature request related to a problem? Please describe.
The current template for 'installment-sale 0.13.0' uses "total amount e[{INITIAL_DUE}]" or "remaining balance of E[{TOTAL_DUE_BEFORE_CLOSING}]".
Describe the solution you'd like
instead of E, it would be nice to have a currency (EUR, GBP) or a currency symbol.
Describe alternatives you've considered
It may be possible to manually amend the text of the template every time you use it...
Additional context
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.