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

Generalized spreadsheet.py and refactored test_spreadsheet.py #1300

Merged
merged 35 commits into from
Jul 31, 2024

Conversation

WackyWeaver
Copy link
Contributor

@WackyWeaver WackyWeaver commented Jul 31, 2024

Some of the functionality of spreadsheet.py did not specify a specific year. Many of the peewee queries did not filter for academic year. We joined all necessary tables to allow spreadsheets to return data for a specified academic year.

Refactored the 14 spreadsheet.py unit tests to include fixtures independent from test data. Removed unnecessary rows in test objects within the test functions. simplified asserted functions and created a much more

Resolves #1289

WackyWeaver and others added 30 commits July 22, 2024 17:06
…n and an input bar for the year to download the report.
… the 'select box' and 'label', and renamed the download button to 'Download' and moved the Excel icon infront of the name.
…he page needs to reload every time it is toggled and does not save the past event tables after reloading
… changed while past terms are always on and disabled and tables are displaying all the time when toggle is on and not displaying when toggle is off
Copy link
Contributor

@BrianRamsay BrianRamsay left a comment

Choose a reason for hiding this comment

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

Looks pretty good.

Add tests to make sure that hard-coding '2023-2024' in the spreadsheet functions wouldn't pass the tests.
Remove sub-transactions in the individual tests and see if everything still works (it should).

app/logic/spreadsheet.py Outdated Show resolved Hide resolved
Copy link

View Code Coverage

@BrianRamsay BrianRamsay merged commit a5f47cd into development Jul 31, 2024
5 checks passed
@BrianRamsay BrianRamsay deleted the generalize-spreadsheet branch July 31, 2024 16:48
@ali-ramazani ali-ramazani self-assigned this Jul 31, 2024
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.

Generalize Spreadsheet Queries (Continued)
6 participants