Giter VIP home page Giter VIP logo

Comments (5)

jagpreetsinghsasan avatar jagpreetsinghsasan commented on August 22, 2024 1

Oh wow. This looks like a perfect solution to do a looser string matching. I will incorporate the same with a variable input of similarity ratio. Thanks @petermetz for the insights

from cacti.

jagpreetsinghsasan avatar jagpreetsinghsasan commented on August 22, 2024

I am working on this

from cacti.

jagpreetsinghsasan avatar jagpreetsinghsasan commented on August 22, 2024

@petermetz I will make the checks looser while keeping the check relevant (It would be very irritating working on a task, creating a PR and then getting stuck comparing and fixing the PR and the related commit.)

from cacti.

petermetz avatar petermetz commented on August 22, 2024

@jagpreetsinghsasan Thank you for the work on the improvements in advance! I thought about it a little more and would strongly recommend to refactor it to be less strict by only demanding a certain level of string similarity, otherwise it will probably just end up being super annoying 90% of the time for contributors in the cases when they just have some silly typo making a difference.

I found this library that looks very versatile and perfect for the task:
https://www.npmjs.com/package/string-similarity-js

Specifically I would recommend the custom check to have a 90% (0.9) similarity ratio demand by default (so maybe they won't be the exact same but as long as at least they are mostly the same we can be OK with it as a best-of-both-worlds tradeoff.

The other thing: It would be very handy to be able to configure the threshold from an env variable so that later on if we find that a higher or lower threshold is better, we don't have to touch the code at all just set the env var in ci.yaml or somewhere else where the job is defined (technically still a code-change I know, but it's in the yaml not in the actual logic)

from cacti.

petermetz avatar petermetz commented on August 22, 2024

@jagpreetsinghsasan You got it! Thank you as well!

from cacti.

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.