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

Adding option to read in JSON resulting from MaIS API by adding a value to Setting #479

Merged
merged 7 commits into from
May 17, 2023

Conversation

hudajkhan
Copy link
Contributor

@hudajkhan hudajkhan commented May 15, 2023

Previous pull request, starting with #474, helped setup a rake task that could be run to generate JSON files with course information from the MaIS APIs.

This pull request allows the app to read in those JSON files if a particular Setting key "use_course_json" is present. The default is to not have that variable be in the Settings file, so we can try out how the app behaves in staging first by manually adding that setting. The tests have been updated to pretend the use_course_json setting is present.

A subsequent pull request will do the following to switch the course reserves process over to using the MaIS APIs:

  • Update schedule.rb so it runs the fetch_courses rake task instead of fetch_xml
  • Remove the setting based option to use the MaIS API JSON and switch over entirely (and remove the registry harvester XML pathway)
  • Update the tests so they no longer rely on the "use_course_json" setting (since they will no longer have to)

How to test this pull request:

  • There are files on staging with the resulting JSON from the APIs (under the lib/course_work_content directory). If you copy these over to your local lib/course_work_content directory, then start the app as you normally would, and then click on "create new reserve list", you should see several pages of courses listed.

@hudajkhan hudajkhan changed the title DRAFT: adding JSON reading in options Adding option to read in JSON resulting from MaIS API by adding a value to Setting May 17, 2023
@hudajkhan hudajkhan marked this pull request as ready for review May 17, 2023 16:03
lib/course_work_courses.rb Outdated Show resolved Hide resolved
lib/course_work_courses.rb Outdated Show resolved Hide resolved
lib/course_work_courses.rb Outdated Show resolved Hide resolved
lib/course_work_courses.rb Outdated Show resolved Hide resolved
@jcoyne jcoyne merged commit 823c4c9 into master May 17, 2023
@jcoyne jcoyne deleted the readInJSON branch May 17, 2023 20:28
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