Perl 6 - the future is here, just unevenly distributed

IRC log for #opentreeoflife, 2014-10-16

| Channels | #opentreeoflife index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:33 towodo joined #opentreeoflife
01:00 towodo joined #opentreeoflife
01:11 towodo joined #opentreeoflife
01:48 ilbot3 joined #opentreeoflife
01:48 Topic for #opentreeoflife is now Open Tree Of Life | opentreeoflife.org | github.com/opentreeoflife | http://irclog.perlgeek.de/opentreeoflife/today
02:02 towodo joined #opentreeoflife
06:59 mtholder joined #opentreeoflife
11:01 mtholder joined #opentreeoflife
12:27 towodo joined #opentreeoflife
12:28 towodo today is social media blackout day
12:29 towodo https://gfurgs6191.wordpress.com/2014/10/07/join-us-for-social-media-blackout-day-101614-2/
12:30 towodo http://knockknockstuff.com/socialmediablackoutday/
12:30 towodo but what if your job duties include doing social media?  take a sick day?
14:01 mtholder is irc "social media" ?
15:36 mtholder joined #opentreeoflife
15:54 mtholder left #opentreeoflife
15:59 kcranstn joined #opentreeoflife
16:11 towodo mtholder (now offline): “social media” seems to be not very well defined. let’s just say by fiat that our use of IRC is not social media.
16:12 kcranstn agreed
17:13 kcranstn joined #opentreeoflife
17:17 josephwb joined #opentreeoflife
17:17 josephwb you there towodo?
17:20 pmidford2 joined #opentreeoflife
17:22 josephwb we were wondering if there was a proper graph-theoretic term for the removal of "knuckles" (that is, internal out-degree one nodes)
17:24 josephwb thing is, in addition to the removal of a node, it also involves the introduction of a new edge between "grandparent" and "grandchild" nodes.
17:25 kcranstn (deletion of node + 2 edges) + addition of one edge
17:25 josephwb yes
17:25 kcranstn or merge of two edges
17:25 josephwb "knitting"?
17:25 kcranstn knitting the knuckles?
17:25 josephwb of edges, i mean
17:26 josephwb e.g. if they have lengths
17:26 josephwb "splice"?
17:27 josephwb not terribly important (asking for Jeet), but thought towodo might have the answer readily available
17:37 josephwb ok, if you have ideas, please email it to me.
17:38 towodo here now… but I guess josephwb has gone
17:48 kcranstn joined #opentreeoflife
18:05 jimallman i’m here for pull-request review, if that’s happening
18:06 kcranstn towodo
18:06 kcranstn ?
18:06 towodo oh….
18:06 towodo ok.
18:07 towodo I forgot to push changes out to production last weekend, but I don’t think that mattered much
18:07 kcranstn what repo should we start with?
18:07 towodo hang on… I’ll pull them all up…
18:07 towodo there are only 3.
18:08 towodo https://github.com/OpenTreeOfLife/taxomachine/pull/80
18:09 towodo pushing ‘tests’ branch to ot17
18:10 towodo logging in to ot17 to try out the tests…
18:11 towodo problem remains.
18:12 jimallman hm, the code looks like it should handle the nose install.. can you see any errors when installing requirements.txt?
18:13 towodo umm… I don’t think so…
18:13 towodo you are looking at test.sh at the top level?
18:14 towodo I don’t see anything about requirements.txt at all.
18:14 towodo which code are you looking at?
18:14 towodo the file is missing a newline at the end
18:15 jimallman https://github.com/OpenTreeOfLife/taxomachine/pull/80/files#diff-1b531c5e405e0bc95890d52cf2f2f5b5R19
18:15 towodo it’s not getting that far. it’s dying in test.sh because nothing has been installed at all and it’s trying to use nosetests
18:16 jimallman ah, ok
18:16 towodo it looks like Cody made some interior script self-configuring, but neglected to update test.sh
18:17 jimallman does it try to use nosetests in run_unit_tests.sh?
18:17 towodo look at test.sh.  that’s what’s failing, and it’s obvious why.
18:18 towodo I’m just adding a comment to the PR.  Let’s move on
18:18 towodo https://github.com/OpenTreeOfLife/opentree/pull/479
18:18 jimallman ok
18:19 jimallman shall i push this to devtree?
18:19 towodo I was just checking to see if it was there already. sure
18:19 kcranstn yes, please
18:20 jimallman looks like i need to merge master.. this is missing some deployment goodness
18:22 mtholder joined #opentreeoflife
18:23 kcranstn hey mtholder!
18:24 mtholder hello
18:25 jimallman ok, this should be working now
18:25 towodo watching jimallman’s progress via the github PR page, which dynamically updates
18:25 jimallman http://devtree.opentreeoflife.org/curator/study/edit/pg_2584
18:26 jimallman this change attempts to find the right TNRS search context using existing OTUs
18:26 jimallman first indication is in Metadata, the Focal Clade widget has Mammals chosen
18:26 jimallman we’ll see this again in OTU Mapping
18:27 towodo way fast
18:27 kcranstn nice
18:28 jimallman You can update this in OTU Mapping, under Mapping Options with the ‘Infer search context…’ button
18:28 towodo this is the kind of thing current curators could easily miss.  wonder how to best communicate news to them
18:28 jimallman update after (for example) importing a new tree
18:28 jimallman or mapping a bunch of stuff
18:29 jimallman the initial test is automcatic, each time you open a study in curation app. so they should be good to go, unless we’re adding or removing trees that matter.
18:29 towodo ok
18:30 jimallman it would be nice to be aware, since ongoing mapping (etc) can improve the context. but they can probably make a good choice manually too, right?
18:30 towodo yes
18:31 towodo $.ajax(…)   - what does ‘$’ mean?
18:31 jimallman standard shorthand for jQuery, in this case calling its low-level ajax method
18:31 mtholder $ = jquery
18:32 jimallman you’ll see lots of $(‘.blah’) in our JS… this is the more common case, where we’re selecting sets of elements in the DOM to examine or operate on.
18:32 towodo ok.  what about that 1em -> 8px ?  I always thought em good, px bad
18:34 jimallman i use a mix of units, depending on the context. 1em is usu. good for “paragraph spacing”, but in this case I’m separating widgets (context menu from the Infer Context button), and it’s just a pleasant space.
18:35 jimallman (i could have said 0.25em and gotten roughly the same result). i’m not sure how much our UI widgets will scale with font size.
18:35 towodo use of ‘px’ terrifies me in the age of retina displays.  but I guess they’ve got that all worked out somehow.
18:35 kcranstn “terrifies” seems strong
18:35 kcranstn I don’t picture you are someone who terrifies easily
18:35 towodo yes, strong.  maybe ‘bothers’
18:36 kcranstn I’d believe ‘bothers’
18:36 towodo ok, I’ll merge this one if everyone’s ok with it
18:36 jimallman there’s yet another level of indirection now (yay), with “display pixels” or somesuch to mask this difference.
18:37 jimallman it’s making Tree Illustrator extra-fun, since it all needs to resolve from SVG units to a consistent physical size on paper.
18:37 towodo kc. merge it?
18:37 kcranstn pl
18:37 kcranstn ok
18:37 towodo done. https://github.com/OpenTreeOfLife/opentree/pull/489
18:38 jimallman this one is basically hygienic.
18:38 jimallman bringing in “vanilla” pages from web2py 2.8.2, then applying my changes to them, so we can see how to handle future versions of web2py
18:39 jimallman i had done this for some files, but not all
18:39 jimallman (the alternative is to have our own fork of web2py 2.8.2, with just these few changes applied)
18:40 jimallman NOTE: i should revert the first commit, since this comment no longer applies (do this now?)
18:41 towodo confused a bit. there are 3 commits but only one comment change in one file?  you made a change, then undid it, then did a different change?
18:41 jimallman yes, and now i’ve reverted the first commit, so we’re right back where we started!
18:42 kcranstn so now no files have changed?
18:42 jimallman but it’s not really a no-op… this PR will bring in some history that clarifies the changes to web2py 2.8.2
18:42 towodo hum… that’s good, but the info ought to be in the source tree somewhere so there’s a chance of finding it via grep -r
18:42 pmidford2 joined #opentreeoflife
18:43 jimallman i can commit diff/patch files, i guess.. i figured (if i were trying to understand these files) that i would start by looking at the current files, then their history. and maybe their filenames, which should bring them to the PR comments.
18:44 towodo if it were me, I would have put loud comments in the changed file saying “JAR changed x to y (added x, etc.) on [date]”
18:44 towodo with visible punctuation ****   and a comment saying something about what the starting point was (web2py 2.8.2 in this case)
18:45 jimallman i can add comments like that, perhaps with a SHA + link to the commit showing the exact changes
18:46 towodo that would be good.  I just remember that I brought it up because I was reading the deploy script and wondered about the file, then looked at the file and saw it was from web2py, and that I had no idea how it was different or what we’ll have to do to update it later…   the answers are all straightforward, just a question of making it easy to find the answers
18:49 jimallman one sec.. adding these now
18:51 jimallman done. note that the URLs here reference the master branch, so they’ll make more sense after this PR is merged.
18:52 jimallman (the oauth one is pretty good now, actually)
18:54 ilbot3 joined #opentreeoflife
18:54 Topic for #opentreeoflife is now Open Tree Of Life | opentreeoflife.org | github.com/opentreeoflife | http://irclog.perlgeek.de/opentreeoflife/today
18:54 jimallman i figured they’re easy enough to convert to a check of git history
18:54 jimallman if someone’s just working with a dump of our files, and no history, they have my sympathy
18:55 jimallman but other suggestions are welcome. the changes are fairly minor, so i can add inline comments too
18:57 jimallman (add more comments, i should say, identifying who made the changes and when)
18:57 towodo sorry to belabor this.  It’s easy enough to say that the only change is to enable CORS headers.
18:57 towodo I wish github supported pair programming
18:57 towodo hey, I can do it in the github UI
18:59 towodo “you must be on a branch to make or propose changes to this file”
18:59 towodo going to the branch…
19:02 jimallman oops, just added comments in latest commit
19:02 towodo funny, it’s not a link to the specific commit
19:02 towodo ok, will save my work and revert
19:03 towodo perfect.
19:03 towodo what do you mean by ‘restore’? was there an earlier version of web2py that had the CORS headers?
19:04 towodo I’ll merge the PR now
19:04 kcranstn ok
19:04 jimallman restores them to the HTTP response, actually, whereas web2py strips them away (dumb)
19:04 jimallman fyi - you can edit in the GitHub UI directly from the Files tab of a PR: https://github.com/OpenTreeOfLife/opentree/pull/489/files
19:05 jimallman here you’re still “on the branch”, versus at an arbitrary commit SHA
19:06 towodo oh I see.  I think.  that’s sort of odd, that it would strip those headers.  [it’s the request btw]
19:06 towodo we’re done with PRs now.
19:07 towodo kcranstn, what’s next step re our discussion of study list curation?  email?  hangout?  irc?
19:08 towodo [sorry, response, you’re right]
19:09 kcranstn let’s start with email. Want to get mockup done first
19:09 towodo ok
19:09 jimallman re: CORS, the response also has CORS headers that say which domains can communicate (Access-Control-Allow-Origin, etc)
19:09 jimallman https://github.com/OpenTreeOfLife/opentree/blob/040a2721054995031a66bb3927c5c4ff4673dceb/rewrite.py#L214-L220
19:09 * jimallman returns to his knitting
19:10 towodo yeah, I know how it works, just being demented
19:16 jimallman re: the taxomachine test.sh, something is very wrong on ot17… it seems you’re still getting the test.sh from master branch
19:16 jimallman towodo: ^
19:18 jimallman that is to say, the results of your cat command here https://github.com/OpenTreeOfLife/taxomachine/pull/80#issuecomment-59411321 match the file on master https://github.com/OpenTreeOfLife/taxomachine/blob/master/test.sh  but not in tests branch  https://github.com/OpenTreeOfLife/taxomachine/blob/tests/test.sh
19:22 towodo back
19:22 towodo Cody taught me something about git
19:22 towodo the fix is to change git_refresh
19:22 kcranstn so, what was the problem?
19:22 towodo need to do ‘git pull origin $branch’ instead of ‘git pull’
19:23 towodo ‘git pull’ is still voodoo to me
19:23 towodo someone who knows how git works should rewrite that one line in git_refresh
19:25 towodo I don’t understand why what I had there doesn’t work
19:25 towodo but the change seems to work so let’s go with that
19:35 mtholder instead of "git pull origin" you probably want "git fetch origin"
19:35 mtholder then "git checkout <branch>" and "git merge origin/<branch>" if the branch exists locally.
19:35 jimallman hm, there’s also the notion of “tracking branches” in git. “git pull” assumes there’s a clearly defined branch.
19:35 towodo why don’t you take a look at deploy/setup/functions.sh and tell me what it should say… there’s a whole series of git commands needed to make this work.  yes, merge is probably the right thing
19:35 mtholder If you don't have it locally, you fetch and then
19:36 mtholder git checkout -b <branch> origin/<branch>
19:36 mtholder I think that you are just missing the -b
19:36 towodo oh!!
19:37 towodo I think that last pull could be a merge
19:42 mtholder It looks like "git checkout -B --track <branch> origin/<branch>" may be the way to go. -B rather than -b resets the branch if it exists. and the --track stuff helps future git pulls to work as you'd expect.
19:49 towodo if I do -B, can I get rid of the ‘checkout .’ ?
19:49 mtholder I don't think so. It is an option to git-checkout
19:51 mtholder Ack. No. Sorry. I think that you do want -b  . Now reading https://www.kernel.org/pub/software/scm/git/docs/git-checkout.html
19:51 kcranstn joined #opentreeoflife
19:52 towodo but -B sounds good to me, reading that man page
19:53 towodo I think I can replace ‘git pull origin $branch’ with ‘git merge origin/$branch’, yes?
19:53 mtholder yes. (after you have checked out branch).
19:55 towodo (cd $repo_dir; git fetch; git checkout -b --track $branch origin/$branch; \
19:55 towodo git checkout .; git merge origin/$branch)
19:55 towodo maybe should be && instead of ;
19:56 mtholder Yes to &&.  What is the second git checkout for? I don't think that is needed.
19:57 towodo been a while.  I think it resets or something.  I put it there for a reason
19:57 mtholder The docs imply that -B will do the reset.
19:57 towodo maybe because the -b was missing…
19:58 mtholder gotcha
20:02 towodo hmm.  no good
20:02 towodo # On branch infer-search-context
20:02 towodo # Your branch and 'origin/infer-search-context' have diverged,
20:02 towodo # and have 7 and 28 different commits each, respectively.
20:03 mtholder That is with -b or -B ?
20:04 towodo -B … but that’s not the selected branch
20:04 towodo fatal: git checkout: updating paths is incompatible with switching branches.
20:05 towodo hmm…
20:05 towodo I think that checkout will have to be split apart
20:07 mtholder fetch and then: "git branch -f --track <branch> origin/<branch> && git checkout <branch>" is perhaps the most explicit way
20:08 towodo since we only care about the one branch I’m going to do ‘git fetch $branch’ instead of ‘git fetch’
20:10 mtholder I think you need the "origin" before the branch name
20:10 towodo so with -f, I don’t need to do a merge, right?
20:10 towodo right
20:14 towodo fatal: Cannot force update the current branch.
20:17 towodo Will remove the -f, and put back the ‘git merge’
20:19 mtholder Yeah. It looks like the only other way is something hacky like checking out a dummy local branch and then doing the git branch -f on the branch you want to reset.  Too much of a pain.
20:19 towodo fatal: A branch named 'clarify-web2py-patches' already exists.
20:20 towodo I don’t see why I should ever have to create the branch - doesn’t ‘git fetch’ create local branches if necessary?
20:21 mtholder It only creates origin/<branch> branches.
20:21 towodo is it git pull that creates branches, maybe?
20:22 towodo I’ve never had to create them when they’ve already existed in github…
20:22 mtholder I don't think that you git a branch unless you create on. You can checkout an origin/branch
20:22 mtholder but then you are in the "detached HEAD" state.
20:23 mtholder which is fine for the deployment machines.
20:24 towodo well i’m puzzled… I’ve never had to do —track before…
20:24 towodo I don’t see a way to create a branch but only if it doesn’t already exist
20:25 towodo (looking at ‘git branch’ man page)
20:25 towodo I guess we do the detached head thing, but I bet it will confuse someone
20:29 mtholder you could do "git branch -d <branch>" first to get rid of a local branch that exists (as long as it is not the branch you are on).
20:29 towodo but it’s hard to know that. ordinarily it will be the branch I’m on.
20:30 mtholder true. You could special case master - assume that it is set to track the right remote branch, so never delete it.
20:31 mtholder other branches  you can 1. checkout master. 2. delete other branch . 3 create other branch. 4 check it out.
20:33 kcranstn joined #opentreeoflife
20:33 towodo or I could create a temporary branch, as you said, and do branch -f from there
20:39 mtholder you can even just do "git checkout origin/master" to move to a detached head and then do the branch -f
20:40 mtholder they (the git folks) just don't want branch to ever change your working copy. It just adds an entry in .git/refs/heads
20:40 mtholder (and perhaps tracking info in .git/config)
20:49 towodo git branch -f --track $branch origin/master
20:49 towodo fatal: Cannot setup tracking information; starting point is not a branch.
20:50 towodo oops.
20:50 towodo git branch --track -f master origin/master
20:50 towodo works
20:50 kcranstn joined #opentreeoflife
20:54 towodo hard to test, but it worked installing everything on ot17, with a few non-master branches
20:54 towodo here’s what I ended up with:
20:54 towodo tmpbranch=origin/master
20:54 towodo (cd $repo_dir && \
20:55 towodo git checkout -q $tmpbranch && \
20:55 towodo git fetch origin $branch && \
20:55 towodo git branch --track -f $branch origin/$branch && \
20:55 towodo git checkout $branch && \
20:55 towodo git merge origin/$branch) || echo "*** git failure ***"
20:55 towodo mtholder, thanks
20:56 mtholder looks good. That works if the $branch already exists? or does the branch -f fail then?
20:59 towodo it works if the branch exists.
21:24 kcranstn joined #opentreeoflife
22:43 towodo joined #opentreeoflife
23:56 towodo joined #opentreeoflife

| Channels | #opentreeoflife index | Today | | Search | Google Search | Plain-Text | summary