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

Added option to fetch and upload old PI file to from and to S3, and added logic to update old PI file #28

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

QuanMPhm
Copy link
Contributor

@QuanMPhm QuanMPhm commented Apr 24, 2024

Partially closes #27. If the user does not provide an old_pi file, process_report.py will by default fetch the file from a hardcoded location in S3 storage.
Setting the upload-to-s3 option will now upload both the processed CSV invoices and the updated PI file.

I've also renamed some functions for consistent capitalization.

I have also added a few print statements to provide the following info:

  • When a new PI is encountered in an invoice
  • When a future PI is found in a past invoice

It should be noted that if future PIs are encountered when processing old invoices, the invoice script will consider them new PIs for the purpose of the new PI credit, and will update the future PI's first-month date to be same as the old invoice's date.

Blocked on #23, and prerequisite to #21

process_report/process_report.py Outdated Show resolved Hide resolved
process_report/process_report.py Show resolved Hide resolved
@QuanMPhm
Copy link
Contributor Author

I've added some small features and have updated the PR summary

process_report/process_report.py Outdated Show resolved Hide resolved
@QuanMPhm QuanMPhm force-pushed the 27/old_pi branch 2 times, most recently from 62d985f to 8505314 Compare April 25, 2024 20:34
Copy link
Contributor

@knikolla knikolla left a comment

Choose a reason for hiding this comment

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

One last comment, otherwise looks good.

process_report/process_report.py Outdated Show resolved Hide resolved
Copy link
Contributor

@knikolla knikolla left a comment

Choose a reason for hiding this comment

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

Looks good to me. @naved001 can you do a final pass today?

process_report/process_report.py Outdated Show resolved Hide resolved
@QuanMPhm
Copy link
Contributor Author

QuanMPhm commented Apr 29, 2024

@knikolla @naved001 Which PR should be pushed first? Does it matter?

@naved001
Copy link
Collaborator

@QuanMPhm maybe the order you proposed the PRs. You'll need to fix the merge conflicts on both PRs though.

…and uploaded back to S3

Also provides logic for cases where future PIs are encountered in past invoices, in which case they will be
considered new PIs for the purpose of the New PI credit, and their first-month date will be changed to the
past invoice's date
@QuanMPhm QuanMPhm merged commit f0a8671 into CCI-MOC:main Apr 29, 2024
2 checks passed
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.

Fetch and update old pi file to s3
3 participants