[Refactor:Autograding] Remove python-dateutil dependency#12426
Conversation
Farhanxikram
left a comment
There was a problem hiding this comment.
Functionality review:
- python-dateutil has been removed from the system requirements file
- I used grep to search for "From dateutils" and there were no instances of that, I also checked "import dateutils" and all dateutils were imported from submitty utillities and not sourced externally
- I pip removed python's date utils from my VM and the tests passed, and dates were completely fine on the webpage side (I was able to edit assignments as an instructor and change dates completely fine)
|
Thank you for the review and the detailed feedback, @Farhanxikram! |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #12426 +/- ##
============================================
- Coverage 21.65% 21.65% -0.01%
Complexity 9638 9638
============================================
Files 268 268
Lines 36233 36230 -3
Branches 486 486
============================================
- Hits 7847 7845 -2
+ Misses 27904 27903 -1
Partials 482 482
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
williamschen23
left a comment
There was a problem hiding this comment.
Lint still fails, please fix!
|
Hi @Farhanxikram! Thanks so much for approving the code! It looks like the CI workflows are currently paused and 'awaiting approval' to run. Could someone please trigger them when they have a second? I'll keep an eye on the results. |
) ### Why is this Change Important & Necessary? This PR removes the python-dateutil dependency. We already have a strong internal submitty_utils/dateutils parser, so using an external library for the same task is not necessary. Moving to a single parser simplifies the codebase and makes us less dependent on external tools. Closes Submitty#11344 ### What is the New Behavior? The functionality doesn't change for normal users. The backend has been changed to use the internal Submitty utilities for all date string parsing instead of the external dateutil library. ### What steps should a reviewer take to reproduce or test the bug or new feature? 1. Check that python-dateutil isn't listed in .setup/pip/system_requirements.txt. 2. Verify that there aren't any import dateutil statements left in the Python source code (I've checked this with grep). 3. Run any action involving date parsing to make sure no ModuleNotFoundError appears. ### Automated Testing & Documentation 1. Unit Tests: I ran the internal utility tests locally: python3 -m unittest python_submitty_utils/tests/test_dateutils.py. All 15 tests passed. 2. End-to-End: Verified basic submission cycles in a local Vagrant environment. 3. Documentation: No changes to submitty.org are needed for this backend change. Other information Breaking Change? No. Migrations? No. Security? Yes, slightly improved by reducing the number of third-party packages. --------- Co-authored-by: HAMMU2025 <[email protected]> Co-authored-by: Barb Cutler <[email protected]>
) ### Why is this Change Important & Necessary? This PR removes the python-dateutil dependency. We already have a strong internal submitty_utils/dateutils parser, so using an external library for the same task is not necessary. Moving to a single parser simplifies the codebase and makes us less dependent on external tools. Closes Submitty#11344 ### What is the New Behavior? The functionality doesn't change for normal users. The backend has been changed to use the internal Submitty utilities for all date string parsing instead of the external dateutil library. ### What steps should a reviewer take to reproduce or test the bug or new feature? 1. Check that python-dateutil isn't listed in .setup/pip/system_requirements.txt. 2. Verify that there aren't any import dateutil statements left in the Python source code (I've checked this with grep). 3. Run any action involving date parsing to make sure no ModuleNotFoundError appears. ### Automated Testing & Documentation 1. Unit Tests: I ran the internal utility tests locally: python3 -m unittest python_submitty_utils/tests/test_dateutils.py. All 15 tests passed. 2. End-to-End: Verified basic submission cycles in a local Vagrant environment. 3. Documentation: No changes to submitty.org are needed for this backend change. Other information Breaking Change? No. Migrations? No. Security? Yes, slightly improved by reducing the number of third-party packages. --------- Co-authored-by: HAMMU2025 <[email protected]> Co-authored-by: Barb Cutler <[email protected]>
Why is this Change Important & Necessary?
This PR removes the python-dateutil dependency. We already have a strong internal submitty_utils/dateutils parser, so using an external library for the same task is not necessary. Moving to a single parser simplifies the codebase and makes us less dependent on external tools.
Closes #11344
What is the New Behavior?
The functionality doesn't change for normal users. The backend has been changed to use the internal Submitty utilities for all date string parsing instead of the external dateutil library.
What steps should a reviewer take to reproduce or test the bug or new feature?
Automated Testing & Documentation
Other information
Breaking Change? No.
Migrations? No.
Security? Yes, slightly improved by reducing the number of third-party packages.