IRC Logs for #cmvt Monday, 2013-05-27

DanielBairdyep i'll have a look.  i'll probably need to spend today on the other project though, apparently intersect's ui guy is only working one day a week.00:00
prologickk nps00:02
DanielBairdhmm i tried npm install require before trying the correct npm install requirejs... wonder what got installed.00:03
prologicyou install via npm00:04
prologicnpm install -g requirejs00:04
prologicit installed /usr/bin/r.js00:04
DanielBairdmy fiurst guess was npm install require, which succeeded in installing *something*00:05
DanielBairdmaybe it was a really old version or something00:05
DanielBairdanyway it's all good now00:05
DanielBairdlooks fine in my secondary repo.  i'll try it in my real one00:06
prologiccool00:07
prologicif you wouldn't mind reviewing the web api docp00:08
prologicit'll give me something to work on today00:08
DanielBairddid you update the logo image?00:09
prologiclol no you did :)00:09
prologicI just created a favicon based on it00:09
DanielBairdit wants to merge it..00:10
prologicyeah well merge it00:10
prologicoh wait00:10
prologicyeah this is what I said00:10
DanielBairdmaybe some metadata changed00:10
prologicI changed the structure of src00:10
prologicyou may want to shelve any uncommitted changes00:10
prologicto make things easier on yourself :)00:10
DanielBairdi'll just "take other", should be fine00:11
DanielBairdfor the image, i mean00:11
prologic*nods*00:11
prologic:)00:15
prologicwhen you're done fixing up your repos00:20
prologicas usual the docs are here: http://testccav.terranova.org.au/docs/00:20
prologicI've updated testccav to the latest revision00:20
DanielBairdokay all checks out, dev and production.  it was pretty painless, the only manual thing i had to do was removing an empty 'static' directory00:23
DanielBairdi think 'model' is missing from some urls..00:27
DanielBaird/summaries/projections00:27
DanielBaird/summaries/projections/model00:27
DanielBaird/summaries/projections/scenario00:27
DanielBaird/summaries/projections/scenario/year00:27
DanielBairdshould be model/scenario/etc right?00:27
prologicahh right00:28
prologicyeah I'll fix that00:28
prologicI was wondering actually00:28
prologicwhich makes more sense00:28
prologicmodel -> scenario -> year > bioclim00:28
prologicor00:28
DanielBairdactually the examples are good, just the initial list of thingies00:28
prologicscenario -> model -> year -> bioclim00:28
prologicit'll affect the directory structure of the underlying data for me00:29
prologicand the way you present the UI00:29
prologicI notice you make Year selection first00:29
prologicwhich will not work00:29
prologicyou need to present model or scenario first00:29
prologicso you then have a further refined list of things to load00:29
prologicwe shouldn't assume that year selection is always a statically defined selection of 2015 through to 2085 in 10 year increments00:30
prologicwhat if we shove data in that's different?00:30
DanielBairdyear, scenario and model are just three dimensions, the order doesn't matter that much00:31
prologicok00:32
DanielBairdi guess it's most useful to consider what the most likely new data would be00:32
prologicwell I plan on making it model -> scenario -> year00:32
prologicas stated in the api docs00:32
prologicif you're pretty happy with this design00:32
prologicI'll go ahead and work on it today00:33
prologicand let you get back to your other work :)00:33
DanielBairdwhat is region, is it region-type, like "ibra"?00:34
prologicyes00:34
prologica reference to a collection of actual regions00:34
prologici.e: a Shapefile00:34
prologicso you might have au/ibra00:35
prologicor au/nrm00:35
prologicwhatever00:35
prologicas we discussed00:35
DanielBairdokay cool, so the result of GETting .../scanario/2050/au/ibra is a list of regions of that type.  or au-ibra?00:35
DanielBairdno i guess au/ibra would be compatible with the region endpoint's api00:37
DanielBairdi'd like to add some example responses, i'll do that now and commit00:38
prologicyou'll get your summary data00:39
prologicfor that particularly model + scenario + year00:39
prologicintersected against that collection of regions00:39
prologicwell00:40
DanielBairddo you want to have a key alongside the result key where you can put query metadata?00:40
prologicI deliberately left the example responses out or now00:40
prologicas I thought the API might go through several internal iterations00:40
prologicuntil we're happy with the output00:40
prologicthen we can copy/paste real responses in :)00:40
prologicI wanted to only design the structure and agreed upon protocol of the API (at a higher level)00:40
prologicnamely because there are several things to consider in implementing this00:41
prologicversioning support (v1 vs. v2, etc)00:41
prologicoutput formats (straight forward)00:41
prologicthe structure of the output (something standard-ish across all endpoints?)00:42
DanielBairdalright i won't worry about it.. i thought of it when i saw that the region includes its border, which I think is gonna be a URL to a feature.. an example would make that clearer00:42
prologic*nods*00:42
prologiclet me code this up00:42
prologicwhen we'll copy/paste real examples in :)00:42
prologicI might not be able to exactly match and examples you might put in right now :)00:42
prologichaha00:42
prologichmm00:43
DanielBairdwhere meta has keys like query_timing or whatever.00:43
prologichow about00:43
prologicone sec00:43
DanielBairdor even just anything in the 'meta' i can console.log00:44
prologichttp://codepad.org/yaUGv21j00:45
prologicwhere success is true/false00:45
prologicdata is the actual data (might be empty)00:45
prologicand refs is a list (might be empty) of other deeper endpoints00:45
prologicwhat's missing here is how to display/handle api help00:46
DanielBairdthat'd be okay00:46
prologica place to either store OK if success == true00:46
prologicor the exception/error if success == false00:46
prologicand maybe even a possibly empty traceback list00:46
DanielBairdyou're supposed to 401 or 5xx or something if there's a real error.  but there are sort-of-errors that we might want messages to go with00:46
prologichttp://codepad.org/wjBdiG9C00:47
prologichmm00:47
prologicthat is a good point00:47
prologicyou are quite right00:47
DanielBairdhttp://codepad.org/yikciFIg00:48
DanielBairdi like the clear delineation of results / about the results00:48
DanielBairdrefs are probably results, now that i think about it00:48
prologichttp://codepad.org/ymp7ph7N00:49
prologichow about this?00:49
prologichelp docs will be rendered in plain text00:49
prologicas I'll rip it straight out of the python doc strings00:49
DanielBairdseems okay.  how do you ask for the help?00:50
DanielBairdbrb00:51
prologicI was thinking like this00:52
prologicGET /summaries/help00:52
prologicor00:52
prologicGET /regions/au/ibra/help00:52
prologicbasically any endpoint will implement a help resource00:53
prologicseems pretty straight forward to me00:53
prologicunless you have a better idea? :)00:54
DanielBairdback.  that seems cool00:54
DanielBairdso any url that doesn't end in "/help" can have "/help" added to get docs00:55
DanielBairdand the help format isn't JSON it's plain text.  Or even HTML i suppose00:56
DanielBairdso, i think refs are just result data, if you mean they're URLs to the things in the directory the user just queried.00:57
DanielBairde.g. GET /summaries/projections/hadgem3/ should return a list of the scenarios that model has available as data, e.g:01:00
prologichttp://testccav.terranova.org.au/docs/webapi.html01:05
prologicupdated01:05
prologicahh yes01:06
prologicI see your point01:06
prologicgood point :)01:06
prologicupdated again01:09
prologicalso I removed the plain-text bit of the help response01:09
prologicI realized that you should be able to request it in any format really01:09
prologictext, json, html, etc01:09
prologicI may however actually (I believe I will) write the doctoring in the python source using reStructuredText01:10
prologicso if html is requested01:10
prologicI'll preprocess it through docutils and render it as html01:10
prologicbefore giving it to the client01:10
prologicif text/json formats are requested, I'll just chunk it at you raw01:10
DanielBairdyeah i guess so.. text is help content only, json is { data: { helpcontent: "the same text" }}, html is the reST rendered text.01:11
prologicyeap01:13
prologicprecisely01:13
prologicas in, it'll act like any other endpoint really01:14
prologicit'll just be builtin to every endpoint01:14
prologicso we all happy with this01:15
prologic?01:15
DanielBairdyes i like it so far01:15
DanielBairdare there bits we can leave out?01:15
prologicalright01:15
prologicwhat do you mean?01:15
DanielBairdi mean not implement..01:15
DanielBairdto save time01:15
prologicumm01:15
prologicyes01:16
prologicthe geometry service01:16
prologicwhich I see as a nice to have really01:16
DanielBairdactually the separate vars stuff too01:16
prologicwell01:16
prologicthat will be no harder to solve than anything else01:16
prologicthe help system will be harder01:16
prologicI'll leave that to last I think01:16
DanielBairdcoo01:16
DanielBairdcool, even01:16
prologicI'll see how I go01:16
prologicI have to now enhance the data tasks in fable.data now01:17
prologicso that I can actually have a data structure of files I can play with01:17
DanielBairdnp.  i guess it's not so much that we should pick things to not do, just that we should do the more important bits first.  so yeah continue on as you were about to01:17
DanielBairdand forget i said that thing about leaving stuffout01:17
prologic:)01:17
prologicI'm going to work on the most obvious01:18
prologicand useful things first01:18
prologic:)01:18
prologicdata structure of real data01:18
prologican implementation of /summaries01:18
prologicand go from there01:18
prologicwhen soon after /regions I guess01:18
DanielBairdcool01:18
prologicyou imagine how long it took you to do what you've got so far01:18
prologicit'll probably take me just a along to hook up all the backend dat :)01:18
prologicand make it all repeatable and reproducable01:19
prologicand that's not even supporting any other kind of data01:19
prologici.e: we don't have any other models01:19
prologiconly the ones Jeremy has01:19
prologicand we don't have any other regions yet01:19
prologiconly IBRA regions01:19
prologicbut hopefully any further data we put into the system01:19
prologiccan be "massaged" into the right form01:19
prologicAlso on another note01:20
prologicapparently Rob is going to be working on some similar things01:20
prologicGehard tells me01:20
prologicperhaps it would be good if he hung out here too?01:20
prologicI *thought* this system might be reused by (mostly) the BCCVL proejct01:20
prologicbut apparently not so much :)01:20
prologic*sigh*01:20
DanielBairdhmm01:21
prologicyes I know :)01:21
prologicthat's what I thought too at first01:21
prologic"hmmmm"01:21
prologicI recall Fri last week I cursed a bit about our terribly lack of reuse :)01:22
prologichaha01:22
DanielBairdit's the not-read-only ness of the VL stuff that makes it not fit so well..  but there's a bit of read-only stuff that might work okay01:22
prologicand I asked why Rob and I couldn't be collaborating on a system to power both projects01:22
prologicand the response I got was "because it's a different project?"01:22
prologicwell01:23
prologicif the VL project needs write apis01:23
prologicwe can build them into what we're doing here01:23
DanielBairdyeah i spent some time griping to / commiserating with Andrew about funding schemes that have tight timelines and specify milestones very specifically01:23
prologicCan you talk to Rob anyway?01:24
prologicrephrase my concerns01:24
prologicand see what he thinks01:24
prologicI just think it's a waste of time doing the same or similar things01:24
prologicwhen we could be improving the same codebase01:24
DanielBairdyes i'll talk him through what we're doing, hopefully he'll see some overlap01:24
prologicperhaps forked versions of the code base01:24
prologicI believe there is overlap01:24
prologicat least in rendering map tiles01:24
prologicfeatures01:24
prologicand doing basic gis related operations01:25
prologicI understand the UI will be vastly different01:25
prologicand some project requirements and goals different01:25
DanielBairdyou and he should definitely talk.01:26
prologicI think so :)01:26
prologicanyway enjoy the rest of your day :)01:26
prologicI'll get to work on this01:26
DanielBairdalright.. ttyl01:26
*** irclogger_____ has joined #cmvt02:17
DanielBairdbbl lunch02:44
*** DanielBaird has quit IRC07:14
*** DanielBaird has joined #cmvt22:26
*** DanielBaird has quit IRC22:50
*** DanielBaird has joined #cmvt22:53

Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!