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
mintpy adjustments to simplify conda-forge recipe #652
Comments
@jhkennedy could you expand more on the 3rd topic? The code does not rely on the |
@yunjunz yep! I'll expand soon; I'm just waiting for the conda-forge PR to go through so I can point to specific things in the feedstock. |
So overall, I'm coming from the perspective of "I want my build/installation tool to do as much of the work as possible." This lets the tool handle all the different OS/machine nuances and me to focus just on telling it want I want it to do. MintPy, nicely, could be built/installed entirely by To illustrate, I'll go over how the current MintPy v1.3.1 recipe doesn't qualify because it fails these criteria:
1. No activate scriptsThe current activate script does two things.
Since (1) was fixed in #653 , that only leaves (2), which is done because most of the python modules inside of MintPy are also console scripts, and console scripts need to be available on Note: to support windows with this current setup, we'd need to also write 2. No OS-specific build scriptsFor linux and mac, MintPy needs this build script which does:
So, really, everything except for executing the the Note: to support windows with this current setup, we'd need to also write a windows However,
(1) is not recommended anymore as it's rather hard to achieve cross-platform compatibility (it just straight copies the files into the "bin" location) and therefore can't be used for noarch packages.
In the end, converting all the executable scripts (and the current
|
Oh, and I should say, the full refactor (arg-less main and a work function) isn't needed -- it's a nice to have to support the same workflows both programmatically and in the console. Since all the minty modules have the |
Thank you @jhkennedy for the detailed explanation! Registering the entrypoints in setup.py sounds good to me. Regarding the refactoring, it seems a lot of changes. I will think about this more this weekend. Having a |
@yunjunz Yep! I think the heavier refactoring is just a "think about it for future development" -- I've actually got a PR started that does all the entrypoints and all but these worked^ as-is:
It looks like it won't be a heavy lift to modify those to work either. ^ By worked, I mean I could run |
Awesome. Please feel free to submit your PR and we could do more testing on the entrypoints setup. |
Copy over the to-do list in mintpy to simplify the conda-forge recipe by @jhkennedy from #648:
1.
test_smallbaselineApp.py
and similar should look for configs relative to itself, not$MINTPY_HOME
ormintpy.__file__
2. not printing on import:
MintPy/mintpy/__init__.py
Lines 18 to 22 in b307f96
3. Drop any reliance on manipulating environment variables for installation (
PATH
,PYTHONPATH
especially;MINTPY_HOME
as well ideally) by leveragingconsole_scripts
entry_points
insetup.py
4. For pyaps3, read CDS key from $HOME directory, in addition to
pyaps3/model.cfg
file, so that users does not need to go to the interpreter directory for account setup.5. arg-less
main()
and a work function. See the comment below for details.The text was updated successfully, but these errors were encountered: