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

Export sum of weights #99

Merged
merged 6 commits into from
Apr 27, 2021
Merged

Export sum of weights #99

merged 6 commits into from
Apr 27, 2021

Conversation

sauloperez
Copy link
Collaborator

@sauloperez sauloperez commented Apr 27, 2021

Closes #87 . It does so by passing in the type of export to perform. That type is used in the job class to choose which query object and serializer pair is used. That's what changes between the two different results views.

The routes follow the same approach we adopted for the results pages. A controller (and endpoint) for each view.

@sauloperez sauloperez self-assigned this Apr 27, 2021
@sauloperez sauloperez force-pushed the export-sum-of-weights branch 7 times, most recently from 19c64b7 to 6bc11ec Compare April 27, 2021 15:01
@sauloperez sauloperez marked this pull request as ready for review April 27, 2021 15:06
We can avoid some code and make things even more explicit. The only
thing that changes between these controllers is the actual
data/serialization the jobs will use.
@codecov-commenter
Copy link

codecov-commenter commented Apr 27, 2021

Codecov Report

Merging #99 (8970e4e) into master (997c1f8) will increase coverage by 0.35%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #99      +/-   ##
==========================================
+ Coverage   94.07%   94.43%   +0.35%     
==========================================
  Files          54       58       +4     
  Lines         726      772      +46     
==========================================
+ Hits          683      729      +46     
  Misses         43       43              
Impacted Files Coverage Δ
...ecidim/action_delegator/admin/create_delegation.rb 96.15% <ø> (ø)
...elegator/admin/consultations/exports_controller.rb 100.00% <100.00%> (ø)
...legator/admin/exports/sum_of_weights_controller.rb 100.00% <100.00%> (ø)
...legator/admin/results/sum_of_weights_controller.rb 100.00% <100.00%> (ø)
...ction_delegator/export_consultation_results_job.rb 100.00% <100.00%> (ø)
...cidim/action_delegator/sum_of_membership_weight.rb 100.00% <100.00%> (ø)
...queries/decidim/action_delegator/sum_of_weights.rb 100.00% <100.00%> (ø)
...ueries/decidim/action_delegator/type_and_weight.rb 100.00% <100.00%> (ø)
...idim/action_delegator/sum_of_weights_serializer.rb 100.00% <100.00%> (ø)
lib/decidim/action_delegator/admin_engine.rb 100.00% <100.00%> (ø)
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 997c1f8...8970e4e. Read the comment docs.

@sauloperez sauloperez merged commit a4f7cca into master Apr 27, 2021
@sauloperez sauloperez deleted the export-sum-of-weights branch April 27, 2021 18:25
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.

Ability to export CSV results of the new results page
2 participants