Skip to main content

Physical calculation package for the mechanics and geometry of power lines

Project description

Mechaphlowers

PyPI Latest Release MPL-2.0 License Actions Status

Python code quality : Quality Gate Status Coverage

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.0.tar.gz (17.2 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.0-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file mechaphlowers-0.1.0.tar.gz.

File metadata

  • Download URL: mechaphlowers-0.1.0.tar.gz
  • Upload date:
  • Size: 17.2 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.0.tar.gz
Algorithm Hash digest
SHA256 7df0b2076f89ab66e5441a242bf546fadb960cd71804c1f6c456bbbbb5b01f56
MD5 a1b20810946bf51992f623902815fd87
BLAKE2b-256 4eac8420a411923301bc3e4d1b80c42d0acf8cd44ac4ccbe4c5ab9fe5188e278

See more details on using hashes here.

Provenance

The following attestation bundles were made for mechaphlowers-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: mechaphlowers-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for mechaphlowers-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 20cc52639517730dbc59cfb8da127b0ff9cd43112e5d2560bfad3ac5becf7231
MD5 050eb9141865f849956fbb925f4c4400
BLAKE2b-256 a9a6f0a5834d5d7fb9b7f1848c84b986a27cf1d766e34bb88d97e0c897e3ea77

See more details on using hashes here.

Provenance

The following attestation bundles were made for mechaphlowers-0.1.0-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