It supports full conversion between French and YDS grades, by implementing the YDS-to-French conversion path.
**Features**
- `pyclimb.convert` now supports conversion from YDS grades to the French grading system.
- `pyclimb.convert` has a new required argument called `grade_system` that refers to the grade system in which `grade` belongs. This contextual information is necessary in order to be able to map between multiple grading systems.
- `GradeConversionError` exception now includes the user-defined param that led to the raising.
- `GradeConversionError` exception chaining is now explicitly suppressed, for simplicity. For example:
*before*:
>>> pyclimb.convert(grade='9c', grade_system='French', to='foo')
Traceback (most recent call last):
File "/workspaces/pyclimb/pyclimb/converter.py", line 33, in convert
output_grading = GradingSystem(to)
File "/opt/python/3.8.12/lib/python3.8/enum.py", line 339, in __call__
return cls.__new__(cls, value)
File "/opt/python/3.8.12/lib/python3.8/enum.py", line 663, in __new__
raise ve_exc
ValueError: 'foo' is not a valid GradingSystem
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/workspaces/pyclimb/pyclimb/converter.py", line 36, in convert
raise exceptions.GradeConversionError(
pyclimb.exceptions.GradeConversionError: Grade could not be converted: foo is not a recognized grading system.
*now*:
>>> pyclimb.convert(grade='9c', grade_system='French', to='foo')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'pyclimb' is not defined
>>> import pyclimb
>>> pyclimb.convert(grade='9c', grade_system='French', to='foo')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/workspaces/pyclimb/pyclimb/converter.py", line 36, in convert
raise exceptions.GradeConversionError(
pyclimb.exceptions.GradeConversionError: Grade could not be converted: foo is not a recognized grading system.
**Docs**
- updated Usage section of README