Coder Social home page Coder Social logo

Comments (13)

mttrbrts avatar mttrbrts commented on June 13, 2024 1

@Aniruddha-Shriwant Where are the Model Dependencies generated?

The nunjucks template generates the output based on data from the API.

from cicero-template-library.

arshadkazmi42 avatar arshadkazmi42 commented on June 13, 2024

I was looking into this bug and found the code here,
https://github.com/accordproject/cicero-template-library/blob/master/run.js#L389
which is getting rendered in the template.
This is the value getting rendered template.getTemplateModel().getModelFile().getExternalImports()
so I am thinking of a fix to use regex to find versions in url v2.0/ and then formatting it to 0.2.0 and replacing .cto with @0.2.0.cto

Is this the expected fix for this? Or it can be achieved by some other way?

from cicero-template-library.

irmerk avatar irmerk commented on June 13, 2024

@dselman @jeromesimeon @mttrbrts I'm not as familiar with nunjucks so I will defer to you all and help if I can.

from cicero-template-library.

Aniruddha-Shriwant avatar Aniruddha-Shriwant commented on June 13, 2024

@irmerk Can I work on this?

from cicero-template-library.

Aniruddha-Shriwant avatar Aniruddha-Shriwant commented on June 13, 2024

@irmerk as the issue was old... at that time latedeliveryandpenalty template would be having version 0.13.1 as latest but now it is 0.16.0 so in ./build/ should I change both the versions or just the latest...?

from cicero-template-library.

Aniruddha-Shriwant avatar Aniruddha-Shriwant commented on June 13, 2024

@irmerk, not just latedeliveryandpenalty but all those templates which have org.accordproject.time.* in their model dependencies have outdated link...
Here is that list
"https://templates.accordproject.org/[email protected]"
"https://templates.accordproject.org/[email protected]"
"https://templates.accordproject.org/[email protected]"
"https://templates.accordproject.org/[email protected]"
"https://templates.accordproject.org/[email protected]"
"https://templates.accordproject.org/[email protected]"
"https://templates.accordproject.org/[email protected]"
"https://templates.accordproject.org/[email protected]"
"https://templates.accordproject.org/[email protected]"
"https://templates.accordproject.org/[email protected]"
"https://templates.accordproject.org/[email protected]"
"https://templates.accordproject.org/[email protected]"
"https://templates.accordproject.org/[email protected]"
"https://templates.accordproject.org/[email protected]"

Steps to reproduce the behavior:

  1. Go to any of the above links
  2. Click on org.accordproject.time.* in the model dependencies
  3. See error

from cicero-template-library.

irmerk avatar irmerk commented on June 13, 2024

I think other people are going to be more of a help here, see #245 (comment)

from cicero-template-library.

Aniruddha-Shriwant avatar Aniruddha-Shriwant commented on June 13, 2024

So, @dselman @jeromesimeon @mttrbrts can any of you throw some light on this?

from cicero-template-library.

Aniruddha-Shriwant avatar Aniruddha-Shriwant commented on June 13, 2024

@Aniruddha-Shriwant Where are the Model Dependencies generated?

The nunjucks template generates the output based on data from the API.

Thanks for pointing out that, I was looking for Model Dependencies in run.js 🤦‍♂️

from cicero-template-library.

Aniruddha-Shriwant avatar Aniruddha-Shriwant commented on June 13, 2024

I had fixed the bug
by replacing this line :
<li><a href="{{uri | replace(".cto", ".html")}}">{{ns}}</a></li>
with this
<li><a href="{{uri | replace("v2.0/time", "[email protected]") | replace(".cto", ".html")}}">{{ns}}</a></li>

But when I run npm run build and opens some HTML files which were having the bug, I noticed that the bug is still present in them.
Hence for testing purpose I incremented their version from package.json and then run the npm run build command again, as the new files for that particular template are generated, by opening those files in browser I noticed that the bug was resolved...

So my question is should I increment the template version which are having the bug (I had already listed which templates are having the bug here) Or is there any other solution for that?

from cicero-template-library.

Aniruddha-Shriwant avatar Aniruddha-Shriwant commented on June 13, 2024

@mttrbrts, can you suggest what I can do about this? This is similar to this(but this was fixed afterward...)
I will create a PR for this and then we can look into its preview build...

from cicero-template-library.

Aniruddha-Shriwant avatar Aniruddha-Shriwant commented on June 13, 2024

@mttrbrts, I had created a PR you may see in the preview build that the bug was not fixed...

from cicero-template-library.

Aniruddha-Shriwant avatar Aniruddha-Shriwant commented on June 13, 2024

Taking this discussion to #385

from cicero-template-library.

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.