These are chat archives for openworm/ChannelWorm

17th
Jun 2015
Vahid Ghayoomie
@VahidGh
Jun 17 2015 07:42
@joebowen, I guess the problem is with the $OPENSHIFT_PYTHON_WSGI_APPLICATION environment variable
Maybe this link could help: http://stackoverflow.com/questions/22644553/changing-documentroot-in-openshift
Joe Bowen
@joebowen
Jun 17 2015 12:12
I'm not sure the issue with the env variable since it's finding wsgi.py and calling web_app/settings.py. It's more acting like there is a redirect. Basically the exact opposite of what's happening in this post http://stackoverflow.com/questions/1466708/run-django-with-url-prefix-subdirectory-app-works-but-urls-broken
Joe Bowen
@joebowen
Jun 17 2015 12:55
If I make FORCE_SCRIPT_NAME = '/test/' in the web_app/settings.py then it will look at http://channelwormdjango-channelworm.rhcloud.com/test/application/ So the redirect to the application url must be happening further down the call stack, maybe?
Travis Jacobs
@travs
Jun 17 2015 13:42
@joebowen good eye
I think you're right, this can still be deployed locally with no trouble at all
Reading this right now
Joe Bowen
@joebowen
Jun 17 2015 13:46
So right now I'm starting up work, but I where I left off was. I figured I'd just go the easy route and map all the urls to application/*... it's hacky and I'm running into issues mapping the static files.
I don't think this is a dns issue, this seems more like a django url redirect issue. i think if it were a dns issue, we'd see http://channelwormdjango-channelworm.rhcloud.com/application/test/ not the other way around.
Travis Jacobs
@travs
Jun 17 2015 13:49
Right
I'm not sure if you updated something but the root url is going somewhere now
Joe Bowen
@joebowen
Jun 17 2015 13:50
yea, that's my url redirect. notice the static files don't come in
Travis Jacobs
@travs
Jun 17 2015 13:50
Ah ok, gotcha
Joe Bowen
@joebowen
Jun 17 2015 13:51
I basically added this:
url('^application/', include(base_urlpatterns))
to the urls and renamed urlpatterns to base_urlpatterns... so it basically just prefixes all the urls with application/... all except the static files

sort of... you actually have to reference it by:
http://channelwormdjango-channelworm.rhcloud.com/static/third_pary/....

otherwise it just prefexes another application/ and you get:

http://channelwormdjango-channelworm.rhcloud.com/application/application/static/third_party/...

Joe Bowen
@joebowen
Jun 17 2015 13:59
the ideal solution would be to figure out what's causing the prefix, but I've run out of ideas on that avenue.
Joe Bowen
@joebowen
Jun 17 2015 16:40
there shouldn't be a wsgi/ folder, where are you seeing that?
uhhh... never mind... that was a reply to a very old message...
Vahid Ghayoomie
@VahidGh
Jun 17 2015 19:13
@joebowen, right, that could not be the solution.
Did you get a chance to look into this? openshift/django-example#32
Also These two samples are based on the new structure:
https://github.com/jfmatth/openshift-django16
https://github.com/ZackYovel/openshift-django-sample
Joe Bowen
@joebowen
Jun 17 2015 19:18
I'll check it out
Joe Bowen
@joebowen
Jun 17 2015 20:05
And we're up! I modeled it off of https://github.com/jfmatth/openshift-django17
Let me know when you're gonna fork it back into the main branch and I'll modify the cron pull on the openshift side.
also, let me know if I've missed anything. I had to add a STATIC_ROOT to the web_app/settings.py so openshift can do a collectstatic.
Vahid Ghayoomie
@VahidGh
Jun 17 2015 20:15
@joebowen, great, thanks. but still the same problem with the digitizer :(
Joe Bowen
@joebowen
Jun 17 2015 20:17
try a reload, I'm seeing that as working currently...
any luck?
Vahid Ghayoomie
@VahidGh
Jun 17 2015 20:54
Yes, now working
Would you request a pull for merging with master?
Joe Bowen
@joebowen
Jun 17 2015 20:57
sure
VahidGh/ChannelWorm#87
Vahid Ghayoomie
@VahidGh
Jun 17 2015 21:06
Ok, I did the merge.
@joebowen, How is the synchronization process?
Now, one problem is with the DB synchronization I guess.
As the DB synchronization is not additive, I think the whole DB file will be replaced with each sync, right?
Joe Bowen
@joebowen
Jun 17 2015 21:16
not sure. what db's are we trying to sync?
Vahid Ghayoomie
@VahidGh
Jun 17 2015 21:17
db.sqlite3
Joe Bowen
@joebowen
Jun 17 2015 21:19
I think since that's the db we're using it should just stay synced?
maybe...?
or do you mean synced back to github?
Vahid Ghayoomie
@VahidGh
Jun 17 2015 21:22
If the cronjob is replacing all the different files with the new ones from github, then the db file will also be replaced!
Joe Bowen
@joebowen
Jun 17 2015 21:23
I can make that a selective process if we need to preserve some files... but I can also sync the db back to github
Vahid Ghayoomie
@VahidGh
Jun 17 2015 21:23
Or we can just ignore replacing db!
Joe Bowen
@joebowen
Jun 17 2015 21:23
yea, currently it clones into a temp folder and then copies into the app-root folder
Vahid Ghayoomie
@VahidGh
Jun 17 2015 21:25
syncing back seems a better approach!
Yes, I entered some data and now it's gone. An update arrived :)
Joe Bowen
@joebowen
Jun 17 2015 21:27
ok, I'll add a github sync back of the db before cloning.
Vahid Ghayoomie
@VahidGh
Jun 17 2015 21:29
But wait
I think this would need a pull request for every sync back, right?
Joe Bowen
@joebowen
Jun 17 2015 21:31
I was thinking that I would do a clone, copy db file into, add, commit, push, then copy everything into app-root folder
and if nothing changed in the db, it just wouldn't commit and push anything
Vahid Ghayoomie
@VahidGh
Jun 17 2015 21:33
Ok, I think it's better to just ignore the db file from being updated by the git repository.
Then we can sync back regularly
Joe Bowen
@joebowen
Jun 17 2015 21:34
ok, maybe put that in a daily cron or something?
Vahid Ghayoomie
@VahidGh
Jun 17 2015 21:36
Or just by demand! It would be safer!
Joe Bowen
@joebowen
Jun 17 2015 21:37
that works
ok, testing the cron job now to make sure it doesn't re-write over the db.
go ahead and make a change
ok, looks like changes are sticking
Vahid Ghayoomie
@VahidGh
Jun 17 2015 21:42
@joebowen, yes, great.
Vahid Ghayoomie
@VahidGh
Jun 17 2015 21:50
@slarson, @travs Some good news from the fitter. Could get some good results from VClamp simulation without needing to digitize every single trace and knowing holding potentials. That means now by just using the automate digitization feature of the digitizer, and having some points, we can generate the model :)
data_vs_candidate-VClamp.png
Needs a little more work to reduce the run-time and better fitting to the points.