AuScope / seismo-loader

MIT License
1 stars 0 forks source link

installation & running issues #46

Open filefolder opened 2 weeks ago

filefolder commented 2 weeks ago

few minor things with getting a working version on my osx machine

1) would be good to mention streamlit (and I assume obspy) dependencies explicitly in instructions and how to install via pip

2) getting these types of errors when following the instructions to run which looks like a small path issue e.g. streamlit run seismic_data/ui/main.py

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling
    result = func()
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 579, in code_to_exec
    exec(code, module.__dict__)
  File "/Users/Robert/installed/seismo-loader/seismic_data/ui/main.py", line 2, in <module>
    from seismic_data.ui.pages.helpers.common import init_settings
ModuleNotFoundError: No module named 'seismic_data' 

3) not so important but: using st as the abbreviation for streamlit (import streamlit as st) is extremely dangerous for seismic code... st is the de facto variable name for a seismic data stream and may cause a lot of confusion/issues elsewhere. I would probably just keep it "streamlit"?

4) are poetry, pyenv, docker et al really necessary? the install instructions as they are are a bit scary for most users and this doesn't seem like the sort of project that is so complicated and particular to require a virtual environment. Ideally this is just a pip install seismo-loader sort of thing? Also the instructions still hint at python3.12 being required, I don't think this is true anymore but having that mentioned is a non-starter for anyone I can ask to demo the code. Perhaps there could be a "easy version" three line install/run instructions just to let people quickly test it out and a "virtual environment" version should people actually need to install that way, which I assume will be a very small minority.

bmotevalli commented 2 weeks ago

@filefolder I have added three files to the root of the project: requirements.txt, setup.sh, run.sh.

Please give it a go and let me know if there are any issues.

Regarding a couple of points that you mentioned:

Response to points 1 and 4:

Please note that we are yet in early development phases of this project. At this stage, most provided instructions are for the main developers, so everyone on the team will know how to set up the project and run it. These instructions will be yet useful at the end for those willing to further develop this app. However, we would need a separate effort to properly draft a user manual (or even host an online manual) on how to install and use this app.

Regarding pip install seismo-loader, as mentioned, this will be available towards the end of the project. We would want to release a library on pypl once the project is in a mature state and tested. Meanwhile, using poetry we can publish a wheel which can be used to simply install the package. But it is yet too early to do that as we are constantly changing stuffs and we would need then to frequently build new wheels, which is not ideal.

At this stage, I do not recommend to promote the app to a wide audience, except to close colleagues. The app is yet far from being matured.

Response to point 2: This should be ok now when using the two provided shell scripts. Basically, our project is a module and python needs to know about it. If we are not installing it via pip (which is not an option for now) and not using poetry, then we just need to add the base path to PYTHONPATH. Please make sure to run the two scripts from the root of the project.

Response to point 3: As discussed in the meeting, we will try to keep UI separate from the API calls and handling data. I guess that would be the best way. We will re-discuss this again in our Tech meeting.

bmotevalli commented 1 week ago

@vjf let us know if it was easy to set up the app in Linux.