CHIMEFRB / fitburst

An open-source package of utilities for direct modeling of radio dynamic spectra.
https://chimefrb.github.io/fitburst/
MIT License
11 stars 2 forks source link

Remove absolute requirement for CHIME/FRB packages #7

Closed bwmeyers closed 3 years ago

bwmeyers commented 3 years ago

As it stands, CHIME/FRB specific packages are required (although hidden as imports in the backend/chimefrb.py data reader). To alleviate this and ensure that fitburst functionality is accessible while not having those specific packages installed, I've slightly modified the data reader class to only load the chime_frb_api and cfod packages as they are needed, and report an informative error when not found.

As an extension to this, we can list those two CHIME packages as optional extras in the setup.cfg file so that a user can still install them via a pip, although with an additional tag, e.g.,

cd fitburst
pip install .[chimefrb]

(Obviously, if the user does not have the credentials required to access the CHIME/FRB package then this will fail, but that is not within the scope of fitburst.)

bwmeyers commented 3 years ago

I'm refactoring a little bit here too, and will try to fix the linting issue.