portugueslab / sashimi

Lightsheet control
GNU General Public License v3.0
1 stars 2 forks source link

Installing in non-editable mode fails: Pointer to instructions broken #124

Open diegoasua opened 3 years ago

diegoasua commented 3 years ago

If sashimi is installed with pip in non-editable mode it won't launch because this line:

https://github.com/portugueslab/sashimi/blob/697a3d5dfade5b348633b8cbc754c9b0b1c339aa/sashimi/gui/save_settings_gui.py#L34

Will point to the inner copy of sashimi of the conda environment being __file__ the wrong string pointing to an inexistent file ...\conda\envs\sashimi\lightsheet_procedure.md

vigji commented 3 years ago

Good catch. Could you make a PR where you fix this? We should place the lightsheet_procedure.md file (which should be renamed microscope_procedure.md) in the config.CONFIG_DIR_PATH path, together with the hardware configuration, and by default we should provide either none or an empty one, not our lab's. An empty template can be sitting in the docs folder, probably.

In this PR it would ge good to also clean up a bit the mess in the SavingSettingsWidget. As we decided we don't want to support a full editor, if people want to change this they can just open the .md file as they would open the settings file (if editing md files in hidden directories is scaring the user, that is not a user that we want to be editing instructions 😄). Same goes for editing the config file from inside the program. If we want to support this, it has to be extremely solid, while atm it just feels a bit finicky (eg, an arbitrary limit of the nested hierarchy, etc). In any case is just an additional moving part there is little need for (don't expect the config file of a working scope changing more than 1/2 per year). Can probably go in Sashimi 2.0 :)