-
Notifications
You must be signed in to change notification settings - Fork 0
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
DEV-562, report count of commitments by phase & org #294
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mwarin
changed the title
started work on report for commitment by phase & org
DRAFT DEV-562, report for commitment by phase & org
Oct 19, 2023
mwarin
changed the title
DRAFT DEV-562, report for commitment by phase & org
DRAFT DEV-562, report count of commitments by phase & org
Oct 19, 2023
mwarin
changed the title
DRAFT DEV-562, report count of commitments by phase & org
DEV-562, report count of commitments by phase & org
Oct 19, 2023
aelkiss
reviewed
Oct 20, 2023
aelkiss
reviewed
Oct 20, 2023
aelkiss
reviewed
Oct 20, 2023
aelkiss
reviewed
Oct 20, 2023
aelkiss
reviewed
Oct 20, 2023
aelkiss
requested changes
Oct 20, 2023
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.
I left a few suggestions; in particular I would like to remove the mkdir
parameter from Utils::ReportOutput#dir
.
@aelkiss I think I addressed all of your feedback. Thanks for catching the missing tests! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
Originating ticket: DEV-562
This PR is primarily adding a new report class (
Reports::SharedPrintPhaseCount
), that gives a count of how manycommitment
s perorganization
given aphase
.So, if umich has 100 phase 3 commitments and smu has 50, and we make a phase 3 report using this new class, we expect an output file with:
(pipes and spacing added here for human readability)
Also taking this time to add a module for simplifying report output location (
Utils::ReportOutput
), which is starting to bug me.If successful/useful we can (on a rainy day) start implementing in the other report scripts.
How?
If you want to run the tests:
Why?
The reporting script is simply needed.
The util script is not strictly needed, but it allows any given script that produces output files to not have to figure out where to put those files, how to name them, or know/care much about the directory structure. This also standardizes timestamps in filenames, and automatically adds a short unique-enough-ish string to avoid filename collisions.
Files changed
4 all new files:
lib/reports/shared_print_phase_count.rb
: report script, the main payload of this PRspec/reports/shared_print_phase_count_spec.rb
test for report scriptlib/utils/report_output.rb
util class to potentially simplify report outputsspec/utils/report_output_spec.rb
test for util class2 minimally edited files to make report script runnable from
phctl.sh
:lib/phctl.rb
lib/sidekiq_jobs.rb
Reviewing/Testing
I'm mostly looking for a sanity check of the tests and the util class.
From @aelkiss I am most interested in what you think about
ReportOutput
as a solution for simplifying reports, since you did the trick for the temporary spec-ouputs.