CLI tool to compute NHL Title Belt info.
Project description
Title Belt Calculator
Finds the shortest path to having a shot at the belt for a given team and belt holder.
Setup
poetry install
# either open a poetry shell to run everything
poetry shell
# or run individual commands with the poetry run prefix
poetry run title-belt-nhl
The following steps assume you are in a poetry shell.
Add poetry run at the beginning of commands if not.
Usage
Run with title-belt-nhl.
$ title-belt-nhl --help
Usage: title-belt-nhl [OPTIONS]
Options:
--team TEXT [required]
--season TEXT
--help Show this message and exit.
Commands:
belt-path
path
path-alt
- use
path-altto get a list of games recursively - use
pathto get the nested list of games iteratively, containing all evaluated games with the shortest path marked - use
belt-pathto get the list of complete games that the belt has traveled so far, plus the next title belt match
Linting and Formatting
Linting
ruff check title_belt_nhl
Fix Lint Errors
ruff check --fix title_belt_nhl
Formatting
ruff format title_belt_nhl
Autoformat on save (vscode)
- Install
ruffextension - Update settings in
.vscode/settings.json:{ "[python]": { "editor.formatOnSave": true, "editor.defaultFormatter": "charliermarsh.ruff", "editor.codeActionsOnSave": { "source.fixAll": "explicit" } } } - Ensure you are using the python interpreter from the poetry shell.
-
Open command palette (Ctrl+Shift+P)
-
Python: Select Interpreter -
"Select at workspace level"
-
"Enter interpreter path"
-
Copy/paste the path to your poetry virtualenv
- Run
poetry env infoand copy the path to the Executable under Virtualenv - Should be something like
/home/user/.cache/pypoetry/virtualenvs/title-belt-nhl-asdf1234-py3.10/bin/python
- Run
-
When you open a python file in vscode, the bottom right corner of the window should show something like:
Python 3.10.14 ("title-belt-nhl-asdf1234-py3.10": poetry)
-
Testing
Run poetry run pytest to run through any tests in the ./title_belt_nhl/tests folder
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file title_belt_nhl-0.3.6.tar.gz.
File metadata
- Download URL: title_belt_nhl-0.3.6.tar.gz
- Upload date:
- Size: 30.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c467d1b634cb2ba6c1a3c9340c94f9b2fa3e91f37885cf60bd06f4403767223e
|
|
| MD5 |
d200de0f6933772362dd0a39c595f280
|
|
| BLAKE2b-256 |
b31443a750216f89e52cd0168e50304304faa54fab8a56d8d1fb6c1e1300b6f6
|
Provenance
The following attestation bundles were made for title_belt_nhl-0.3.6.tar.gz:
Publisher:
publish.yml on kawa2287/title-belt-nhl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
title_belt_nhl-0.3.6.tar.gz -
Subject digest:
c467d1b634cb2ba6c1a3c9340c94f9b2fa3e91f37885cf60bd06f4403767223e - Sigstore transparency entry: 150498629
- Sigstore integration time:
-
Permalink:
kawa2287/title-belt-nhl@72f7b95fe5dad4059db9ede7e4bdec16de1ef986 -
Branch / Tag:
refs/tags/0.3.6 - Owner: https://github.com/kawa2287
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@72f7b95fe5dad4059db9ede7e4bdec16de1ef986 -
Trigger Event:
push
-
Statement type:
File details
Details for the file title_belt_nhl-0.3.6-py3-none-any.whl.
File metadata
- Download URL: title_belt_nhl-0.3.6-py3-none-any.whl
- Upload date:
- Size: 31.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1dc59784bb23f562bbd25e236fa13460ebd8e31c4c1b706953995b399b4a9ac0
|
|
| MD5 |
4c8a2b914208d17b1f8da89523ef3bd6
|
|
| BLAKE2b-256 |
4c1ba1bc811fc7885778c6afd2738cfe854e45048b126065748fa62f2eec16b0
|
Provenance
The following attestation bundles were made for title_belt_nhl-0.3.6-py3-none-any.whl:
Publisher:
publish.yml on kawa2287/title-belt-nhl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
title_belt_nhl-0.3.6-py3-none-any.whl -
Subject digest:
1dc59784bb23f562bbd25e236fa13460ebd8e31c4c1b706953995b399b4a9ac0 - Sigstore transparency entry: 150498630
- Sigstore integration time:
-
Permalink:
kawa2287/title-belt-nhl@72f7b95fe5dad4059db9ede7e4bdec16de1ef986 -
Branch / Tag:
refs/tags/0.3.6 - Owner: https://github.com/kawa2287
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@72f7b95fe5dad4059db9ede7e4bdec16de1ef986 -
Trigger Event:
push
-
Statement type: