Skip to content

Refactor courses to course#1732

Open
AngelsandDevsLOL wants to merge 2 commits into
Courseography:masterfrom
AngelsandDevsLOL:refactor-courses-to-course
Open

Refactor courses to course#1732
AngelsandDevsLOL wants to merge 2 commits into
Courseography:masterfrom
AngelsandDevsLOL:refactor-courses-to-course

Conversation

@AngelsandDevsLOL

@AngelsandDevsLOL AngelsandDevsLOL commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Proposed Changes

Building off the previous PR #1721 (which renamed the Course data type to CourseData and moved it into Models/Course.hs), this PR renames the Courses database table to Course. It adds a v3 migration to Database/Migrations.hs so the existing database table is renamed. It updates the Courses datatype in Database/Tables.hs to be Course, as well as updating all of the accessor functions from coursesX to courseX.

With the Course name now free from the previous PR, renaming the Courses table to Course makes the schema consistent with the rest of the table names and naming conventions.
...

Screenshots of your changes (if applicable)

Type of Change

(Write an X or a brief description next to the type or types that best describe your changes.)

Type Applies?
🚨 Breaking change (fix or feature that would cause existing functionality to change)
New feature (non-breaking change that adds functionality)
🐛 Bug fix (non-breaking change that fixes an issue)
🎨 User interface change (change to user interface; provide screenshots)
♻️ Refactoring (internal change to codebase, without changing functionality) X
🚦 Test update (change that only adds or modifies tests)
📦 Dependency update (change that updates a dependency)
🔧 Internal (change that only affects developers or continuous integration)

Checklist

(Complete each of the following items for your pull request. Indicate that you have completed an item by changing the [ ] into a [x] in the raw text, or by clicking on the checkbox in the rendered description on GitHub.)

Before opening your pull request:

  • I have performed a self-review of my changes.
    • Check that all changed files included in this pull request are intentional changes.
    • Check that all changes are relevant to the purpose of this pull request, as described above.
  • I have added tests for my changes, if applicable.
    • This is required for all bug fixes and new features.
  • I have updated the project documentation, if applicable.
    • This is required for new features.
  • If this is my first contribution, I have added myself to the list of contributors.
  • I have updated the project Changelog (this is required for all changes).

After opening your pull request:

  • I have verified that the CircleCI checks have passed.
  • I have requested a review from a project maintainer.

Questions and Comments

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 0

Coverage increased (+0.04%) to 58.647%

Details

  • Coverage increased (+0.04%) from the base build.
  • Patch coverage: 6 uncovered changes across 4 files (22 of 28 lines covered, 78.57%).
  • 54 coverage regressions across 3 files.

Uncovered Changes

File Changed Covered %
app/Models/Course.hs 21 18 85.71%
app/Database/CourseVideoSeed.hs 1 0 0.0%
app/Database/Migrations.hs 3 2 66.67%
app/WebParsing/ArtSciParser.hs 1 0 0.0%
Total (5 files) 28 22 78.57%

Coverage Regressions

54 previously-covered lines in 3 files lost coverage.

File Lines Losing Coverage Coverage
app/Svg/Parser.hs 31 62.47%
app/Models/Course.hs 15 53.95%
app/MasterTemplate.hs 8 0.0%

Coverage Stats

Coverage Status
Relevant Lines: 3945
Covered Lines: 2376
Line Coverage: 60.23%
Relevant Branches: 964
Covered Branches: 503
Branch Coverage: 52.18%
Branches in Coverage %: Yes
Coverage Strength: 164.33 hits per line

💛 - Coveralls

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