Closed oconnorb closed 11 months ago
gwemopt-run just points to run.py: https://github.com/skyportal/gwemopt/blob/main/pyproject.toml#L59 Can you explain more about the behavior you are seeing?
After running "git pull" I tried to run:
python -m gwemopt -t DECam -e S230922g
resulting in the error
/Users/brendan/opt/anaconda3/envs/gwemopt/bin/python: No module named gwemopt.main; ‘gwemopt’ is a package and cannot be directly executed
Due to the lack of the main file.
I then tried gwemopt_run and I received the error:
/Users/brendan/opt/anaconda3/envs/gwemopt/bin/python: No module named gwemopt-run
The fix for me was to add back the old main file and then could run in the default manner.
@oconnorb we removed the gwemopt_run and replaced with gwemopt-run. Does this work for you?
Could you clarify exactly the command you want me to try? I was unsuccessful in having gwemopt-run work.
i.e., by replacing "python -m gwemopt ..." with "gwemopt-run ..."
The pyproject.toml makes an executable called gwemopt-run.
Gotcha, I see that in the .toml file. Is there a step I am missing to run after "git pull" that would create the executable?
@oconnorb You are using pip install . or similar to build?
Ah, no. I had just ran "git pull" in a prior installation as I wanted Tomas's update to the parallelization. In any case, gwemopt is working for me as I just added the main file back in manually so I can still run with "python -m gwemopt". I just wanted to make sure this wasn't an issue that would impact new users, so I guess as long as they install through pip they will be fine. Thanks! :)
Ok I see. So you run setup.py? That is an old style way of doing things that is now being deprecated in general slowly but surely.
I'll be sure to use "pip install -e gwemopt" in the future. I made a note of this for next time I update. Igor said he was able to get this to work on his end using that.
Ok great. -e basically sim links the files, but that should do fine for this purpose.
In the latest version of the github (this skyportal branch) there is no main file so a git pull breaks the ability to run gwemopt until manually adding the old main file to the correct location. The Usage documentation nots a gwemopt-run, which also does not work at present. The version of gwemopt that can be installed through pip seems fine at present.