-
Notifications
You must be signed in to change notification settings - Fork 106
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
[V0086] Fix candidate totals for future elections #3219
Conversation
cb9dc2b
to
f91e4f5
Compare
Codecov Report
@@ Coverage Diff @@
## develop #3219 +/- ##
===========================================
+ Coverage 87.78% 88.14% +0.35%
===========================================
Files 77 77
Lines 6167 6147 -20
===========================================
+ Hits 5414 5418 +4
+ Misses 753 729 -24
Continue to review full report at Codecov.
|
1258bfc
to
acc6359
Compare
acc6359
to
3dd3293
Compare
tests/test_aggregates.py
Outdated
@@ -357,6 +357,76 @@ def setUp(self): | |||
fec_election_year=2018, | |||
) | |||
|
|||
# Create data for future presidential - 2020. Use formula for future |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be a good opportunity to try out Hypothesis and seeing how well it pairs with py.test
's parameterized functions! I know there is a desire to get this out sooner rather than later, but I think these tests and this setup would make for an excellent candidate in trying this out in the future. :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ccostino! I forgot I put this note in here. I was thinking of using a get_current_cycle() + 2
but it looks like that function is only in the CMS.
b6dfe36
to
82b0259
Compare
@@ -168,9 +170,12 @@ def test_candidate_aggregates_by_election(self): | |||
|
|||
class TestCandidateAggregates(ApiBaseTest): | |||
|
|||
current_cycle = get_current_cycle() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ccostino I made these future cycles dynamic :)
the creation script of this ofec_candidate_history_with_future_elections_mv
|
Thanks so much for taking a look, @hcaofec!
|
ran this query in dev fec_cycle 2020 is missing, and not sure if last row of financial data ( cycle=2022) makes sense or not |
@hcaofec that looks right to me, we wouldn't want 2020 in there because the candidate (S6CA00584) is running in 2022. There should be a
|
@hcaofec @lbeaufort looks correct to me. We need the 2022 row to display the full 6-year period. There's no 2020 row because it's not 2019-20 yet.
@fec-jli when I click on the "details" link of security/snyk - data/flyway/build.gradle (fec-jli) above I get an error message: "organisation does not exist." Any ideas why? |
d59707a
to
5b00748
Compare
Update: I am now using |
5b00748
to
ef48865
Compare
Summary (required)
Fix candidate totals for future elections (2020/2022 presidential/senate)
I double-checked totals and tracked them here: https://docs.google.com/spreadsheets/d/1NUlhWZ6aHvNNSugPk3BWemDQSZn3pimjbqW_4IC_cnw/edit#gid=0
How to test the changes locally
cfdm_test
,invoke create_sample_db
dev
DB, changeclass CandidateHistoryWithFuture(BaseCandidate)
toofec_candidate_history_with_future_election_mv_tmp
andclass CandidateTotal(db.Model)
toofec_candidate_totals_mv_2020_tmp
feature/add-suite-to-committee-address
Impacted areas of the application
List general components of the application that this PR will affect:
Before - no data 👎
After - data! 👍
Related PRs
Branched
from feature/fix-special-candidate-totals
, PR: #3198