Make MATPOWER installable from `pypi`.
Project description
matpower-pip
Make MATPOWER installable from pypi
. This package make MATPOWER copy (currently Version 7.1
) as python package
and maintain MATPOWER version with custom pypi suffix such as a
, b
, dev
, post
, etc. You can than use oct2py
or mypower
to run MATPOWER using octave client.
Installation
For callable matpower
via oct2py
(require octave on environment system PATH
):
pip install matpower[octave]
For downloading MATPOWER only:
pip install matpower
Extra (require oct2py
)
If oct2py
also installed, matpower.matpower
can be used as Oct2Py()
class with MATPOWER path added.
from matpower import matpower
mpc = matpower.eval('case9', verbose=False)
mpc = matpower.runpf(mpc)
from matpower import matpower
matpower.runpf()
Build for developer
Download matpower
Windows
curl -L https://github.com/MATPOWER/matpower/archive/refs/tags/7.1.zip > matpower.zip
tar -xf matpower.zip
del matpower.zip
ren matpower-7.1 matpower
copy matpowerpip\__init__.py matpower\__init__.py
Note: Sometimes it is not working from inside vscode
. Try use it on cmd
Python
Directly use downloader.py
:
cd matpowerpip
py downloader.py
With matpowerpip
(require oct2py
):
import matpowerpip
matpowerpip.downloader.download()
deployment to pypi
For testing, use testpypi
:
py setup.py sdist
py -m twine upload --repository testpypi dist/* --verbose
For actual push to pypi
:
py setup.py sdist
twine upload dist/*
TODO
-
Add dynamic "version"
-
Update
mypower
to makematpower-pip
as defaultmatpower
path.
Authors
- Muhammad Yasirroni - yasirroni
Acknowledgement
This repository was supported by Faculty of Engineering, Universitas Gadjah Mada under the supervision of Mr. Sarjiya
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.