Skip to content

Latest commit

 

History

History
138 lines (97 loc) · 2.15 KB

COMMANDS.md

File metadata and controls

138 lines (97 loc) · 2.15 KB

Commands

Place to save some commands related to matpower-pip development, deployment, and maintenance.

Download MATPOWER

Python

Directly use downloader.py:

cd matpowerpip
py downloader.py

With matpowerpip:

from matpowerpip.downloader import download_matpower, copy_init

download_matpower(matpower_version='8.0')
copy_init()

Windows (cmd)

Note: Sometimes it is not working from inside vscode terminal, since vscode use powershell instead of cmd. Try use to use windows cmd instead.

Delete dist

Delete old dist if exist to avoid the unexpected.

del dist -Recurse -Force
del matpower.egg-info -Recurse -Force
del dist -Recurse -Force
del matpower.egg-info

Backups

Xcopy /E /I matpower backups\matpower-7.1

Restore matpower from backup

del matpower -Recurse -Force
Xcopy /E /I backups\matpower-7.1 matpower
copy matpowerpip\__init__.py matpower\__init__.py

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/*

Using build

python -m build
twine upload dist/*
twine check dist/*

Push update

del matpower -Recurse -Force
Xcopy /E /I backups\matpower-7.1 matpower
copy matpowerpip\__init__.py matpower\__init__.py
del dist -Recurse -Force
del matpower.egg-info -Recurse -Force
py setup.py sdist
twine upload dist/*

Developer install

del matpower -Recurse -Force
Xcopy /E /I backups\matpower-7.1 matpower
copy matpowerpip\__init__.py matpower\__init__.py
pip install -e .

Tags

git tag -a v2.1.4 -m "v2.1.4: Fix start instance and install"

Pandoc

pandoc README.md -o README.pdf

Zip repo

alias gitzip="git archive HEAD -o ${PWD##*/}.zip"
gitzip