Giter Club home page Giter Club logo

votes's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar lzear avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

votes's Issues

Question

Hi Izear
Thanks for your great work here. We are using your repo in our app Forby.io and we would like to add 2 algorithms based on some research we came across:

Minimax-TD

https://drive.google.com/file/d/1ZvId-tdOLb4vWp0pm5XZaBK2FkqkXLXh/view?usp=share_link

And Score Voting:
https://en.wikipedia.org/wiki/Score_voting
Just adds up the scores. We are using +5 to -5 as our options.

Are you interested in adding these?
I am willing to hire someone to develop these.
Thanks,
[email protected]

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


The release 1.1.0 on branch master cannot be published as it is out of range.

Based on the releases published on other branches, only versions within the range >=1.0.0 <1.1.0 can be published from branch master.

The following commits are responsible for the invalid release:

  • feat: force a deployment (f6f966b)
  • ci: fix release action (dc73b37)
  • ci: fix deploy action (2746668)
  • ci: fix semantic release github action (47e9f1b)
  • ci: remove travis deploy (10b8d7b)
  • ci: add github action: semantic release (9021961)
  • Create codeql-analysis.yml (7c94cde)
  • chore(deps): bump npm-user-validate from 1.0.0 to 1.0.1 (87d9eec)

Those commits should be moved to a valid branch with git merge or git cherry-pick and removed from branch master with git revert or git reset.

A valid branch could be next.

See the workflow configuration documentation for more details.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

In-browser use

Hi,

have you tried/had success with adapting this package for in-browser use?

Cannot resolve Lodash dependencies from Webpack + TypeScript

First, I just want to say thanks for publishing this library! This is a high-quality resource for running different types of voting algorithms. I'm interested in using this library for hobby purposes.


I'm trying to run this library from a Webpack config, but I'm running into error messages that resemble the following:

ERROR in ./node_modules/votes/dist/index.mjs 1:895-929
Module not found: Error: Can't resolve 'lodash/difference' in '[...]\node_modules\votes\dist'
Did you mean 'difference.js'?
BREAKING CHANGE: The request 'lodash/difference' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

The Webpack config I'm using comes from the official Webpack + TypeScript docs.

I'm able to resolve this issue by following these steps. Can we provide an out-of-the-box fix for this, though?

Additional information:

Questions

Hi Izear
First of all, I am very impressed with your work.
I have a few questions.

  1. What's the meaning of weight in the below example?
  2. What's the use of scoresFromBallots?
  3. Can you share one example for Minimax Condorcet method?
  4. Is there any similar npm package for voting algorithms?

return scoresFromBallots(
[
{ ranking: [['Lion'], ['Bear'], ['Sheep']], weight: 4 },
{ ranking: [['Sheep'], ['Bear'], ['Lion']], weight: 3 },
{ ranking: [['Bear', 'Sheep'], ['Lion']], weight: 2 },
],
['Lion', 'Bear', 'Sheep'],
VotingSystem.Schulze,
)

Next.js production env with side effect

I'm still trying to understand what is exactly the root cause, the only thing I know for sure is that it only happens when I try to use the votes import, if I remove the code reference it works fine.

It's using InstantRunoff to calculate results, it works fine locally, but once I deploy into Vercel it fails and the only error I got is this one:
image

Any tip how can I investigate it better or what to do? I already sent Vercel a ticket to follow up as well.

Sentry information:

Crashed in non-app: /var/task/node_modules/votes/dist/votes.cjs.prod.js in InstantRunoff.lastRoundQualified

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.