greenelab / connectivity-search-backend

Django backend for hetnet connectivity search
https://search-api.het.io
BSD 3-Clause "New" or "Revised" License
6 stars 2 forks source link

Major environment update: Python 3.8, Django 3 #70

Closed dhimmel closed 4 years ago

dhimmel commented 4 years ago

~~Not all conda dependencies have been rebuilt for 3.8 yet, so we may have to retry installing this environment in the future. https://conda-forge.org/status/~~

dongbohu commented 4 years ago

That's a lot of updates. You may want to try the new environment on a test server before merging.

dhimmel commented 4 years ago

Tested https://github.com/greenelab/connectivity-search-backend/pull/70/commits/b75de1809c44843280836b8f0d22a4f8cb03dc8a locally using:

conda env update --file environment.yml
conda activate hetmech-backend
python manage.py runserver

Since on a different machine, I SSH port forwarded like:

ssh -L 9000:localhost:8000 dhimmel@XXXX.med.upenn.edu

Then clicked through every API endpoint at http://localhost:9000/v1/ and looked for errors.

Here are the runserver logs:

python manage.py runserver

Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
June 22, 2020 - 21:41:25
Django version 3.0.7, using settings 'dj_hetmech.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Not Found: /
[22/Jun/2020 21:42:05] "GET / HTTP/1.1" 404 2973
Not Found: /favicon.ico
[22/Jun/2020 21:42:06] "GET /favicon.ico HTTP/1.1" 404 3024
[22/Jun/2020 21:42:11] "GET /v1 HTTP/1.1" 301 0
[22/Jun/2020 21:42:12] "GET /v1/ HTTP/1.1" 200 10674
[22/Jun/2020 21:42:12] "GET /static/rest_framework/css/bootstrap.min.css HTTP/1.1" 200 121457
[22/Jun/2020 21:42:12] "GET /static/rest_framework/css/bootstrap-tweaks.css HTTP/1.1" 200 3385
[22/Jun/2020 21:42:12] "GET /static/rest_framework/css/prettify.css HTTP/1.1" 200 817
[22/Jun/2020 21:42:12] "GET /static/rest_framework/css/default.css HTTP/1.1" 200 1131
[22/Jun/2020 21:42:12] "GET /static/rest_framework/js/ajax-form.js HTTP/1.1" 200 3597
[22/Jun/2020 21:42:12] "GET /static/rest_framework/js/jquery-3.4.1.min.js HTTP/1.1" 200 88145
[22/Jun/2020 21:42:12] "GET /static/rest_framework/js/csrf.js HTTP/1.1" 200 1719
[22/Jun/2020 21:42:12] "GET /static/rest_framework/js/bootstrap.min.js HTTP/1.1" 200 39680
[22/Jun/2020 21:42:12] "GET /static/rest_framework/js/prettify-min.js HTTP/1.1" 200 13632
[22/Jun/2020 21:42:13] "GET /static/rest_framework/js/default.js HTTP/1.1" 200 1268
[22/Jun/2020 21:42:13] "GET /static/rest_framework/img/grid.png HTTP/1.1" 200 1458
[22/Jun/2020 21:42:16] "GET /v1/node/2 HTTP/1.1" 200 10922
[22/Jun/2020 21:42:20] "GET /v1/ HTTP/1.1" 200 10674
[22/Jun/2020 21:42:21] "GET /v1/nodes/ HTTP/1.1" 200 28441
[22/Jun/2020 21:42:30] "GET /v1/random-node-pair/ HTTP/1.1" 200 9994
[22/Jun/2020 21:42:34] "GET /v1/random-node-pair/ HTTP/1.1" 200 9996
[22/Jun/2020 21:42:37] "GET /v1/random-node-pair/ HTTP/1.1" 200 9996
[22/Jun/2020 21:42:38] "GET /v1/random-node-pair/ HTTP/1.1" 200 9996
[22/Jun/2020 21:42:39] "GET /v1/random-node-pair/ HTTP/1.1" 200 9996
[22/Jun/2020 21:42:45] "GET /v1/metapaths/source/17054/target/6602/ HTTP/1.1" 200 32838
[22/Jun/2020 21:42:52] "GET /v1/metapaths/random-nodes/ HTTP/1.1" 200 35738
[22/Jun/2020 21:43:00] "GET /v1/paths/source/17054/target/6602/metapath/CbGeAlD/ HTTP/1.1" 200 227303

This looks good to me! Pretty amazing not even any deprecation warnings after such major upgrades. I think this should have assessed much of this codebase. Possible something breaks in the code not covered here, like the management command to populate database.

dhimmel commented 4 years ago

Notes:

Deploys in this build