Physical calculation package for the mechanics and geometry of power lines
Project description
Library
Physical calculation package for the mechanics and geometry of overhead power lines.
Set up development environment
You need python 3.11. You may have to install it manually (e.g. with pyenv).
Then you may create a virtualenv, install dependencies and activate the env:
# create virtual env (if needed) and install dependencies (including dev dependencies)
poetry install
poetry shell # activate virtual env
Tip: if using VSCode/VSCodium, configure it to use your virtual env's interpreter.
How to format or lint code
Once dev dependencies are installed, you may format and lint python files like this:
poetry run poe format
poetry run poe lint
Use following command if you only want to check if files are correctly formatted:
poetry run poe check-format
You may automatically fix some linting errors:
poetry run poe lint-fix
Tip: if using VSCode/VSCodium, you may also use Ruff extension.
How to check typing
In order to check type hints consistency, you may run:
poetry run poe typing
How to test
On the command line:
poetry run poe test
In VSCode:
Configure VSCode to use your virtual env's interpreter. Open the Testing tab and configure tests using pytest. Click to run tests.
All in one
You may run every check mentioned above with just one command:
poetry run poe checks
Exporting the library
In order to build the library (wheel and tar.gz archive):
poetry build
How to serve the documentation
poetry install --with docs # install documentation related dependencies
poetry run poe doc
Testing in a browser via pyodide
You may test your pyodide package using pyodide console in a browser.
Download pyodide
Download a version of Pyodide from the releases page, extract it and serve it with a web server:
wget https://github.com/pyodide/pyodide/releases/download/0.25.0/pyodide-0.25.0.tar.bz2
tar -xvf pyodide-0.25.0.tar.bz2
cd pyodide
python3 -m http.server
Pyodide console is then available at http://localhost:8000/console.html
Test in pyodide console
Copy needed wheels to pyodide folder. Then, in pyodide console:
import micropip
# load your wheel
await micropip.install("http://localhost:8000/<wheel_name>.whl", keep_going=True)
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
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 mechaphlowers-0.1.0a0.tar.gz.
File metadata
- Download URL: mechaphlowers-0.1.0a0.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03059c9f6613da2d75de0e8a55d9a5bec88112c7f42f07263f1af82b27fa25d0
|
|
| MD5 |
4bebb8bc76eb35137b5bb2a061af6fe7
|
|
| BLAKE2b-256 |
a56da1afded7fe78288e78b7b7215d8ebbf40b2a29994b07b2008966280f487b
|
Provenance
The following attestation bundles were made for mechaphlowers-0.1.0a0.tar.gz:
Publisher:
publish.yml on phlowers/mechaphlowers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mechaphlowers-0.1.0a0.tar.gz -
Subject digest:
03059c9f6613da2d75de0e8a55d9a5bec88112c7f42f07263f1af82b27fa25d0 - Sigstore transparency entry: 162303950
- Sigstore integration time:
-
Permalink:
phlowers/mechaphlowers@bffa796f7acefc025a469e7e10e0712f12590dcc -
Branch / Tag:
refs/pull/55/merge - Owner: https://github.com/phlowers
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@bffa796f7acefc025a469e7e10e0712f12590dcc -
Trigger Event:
pull_request
-
Statement type:
File details
Details for the file mechaphlowers-0.1.0a0-py3-none-any.whl.
File metadata
- Download URL: mechaphlowers-0.1.0a0-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
408afb7ae3f02343692a7c31b977096d66b31bffa8e3579e6de18b94139a48e2
|
|
| MD5 |
129bd6276de488e181e7b9cb505a5e9e
|
|
| BLAKE2b-256 |
d659f82b5aab9b6bb03683e1ed4a0fc79d94dc9f7dcbb9cfe9c7237ae7654226
|
Provenance
The following attestation bundles were made for mechaphlowers-0.1.0a0-py3-none-any.whl:
Publisher:
publish.yml on phlowers/mechaphlowers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mechaphlowers-0.1.0a0-py3-none-any.whl -
Subject digest:
408afb7ae3f02343692a7c31b977096d66b31bffa8e3579e6de18b94139a48e2 - Sigstore transparency entry: 162303953
- Sigstore integration time:
-
Permalink:
phlowers/mechaphlowers@bffa796f7acefc025a469e7e10e0712f12590dcc -
Branch / Tag:
refs/pull/55/merge - Owner: https://github.com/phlowers
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@bffa796f7acefc025a469e7e10e0712f12590dcc -
Trigger Event:
pull_request
-
Statement type: