Git Product home page Git Product logo

Comments (4)

joshuanazareth97 avatar joshuanazareth97 commented on July 4, 2024 1

@saihaj can I pick this to work on next?

from graph-tooling.

saihaj avatar saihaj commented on July 4, 2024 1

go for it @joshuanazareth97

from graph-tooling.

joshuanazareth97 avatar joshuanazareth97 commented on July 4, 2024

@saihaj Notes on my understanding / the implementation I am planning:

  • As I understand it, there are 2 locations from which we could receive spkgPath: (1) flag (2) interactive prompt
  • The value received from either of these is passed into the same initSubgraphFromContract method, which then adds this to the manifest file under source
  • Currently, the file must exist in the path relative to the directory that graph init is called in

Approach:

  • Change the validation for the spkg file to also pass for the URL format above (spkg.io.../.../)
  • If we receive a URL, download the file into the current directory
  • In this case spkgPath becomes the name of the spkg file, since it is in the root of the current directory
  • Continue as before, passing spkgPath into the manifest, just like with local files

Bonus:

  • Potential UX improvement: If a URL is passed, we can further ask the user which directory they want to download the spkg file into, defaulting to the current dir. This would give more control to the user, but would require additional logic for creating non-existent folders etc.

Interested to know your thoughts around this approach.

from graph-tooling.

joshuanazareth97 avatar joshuanazareth97 commented on July 4, 2024

Hey @saihaj, have implemented this using a slight variation of the approach above. have not yet implemented the bonus feature I mentioned, do let me know if there's anything you'd like me to change?

from graph-tooling.

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.