/srv/irclogs.ubuntu.com/2013/02/05/#ubuntu-us-mi.txt

snap-lEvening00:36
rick_h_ugh00:37
snap-lTHat good, eh?00:38
rick_h_yea, headache all day00:38
snap-lUgh00:38
snap-lthat's no fun00:38
jrwrenmore coffee01:04
rick_h_heh, love the xkcd what if today12:51
snap-lGOod morning13:07
rick_h_party13:09
derekvso14:25
derekvI did a pyramid setup tutorial14:25
derekvalchemy scaffold14:26
derekv"Pyramid is having a problem using your SQL database"14:26
derekvIs what I get14:26
derekvthis is with unmodified code as pcreate command created it14:26
derekvso i found the initialize_foo_db script14:27
derekvbut it doesn't help14:27
derekvI was hoping to see the screen as shown in the tutorial before I started looking at the code etc14:28
derekvnvm reposting to #pyramid14:33
rick_h_derekv: what's the SA url in the ini?14:33
rick_h_not sure, not done the tutorial in a while14:33
derekvsqlalchemy.url = sqlite:///%(here)s/project.sqlite14:34
derekvso that tutorial I found by navigating14:34
derekvbut you you search google, there are mutiple tutorials that vary slightly14:34
derekvsome i guees for different versions14: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
derekvi wonder if that s is supposed to be there after the %(here)14:36
derekvrick_h_: yea14:36
derekvwell the server runs14:36
derekvthat is what I see on the localhost page14:36
rick_h_yes, $(here)s is a str replacement14:36
derekvok14:36
rick_h_derekv: and no error output/traceback at the cli where you ran the server?14:36
derekvrick_h_: just some INFO statements about what select its running, no error14: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 up14:37
derekvok14:37
derekvhttps://github.com/DerekV/pyramid-tutorial14:54
rick_h_derekv: k, sec14:56
snap-lChange %(here) to an actual path14:58
snap-lsqlite:///tmp/foo.db14:58
derekvok14:59
rick_h_car done, have to run, will check back in a bit15:00
derekvok thanks I'll play with it15:04
rick_h_derekv: sorry, that initializesql script is broken as fu15:54
rick_h_fixing, will have a diff shortly15: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.ini15:57
rick_h_from within your virtualenv or whatever15:57
derekvok16:02
derekvrick_h_: that works!16:09
derekvrick_h_: do I just rerun that script if I update my models?16:22
rick_h_derekv: no, it's not a migrations solution16:29
rick_h_it's just meant to init a new install16:29
rick_h_derekv: you can rm your db and rerun it if you want16:30
rick_h_and get back an empty db with the table structure16:30
rick_h_derekv: alembic is a tool for true migrations16:30
widoxspeaking of python...16:39
widoxwhat's that tool to create a standard project with rick_h_?16:40
rick_h_modern package template16:40
widoxlike, it setups standard project layout and such16:40
widoxcool, thanks16:40
derekvrick_h_: clean database is ok for now18:09
derekvno data of importance =p18:09
rick_h_derekv: yea, then just rm db && bin/python scripts/...18:10
derekvtype token occurance18:29
rick_h_huh?18:30
derekvso apprearently a "type" is the concept of a thing, and a "token" is an instance of it18:30
derekvhttp://plato.stanford.edu/entries/types-tokens/#WhaDis18:30
derekvJust trying to come up with table names18:31
derekvfor my model18:31
rick_h_yea, I'd say type/instance18:31
rick_h_table names generally work best as plurals of the model name normalized a bit18:31
rick_h_ime18:31
derekvtype and instance both have too much overlap with programming18:31
derekvtype/token would be the correct words according to this article18:32
derekvbasically I am going to have a little app where you can create some thing, then click ( or poke api ) to "count" occurances of it18:33
derekvthen see by time or total count or graph or whatever18:33
derekvsilly concept but wanting some simple project18:33
derekvto build a web app around18:33
derekveventtypes and occurances is probably the most readable18:36
derekvusers eventtypes occurances tables , thats about as simple of a model as you can get =]18:36
greg-grick_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 :P19:18
greg-g:) me too, Rowan is breaking/chipping all of our wooden utensils19:18
brouschgreg-g: Is everything a drum?19:19
greg-gmore that he REALLY, I mean ***REALLY*** wants to help stir anything that is on the stove19:21
greg-gand by "stir" I mean "fling around a large utensil in the general direction of the skillet, thus getting food everywhere"19:22
greg-gseriously, actually, he does pretty well now, just pushes stuff around, can still get messy though19:22
rick_h_greg-g: lol, when I cook I give the boy a pan, a spoon, and some uncooked noodles or such19:22
rick_h_uncooked noodles, beans, and cereal works best (kix and the like)19:23
* greg-g nods19:23
greg-gwe 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 water19:23
rick_h_I have enough to clean up19:23
brouschI don't let mine help. He can get on a chair and watch19:24
greg-gwe got him a Learning Tower that helps a bunch, he does stuff on the counter next to where we are doing food prep19:24
rick_h_I let him pull a kitchen chair up on the other side of the counter19:24
rick_h_so he stands on the chair and goes crazy on the counter with his cooking19:24
rick_h_wanting one of whatever dad has "I need some tongs, oven mitts, ..."19:24
greg-gyeah, like the learning tower, just the learning tower is fenced off, basically19:24
greg-gyep19:24
* rick_h_ looks up learning tower19:25
rick_h_ah, that's pretty cool19:25
rick_h_I was going to look at making the boy a step stool, but maybe something a bit larger would be in order19:26
rick_h_ouch 35#19:27
greg-gyeah, heavy/sturdy, and not cheap, we got ours used19:27
rick_h_cool19:27
derekvwhat 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 splodes19:37
rick_h_you asked19:39
brouschNo. He asked what type to use, not everything19:41
rick_h_"what should I use for time" ... says nothing about type :P19:41
derekvlol19:42
derekvso19:42
derekvI want to store when the occurance happened.  eg, same more or less as when the row is created19:43
rick_h_created_date = Column(DateTime, default=datetime.datetime.utcnow)19:44
derekvcool... 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 string19:45
rick_h_but SA will hide that fact from your as long as you use SA19:45
derekvrick_h_: I plan to only use SA19:45
derekvI saw that, is why I asked19:46
rick_h_you'll just get a datetime back then and it'll auto insert on Session.add()/commit19:46
rick_h_or .flush19:46
derekvcool19:47
* derekv deletes some semicolons19:50
derekvhttps://github.com/DerekV/pyramid-tutorial/blob/master/project/models.py , on the right track ? =]20:12
derekvoops bad link20:12
derekvhttps://github.com/DerekV/pyramid-tutorial/blob/model-spike/project/models.py20:12
rick_h_think name being unique is a bit unreasonable?20:13
rick_h_and occurance/eventtype seem mixed up20: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
derekvrick_h_: both good thoughts20:15
derekvre 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 simple20: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
derekvright has to be validated anyays20:18
rick_h_but I guess that's mutable as well20:18
derekvthe name wont' be mutable20:18
derekvfuture enhancement20:18
derekvI'm not even worried about api compatability or anything20:19
derekvBefore long I'll have to think through all that I'm sure20:20
rick_h_http://r.bmark.us/u/bd80c81fa7fa80 cool, was looking at that for bookie as well20:20
derekvbasically I could just use the id of the eventtype but I dislike using database id's outside of database access code20:21
rick_h_yea, but username seems more stable than name20:21
rick_h_but just my experience20:21
derekvright20:21
derekvwhat will get me to demo quickest?20:25
derekvprobably just using the database id20:26
derekvand hold my nose20:26
derekvand name should be descriptions20:28
derekv-s20:28
derekvevent type doesn't even need a creator atm20:28
snap-lMan, factory resets on your phone are no fun20:28
derekvso 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
derekvi guess i'll put in 'observed by'20:31
derekvmakes sense20:31
derekvany my init on Occurance is jacked20:33
rick_h_sec, will have a MP coming your way in a second20:33
derekvfor the init, you you want pass the _id's or the relationship?20:34
derekvMilitary Police?20:34
derekvacronym fail20:35
rick_h_merge prop20:35
rick_h_pull req20:35
brouschMP? really? Is that some launchpad lingo?20:38
rick_h_yea, MP is merge proposal20:38
rick_h_derekv: so there's amy first pass at what I would do :)20:38
derekvrick_h_: cool20:38
* brousch beats rick_h_ about the head and neck. IT'S A PULL REQUEST AND DON'T YOU FORGET IT AGAIN20:38
rick_h_https://github.com/DerekV/pyramid-tutorial/pull/120:38
rick_h_brousch: sorry, MP came first and I use that a lot more in a day20:39
derekvwell so much for squashing my wip commit20:43
rick_h_doh20:43
derekv=p20: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-lrick_h_: That bad?20:44
derekvITS NP20:44
derekvcapslock die20:44
derekvi need sleep20:48

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