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

Add a backend for node and Vocdoni/SDK operations #72

Merged
merged 40 commits into from
Jan 9, 2024
Merged

Conversation

microstudi
Copy link
Contributor

@microstudi microstudi commented Nov 23, 2023

Replaces browser operations with a node wrapper backend.

  • Can create organization wallet
  • Get more tokens (dev/stg)
  • Create election in vocdoni
  • Can manually start
  • Can automatically start
  • Can pause/restart
  • Can fetch voting stats
  • Saves the results
  • Tests
  • Upload census

Setup election
image

Start election
image

Processing...
image

Pause election
image

Copy link

codecov bot commented Nov 25, 2023

Codecov Report

Attention: 72 lines in your changes are missing coverage. Please review.

Comparison is base (8ea2d6c) 92.26% compared to head (7d3f7f0) 87.69%.

❗ Current head 7d3f7f0 differs from pull request most recent head 295f3ef. Consider uploading reports for the commit 295f3ef to get more accurate results

Files Patch % Lines
...ds/decidim/vocdoni/admin/update_election_status.rb 39.53% 26 Missing ⚠️
app/jobs/decidim/vocdoni/admin/sdk_runner_job.rb 0.00% 21 Missing ⚠️
...cidim/vocdoni/admin/create_vocdoni_election_job.rb 45.00% 11 Missing ⚠️
...trollers/decidim/vocdoni/admin/steps_controller.rb 30.00% 7 Missing ⚠️
...lers/decidim/vocdoni/admin/elections_controller.rb 60.00% 4 Missing ⚠️
app/helpers/decidim/vocdoni/admin/steps_helper.rb 75.00% 2 Missing ⚠️
.../decidim/vocdoni/admin/create_voter_wallets_job.rb 95.83% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #72      +/-   ##
==========================================
- Coverage   92.26%   87.69%   -4.57%     
==========================================
  Files          87       86       -1     
  Lines        1706     1804      +98     
==========================================
+ Hits         1574     1582       +8     
- Misses        132      222      +90     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andreslucena andreslucena changed the title add a backend for node and Vocdoni/SDK operations Add a backend for node and Vocdoni/SDK operations Dec 12, 2023
Copy link
Collaborator

@andreslucena andreslucena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've given a first look, can you check it out please?

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
node-wrapper/index.js Outdated Show resolved Hide resolved
node-wrapper/node_runner.js Outdated Show resolved Hide resolved
spec/models/decidim/vocdoni/election_spec.rb Outdated Show resolved Hide resolved
spec/system/decidim/admin/admin_manages_census_spec.rb Outdated Show resolved Hide resolved
@microstudi
Copy link
Contributor Author

All issues fixed @andreslucena !

Copy link
Collaborator

@andreslucena andreslucena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a few more details but also I think I found a potential problem between the commands and the jobs. As I mentioned, we could move the problem to an issue so we can merge this ASAP

README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
app/commands/decidim/vocdoni/admin/save_results.rb Outdated Show resolved Hide resolved
app/commands/decidim/vocdoni/admin/setup_election.rb Outdated Show resolved Hide resolved
@microstudi
Copy link
Contributor Author

@andreslucena most changes applied, can you review again?

@andreslucena andreslucena merged commit 35136d6 into main Jan 9, 2024
2 checks passed
@andreslucena andreslucena deleted the node-backend branch January 9, 2024 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants