Skip to content

Commit 9ac2786

Browse files
authored
Merge pull request #1002 from thecourseforum/dev
Add new grade data from fall 2024
2 parents e3eb00f + dfed1e7 commit 9ac2786

File tree

8 files changed

+2603
-16
lines changed

8 files changed

+2603
-16
lines changed

.gitattributes

Lines changed: 0 additions & 7 deletions
This file was deleted.

doc/dev.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# tCF Developer Info
22

3-
Ensure your system has [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git), [git-lfs](https://git-lfs.com/) and [Docker](https://docs.docker.com/install/) installed.
3+
Ensure your system has [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git), [git-lfs](https://git-lfs.com/), [Docker](https://docs.docker.com/install/), and [gdown](https://github.com/wkentaro/gdown) installed.
44

55
## One-Command Setup
66

@@ -35,7 +35,7 @@ $ docker compose up --build
3535
```
3636

3737
4. Wait for the Django server to finish building (i.e. `tcf_django | Watching for file changes with StatReloader` is visible in stdout).
38-
5. Download and place the [latest database backup](https://drive.google.com/drive/u/0/folders/1a7OkHkepOBWKiDou8nEhpAG41IzLi7mh) from Google Drive into `db/latest.sql` in your local repo.
38+
5. Download and place the [latest database backup](https://drive.google.com/drive/u/0/folders/1a7OkHkepOBWKiDou8nEhpAG41IzLi7mh) (should be named `latest.sql`) from Google Drive into `db/latest.sql` in your local repo.
3939
6. Update the database:
4040

4141
MacOS/Linux (or Windows, if you're using Git-Bash):

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ requests~=2.31.0
2222
social-auth-app-django~=5.4.0
2323
tqdm~=4.66.1
2424
types-tqdm~=4.66.0
25-
uWSGI~=2.0.23
25+
uWSGI~=2.0.28

scripts/setup.sh

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ if [ -z "$1" ]; then
55
exit
66
fi
77

8+
cd "$1" || exit
9+
810
exists() {
911
command -v "$1" >/dev/null 2>&1 || {
1012
echo "Error: '$1' is not installed. Please install '$1'." >&2
@@ -16,6 +18,8 @@ exists git
1618

1719
exists docker
1820

21+
exists gdown # check for gdown
22+
1923
git clone git@github.com:thecourseforum/theCourseForum2.git
2024
if [ "$?" -ne 0 ]; then
2125
echo "Unable to clone thecourseforum/theCourseForum2 with SSH. Ensure you have an ssh key set up on your GitHub account."
@@ -39,11 +43,25 @@ read -r _ </dev/tty
3943

4044
[ ! -f ".env" ] && echo "Error: '.env' file does not exist in '$1'. Follow the installation instructions in doc/dev.md after creating a '.env' file." && exit 1
4145

46+
GDRIVE_FILE_ID="1TsSvhvWGA24537xNo_9CkULKzjugNrZH"
47+
SQL_FILE_PATH="db/latest.sql"
48+
49+
echo "Downloading $SQL_FILE_PATH from Google Drive..."
50+
51+
# use gdown to download latest.sql
52+
gdown "$GDRIVE_FILE_ID" --output "$SQL_FILE_PATH"
53+
if [ "$?" -ne 0 ]; then
54+
echo "Failed to download $SQL_FILE_PATH from Google Drive."
55+
echo "Make sure the file is publicly accessible or you have proper permissions."
56+
exit 1
57+
fi
58+
4259
docker compose build --no-cache
4360
docker compose up &
4461
(
45-
sleep 1
62+
sleep 3 # 1 to 3 to ensure containers are up
4663
docker exec -i tcf_db psql tcf_db -U tcf_django -c "DROP SCHEMA public CASCADE; CREATE SCHEMA public;"
4764
docker exec -i tcf_db psql tcf_db -U tcf_django -c "CREATE EXTENSION IF NOT EXISTS pg_trgm;"
48-
docker exec -i tcf_db psql tcf_db -U tcf_django <db/latest.sql
65+
echo "Importing data from $SQL_FILE_PATH..."
66+
docker exec -i tcf_db psql tcf_db -U tcf_django < "$SQL_FILE_PATH"
4967
) &

tcf_website/management/commands/grade_data/csv/2024_fall.csv

Lines changed: 2569 additions & 0 deletions
Large diffs are not rendered by default.
24.4 KB
Loading

tcf_website/templates/landing/landing.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,25 +318,25 @@ <h5>Follow
318318
<li class="list-inline-item mr-3"
319319
style="display: inline-block; vertical-align: middle; transform: translateY(0.00rem);">
320320
<a href="https://discord.gg/tAjzH7eyvW">
321-
<i class="fab fa-discord fa-2x fa-fw"></i>
321+
<i class="fab fa-discord fa-2x fa-fw" style="width: 1.5em; height: 1.5em; vertical-align: middle; display: inline-block; filter: invert(100%) brightness(150%);"></i>
322322
</a>
323323
</li>
324324
<li class="list-inline-item mr-3"
325325
style="display: inline-block; vertical-align: middle; transform: translateY(0.00rem);">
326326
<a href="https://www.facebook.com/thecourseforum">
327-
<i class="fab fa-facebook fa-2x fa-fw"></i>
327+
<i class="fab fa-facebook fa-2x fa-fw" style="width: 1.5em; height: 1.5em; vertical-align: middle; display: inline-block; filter: invert(100%) brightness(150%);"></i>
328328
</a>
329329
</li>
330330
<li class="list-inline-item mr-3"
331331
style="display: inline-block; vertical-align: middle; transform: translateY(0.00rem);">
332332
<a href="https://www.instagram.com/thecourseforum_uva/">
333-
<i class="fab fa-instagram fa-2x fa-fw"></i>
333+
<i class="fab fa-instagram fa-2x fa-fw" style="width: 1.5em; height: 1.5em; vertical-align: middle; display: inline-block; filter: invert(100%) brightness(150%);"></i>
334334
</a>
335335
</li>
336336
<li class="list-inline-item"
337337
style="display: inline-block; vertical-align: middle; transform: translateY(0.00rem);">
338338
<a href="https://twitter.com/thecourseforum">
339-
<i class="fab fa-twitter-square fa-2x fa-fw"></i>
339+
<i class="fab fa-twitter-square fa-2x fa-fw" style="width: 1.5em; height: 1.5em; vertical-align: middle; display: inline-block; filter: invert(100%) brightness(150%);"></i>
340340
</a>
341341
</li>
342342
</ul>

tcf_website/views/team_info.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,13 @@
221221
"img_filename": "ENG_Visvajit_Murali.jpg",
222222
"github": "visva-murali"
223223
},
224+
{
225+
"name": "Angad Brar",
226+
"role": "Developer",
227+
"class": "2027",
228+
"img_filename": "ENG_Angad_Brar.jpg",
229+
"github": "angadv12"
230+
},
224231
{
225232
"name": "Grace Kang",
226233
"role": "Developer",

0 commit comments

Comments
 (0)