Skip to content

ENSY-71-post-files-to-pod#4

Merged
ehanson8 merged 4 commits intomainfrom
ENSY-71-post-files-to-pod
Jun 1, 2022
Merged

ENSY-71-post-files-to-pod#4
ehanson8 merged 4 commits intomainfrom
ENSY-71-post-files-to-pod

Conversation

@ehanson8
Copy link
Contributor

@ehanson8 ehanson8 commented May 31, 2022

Helpful background context

This PR completes the core functionality of the ppod app so full end-to-end testing is now possible.

How can a reviewer manually see the effects of these changes?

Local testing functionality will be added as a part of ENSY-85

What are the relevant tickets?

Developer

  • All new ENV is documented in README
  • Stakeholder approval has been confirmed (or is not needed)

Code Reviewer

  • The commit message is clear and follows our guidelines
    (not just this pull request message)
  • There are appropriate tests covering any new functionality
  • The documentation has been updated or is unnecessary
  • The changes have been verified
  • New dependencies are appropriate or there were no changes

Includes new or updated dependencies?

YES

Why these changes are being introduced:
* ppod needs to post MARC records to POD streams using an access token

How this addresses that need:
* Add mocked_pod and pod_response fixture and update test_env fixture with new variables
* Add requests module and related dependencies to Pipfile
* Add post_files_to_pod function
* Add unit tests for new function
* Update README.md to include new envs

Side effects of this change:
* New env required to run the code

Relevant ticket(s):
* https://mitlibraries.atlassian.net/browse/ENSY-71
@ehanson8 ehanson8 requested a review from hakbailey May 31, 2022 17:58
Copy link
Contributor

@hakbailey hakbailey left a comment

Choose a reason for hiding this comment

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

See inline comments, the code naming/clarity suggestions are totally optional but the stream name source and the bad url test need to be updated. Lmk if you have questions!

* Rename fixtures for consistency and accuracy
* Add marcxml and mocked_ssm fixtures
* Update mocked_pod fixture
* Remove pod response fixture due to lack of use response text in the app
* Rename function to post_file_to_pod
* Correct file type in post_file_to_pod
* Update log message after posting a file
* Shift types-requests to dev in Pipfile
* Update tests with new fixtures
@ehanson8 ehanson8 requested a review from hakbailey June 1, 2022 14:28
Copy link
Contributor

@hakbailey hakbailey left a comment

Choose a reason for hiding this comment

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

Just a couple more suggestions for clarity and test efficiency. Maybe go ahead and update the README env variables and instructions while you're at it? Then we'll be totally done after this PR!

* Change fixture parameters for greater efficiency
* Renamed ENV for clarity
* Update SSM call to remove unnecessary decryption
* Update requirements.txt
* Update README.md with dev1 testing instructions
* Remove unnecessary fixture calls
@ehanson8 ehanson8 requested a review from hakbailey June 1, 2022 20:29
* Add export bucket note
@ehanson8 ehanson8 merged commit f4d5f06 into main Jun 1, 2022
@ehanson8 ehanson8 deleted the ENSY-71-post-files-to-pod branch June 1, 2022 20:45
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