Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mechaphlowers-0.1.0a0.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mechaphlowers-0.1.0a0-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

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

Hashes for mechaphlowers-0.1.0a0.tar.gz
Algorithm Hash digest
SHA256 03059c9f6613da2d75de0e8a55d9a5bec88112c7f42f07263f1af82b27fa25d0
MD5 4bebb8bc76eb35137b5bb2a061af6fe7
BLAKE2b-256 a56da1afded7fe78288e78b7b7215d8ebbf40b2a29994b07b2008966280f487b

See more details on using hashes here.

Provenance

The following attestation bundles were made for mechaphlowers-0.1.0a0.tar.gz:

Publisher: publish.yml on phlowers/mechaphlowers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mechaphlowers-0.1.0a0-py3-none-any.whl.

File metadata

File hashes

Hashes for mechaphlowers-0.1.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 408afb7ae3f02343692a7c31b977096d66b31bffa8e3579e6de18b94139a48e2
MD5 129bd6276de488e181e7b9cb505a5e9e
BLAKE2b-256 d659f82b5aab9b6bb03683e1ed4a0fc79d94dc9f7dcbb9cfe9c7237ae7654226

See more details on using hashes here.

Provenance

The following attestation bundles were made for mechaphlowers-0.1.0a0-py3-none-any.whl:

Publisher: publish.yml on phlowers/mechaphlowers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page