Code Monkey home page Code Monkey logo

Comments (4)

marcelerz avatar marcelerz commented on May 24, 2024

Hi Sarbbotam,

Yes, that is correct that either one is required. I described this in the Readme as:

  • imageAPath Defines the path to the first image that should be compared (required; one or the other)
  • imageA Supplies first image that should be compared (required; one or the other)
  • imageBPath Defines the path to the second image that should be compared (required; one or the other)
  • imageB Supplies second image that should be compared (required; one or the other)

I see that this not ideal, but I don't know of any other way to describe it through the API documentation. I can either declare all optional, or declare all required. Since some of them are required, I chose to "define" them all as required in the API-documentation but described it in the Readme.
What would prefer? And why?

from blink-diff.

sarbbottam avatar sarbbottam commented on May 24, 2024

I had been referring the previously stated example and I was always getting a failed output, while passing the desired parameter to the BlinkDiff constructor. Then I started looking into the API documentation and was completely confused what needs to be done, till I looked into the code and figured out.

I suppose, the statement '(required; one or the other)' does not seems to convey its intention. I would recommend to get it removed from the options'/parameters' description and explicitly call out a section on the mandatory parameter, followed by examples.

Thanks,

from blink-diff.

marcelerz avatar marcelerz commented on May 24, 2024

I don't want to remove the statement in the documentation as it might lead to more confusion. I modified it a little bit since I also believe that this wasn't really helpful.
However, I added also another example per your suggestion and I hope I made it with this a bit clearer.
See commit 3d7fd9c.

from blink-diff.

sarbbottam avatar sarbbottam commented on May 24, 2024

looks better 🍁

from blink-diff.

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.