Revision f77ad6e7fd90f3c0eb255bd553d4666b5db40bcf authored by Matt Garthwaite on 04 August 2020, 00:12:52 UTC, committed by Matt Garthwaite on 04 August 2020, 00:12:52 UTC
1 parent e326b29
developer_hints.txt
# publish package to PyPI
follow the steps at: https://medium.com/@joel.barmettler/how-to-upload-your-python-package-to-pypi-65edc5fe9c56
Summary:
1) create new 'release' in Github. this will tag a commit hash.
2) copy link to tar.gz Source Code from github release, add to download_url in setup.py
3) update version number in setup.py (to match the Github release)
4) `python3 setup.py sdist bdist_wheel` - prepare package
5) `python3 -m twine upload --repository testpypi dist/*` - test upload that does not affect real PyPI
5) `python3 -m twine upload dist/*` - upload package to PyPI
check out here also: https://packaging.python.org/tutorials/packaging-projects/
---------------------------------------------
# Clone Github repo
cd ~
git clone git@github.com:GeoscienceAustralia/PyRate.git
# build PyRate package
cd ~/PyRate
pip install -r requirements-dev.txt
pip install -r requirements-test.txt
pip install -r requirements-test.txt
cd /PyRate && python3 setup.py install
# Run workflow
python pyrate/__main__.py conv2tif -f pyrate_gamma.conf
pyrate prepifg -f pyrate_gamma.conf
pyrate process -f pyrate_gamma.conf
pyrate merge -f pyrate_gamma.conf
---------------------------------------
# Build Sphinx docs
pip install -r requirements-dev.txt
cd /PyRate/docs && make html
---------------------------------------
# Run unit tests, avoiding those marked as "slow"
pip install -r requirements-test.txt
cd /PyRate
chmod 444 tests/test_data/small_test/tif/geo_070709-070813_unw.tif
pytest tests/ -m "not slow"
---------------------------------------
NCI Gadi supercomputer
ssh <username>@gadi.nci.org.au
cd ~
rm -rf PyRate
rm -rf PyRateVenv
git clone https://github.com/GeoscienceAustralia/PyRate.git -b develop --single-branch
source PyRate/scripts/nci_load_modules.sh
python3 -m venv ~/PyRateVenv
source ~/PyRateVenv/bin/activate
cd ~/PyRate
pip install -r requirements-dev.txt
pip install -r requirements-test.txt
pip install -r requirements.txt
python setup.py install
cd ~/PyRate/pyrate
python main.py -v DEBUG conv2tif -f ~/PyRate/sample_data/input_parameters.conf
python main.py -v DEBUG prepifg -f ~/PyRate/sample_data/input_parameters.conf
python main.py -v DEBUG process -f ~/PyRate/sample_data/input_parameters.conf
python main.py -v DEBUG merge -f ~/PyRate/sample_data/input_parameters.conf

Computing file changes ...