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.5.0.tar.gz
.
File metadata
- Download URL: uol-grades-calculator-0.5.0.tar.gz
- Upload date:
- Size: 13.8 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 | 39655e83a8d50f90c18edf98289d31e03ff281b368adc9d33f9852378e5bed37 |
|
MD5 | f5a25288b63d4b7f84f104b4b36fb8c2 |
|
BLAKE2b-256 | 68afebf13d838ecd9806663c33dec8387c89ac6d1f05a46c74c40a26e89a5246 |
File details
Details for the file uol_grades_calculator-0.5.0-py2.py3-none-any.whl
.
File metadata
- Download URL: uol_grades_calculator-0.5.0-py2.py3-none-any.whl
- Upload date:
- Size: 14.9 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 | c2547f34e6203139ae73e1ea7dac9628a84e808d41af08cc3fc360c8a5c0b386 |
|
MD5 | 1cad52b5912b6f5f8d62a3501de1cfb7 |
|
BLAKE2b-256 | 0658778ed508f0286911b357edc389b2b4c72cc90f6ffdab2a12163b1350e07c |