-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setup: add all executable modules as entry_points/console_scripts
#659
Conversation
…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.py
console_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.py
entry_points/console_scripts
Done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_scripts
entry_points
insetup.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.py
as I believe it's a legacy script that's been superseded bytropo_pyaps3.py
.Other thoughts:
setup.py
file (e.g., move thepackages
andentry_points
arguments to the bottom)Reminders