Skip to content

Refactor Building and Time functions into Models#1718

Draft
AngelsandDevsLOL wants to merge 7 commits into
Courseography:masterfrom
AngelsandDevsLOL:refactor-building-and-time
Draft

Refactor Building and Time functions into Models#1718
AngelsandDevsLOL wants to merge 7 commits into
Courseography:masterfrom
AngelsandDevsLOL:refactor-building-and-time

Conversation

@AngelsandDevsLOL
Copy link
Copy Markdown
Contributor

@AngelsandDevsLOL AngelsandDevsLOL commented May 30, 2026

Proposed Changes

Moves Building-related functions out of Database/Tables.hs and WebParsing/ArtSciParser.hs into a new Models/Building.hs, following a similar pattern as Models/Course.hs and Models/Meeting.hs. This PR also moves the Time-related functions out of Database/Tables.hs into Models/Time.hs.

buildingsCSV, parseBuildings, getBuildingsFromCSV, getBuilding, are moved to Models/Building.hs.
buildTime and buildTimes are moved to Models/Time.hs.
All imports using the functions were updated to find the corresponding functions in Models/Building.hs and Models/Time.hs.
...

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

@AngelsandDevsLOL AngelsandDevsLOL force-pushed the refactor-building-and-time branch from 7757b19 to 9a83761 Compare May 30, 2026 15:13
@coveralls
Copy link
Copy Markdown

Coverage Report for CI Build 8539

Coverage increased (+0.4%) to 58.634%

Details

  • Coverage increased (+0.4%) from the base build.
  • Patch coverage: 2 uncovered changes across 1 file (38 of 40 lines covered, 95.0%).
  • 28 coverage regressions across 1 file.

Uncovered Changes

File Changed Covered %
app/Models/Building.hs 26 24 92.31%
Total (2 files) 40 38 95.0%

Coverage Regressions

28 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
app/WebParsing/ArtSciParser.hs 28 0.0%

Coverage Stats

Coverage Status
Relevant Lines: 3941
Covered Lines: 2373
Line Coverage: 60.21%
Relevant Branches: 964
Covered Branches: 503
Branch Coverage: 52.18%
Branches in Coverage %: Yes
Coverage Strength: 164.71 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