skyportal / gwemopt

Gravitational-wave Electromagnetic Optimization
GNU General Public License v3.0
19 stars 34 forks source link

`__main__.py` and absolute paths #96

Closed robertdstein closed 1 year ago

robertdstein commented 1 year ago

This PR fixes #94 , by adding a __main__.py to replace gwemopt_run. It makes some progress on #90, by introducing default paths for config dir/tiling dir etc.

You can now run gwemopt with:

python -m gwemopt....

It replaces the relative paths with absolute paths, so you can run this command from different directories without issue.

It is a prequisite for #95, and should eventually lead to users running gwemopt directly after pypi install.

It updates the README with the new path. It also adds a symlink from the old gwemopt_run to the new __main__.py, to preserve backward compatibility, so python bin/gwemopt_run .... will work exactly as before.