No project description provided
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:
path
path-alt
- use
path-alt
to get a string showing list of games - use
path
to get the list of games using a diff algorithm
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
ruff
extension - 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 info
and 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
File details
Details for the file title_belt_nhl-0.2.0.tar.gz
.
File metadata
- Download URL: title_belt_nhl-0.2.0.tar.gz
- Upload date:
- Size: 27.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef3775ae6d6865b04f583021848e9faa0b99bcc01709b57501ad0621ad7b0878 |
|
MD5 | 545a2c79bfdf4493975c579a1e16db35 |
|
BLAKE2b-256 | f22a65af4d86d9f5b5651482638641bb82087550d06df03f41994be6b3aa6ce0 |
Provenance
File details
Details for the file title_belt_nhl-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: title_belt_nhl-0.2.0-py3-none-any.whl
- Upload date:
- Size: 29.3 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 | 25502bd7d76cc385a8f3c145eb5a1c9334f82afa6a710fe46a913f335aac2150 |
|
MD5 | 6f998d88a8ab9ab4e75f3ced230d9581 |
|
BLAKE2b-256 | ac57ba49fb475c74e249826fdc44dd0ef2928f51f520901a3564b996cfac36a9 |