Skip to content

Commit 4a5fbb6

Browse files
authored
Merge pull request #85 from Zohair-coder/dev
Added mypy
2 parents b7df37f + 298dbdb commit 4a5fbb6

File tree

15 files changed

+417
-5589
lines changed

15 files changed

+417
-5589
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"vscode": {
1313
"extensions": [
1414
"ms-python.python",
15-
"charliermarsh.ruff"
15+
"charliermarsh.ruff",
16+
"ms-python.mypy-type-checker"
1617
],
1718
"settings": {
1819
"editor.defaultFormatter": "charliermarsh.ruff",

.github/workflows/functional_test.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@ jobs:
1616
with:
1717
python-version: "3.11"
1818

19-
- name: Install linter/formatter dependencies
19+
- name: Install dependencies
2020
run: |
2121
python -m pip install --upgrade pip
22-
pip install ruff
22+
pip install -r requirements.txt
2323
24+
- name: Run mypy
25+
run: mypy src --strict
26+
2427
- name: Run Linter
2528
run: ruff check --output-format=github src
2629

@@ -97,7 +100,7 @@ jobs:
97100
fi
98101
99102
- name: Reset database
100-
run: docker compose run scraper sh -c 'apk add postgresql-client && ./scripts/reset_db.sh;'
103+
run: docker compose run scraper sh -c 'apk add postgresql-client && ./scripts/reset-db.sh;'
101104

102105
- name: Run scraper again (to test cache)
103106
run: docker compose run scraper python3 src/main.py --db --all-colleges --ratings

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
"console": "integratedTerminal",
1313
"justMyCode": true,
1414
"cwd": "${workspaceFolder}",
15-
"args": ["--ratings"]
15+
// "args": ["--ratings"]
1616
// "args": ["--all-colleges"]
1717
// "args": ["--db"]
1818
// "args": ["--ratings", "--db", "--all-colleges"]
19-
// "args": ["--ratings", "--db"]
19+
"args": ["--ratings", "--db"]
2020
// "args": ["--email"]
2121
}
2222
]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ python src/main.py --db
9292
This will create a new database `schedulerdb` and the necessary tables if they aren't already created, and then insert the data into the database. If the data is already populated, it will update the existing data. To delete all the data, make sure the environment variables specified in `src/db_config.py` are set and then run the following command (make sure you're using the Git Bash terminal if you're using Windows):
9393

9494
```bash
95-
./scripts/reset_db.sh
95+
./scripts/reset-db.sh
9696
```
9797

9898
To view the schema for the tables, you can look at the `src/create_tables.sql` file.

0 commit comments

Comments
 (0)