japacible / DashTricks-Pakistan

Android application focused on vaccine cold chain management in Pakistan.
13 stars 6 forks source link

5.20 Code Freeze #49

Closed japacible closed 10 years ago

japacible commented 10 years ago

Code freeze for demo on Wednesday. Deadline: EOD 5.20

japacible commented 10 years ago

Reminder this is tonight at midnight.

No broken builds or crashing app, please! =)

danluna commented 10 years ago

@Venture- I'm getting compilation problems after your update. It looks like you deleted a few files from the Model folder and now the AllocationDriver.java class is crashing since it doesn't have these to work with anymore. I might have also pulled data wrong as well, I'm not incredibly experience with git yet. Anyways let me know if you were able to build after you made those changes... for now I'm going to comment stuff out.

Venture- commented 10 years ago

I ended up changing a few interfaces to manage capacities cleanly. The primary change (which I'm assuming is causing issues) is pulling out capacity from the facilities class.

This was done mainly because asking for a facilities volume was a nebulous request. At any given time it was unclear if a facility had been granted all of it's refrigerators, some of them, all of them, or had been allocated new ones.

Options I considered were having a facility keep track of "pre" and "post" allocation refrigerator capacities, having post allocation capacity stored independently, and having having sets of pre and post allocation facilities.

The first two were discarded because it added a lot of complexity to the facilities class, and still had a lot of the ambiguity issues from before. Additionally, it caused the interfaces between the two capacities to be different. This would eventually require distinct code from the front end to query each.

The multiple facilities was discarded because I disliked having "unique" names and ids referring to separate objects. It would have also required careful deduplication to make sure "identical" facilities weren't counted separately. Finally, I just didn't like how much redundant information would have been stored (I <3 L2 caches).

Currently I have capacity maintained (both by modeling and allocation) as a map from a facility to a capacity (just a collection of refrigerators and counts). This allows a capacity to be maintained independently from a facility, and there is no ambiguity as to what state a facility is in (or what a name/ID refers to (or equality)). It also lets us keep identical interfaces for pre and post allocation. if something about this configuration breaks something for you, I'm sure I could get one of the other mentioned ones (or something else) to work.

It is possible we will want to wrap this mapping in some class, but I don't think we need to. Also, there were a couple renamings to more sane and meaningful things.

I currently don't have any issue building and running various test cases. Woo git fun!

Bejoty commented 10 years ago

Here's what I ended up with for new map viz functionality: http://bejoty.github.io/d3demos/pakmap.html

I haven't pushed anything to this repo for fear of blowing everything up, but in theory it should all work when the folder is updated with new files. It doesn't use data input at this time (fake or otherwise), but the random values will be easy to replace once we solidify the new data object structure.

danluna commented 10 years ago

I also did a bit more stuff and am afraid to break the repo at this point. I will take my tablet tomorrow to show this to everyone. See you guys at 3:30!

japacible commented 10 years ago

@Bejoty push to another branch and have @InsaneFisherman grab that build for our demo today please. I know you can show it on your tablet, but it would be nice to have course staff see that on a nexus 7, in app.

Also, your work is very isolated in the repo, so if you replace your old files, nothing should blow up. If you really want someone else to test for you, open a pull request.

software-dov commented 10 years ago

Somehow the build is broken. Getting 48 build errors, mostly because of missing classes: VolumeRequirement, VolumenRequirementBuilder, RefrigeratorTypeAndCound. Temporarily added those back in, and it builds fine.

Code is on the device and should be ready to demo.

On May 21, 2014, at 9:32 AM, Jennifer Apacible notifications@github.com wrote:

@Bejoty push to another branch and have @InsaneFisherman grab that build for our demo today please. I know you can show it on your tablet, but it would be nice to have course staff see that on a nexus 7, in app.

Also, your work is very isolated in the repo, so if you replace your old files, nothing should blow up. If you really want someone else to test for you, open a pull request.

— Reply to this email directly or view it on GitHub.

Bejoty commented 10 years ago

After a bit of finagling with the desktop app, I managed to update a test branch in the repo. It does use a couple new asset files within the local directory, but the HTML file has the same name so I don't believe it would break.

Can someone test in on the tablet?

software-dov commented 10 years ago

Which branch?

On May 21, 2014, at 10:31 AM, Austin Hedeen notifications@github.com wrote:

After a bit of finagling with the desktop app, I managed to update a test branch in the repo. It does use a couple new asset files within the local directory, but the HTML file has the same name so I don't believe it would break.

Can someone test in on the tablet?

— Reply to this email directly or view it on GitHub.

danluna commented 10 years ago

Hey guys, I am also getting the same build errors. In the meantime, I am going to grab @Bejoty 's new stuff and add it to my version of the app and I believe that would be up-to-date as far as visualization goes (unless I am missing any updated stuff from someone else).

@Bejoty, I assume that bootstrap.min.css, pakistan.html, and pakmap.hmtl are all the new/updated files which I need to include in the assets folder?

danluna commented 10 years ago

@InsaneFisherman The branch is called map-test

software-dov commented 10 years ago

Sweet. Do we want to use master as the demo for today or this other branch? On May 21, 2014 11:21 AM, "Daniel Luna" notifications@github.com wrote:

@InsaneFisherman https://github.com/InsaneFisherman The branch is called map-test

— Reply to this email directly or view it on GitHubhttps://github.com/japacible/DashTricks-Pakistan/issues/49#issuecomment-43795094 .

Bejoty commented 10 years ago

I just branched off of master this morning, so if map-test works, I'd say use that. Unless someone pushed something vital since 10am.

danluna commented 10 years ago

The problem with both branches is that they both have the build errors from those missing classes which you mentioned @InsaneFisherman .

Is there a way to add those needed files in to the master branch? Or even revert the master to a previous working commit for now? I still have a few changes I need to commit, but am skeptical of doing it since the current version breaks.

In the meantime, I can load @Bejoty 's new files onto my local version of the app. This local version would have all the updated Android activities including @Bejoty 's map, my list views, and a few appearance changes I made in general. I am working on integrating @Bejoty 's files as we speak. Ultimately, this would be the most advanced version as far as viz goes.

If I can get this up to the repo before we meet that would be great. However, I want the current version in the repo to build before continuing to add more to it.

software-dov commented 10 years ago

I just checked out the files from a previous commit. We can use them temporarily until we actually sort out the issue.

Will build and try map-test On May 21, 2014, at 11:34 AM, Daniel Luna notifications@github.com wrote:

The problem with both branches is that they both have the build errors from those missing classes which you mentioned @InsaneFisherman .

Is there a way to add those needed files in to the master branch? Or even revert the master to a previous working commit for now? I still have a few changes I need to commit, but am skeptical of doing it since the current version breaks.

In the meantime, I can load @Bejoty 's new files onto my local version of the app. This local version would have all the updated Android activities including @Bejoty 's map, my list views, and a few appearance changes I made in general. I am working on integrating @Bejoty 's files as we speak. Ultimately, this would be the most advanced version as far as viz goes.

If I can get this up to the repo before we meet that would be great. However, I want the current version in the repo to build before continuing to add more to it.

— Reply to this email directly or view it on GitHub.

Bejoty commented 10 years ago

Yeah, if you get a working build, just copying in the new /www from map-test should work to avoid merge hell.

software-dov commented 10 years ago

Just checked out and built map-test. It doesn’t display the map, but looks like it wants to show Facility coverage. Is it supposed to do something else?

On May 21, 2014, at 11:38 AM, Austin Hedeen notifications@github.com wrote:

Yeah, if you get a working build, just copying in the new /www from map-test should work to avoid merge hell.

— Reply to this email directly or view it on GitHub.

Bejoty commented 10 years ago

Yeah, it should show the map. Does the tablet easily show browser script errors?

software-dov commented 10 years ago

From attached console:

.pakistan.app E/AndroidProtocolHandler﹕ Unable to open asset URL: file:///android_asset/www/pakistan2.json 05-21 11:41:32.241 7218-7250/com.dashtricks.pakistan.app E/AndroidProtocolHandler﹕ Unable to open asset URL: file:///android_asset/www/fake_data.json 05-21 11:41:32.261 7218-7218/com.dashtricks.pakistan.app I/chromium﹕ [INFO:CONSOLE(30)] "Uncaught TypeError: Cannot read property 'objects' of undefined", source: file:///android_asset/www/js/pakmap.js (30) 05-21 11:41:32.261 7218-7218/com.dashtricks.pakistan.app I/chromium﹕ [INFO:CONSOLE(54)] "Uncaught TypeError: Cannot read property 'facilities' of undefined", source: file:///android_asset/www/js/pakmap.js (54) 05-21 11:50:49.921 7218-7218/com.dashtricks.pakistan.app W/IInputConnectionWrapper﹕ showStatusIcon on inactive InputConnection On May 21, 2014, at 11:38 AM, Austin Hedeen notifications@github.com wrote:

Yeah, if you get a working build, just copying in the new /www from map-test should work to avoid merge hell.

— Reply to this email directly or view it on GitHub.

Bejoty commented 10 years ago

Oh, it's pulling the old files. I might have messed up the branch commit. Let me look at the source real quick...

Bejoty commented 10 years ago

I must have forgot to move the JS file. My desktop app is glitching atm, so copy this file over: https://github.com/Bejoty/d3demos/blob/gh-pages/js/pakmap.js

danluna commented 10 years ago

I'm getting a map but the rendering is really weird. Could there be other files that are still needed?

software-dov commented 10 years ago

Where should it go in the repo? Assets?

On May 21, 2014, at 12:04 PM, Austin Hedeen notifications@github.com wrote:

I must have forgot to move the JS file. My desktop app is glitching atm, so copy this file over: https://github.com/Bejoty/d3demos/blob/gh-pages/js/pakmap.js

— Reply to this email directly or view it on GitHub.

danluna commented 10 years ago

Yeah, assets/www/js/pakmap.js

danluna commented 10 years ago

@Bejoty Is pakmap.css up to date in your repo?

software-dov commented 10 years ago

Still nothing. A file of the same name existed in the same place, but was replaced.

On May 21, 2014, at 12:11 PM, Daniel Luna notifications@github.com wrote:

I'm getting a map but the rendering is really weird. Could there be other files that are still needed?

— Reply to this email directly or view it on GitHub.

Bejoty commented 10 years ago

My app is choosing a terrible time to stop working, and I'm a bit rusty with Win cmd for git, so for the moment I suppose compare files with what I have here: https://github.com/Bejoty/d3demos/tree/gh-pages

Ignore the trash and PAK_adm folders. I have an hour before my next class so I'll keep searching for the issue as well.

Bejoty commented 10 years ago

For reference, it should function like this page: http://bejoty.github.io/d3demos/pakmap.html

Bejoty commented 10 years ago

Oh, yeah the CSS file didn't get replaced either. My bad. https://github.com/Bejoty/d3demos/blob/gh-pages/css/pakmap.css

Sorry, I was trying to do all this branching stuff on a bus this morning and it was being an ass.

danluna commented 10 years ago

@Bejoty With the css this looks alot more like it! There is just one problem with the map... the background of the map section is filling in with blue or green color. It is strange, I can try to send you a picture in a bit.

danluna commented 10 years ago

Check it out:

20140521_124424

Bejoty commented 10 years ago

Indeed, that is false.... Hmm, is that upon load or does it happen when you tap a region? Also are there any other script errors?

(Oh, presumably this is on click, since the list view is showing facilities.)

danluna commented 10 years ago

This is upon load up. And I actually get a blue color instead of the teal-ish color to begin with. After click, the teal-ish color takes over.

danluna commented 10 years ago

Every time I click I also get a message saying this:

05-21 12:43:53.914 12351-12393/com.dashtricks.pakistan.app E/webcoreglue﹕ getAbsoluteBoundingBox failed for node 0x674a5aa8, name RenderSVGPath 05-21 12:43:54.504 12351-12393/com.dashtricks.pakistan.app E/webcoreglue﹕ getAbsoluteBoundingBox failed for node 0x674a5aa8, name RenderSVGPath 05-21 12:43:55.354 12351-12393/com.dashtricks.pakistan.app E/webcoreglue﹕ getAbsoluteBoundingBox failed for node 0x674a5aa8, name RenderSVGPath

Bejoty commented 10 years ago

Intriguing.... I can see this being one of two issues. Either multiple regions are being incorrectly class labeled or the d3 paths aren't closing correctly.

With those errors, it's looking to be the latter. Hmmm, SVG render error. What's making this difficult is that the error doesn't happen on desktop browsers.

Bejoty commented 10 years ago

If you could, give this a quick sanity check. I updated the files in the map-test branch, and copied that /www/ folder verbatim to test it on my desktop browsers. Neither of them replicate this bug.

Try replacing the web folder with the current branch commit. I don't see how it would be different, but it's worth a shot while I ponder why the environment is creating such an issue.

danluna commented 10 years ago

Ok, I'll copy those files over and let you know the results. I also assumed that the android/webview environment was causing this from the get-go. Anyways, I'll give this a shot!

danluna commented 10 years ago

Same results so far :( This definitely looks like rendering/environment issues as you said. If we don't get this running before the meeting, we can show them both the map on your browser, and the map on the tablet even if it still has rendering problems. That way we atleast show progress and ask Fahad for D3/Webview rendering help.

Bejoty commented 10 years ago

I have a couple ideas of how to debug, but it would help if android had an easy way to observe DOM elements. Does that exist? Either way, it's high time I get a local build set up.

Really the most intuitive way to debug front-end stuff like this is quick iteration. The build step makes this a frustrating process over desktop browser iteration.

danluna commented 10 years ago

Yep, building on Android is not ctrl-r awesome haha.

I'm not sure if Android includes DOM interaction, @japacible might know about this?

danluna commented 10 years ago

It worked once finally! However, it only renders correctly like this about 1 out of 10 times that I load the webview. This is wierd.

20140521_140124

japacible commented 10 years ago

Not sure about dom interaction, but here's a start: http://developer.android.com/guide/webapps/debugging.html

software-dov commented 10 years ago

Changes pulled. Demo looks great! Seems a little slow, and small facilities are hard to select, but this should go over well. On May 21, 2014, at 1:57 PM, Jennifer Apacible notifications@github.com wrote:

Not sure about dom interaction, but here's a start: http://developer.android.com/guide/webapps/debugging.html

— Reply to this email directly or view it on GitHub.

Bejoty commented 10 years ago

@InsaneFisherman, does the map work consistently for you?

One of my thoughts is that it might be a JS race condition with parsing JSON data and assigning click handlers / styling. I don't see how precisely this would happen, as it seems to hold on load for the rest of the code, but it's something to look into.

software-dov commented 10 years ago

Today I worked on integrating database creation and data slurping into the UI in addition to working on the draft of the paper.

software-dov commented 10 years ago

Good. I would suggest that you sit with Jennifer and go through whole paper prototype she has. While traversing, note different data objects she would need for different activities. Some of these objects will go to the list, bar charts and maps. Think about the flow of application. When a user click on a bar or district on a map or list element, where is the data of further details. Is that something application should query when the event occurs or application should already have that data preloaded. This will define the data flow and json object formats that application should expect. Once done with that, you can go ahead and complete the data access layer by implementing all the required functions to support application.

On Thu, May 22, 2014 at 11:36 PM, Dov Shlachter zygomorph125@gmail.comwrote:

Today I worked on integrating database creation and data slurping into the UI in addition to working on the draft of the paper.

software-dov commented 10 years ago

The facility and refrigerator class look like they’ve been stripped. Do they no longer need all the capacity/other information, or am I somehow out of sync?

japacible commented 10 years ago

pinging @danluna - commit f4ea49b88cef158fc0a3384dd31a9ec63114f82c ?

(Also, pls start a new issue since this is all under code freeze from last week? That way we can easily find things :D)

software-dov commented 10 years ago

Integrating database and data accessing class, review and polish paper first draft.

software-dov commented 10 years ago

Ok

On Sat, May 24, 2014 at 11:48 PM, Dov Shlachter zygomorph125@gmail.comwrote:

Integrating database and data accessing class, review and polish paper first draft.