A library to easily convert climbing route grades between different grading systems.

Overview

pyclimb

PyPI PyPI - Python Version codecov Code style: black GitHub Workflow Status PyPI - Wheel

A library to easily convert climbing route grades between different grading systems.

In rock climbing, mountaineering, and other climbing disciplines, climbers give a grade to a climbing route or boulder problem, intended to describe concisely the difficulty and danger of climbing it. Different types of climbing (such as sport climbing, bouldering or ice climbing) each have their own grading systems, and many nationalities developed their own, distinctive grading systems.

Install

The recommended installation is via pip:

pip install pyclimb

Usage

import pyclimb


pyclimb.convert(grade='6a+', to='YDS')
// '5.10b'
pyclimb.convert(grade='9c', to='YDS')
// '5.15d'

Note

This is a package under active development. Currently, only the following conversions are being supported:

Other conversions and different types of climbing will be included soon. These changes may drastically change the user-facing API, so do consult the semantic versioning of this package before upgrading to a newer version.

How to contribute

If you wish to contribute, this is a great place to start!

License

Distributed under the MIT License.

You might also like...
A workflow management tool for numerical models on the NCI computing systems

Payu Payu is a climate model workflow management tool for supercomputing environments. Payu is currently only configured for use on computing clusters

Daiho Tool is a Script Gathering for Windows/Linux systems written in Python.
Daiho Tool is a Script Gathering for Windows/Linux systems written in Python.

Daiho is a Script Developed with Python3. It gathers a total of 22 Discord tools (including a RAT, a Raid Tool, a Nuker Tool, a Token Grabberr, etc). It has a pleasant and intuitive interface to facilitate the use of all with help and explanations for each of them.

osqueryIR is an artifact collection tool for Linux systems.
osqueryIR is an artifact collection tool for Linux systems.

osqueryIR osqueryIR is an artifact collection tool for Linux systems. It provides the following capabilities: Execute osquery SQL queries Collect file

A functional standard library for Python.

Toolz A set of utility functions for iterators, functions, and dictionaries. See the PyToolz documentation at https://toolz.readthedocs.io LICENSE New

🔩 Like builtins, but boltons. 250+ constructs, recipes, and snippets which extend (and rely on nothing but) the Python standard library. Nothing like Michael Bolton.

Boltons boltons should be builtins. Boltons is a set of over 230 BSD-licensed, pure-Python utilities in the same spirit as — and yet conspicuously mis

Retrying library for Python

Tenacity Tenacity is an Apache 2.0 licensed general-purpose retrying library, written in Python, to simplify the task of adding retry behavior to just

Retrying is an Apache 2.0 licensed general-purpose retrying library, written in Python, to simplify the task of adding retry behavior to just about anything.

Retrying Retrying is an Apache 2.0 licensed general-purpose retrying library, written in Python, to simplify the task of adding retry behavior to just

isort is a Python utility / library to sort imports alphabetically, and automatically separated into sections and by type.
isort is a Python utility / library to sort imports alphabetically, and automatically separated into sections and by type.

isort is a Python utility / library to sort imports alphabetically, and automatically separated into sections and by type. It provides a command line utility, Python library and plugins for various editors to quickly sort all your imports.

A Python library for reading, writing and visualizing the OMEGA Format
A Python library for reading, writing and visualizing the OMEGA Format

A Python library for reading, writing and visualizing the OMEGA Format, targeted towards storing reference and perception data in the automotive context on an object list basis with a focus on an urban use case.

Comments
  • support for python 3.11

    support for python 3.11

    Is your feature request related to a problem? Please describe. python version support.

    Describe the solution you'd like pydatagovgr to also support python 3.11 (first released: 2022-10-24)

    Additional context https://www.python.org/downloads/release/python-3110/

    opened by ilias-ant 0
  • support different climbing types (e.g. bouldering)

    support different climbing types (e.g. bouldering)

    Right now, library supports grading conversion only in the context of sport climbing (and trad?). For example, bouldering has a different grading scheme.

    opened by ilias-ant 0
Releases(v0.2.0)
  • v0.2.0(Jan 30, 2022)

    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
    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Jan 23, 2022)

    The inaugural release - it introduces the most basic functionality of pyclimb.

    Features

    • pyclimb.convert API, in order to convert between different climbing grades - at the moment, supports only conversion of French grades to the YDS (Yosemite Decimal System).
    • poetry as dependeny management and packaging system.

    Docs

    • README
    • CONTRIBUTING
    • CODE_OF_CONDUCT
    • SECURITY
    • LICENSE
    • ISSUE_TEMPLATE: bug_report, feature_request

    CI/CD

    • CI step as Github action
    • CD step as Github action
    Source code(tar.gz)
    Source code(zip)
Owner
Ilias Antonopoulos
Machine Learning Engineer | MSc student.
Ilias Antonopoulos
Create powerful passwords easily and with many options with this program

Password_Generator About the Program: You can create powerful passwords with this program with many options easily! Features: You can copy the generat

Sina.f 0 Jul 14, 2022
Run functions in parallel easily, with their results typed correctly!

typesafe_parmap pip install pip install typesafe-parmap Run functions in parallel safely with typesafe parmap! GitHub: https://github.com/thejaminato

James Chua 3 Nov 6, 2021
NFT-Generator is the best way to generate thousands of NFTs quick and easily with Python.

NFT-Generator is the best way to generate thousands of NFTs quick and easily with Python. Just add your files, set your configuration and run the scri

null 78 Dec 27, 2022
convert a dict-list object from / to a typed object(class instance with type annotation)

objtyping 带类型定义的对象转换器 由来 Python不是强类型语言,开发人员没有给数据定义类型的习惯。这样虽然灵活,但处理复杂业务逻辑的时候却不够方便——缺乏类型检查可能导致很难发现错误,在IDE里编码时也没

Song Hui 15 Dec 22, 2022
Factoral Methods using two different method

Factoral-Methods-using-two-different-method Here, I am finding the factorial of a number by using two different method. The first method is by using f

Sachin Vinayak Dabhade 4 Sep 24, 2021
Convert any-bit number to decimal number and vise versa.

2deci Convert any-bit number to decimal number and vise versa. --bit n to set bit to n --exp xxx to set expression to xxx --r to run reversely (from d

null 3 Sep 15, 2021
A BlackJack simulator in Python to simulate thousands or millions of hands using different strategies.

BlackJack Simulator (in Python) A BlackJack simulator to play any number of hands using different strategies The Rules To keep the code relatively sim

Hamid 4 Jun 24, 2022
A program to convert celcius to faranheit. made with python

Temp-Converter What is Temp-Converter Temp-Converter is little program made with pyhton to convert celcius to faranheit. Needed A python interpreter P

Chandula Janith 0 Nov 27, 2021
This two python programs can convert km to miles and miles to km

km-to-miles These two little python programs can convert kilometers to miles and miles to kilometers Needed Python3 or a online python compiler with t

Chandula Janith 3 Jan 30, 2022
Casefy (/keɪsfaɪ/) is a lightweight Python package to convert the casing of strings

Casefy (/keɪsfaɪ/) is a lightweight Python package to convert the casing of strings. It has no third-party dependencies and supports Unicode.

Diego Miguel Lozano 12 Jan 8, 2023