sul-dlss / course_reserves

rails app used by patrons looking up course reserve info and lib staff entering course reserve info
1 stars 1 forks source link

Set up rake task to get course information from MaIS APIs #474

Closed hudajkhan closed 1 year ago

hudajkhan commented 1 year ago

What this pull request does:

What this pull request does not do:

How to test this pull request:

More details: The fetch_courses rake task uses a new class called CourseAPI class to parse the course term info returned from the MaIS Course Term API. CourseAPI also retrieves section and instructor information, and generates the JSON that the fetch_courses rake task writes to the course_work_xml directory. The process of generating these JSON files takes a few hours, so this step is better left as a rake task that can run independently and then make the info available to the app. One JSON file per term is generated. fetch_xml requested the current and next immediate term, so that pattern remains the same.

hudajkhan commented 1 year ago

Thanks @thatbudakguy ! These are really helpful suggestions.

jcoyne commented 1 year ago

Is there a related issue this should be linked to?

hudajkhan commented 1 year ago

Just put the link to this pull request in the issue https://github.com/sul-dlss/course_reserves/issues/410

jcoyne commented 1 year ago

@hudajkhan I think this is looking good now. Do you want to squash this into a single commit, or would it be beneficial to retail the 19 commits in the history.

hudajkhan commented 1 year ago

Squashing seems fine for the moment. Rubocop and rspec passed locally but the checks are still in process on GitHub.