Skip to content

Conversation

@alportoricensis
Copy link
Contributor

Proposed Changes

  • Added beta support for Canvas' SmartSearch API (https://canvas.instructure.com/doc/api/smart_search.html#SearchResult), as requested in Add API coverage for SmartSearch #659.
  • Included a smartsearch method within course.py to handle requests to the SmartSearch API
  • Created SearchResult subclass within searchresult.py to adapt different responses from the SmartSearch API (which can return a page, an assignment, etc.) to existing CanvasAPI classes (Page, Assignment, etc.). Took into account extensibility and raising ValueErrors as the API is experimental and breaking changes could occur.
  • Added tests for both additions, maintaining 100% statement coverage

Fixes #659.

This was completed as part of Homework #6 of EECS 481, Software Engineering, at The University of Michigan, which requires students to create a pull request for an open-source project. For more information, see https://eecs481.org/hw6.html.

Thetwam added 5 commits June 27, 2025 14:16
…tch real-life use. Remove kwargs from SearchResult.resolve in favor of adding to kwargs not required list.
…artsearch is the only way a user can really get a SmartResult object, and that function adds the course_id in, we can use the internal course_id value reliably.
@codecov
Copy link

codecov bot commented Jun 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (531638b) to head (83c4b5a).
Report is 8 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff            @@
##           develop      #690   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           74        75    +1     
  Lines         3764      3788   +24     
=========================================
+ Hits          3764      3788   +24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@Thetwam Thetwam left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! I made a bunch of tweaks to the code to match some real-world testing we did with this branch. If you have any questions, let me know. Thanks again! 👍

@Thetwam Thetwam merged commit a2b22fd into ucfopen:develop Jun 30, 2025
7 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.

Add API coverage for SmartSearch

2 participants