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

Section importers: Update to explicitly scope by district_school_year #2551

Merged
merged 14 commits into from Aug 27, 2019

Conversation

@kevinrobinson
Copy link
Contributor

kevinrobinson commented Aug 26, 2019

Builds on #2550, and 47f2819#diff-cdc8b736dce9a3bd0db85d690b10d9e1 before.

Who is this PR for?

Somerville educators, internal team

What problem does this PR fix?

Somerville section assignment exports are now scoped by the district_school_year, which means there's now enough information to avoid collisions on primary keys across school years. Things like course_number and section_number were recycled but with different values across semesters or years, and because of how the import processes for these worked historically (years back), this meant there were different variants of old orphaned records in the Section table.

Ideally, we'd be able to help educators look at information like student section enrollment and grades over time. To do this for grades specifically, it means that Section records need to have stable identities over time. The snapshots to HistoricalGrade records does this in a limited way, but we haven't looked at this yet.

What does this PR do?

This PR updates the importers processing a) course and sections, b) student section assignments, c) educator section assignments, and d) section grades, and their related tests. These all now expect district_school_year to be set explicitly, and scope the match process in the import to only look within that school year.

The result is that running these in order should create a new set of Section records, explicitly scoped to a school year. And older Section records would stay in the database,

Checklists

Which features or pages does this PR touch?

  • course_sections importer
  • educator_section_assignments importer
  • student_section_assignments importer
  • student_section_grades importer
  • Student profile pages
  • Educator permissions
  • Home page

Does this PR use tests to help verify we can deploy these changes quickly and confidently?

  • Included specs for changes
  • Improved specs for existing code in need of better test coverage
  • Manual testing made more sense here
@kevinrobinson

This comment has been minimized.

Copy link
Contributor Author

kevinrobinson commented Aug 27, 2019

selfie

@kevinrobinson kevinrobinson merged commit 620db5a into master Aug 27, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@kevinrobinson kevinrobinson deleted the patch/isolate-sections-by-school-year branch Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.