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

conda environment generated from requirements.txt is not completely functional #97

Open miguelcleon opened 7 years ago

miguelcleon commented 7 years ago

When attempting to run ODM2 Admin with a conda environment generated from requirement.txt some errors are encountered:

1) inline forms were not rendering, I'm guessing this has to do with this import not working properly https://github.com/miguelcleon/ODM2-Admin/blob/master/odm2admin/forms.py#L2

2) ajax lookup fields sometimes weren't working. I haven't been able to figure out why some worked and others did not.

@ocefpaf probably there is some problem with django-ajax-selects?

@lsetiawan maybe you could see if you can replicate the problems?

ocefpaf commented 7 years ago

@ocefpaf probably there is some problem with django-ajax-selects?

If you find any packaing problems with django-ajax-selects selects let me know in:

https://github.com/conda-forge/django-ajax-selects-feedstock/issues

Maybe it just needs the right version?

miguelcleon commented 7 years ago

So I thought I'd test this by creating the environment again and inspecting the django-ajax-selects version in the environment I'm using to run the application and a fresh environment generated from the requirements.txt file. However when I run conda create --yes -n ENVNAME python=3.5 --file requirements.txt I get `PackageNotFoundError: Package not found: '' Packages missing in current linux-64 channels:

looks like I need to spceify the channel, but what is the channel? I tried ODM2 but that yielded the same result.

miguelcleon commented 7 years ago

Also I've actually been using python 2.7.12 in the environment running the application.

ocefpaf commented 7 years ago

You can do like we what we have in the .travis.yml file:

conda config --add channels conda-forge --force
conda create -n ENVNAME python=2.7 --file requirements.txt --file requirements-dev.txt

or you can do all in one command with:

conda create -n ENVNAME python=2.7 --file requirements.txt --file requirements-dev.txt -c conda-forge

The former will add conda-forge to your .condarc file the latter won't.

miguelcleon commented 7 years ago

Ok, great. I've been able to reproduce the problem. I was using an older version of django-ajax-selects. The solution should be to fix the bug rather then pin the package. I'll open another issue with the details.

miguelcleon commented 7 years ago

Ok, I'm still getting the other problem I had noticed. This isn't as big of a problem but it still should to be addressed. I'll open another issue for that.