snap-l | Evening | 00:36 |
---|---|---|
rick_h_ | ugh | 00:37 |
snap-l | THat good, eh? | 00:38 |
rick_h_ | yea, headache all day | 00:38 |
snap-l | Ugh | 00:38 |
snap-l | that's no fun | 00:38 |
jrwren | more coffee | 01:04 |
rick_h_ | heh, love the xkcd what if today | 12:51 |
snap-l | GOod morning | 13:07 |
rick_h_ | party | 13:09 |
derekv | so | 14:25 |
derekv | I did a pyramid setup tutorial | 14:25 |
derekv | alchemy scaffold | 14:26 |
derekv | "Pyramid is having a problem using your SQL database" | 14:26 |
derekv | Is what I get | 14:26 |
derekv | this is with unmodified code as pcreate command created it | 14:26 |
derekv | so i found the initialize_foo_db script | 14:27 |
derekv | but it doesn't help | 14:27 |
derekv | I was hoping to see the screen as shown in the tutorial before I started looking at the code etc | 14:28 |
derekv | nvm reposting to #pyramid | 14:33 |
rick_h_ | derekv: what's the SA url in the ini? | 14:33 |
rick_h_ | not sure, not done the tutorial in a while | 14:33 |
derekv | sqlalchemy.url = sqlite:///%(here)s/project.sqlite | 14:34 |
derekv | so that tutorial I found by navigating | 14:34 |
derekv | but you you search google, there are mutiple tutorials that vary slightly | 14:34 |
derekv | some i guees for different versions | 14:35 |
rick_h_ | yea, so not sure where you get this error at? | 14:35 |
rick_h_ | that's all you get? "Pyramid is having a problem using your SQL database" | 14:35 |
rick_h_ | when you do a pserve development.ini? | 14:35 |
derekv | i wonder if that s is supposed to be there after the %(here) | 14:36 |
derekv | rick_h_: yea | 14:36 |
derekv | well the server runs | 14:36 |
derekv | that is what I see on the localhost page | 14:36 |
rick_h_ | yes, $(here)s is a str replacement | 14:36 |
derekv | ok | 14:36 |
rick_h_ | derekv: and no error output/traceback at the cli where you ran the server? | 14:36 |
derekv | rick_h_: just some INFO statements about what select its running, no error | 14:37 |
rick_h_ | derekv: push the source up somewhere and I can look. Not sure what the scafoold does these days and hard to see what's up | 14:37 |
derekv | ok | 14:37 |
derekv | https://github.com/DerekV/pyramid-tutorial | 14:54 |
rick_h_ | derekv: k, sec | 14:56 |
snap-l | Change %(here) to an actual path | 14:58 |
snap-l | sqlite:///tmp/foo.db | 14:58 |
derekv | ok | 14:59 |
rick_h_ | car done, have to run, will check back in a bit | 15:00 |
derekv | ok thanks I'll play with it | 15:04 |
rick_h_ | derekv: sorry, that initializesql script is broken as fu | 15:54 |
rick_h_ | fixing, will have a diff shortly | 15:54 |
rick_h_ | derekv: http://paste.mitechie.com/show/879/ | 15:57 |
rick_h_ | make sure to run bin/python project/scripts/initializedb.py development.ini | 15:57 |
rick_h_ | from within your virtualenv or whatever | 15:57 |
derekv | ok | 16:02 |
derekv | rick_h_: that works! | 16:09 |
derekv | rick_h_: do I just rerun that script if I update my models? | 16:22 |
rick_h_ | derekv: no, it's not a migrations solution | 16:29 |
rick_h_ | it's just meant to init a new install | 16:29 |
rick_h_ | derekv: you can rm your db and rerun it if you want | 16:30 |
rick_h_ | and get back an empty db with the table structure | 16:30 |
rick_h_ | derekv: alembic is a tool for true migrations | 16:30 |
widox | speaking of python... | 16:39 |
widox | what's that tool to create a standard project with rick_h_? | 16:40 |
rick_h_ | modern package template | 16:40 |
widox | like, it setups standard project layout and such | 16:40 |
widox | cool, thanks | 16:40 |
derekv | rick_h_: clean database is ok for now | 18:09 |
derekv | no data of importance =p | 18:09 |
rick_h_ | derekv: yea, then just rm db && bin/python scripts/... | 18:10 |
derekv | type token occurance | 18:29 |
rick_h_ | huh? | 18:30 |
derekv | so apprearently a "type" is the concept of a thing, and a "token" is an instance of it | 18:30 |
derekv | http://plato.stanford.edu/entries/types-tokens/#WhaDis | 18:30 |
derekv | Just trying to come up with table names | 18:31 |
derekv | for my model | 18:31 |
rick_h_ | yea, I'd say type/instance | 18:31 |
rick_h_ | table names generally work best as plurals of the model name normalized a bit | 18:31 |
rick_h_ | ime | 18:31 |
derekv | type and instance both have too much overlap with programming | 18:31 |
derekv | type/token would be the correct words according to this article | 18:32 |
derekv | basically I am going to have a little app where you can create some thing, then click ( or poke api ) to "count" occurances of it | 18:33 |
derekv | then see by time or total count or graph or whatever | 18:33 |
derekv | silly concept but wanting some simple project | 18:33 |
derekv | to build a web app around | 18:33 |
derekv | eventtypes and occurances is probably the most readable | 18:36 |
derekv | users eventtypes occurances tables , thats about as simple of a model as you can get =] | 18:36 |
greg-g | rick_h_: I was so tired last night that I didn't even open the box with the spoon knives in it. No pictures yet, but I have them ;) | 19:17 |
rick_h_ | greg-g: awesome! | 19:17 |
rick_h_ | I need a deep ladle when you get time :P | 19:18 |
greg-g | :) me too, Rowan is breaking/chipping all of our wooden utensils | 19:18 |
brousch | greg-g: Is everything a drum? | 19:19 |
greg-g | more that he REALLY, I mean ***REALLY*** wants to help stir anything that is on the stove | 19:21 |
greg-g | and by "stir" I mean "fling around a large utensil in the general direction of the skillet, thus getting food everywhere" | 19:22 |
greg-g | seriously, actually, he does pretty well now, just pushes stuff around, can still get messy though | 19:22 |
rick_h_ | greg-g: lol, when I cook I give the boy a pan, a spoon, and some uncooked noodles or such | 19:22 |
rick_h_ | uncooked noodles, beans, and cereal works best (kix and the like) | 19:23 |
* greg-g nods | 19:23 | |
greg-g | we try the pot with water on the floor trick, he loves that, but he *really* wants to see what we're doing "up there" | 19:23 |
rick_h_ | yea, I don't do water | 19:23 |
rick_h_ | I have enough to clean up | 19:23 |
brousch | I don't let mine help. He can get on a chair and watch | 19:24 |
greg-g | we got him a Learning Tower that helps a bunch, he does stuff on the counter next to where we are doing food prep | 19:24 |
rick_h_ | I let him pull a kitchen chair up on the other side of the counter | 19:24 |
rick_h_ | so he stands on the chair and goes crazy on the counter with his cooking | 19:24 |
rick_h_ | wanting one of whatever dad has "I need some tongs, oven mitts, ..." | 19:24 |
greg-g | yeah, like the learning tower, just the learning tower is fenced off, basically | 19:24 |
greg-g | yep | 19:24 |
* rick_h_ looks up learning tower | 19:25 | |
rick_h_ | ah, that's pretty cool | 19:25 |
rick_h_ | I was going to look at making the boy a step stool, but maybe something a bit larger would be in order | 19:26 |
rick_h_ | ouch 35# | 19:27 |
greg-g | yeah, heavy/sturdy, and not cheap, we got ours used | 19:27 |
rick_h_ | cool | 19:27 |
derekv | what should I use for time? TIMESTAMP? | 19:35 |
rick_h_ | http://taaviburns.ca/presentations/what_you_need_to_know_about_datetimes/ | 19:36 |
derekv | *brain splodes | 19:37 |
rick_h_ | you asked | 19:39 |
brousch | No. He asked what type to use, not everything | 19:41 |
rick_h_ | "what should I use for time" ... says nothing about type :P | 19:41 |
derekv | lol | 19:42 |
derekv | so | 19:42 |
derekv | I want to store when the occurance happened. eg, same more or less as when the row is created | 19:43 |
rick_h_ | created_date = Column(DateTime, default=datetime.datetime.utcnow) | 19:44 |
derekv | cool... hopefully that will work more or less transparently on postgres and sqlite? | 19:45 |
rick_h_ | rgr, just be ware that sqlite doesn't support a real datetime so it's actually a string | 19:45 |
rick_h_ | but SA will hide that fact from your as long as you use SA | 19:45 |
derekv | rick_h_: I plan to only use SA | 19:45 |
derekv | I saw that, is why I asked | 19:46 |
rick_h_ | you'll just get a datetime back then and it'll auto insert on Session.add()/commit | 19:46 |
rick_h_ | or .flush | 19:46 |
derekv | cool | 19:47 |
* derekv deletes some semicolons | 19:50 | |
derekv | https://github.com/DerekV/pyramid-tutorial/blob/master/project/models.py , on the right track ? =] | 20:12 |
derekv | oops bad link | 20:12 |
derekv | https://github.com/DerekV/pyramid-tutorial/blob/model-spike/project/models.py | 20:12 |
rick_h_ | think name being unique is a bit unreasonable? | 20:13 |
rick_h_ | and occurance/eventtype seem mixed up | 20:14 |
rick_h_ | what's an event type supposed to be? Seems like something that has a limited set of known events? | 20:14 |
rick_h_ | but it's tied to a creator? | 20:14 |
rick_h_ | should that be on the occurance, who was involved in it? | 20:14 |
derekv | rick_h_: both good thoughts | 20:15 |
derekv | re name being unique, i'm going to use the name as part of the rest path ... thought about doing a hash as the path for that reason and for basic privacy but decided to keep it simple | 20:17 |
rick_h_ | rest path on mutable data? | 20:17 |
rick_h_ | not to mention no true limit on the type of data in there. | 20:18 |
rick_h_ | I'd use username and validate it to not be allowed to be url escaped characters and the like perhaps? | 20:18 |
derekv | right has to be validated anyays | 20:18 |
rick_h_ | but I guess that's mutable as well | 20:18 |
derekv | the name wont' be mutable | 20:18 |
derekv | future enhancement | 20:18 |
derekv | I'm not even worried about api compatability or anything | 20:19 |
derekv | Before long I'll have to think through all that I'm sure | 20:20 |
rick_h_ | http://r.bmark.us/u/bd80c81fa7fa80 cool, was looking at that for bookie as well | 20:20 |
derekv | basically I could just use the id of the eventtype but I dislike using database id's outside of database access code | 20:21 |
rick_h_ | yea, but username seems more stable than name | 20:21 |
rick_h_ | but just my experience | 20:21 |
derekv | right | 20:21 |
derekv | what will get me to demo quickest? | 20:25 |
derekv | probably just using the database id | 20:26 |
derekv | and hold my nose | 20:26 |
derekv | and name should be descriptions | 20:28 |
derekv | -s | 20:28 |
derekv | event type doesn't even need a creator atm | 20:28 |
snap-l | Man, factory resets on your phone are no fun | 20:28 |
derekv | so for occurances... eventually you'd either decide that only the creator can post occurances or you'd need some sort of "observed by" | 20:30 |
derekv | i guess i'll put in 'observed by' | 20:31 |
derekv | makes sense | 20:31 |
derekv | any my init on Occurance is jacked | 20:33 |
rick_h_ | sec, will have a MP coming your way in a second | 20:33 |
derekv | for the init, you you want pass the _id's or the relationship? | 20:34 |
derekv | Military Police? | 20:34 |
derekv | acronym fail | 20:35 |
rick_h_ | merge prop | 20:35 |
rick_h_ | pull req | 20:35 |
brousch | MP? really? Is that some launchpad lingo? | 20:38 |
rick_h_ | yea, MP is merge proposal | 20:38 |
rick_h_ | derekv: so there's amy first pass at what I would do :) | 20:38 |
derekv | rick_h_: cool | 20:38 |
* brousch beats rick_h_ about the head and neck. IT'S A PULL REQUEST AND DON'T YOU FORGET IT AGAIN | 20:38 | |
rick_h_ | https://github.com/DerekV/pyramid-tutorial/pull/1 | 20:38 |
rick_h_ | brousch: sorry, MP came first and I use that a lot more in a day | 20:39 |
derekv | well so much for squashing my wip commit | 20:43 |
rick_h_ | doh | 20:43 |
derekv | =p | 20:43 |
rick_h_ | git co -b wtf_did_rick_do && git merge ... | 20:44 |
rick_h_ | and with that today has sucked and I'm running away... | 20:44 |
snap-l | rick_h_: That bad? | 20:44 |
derekv | ITS NP | 20:44 |
derekv | capslock die | 20:44 |
derekv | i need sleep | 20:48 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!