Place to save some commands related to matpower-pip development, deployment, and maintenance.
Directly use downloader.py:
py matpowerpip/downloader.pyWith matpowerpip:
from matpowerpip.downloader import download_matpower, copy_init
download_matpower(matpower_version='8.1', force=True, backup='backups')
copy_init()See dev/download_matpower.ipynb for a notebook example.
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 old dist if exist to avoid the unexpected.
del dist -Recurse -Force
del matpower.egg-info -Recurse -Forcedel dist -Recurse -Force
del matpower.egg-infoXcopy /E /I matpower backups\matpower-8.1del matpower -Recurse -Force
Xcopy /E /I backups\matpower-8.1 matpower
copy matpowerpip\__init__.py matpower\__init__.pyFor 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/*del matpower -Recurse -Force
Xcopy /E /I backups\matpower-8.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/*del matpower -Recurse -Force
Xcopy /E /I backups\matpower-8.1 matpower
copy matpowerpip\__init__.py matpower\__init__.py
pip install -e .git tag -a v2.1.4 -m "v2.1.4: Fix start instance and install"pandoc README.md -o README.pdfalias gitzip="git archive HEAD -o ${PWD##*/}.zip"
gitzipThe notebooks_py folder is ignored by git
jupytext --set-formats "notebooks//ipynb,notebooks_py//py:percent" notebooks/*.ipynb
jupytext --sync notebooks/*.ipynb