Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
meezlung authored Dec 19, 2024
1 parent 55e5dd8 commit f4f7ee0
Showing 1 changed file with 23 additions and 17 deletions.
40 changes: 23 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,34 +92,40 @@ https://github.com/user-attachments/assets/8c4a7ae4-fd49-46dd-9710-ea5d16769eba
## Overview of the files
### crs_scraper.py
- This just scrapes everything from the CRS website then outputs a data in the form of **list[dict[str, str | list[str]]]**.
- I used this last Midyear CRS enlistment (2023) and outputted the data as ```raw_data_CS_2ndYear_1stSem_AY_2024-2025.json``` and ```raw_data_CS_2ndYear_1stSem_AY_2024-2025.txt```.
- They are raw data, so I had to use ```data_sorter.py``` to sort important property data. What I'm thinking now is that I should really optimize this by sorting and organizing properties while scraping the website (see ```optimized_crscraper.py```).
### crs_scraper_preenlistment.py, crs_scraper_waitlist.py
- Consists of the class, ```CRScraper```.
- ```CRScraper```
- This just scrapes everything from the CRS website then outputs a data in the form of **list[dict[str, str | list[str]]]**.
- I used this last Midyear CRS enlistment (2023) and outputted the data as ```raw_data_CS_2ndYear_1stSem_AY_2024-2025.json``` and ```raw_data_CS_2ndYear_1stSem_AY_2024-2025.txt```.
- They are raw data, so I had to use ```data_sorter.py``` to sort important property data. What I'm thinking now is that I should really optimize this by sorting and organizing properties while scraping the website (see ```optimized_crscraper.py```).
### crs_data.py (for debugging purposes only)
- This contains the raw data generated by ```crs_scraper.py``` last CRS enlistment during the Midyear for the subjects Physics 72, Math 23, Math 40, CS 20, and CS 32 (my courses this 1st Sem Second Year).
### data_sorter.py
- It needs the raw data from ```crs_scraper.py``` as input.
- This generates all possible combinations of schedules with no time conflict.
- Also has the feature to rank all generated schedule combinations possible by the property probability.
- TODO:
- Can be good as well if we can consider other constrains as well (e.g. Restrictions/Remarks)
- Consists of classes, ```DataSorter``` and ```ScheduleGenerator```.
- ```DataSorter```
- It needs the raw data from ```crs_scraper.py``` as input.
- Only formats the raw data beautifully so it's kinda unnecessary.
- ```ScheduleGenerator```
- This generates all possible combinations of schedules with no time conflict.
- Also has the feature to rank all generated schedule combinations possible by the property probability.
- TODO:
- Can be good as well if we can consider other constrains as well (e.g. Restrictions/Remarks)
### probability_calculator.py
- This is highly inspired by _**Leonard Ang**_'s code in his [UPD-Course-Probability-Calculator](https://github.com/drew-747/UPD-Course-Probability-Calculator/blob/main/popup.js)
- This calculates probability based on available slots, total demand, and preenlistment priority.
- I think this should not be the only factor in deciding which ranks the best schedule.
- Consists of the class, ```ProbabilityCalculator```.
- ```ProbabilityCalculator```
- This is highly inspired by _**Leonard Ang**_'s code in his [UPD-Course-Probability-Calculator](https://github.com/drew-747/UPD-Course-Probability-Calculator/blob/main/popup.js)
- This calculates probability based on available slots, total demand, and preenlistment priority.
- I think this should not be the only factor in deciding which ranks the best schedule.
### crs_main.py
- This controls everything, including ```crs_data.py```, ```data_sorter.py```, ```crs_scraper.py```.
- This controls everything, including ```crs_data.py```, ```data_sorter.py```, ```crs_scraper.py``` via import modules.
- This will also serve as the main backend file for the Svelte frontend via Flask.
### test.py
- Same behavior as crs_main.py, but is only just for local testing purposes.
<br />
Expand Down

0 comments on commit f4f7ee0

Please sign in to comment.