Grades calculator for the BSc Computer Science at the University of London
Project description
Grades Calculator
Simple script to get information about progress made in a BSc Computer Science at the University of London (calculations are specific to this particular degree).
Table of contents
- Requirements
- To run the utility
- Generate a sample config file to get started
- How to fill the config file (
.grades.yml
by default) - Sample command outputs
- For developers
Requirements
Python 3.6 and above. Install additional dependencies with the following command:
pip install -r requirements.txt
To run the utility
python -m uol_grades_calculator
By passing no arguments, this will print the default help message.
Generate a sample config file to get started
To generate a sample configuration file, run the following command:
python -m uol_grades_calculator generate-sample
The configuration file will be created in your home directory as a hidden file (i.e. ~/.grades.yml
).
Specifying a different path for the config file
If you want to create it somewhere else:
python -m uol_grades_calculator --config /path/to/config/file.yml generate-sample
Note that you will have to indicate where the config is each time you use this tool in this case (you can always create an alias to avoid the trouble of typing it every time). For example:
python -m uol_grades_calculator --config /path/to/config/file.yml summarize
How to fill the config file (.grades.yml
by default)
Each module described in the config file should contain information adhering to the following indications:
YAML node | Value | Example(s) | Optional * |
---|---|---|---|
completion_date |
Date as a string: YYYY-MM |
2020-01 |
Yes |
final_score |
Float: range 0.00–100.00 | 50 , 50.5 , 90.56 |
Yes |
final_weight |
Integer expressing a percentage: range 0–100 | 0 , 40 , 80 , 100 |
Yes |
midterm_score |
Float: range 0.00–100.00 | 50 , 50.5 , 90.56 |
Yes |
midterm_weight |
Integer expressing a percentage: range 0–100 | 0 , 40 , 80 , 100 |
Yes |
module_score |
Float: range 0.00–100.00 | 50 , 50.5 , 90.56 |
No |
level |
Integer: choose strictly from 4 , 5 or 6 |
4 , 5 , 6 |
No |
* If a node value is left empty (or the node is absent in a given module), this will affect how the module is taken into account (average across all modules, summary of modules taken, etc.).
Here is a complete example for one module:
Algorithms and Data Structures I:
completion_date: 2020-03
final_score: 92
final_weight: 50
midterm_score: 98
midterm_weight: 50
module_score: 95
level: 4
Module taken
This means we define a module score between 0
and 100
, both being inclusive values.
Algorithms and Data Structures I:
module_score: 80.5
Module recognized (RPL)
In this case, we define a score of -1
to indicate that this module is done but we didn't get a score for it.
Algorithms and Data Structures I:
module_score: -1
Sample command outputs
summarize
Modules taken:
[ { 'Algorithms and Data Structures I': { 'completion_date': '2020-03',
'final_score': 92,
'final_weight': 50,
'level': 4,
'midterm_score': 98,
'midterm_weight': 50,
'module_score': 95}},
{ 'Discrete Mathematics': { 'completion_date': '2020-03',
'final_score': 100,
'final_weight': 50,
'level': 4,
'midterm_score': 99,
'midterm_weight': 50,
'module_score': 100}},
{ 'Fundamentals of Computer Science': { 'completion_date': '2020-09',
'final_score': 98,
'final_weight': 50,
'level': 4,
'midterm_score': 98,
'midterm_weight': 50,
'module_score': 98}},
{ 'How Computers Work': { 'completion_date': '2018-12',
'level': 4,
'module_score': -1}},
{ 'Introduction to Programming I': { 'completion_date': '2019-09',
'final_score': 100,
'final_weight': 50,
'level': 4,
'midterm_score': 100,
'midterm_weight': 50,
'module_score': 100}},
{ 'Numerical Mathematics': { 'completion_date': '2019-09',
'final_score': 61,
'final_weight': 50,
'level': 4,
'midterm_score': 99,
'midterm_weight': 50,
'module_score': 80}},
{ 'Introduction to Programming II': { 'completion_date': '2020-03',
'final_score': 98,
'final_weight': 70,
'level': 4,
'midterm_score': 100,
'midterm_weight': 30,
'module_score': 99}},
{ 'Web Development': { 'completion_date': '2019-09',
'final_score': 87,
'final_weight': 70,
'level': 4,
'midterm_score': 86,
'midterm_weight': 30,
'module_score': 87}},
{ 'Algorithms and Data Structures II': { 'completion_date': '2020-09',
'final_score': 92,
'final_weight': 50,
'level': 5,
'midterm_score': 92,
'midterm_weight': 50,
'module_score': 92}},
{ 'Object Oriented Programming': { 'completion_date': '2020-09',
'final_score': 96,
'final_weight': 50,
'level': 5,
'midterm_score': 96,
'midterm_weight': 50,
'module_score': 96}}]
Number of modules done: 10
Scores so far: [95, 100, 98, 100, 80, 99, 87, 92, 96]
Weighted average: 94.08 (ECTS: A, US: A)
Unweighted average: 94.11 (ECTS: A, US: A)
Classification: First Class Honours
ECTS grade equivalence:
{ 'Algorithms and Data Structures I': 'A',
'Algorithms and Data Structures II': 'A',
'Discrete Mathematics': 'A',
'Fundamentals of Computer Science': 'A',
'How Computers Work': 'N/A',
'Introduction to Programming I': 'A',
'Introduction to Programming II': 'A',
'Numerical Mathematics': 'A',
'Object Oriented Programming': 'A',
'Web Development': 'A'}
US grade equivalence:
{ 'Algorithms and Data Structures I': 'A',
'Algorithms and Data Structures II': 'A-',
'Discrete Mathematics': 'A',
'Fundamentals of Computer Science': 'A',
'How Computers Work': 'N/A',
'Introduction to Programming I': 'A',
'Introduction to Programming II': 'A',
'Numerical Mathematics': 'B-',
'Object Oriented Programming': 'A',
'Web Development': 'B+'}
GPA: 4 (US) – 4 (UK)
Total credits done: 150 / 360 (41.67%)
For developers
To run the test suite
pip install -r requirements-dev.txt
pytest
To develop locally as a package
python setup.py develop
Then the command ugc
(short for uol_grades_calculator
) becomes available on the command-line. Type ugc --help
for more information.
To publish to PyPI
Update version as necessary in uol_grades_calculator/__init__.py
and setup.py
.
Regenerate a build:
rm -rf dist build
python setup.py sdist bdist_wheel --universal
Test the package at test.pypi.org:
python -m twine upload --repository testpypi dist/*
The package will be publicly available at https://test.pypi.org/project/uol-grades-calculator/ and you will be able to pip install
it as usual.
Publish officially at pypi.org:
python -m twine upload dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file uol-grades-calculator-0.4.0.tar.gz
.
File metadata
- Download URL: uol-grades-calculator-0.4.0.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1b1955c7df8384d0ba17e3fbb0ccd968aba1f8d29e22f1ab6d03cad1fb402c0 |
|
MD5 | 5786b61bb66640735915b849c760b7c4 |
|
BLAKE2b-256 | ee14b84fd86713a284702704f9ad1c2e2477ef8fa370ce43806b228e4756a0db |
File details
Details for the file uol_grades_calculator-0.4.0-py2.py3-none-any.whl
.
File metadata
- Download URL: uol_grades_calculator-0.4.0-py2.py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89c6fc5de99cade87cf762c697bcea19fa560bf7710a8c4c5f5abb259e21bd33 |
|
MD5 | 161ed386e1f288dcece80e7356632479 |
|
BLAKE2b-256 | b223f94dd8ac5b40d78842cc6ed2ae57e09f2cbae40d615f1f2d3f9d2a71488f |