setup: add all executable modules as entry_points/console_scripts#659
setup: add all executable modules as entry_points/console_scripts#659yunjunz merged 10 commits intoinsarlab:mainfrom
entry_points/console_scripts#659Conversation
…gs so --help or missing args exit gracefully
…rguments are provided.
… traceback when no arguments are provided.
|
💖 Thanks for opening this pull request! Please check out our contributing guidelines. 💖 |
console_scripts entry_point in setup.pyconsole_scripts entry_points in setup.py
|
Oh, I also have not addressed any installation, etc. type documentation -- that could be addressed here, or in conjunction with documentation about conda-forge after this has been vetted more. |
Sounds good to me, please do it as you see fit. |
Yep, there will be big (good) changes in the installation. I would prefer to do it in another PR when conda-forge is ready and this PR is tested more as you said. |
console_scripts entry_points in setup.pyentry_points/console_scripts
Done! |
yunjunz
left a comment
There was a problem hiding this comment.
Looks all good to me. I will do more testings on the weekend before merging it. Thank you @jhkennedy!
|
I installed and tested mintpy as below on macOS. Everything looks good to me. # download
cd ~/tools
git clone https://github.com/insarlab/MintPy.git
# install
conda create --name test
conda activate test
conda install --file tools/MintPy/docs/requirements.txt pysolid pyaps3 gdal">=3"
cd ~/tools/MintPy
python setup.py install
# test
python ~/tools/MintPy/tests/test_smallbaselineApp.py |
|
🎉 🎉 🎉 Congrats on merging your first pull request! We here at behaviorbot are proud of you! 🎉 🎉 🎉 |
|
@yunjunz Just a note -- |
|
Good to know, thanks. |
+ simplify the installation since now `pyaps3` and `pysolid` are available via conda-forge, so they are no longer need to be manually cloned and installed anymore. This simplifies the environment setup files and installation notes. + since #659, there's no longer a need to manipulate PATH or PYTHONPATH for mintpy anymore, as a "pip install" will correctly place the mintpy package and all executable scripts to be available in the environment. Co-authored-by: Zhang Yunjun <yunjunzgeo@gmail.com>
Description of proposed changes
This add all currently executable modules as
console_scriptsentry_pointsinsetup.py, addressing Task 3 in #652 and (I think) finished off #497. This comment gives a detailed explination of how entrypoints work, and how it changes develoment workflows.*I have not extensively tested these scripts beyond making sure arguments are passed through appropriately and all can be called with
--help.Note: I've not added
tropo_pyaps.pyas I believe it's a legacy script that's been superseded bytropo_pyaps3.py.Other thoughts:
setup.pyfile (e.g., move thepackagesandentry_pointsarguments to the bottom)Reminders