Skip to content

Comments

Lous list open seats async#990

Merged
ajnye merged 40 commits intodevfrom
lous-list-open-seats-async
Mar 23, 2025
Merged

Lous list open seats async#990
ajnye merged 40 commits intodevfrom
lous-list-open-seats-async

Conversation

@brandonistfan
Copy link
Contributor

@brandonistfan brandonistfan commented Feb 2, 2025

GitHub Issues addressed

  • This PR closes

Testing

  • A brief explanation of tests done/written or how reviewers can test your work

To test this, navigate to a course and click the section dropdown to view the updated enrollment for each section. In terms of unit testing, there are two testing modules, test_enrollment.py and test_fetch_enrollment.py.

What I did

  • Created SectionEnrollment model to track course section enrollment
  • Created CourseEnrollment model to track when a course was last updated
  • Implemented an asynchronous task to update enrollment when clicking on a course
  • Added open sections filter to course search functionality
  • Integrated open sections filter into dropdown search
  • Updated Course model and search view to handle open sections filtering
  • Defaulted sections dropdown to open while giving the option to show 5 sections or show all
  • Created a script/command to run an update on all sections for the current semester fetch_enrollment.py

Screenshots

  • Before
image image *Open Section Filter Not Applied* image - After imageimage *Open Section Filter Applied* image

Questions/Discussions/Notes

@brandonistfan brandonistfan force-pushed the lous-list-open-seats-async branch from 004a14a to a9bac3c Compare February 2, 2025 20:36
@brandonistfan brandonistfan force-pushed the lous-list-open-seats-async branch from f5777b8 to ace06b5 Compare February 9, 2025 17:55
@brandonistfan brandonistfan force-pushed the lous-list-open-seats-async branch from 8be853a to c8a211f Compare February 9, 2025 20:58
@brandonistfan brandonistfan force-pushed the lous-list-open-seats-async branch from 6fda130 to 05217a2 Compare February 9, 2025 22:12
@brandonistfan brandonistfan requested a review from ajnye February 12, 2025 19:15
@brandonistfan brandonistfan force-pushed the lous-list-open-seats-async branch from 8d766ea to 6286272 Compare February 17, 2025 21:35
@brandonistfan brandonistfan force-pushed the lous-list-open-seats-async branch from 6286272 to 75ce37e Compare February 17, 2025 21:43
@brandonistfan brandonistfan force-pushed the lous-list-open-seats-async branch from 9b6209e to 2c75acc Compare February 18, 2025 23:06

@patch("tcf_website.management.commands.fetch_enrollment.session.get")
def test_fetch_enrollment_success(self, mock_get):
"""Test successful enrollment fetch."""
Copy link
Contributor

Choose a reason for hiding this comment

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

is the rest of the codebase using unittest.mock? This flows a lot better than some of the older tests.

Copy link
Member

Choose a reason for hiding this comment

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

I don't think so, but future tests should probably use this.

@Jay-Lalwani Jay-Lalwani force-pushed the lous-list-open-seats-async branch from 06032dd to f051ef3 Compare March 15, 2025 22:16
Jay-Lalwani
Jay-Lalwani previously approved these changes Mar 17, 2025
ajnye
ajnye previously approved these changes Mar 23, 2025
Copy link
Member

@ajnye ajnye left a comment

Choose a reason for hiding this comment

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

LGTM, we should do some more bug testing and merge this ASAP

@brandonistfan brandonistfan dismissed stale reviews from ajnye and Jay-Lalwani via 511bacb March 23, 2025 18:56
Copy link
Member

@ajnye ajnye left a comment

Choose a reason for hiding this comment

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

Approved

@ajnye ajnye merged commit 323008a into dev Mar 23, 2025
3 checks passed
chaizhang pushed a commit that referenced this pull request Aug 10, 2025
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.

4 participants