ODM2 / CZ-Manager

CZ Manager (formerly ODM2 Admin) is an application for site level data management of environmental observations using Observation Data Model 2 (ODM2) for documentation and a detailed walkthrough see:
http://odm2.github.io/CZ-Manager
MIT License
9 stars 12 forks source link

Django2 #194

Closed miguelcleon closed 6 years ago

miguelcleon commented 6 years ago

updates for compatability with django 2.0 and python 3.6. Also updates for exporting to hydroshare functionality.

miguelcleon commented 6 years ago

@lsetiawan @ocefpaf I updated code for django 2.0.1 and python 3.6 travis is still failing though. Maybe something I did with the travis.yml is wrong?

miguelcleon commented 6 years ago

hs_restclient isn't on a conda channel, maybe it can be added to conda-forge? This is a python REST client for hydroshare.org I'm using to export data. https://pypi.python.org/pypi/hs_restclient I added it as a pip install in travis.yml

miguelcleon commented 6 years ago

oh I see django-fixture-magic is also not on a conda channel.

ocefpaf commented 6 years ago

@miguelcleon see https://github.com/conda-forge/staged-recipes/pull/4839

Once that PR is merged those packages will be available on the conda-forge channel.

miguelcleon commented 6 years ago

Great, thanks @ocefpaf it looks like travis got passed the enivronment build errors and is now encountering issues in the ODM2 Admin code I need to look at. One more django package will need to be added to conda-forge for this social-auth-app-django can that be added as well?

ocefpaf commented 6 years ago

One more django package will need to be added to conda-forge for this social-auth-app-django can that be added as well?

Yep. See https://github.com/conda-forge/staged-recipes/pull/4840

miguelcleon commented 6 years ago

The error on travis is now OSError: /home/travis/miniconda/envs/TEST/lib/libgdal.so: cannot open shared object file: No such file or directory Maybe need to install gdal in travis.yml? gdal has been a requirement for a long time so I'm not sure.

ocefpaf commented 6 years ago

Maybe need to install gdal in travis.yml?

Not really. It is something else. Let me check this later today and I'll get back to you.

miguelcleon commented 6 years ago

For the last update the error was psycopg2.OperationalError: FATAL: role "user" does not exist, I've added a blank ODM2 database which was missing. I'm not sure how travis sets up postgresql. @lsetiawan ? Maybe I need the travis.yml from the testing branch? I think I've been building off an older one.

miguelcleon commented 6 years ago

it's failing on test execution.

miguelcleon commented 6 years ago

changing setup.py didn't help I'm still gettingpsycopg2.OperationalError: FATAL: role "user" does not exist

miguelcleon commented 6 years ago

The problem I think has to do with the test database django creates for testing.

miguelcleon commented 6 years ago

I thought maybe I fixed it but now I'm getting the below error which seems odd. @ocefpaf any ideas about this?


$ if [[ $TEST_TARGET == 'default' ]]; then python $TRAVIS_BUILD_DIR/manage.py test tests/; python fi
/home/travis/.travis/job_stages: eval: line 58: syntax error: unexpected end of file
The command "if [[ $TEST_TARGET == 'default' ]]; then python $TRAVIS_BUILD_DIR/manage.py test tests/; python fi" exited with 1.
miguelcleon commented 6 years ago

I think I see it.

miguelcleon commented 6 years ago

Yes!! it worked thanks much @ocefpaf and @lsetiawan ! 🍾 🎆