Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public endpoint for tally resolution #6

Open
domi41 opened this issue Feb 18, 2021 · 2 comments
Open

Public endpoint for tally resolution #6

domi41 opened this issue Feb 18, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@domi41
Copy link
Contributor

domi41 commented Feb 18, 2021

/deliberate?tally=4,2,1,0,2/1,3,5,1,0
or
/deliberate?tally[]=4,2,1,0,2&tally[]=1,3,5,1,0
or
/4-2-1-0-2_1-3-5-1-0.json

  • With an API similar to the merit profile SVG generation
  • No need to authenticate
  • Returns JSON
@domi41 domi41 added the enhancement New feature or request label Feb 18, 2021
@domi41 domi41 added this to the v0.1.0 milestone Feb 18, 2021
@domi41 domi41 self-assigned this Feb 18, 2021
@domi41
Copy link
Contributor Author

domi41 commented Mar 13, 2021

This is well underway and now validates the following feature:

#language: fr
@fr
Fonctionnalité: Résoudre majoritairement un dépouillement
  Dans le but de connaître le rang des propositions
  En tant que détenteur⋅e du dépouillement d'un scrutin
  Je veux résoudre ce dépouillement


Règle: S'authentifier n'est pas nécessaire pour résoudre un dépouillement


Scénario: Résoudre un dépouillement

  Étant donné un visiteur nommé Paul Bourgine
  Quand Paul Bourgine télécharge le fichier 0-2-5-2-4_2-1-4-1-5_0-1-6-3-3.json
  Alors Paul Bourgine devrait réussir
  Et la réponse à Paul Bourgine devrait comporter:
  """
  proposals:
  - proposal: 0
    rank: 2
    tally: [0, 2, 5, 2, 4]
    median: 2
  - proposal: 1
    rank: 1
    tally: [2, 1, 4, 1, 5]
    median: 2
  - proposal: 2
    rank: 3
    tally: [0, 1, 6, 3, 3]
    median: 2
  """

@domi41
Copy link
Contributor Author

domi41 commented May 24, 2021

Not closing this until we've added some more specification scenarios about an incorrect usage of the endpoint, such as disparate amounts of grades and such.

This is a good first issue if anyone feels like writing plain language features.
The (french) file is https://github.com/MieuxVoter/mv-api-features-fr/blob/master/10.fonctionnalites/91.resoudre-majoritairement-un-depouillement.feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant