#hypothes.is

/

      • hslack
        <nick> you'll probably need to generate a new endpoint and test against that
      • <wyan> passpack?
      • <wyan> I might need access to that one as well
      • <nick> oh... I thought we'd set that up?
      • <nick> perhaps not
      • <wyan> not that I know of
      • <nick> indeed not!
      • <nick> ok, so go to http://passpack.com|passpack.com, create an account, follow the steps at https://help.passpack.com/knowledgebase/idx.php... to generate a nickname, and then let me know what it is!
      • <wyan> ok, it's `wyan`
      • <nick> @wyan: invited
      • <wyan> ok
      • <wyan> what now? :)
      • <chdorner> @nick: rebased master onto my branch. now I'm getting "No module named TestCommon". I already ran `make dev` to get the new dependencies, what am I missing? (other than I'm obsiously missing a module named TestCommon)
      • <chdorner> weird, it looks like running `py.test` in the root directory includes python tests in node_modules as well
      • <chdorner> yeah, no worries. can't just run `py.test` anymore
      • <nick> @chdorner: right -- that's my fault -- we can probably add `node_modules` back to `norecursedirs` so that doesn't happen
      • <nick> you should still be able to run it
      • <nick> but I'd suggest using tox if possible
      • <chdorner> will look into tox tomorrow morning, with a cup of :coffee:
      • <nick> for now you should be able to just specify the module explicitly
      • <nick> `py.test h`
      • <chdorner> yeah that works
      • <wyan> @nick: I think you need to explicitly share the password with me, I can see no pwds yet
      • <wyan> oh nevermind
      • <chdorner> also saw that I can still use `/` instead of dots, hooray! bash completion!
      • <wyan> they just appeared as soon as I complained
      • <nick> @wyan: you're right -- I needed to add you to groups
      • <wyan> hi @sheetaluk ! :)
      • <sheetaluk> oh hey! I wasn't sure which channel would be more appropriate for first hello
      • castlelo1 joined the channel
      • <nick> Hello @sheetaluk!
      • <nick> Welcome!
      • <nick> The developers tend to hang out in here (this channel is public and mirrored to IRC), and #lounge is internal chatter.
      • <robertknight> Hello @sheetaluk !
      • <sheetaluk> hey @nick! Good to know
      • <sheetaluk> Hey @robertknight! nice to see you again :)
      • badon_ joined the channel
      • <lenazun> welcome @sheetaluk!
      • <sheetaluk> hey hey @lenazun!
      • Treora joined the channel
      • <chdorner> hello @sheetaluk!
      • <sheetaluk> Hi @chdorner :)
      • <wyan> `ngrok` is coming super handy to test this CSP thing!
      • <seanh> Should I be able to find this https://github.com/hypothesis/h/issues/2976 in Sentry? It looks to me as if that error message is shown by the client when the server 500s, but I tried a few searches in Sentry and not turning up anything
      • <seanh> Maybe you get that error from some 4xx responses from the server too
      • <seanh> Yeah, a 401 would also produce that error
      • <chdorner> nick: I'm having to duplicate a lot of the code in the migration script to make sure that the ES Annotation has the same API. The upside is that the migration script will be able to just create an ES annotation and then call the property methods + these conversions will have tests as well!
      • Treora has quit
      • <nick> @chdorner: you mean the normalisation code?
      • <nick> sounds about right
      • <chdorner> yeah
      • <chdorner> lots of moving code around, but quite nice once it's done
      • <seanh> Ok, why isn't this working? https://gist.github.com/seanh/9339459937946ec80141 The `activate()` method does work (`session.delete(self.activation)` deletes the activation), just not when run by this test (the `assert` fails because `user.activation` is still an `Activation` object)
      • Treora joined the channel
      • <seanh> If I step through the tests in the debugger, and simultaneously open the test db in psql, then it appears as if nothing is ever written to the db, even after adding the user and activation and calling commit. Inspecting the `db` object that the tests have in pdb though, it does seem to be a scoped session with an engine pointing at the postgresql test db
      • <seanh> Ok, so `activation._sa_instance_state.deleted` is `True` but (even after `flush()`) `user.activation` is still `activation` and not `None`. This is true both in tests and in dev. Presumably in dev it _is_ `None` on the next request, otherwise activating wouldn't work, and it does work
      • <seanh> I thought sqla was supposed to be update the Python objects on both end of a backref when things changed, but apparently not in this case
      • <nick> @seanh: ah, that's a bug in the test setup
      • <seanh> I was looking at the test setup, but couldn't spot it
      • <nick> basically the problem is that we can't commit inside test functions, as that breaks the savepoint/rollback thing we have going on
      • <nick> so we've aliased `commit` to `flush`
      • <nick> but we should probably alias `commit` to `flush(); expire_all()`
      • <nick> because the problem you're running into there is that the persistence state of the user object isn't being expired, as it would be usually when you call commit
      • <seanh> Oh yeah, I saw that
      • <seanh> Ok I'll try that
      • <seanh> I thought just flush(), or even nothing, should be enough to update the user's ref to the activation, though
      • <nick> well the object hasn't been deleted by that point
      • <nick> you can do `session.delete(athing)` and still reference properties on `athing`
      • <sheetaluk> Hey guys, im trying to setup my dev env, is anybody free to help me?
      • <nick> Yep!
      • <nick> What's up?
      • <nick> @seanh: pretty sure https://github.com/hypothesis/h/commit/034b17b0... should fix it
      • <sheetaluk> so the doc says to install docker and then run rlastic search
      • <sheetaluk> which i did, and confirmed with docker ps
      • <sheetaluk> but when i go to http://127.0.0.1:9200/ i see webpage not available
      • <nick> are you on a Mac?
      • <sheetaluk> yeah
      • <sheetaluk> right, forgot to mention tht
      • <nick> Using docker-machine?
      • <sheetaluk> yeah, i did launch it
      • <nick> hokay, so docker won't be running on 127.0.0.1
      • <sheetaluk> oh?
      • <nick> So what does `docker-machine ls` say?
      • <sheetaluk> right
      • <sheetaluk> i forgot how to use docker
      • <sheetaluk> default * virtualbox Running tcp://192.168.99.100:2376 v1.10.2
      • <nick> @lenazun: I guess so... :)
      • <sheetaluk> thx @nick
      • <nick> @sheetaluk: great, so what I have (I also use a Mac) is a line in `/etc/hosts` with that IP in
      • <nick> so for you,
      • <sheetaluk> ok
      • <nick> `192.168.99.100 docker`
      • <nick> and then Elasticsearch will be at http://docker:9200, etc.
      • <sheetaluk> just did that
      • <seanh> nick: that worked, thanks
      • <nick> you'll probably also want to set these environment variables to make working with the application nicer:
      • <nick> `export DATABASE_URL='postgresql://postgres@docker/h'`
      • <nick> `export TEST_DATABASE_URL='postgresql://postgres@docker/h_test'`
      • <sheetaluk> ok... will do that
      • <nick> I use a `.env` file and https://github.com/kennethreitz/autoenv, but you could just have a `setup_env` script that you source or similar
      • <sheetaluk> alright. thx a lot
      • <nick> okdoke, folks
      • <nick> I'm off for the day
      • <sheetaluk> night night
      • <nick> (well I was off a while ago, actually ... cooking dinner atm :)
      • <nick> )
      • <lenazun> have a good evening!
      • <seanh> Ok, I'm off to make dinner too
      • <lenazun> good night Europeans!
      • Treora has quit
      • Treora joined the channel
      • Treora has quit
      • M-Geezus42 joined the channel
      • vannevar has quit
      • vannevar joined the channel
      • M-kioshimafx1337 joined the channel
      • badon_ joined the channel
      • Treora joined the channel
      • Treora has quit