I was playing around with the dependencies and just need to make a few notes to refer to later:
This was the most boiled-down, updated list of dependencies that I was able to get:
dependencies:
- python=2.7*
- azure=0.10.0
- django=1.9*
- bokeh
- paste
- psycopg2
- sqlalchemy
- requests
- PasteScript
- selenium
- coverage
- docker-py
- geoalchemy2
- pip=9.0*
- pillow
- plotly
- uwsgi
- pip:
- django-gravatar2
- django-bootstrap3
- django-model-utils
- django-guardian
- django-simple-captcha
- django-termsandconditions
- owslib>=0.8.0,<0.9.0
- tethys_dataset_services
- condorpy
- TethysCluster
- python_social_auth==0.2.14
owslib >= 0.10.0 is available on conda, but it breaks Tethys (not sure why; it fails silently; I plan to look into it at some point).
The following packages need to be updated for us to be able to switch to Python 3:
* tethys_dataset_services
* condorpy
* TethysCluster (I think we just need to remove this from Tethys)
* PasteScript (this is available for Python 3 on pip, but not on conda).
To find a list of packages that depend on (for example) postgresql, use the following command:
grep postgresql /opt/miniconda/pkgs/*/info/index.json
In conda django depends on gdal which in turn depends on sqlite and postgresql, so both database packages are already in the environment. I was
not able to get the database to initialize with a sqlite database. Although I'm interested in chasing down exactly why its not working, for academic reasons, I don't really think we should use sqlite as a development database. To set up postgresql locally to serve as the Tethys database execute the following commands:
sudo useradd postgres
sudo -u postgres /opt/miniconda/envs/tethys/bin/initdb -D psql/data
sudo -u postgres /opt/miniconda/envs/tethys/bin/pg_ctl -D psql/data -l logfile start
sudo -u postgres /opt/miniconda/envs/tethys/bin/psql --command "CREATE USER tethys_default WITH NOCREATEDB NOCREATEROLE NOSUPERUSER PASSWORD 'pass';"
sudo -u postgres /opt/miniconda/envs/tethys/bin/createdb -O tethys_default tethys_default -E utf-8 -T template0
This requires changing the port in settings.py for the default database to 5432. We probably start the database on port 5435 to match the default settings, but its probably better to keep it on the default to avoid conflict with the dockers if those end up getting set up. We could change the settings template to default to 5432 for the default database.