*** replaceafill has quit IRC | 00:58 | |
*** replaceafill has joined #schooltool | 01:11 | |
*** replaceafill has quit IRC | 01:44 | |
*** menesis has quit IRC | 01:52 | |
*** menesis has joined #schooltool | 09:07 | |
*** menesis has quit IRC | 09:58 | |
*** menesis has joined #schooltool | 13:54 | |
*** pgulley has joined #schooltool | 15:15 | |
*** pgulley has quit IRC | 15:40 | |
*** th1a has joined #schooltool | 16:31 | |
th1a | Hi yvl, menesis. | 16:32 |
---|---|---|
th1a | I guess we're waiting for replaceafill. | 16:32 |
menesis | hi. | 16:33 |
th1a | menesis: I just forwarded thanks from a supervisor user for your ppa fix. | 16:33 |
menesis | I got it myself | 16:34 |
yvl | good morning | 16:34 |
menesis | sent to schooltool-owners I guess | 16:34 |
th1a | Ah. | 16:34 |
menesis | nice :) | 16:34 |
menesis | but I still have to submit the patch to debian | 16:35 |
th1a | There is always more for the package manager to do. | 16:35 |
th1a | yvl: Where can I find lazr.restful docs? | 16:37 |
yvl | umm | 16:38 |
th1a | So there are some folks in South Africa interested in doing a mobile client. | 16:38 |
yvl | didn't look for them yet | 16:38 |
th1a | http://www.mlab.co.za | 16:38 |
th1a | Well, if I want to understand it more, where should I look? Just at your branch? | 16:39 |
th1a | I can find it in their code. | 16:40 |
yvl | http://bazaar.launchpad.net/~lazr-developers/lazr.restful/trunk/files/head:/src/lazr/restful/docs/ | 16:40 |
yvl | and client here: http://bazaar.launchpad.net/~lazr-developers/lazr.restfulclient/trunk/files/head:/src/lazr/restfulclient/docs/ | 16:40 |
th1a | OK. Thanks. | 16:41 |
th1a | So if nothing else, that gives Aaron a little extra motivation (and the rest of us) on the web services side. | 16:41 |
th1a | I'm not sure if they've actually done any real planning on what they'd like to do, but I'm trying to push them in the direction of an attendance client first. | 16:42 |
*** replaceafill has joined #schooltool | 16:42 | |
replaceafill | good morning/afternoon | 16:42 |
th1a | hi replaceafill . | 16:42 |
replaceafill | sorry i'm late (no internet for a while) | 16:43 |
th1a | np | 16:43 |
th1a | OK, yvl, would you like to start? | 16:43 |
yvl | sure | 16:43 |
yvl | well, not much to say | 16:43 |
yvl | pushed... | 16:43 |
yvl | bzr+ssh://bazaar.launchpad.net/~justas-pov/schooltool/schooltool.rest/ | 16:44 |
yvl | just an example REST api for person | 16:44 |
yvl | (s) | 16:44 |
yvl | oh, along the way I added a debugdb script to schooltool.devtools | 16:45 |
yvl | so if you add it to [scripts] in buildout | 16:45 |
yvl | you can use it to get interactive shell with open ST db and all components loaded | 16:45 |
yvl | what else.. | 16:46 |
yvl | moving along with relationship statuses | 16:46 |
replaceafill | yvl, components as in adapters, utilities, etc? | 16:46 |
yvl | yes | 16:46 |
replaceafill | yvl, hhmm i have a question related to that | 16:46 |
replaceafill | but sorry for interrupting | 16:47 |
yvl | listening | 16:47 |
replaceafill | i'm working on the script for loading the grades for the malawi school | 16:47 |
replaceafill | and i used zope.component's provideAdapter and provideUtility | 16:47 |
replaceafill | in order to use ISchoolToolApplication(None) for example, etc | 16:48 |
replaceafill | but i got to a dead end on the IntIds utility | 16:48 |
replaceafill | which i think is local in the app site manager, correct? | 16:48 |
yvl | yes | 16:49 |
replaceafill | i need the IntIds utility because the ISectionContainer adapter for terms uses intids | 16:49 |
yvl | so you can now do this | 16:49 |
replaceafill | maybe your new script could help? | 16:49 |
replaceafill | i mean, the interactive shell part | 16:49 |
yvl | from schooltool.devtools.database import open_database | 16:49 |
replaceafill | oh | 16:50 |
yvl | db = open_database(config="xxx", with_components=True) | 16:50 |
yvl | config is path to schooltool.conf | 16:50 |
replaceafill | but this is in trunk right :( | 16:50 |
replaceafill | and this script needs to run with deb packages | 16:50 |
replaceafill | i mean, the malawi script | 16:50 |
yvl | then: | 16:50 |
yvl | root = connection.root() | 16:50 |
yvl | app = root[ZopePublication.root_name] | 16:50 |
yvl | oldsite = getSite() | 16:50 |
yvl | setSite(app) | 16:50 |
yvl | oh , | 16:50 |
menesis | this is in devtools. that is not packaged. | 16:51 |
yvl | connection = db.open() | 16:51 |
yvl | ok | 16:51 |
replaceafill | yvl, that's what i did | 16:51 |
yvl | well then | 16:51 |
yvl | just copy the Machinery from http://bazaar.launchpad.net/~schooltool-owners/schooltool.devtools/trunk/view/head:/src/schooltool/devtools/database.py | 16:51 |
yvl | that should work if refactored SchoolToolMachinery is packaged already | 16:52 |
replaceafill | ah ok | 16:52 |
menesis | SchoolToolMachinery is only in trunk, not 2.4 | 16:52 |
replaceafill | this is how i've been registering stuff i've needed: http://pastebin.com/q11pR5L4 | 16:53 |
replaceafill | you can see how i tried to get the intids from the app's sitemanager | 16:53 |
replaceafill | ignore lines 11-13 :) i was just testing it | 16:53 |
yvl | :) | 16:53 |
yvl | well, it would be better to load with ZConfig | 16:53 |
replaceafill | that would give me the whole environment? | 16:54 |
replaceafill | i'm confused that this setSite(app) approach works for evolution scripts | 16:55 |
replaceafill | we even have evolve scripts that use getUtility(IIntIds) with no problem | 16:55 |
yvl | umm | 16:56 |
yvl | well, ISchoolToolApplication adapter returns current site | 16:56 |
yvl | but evolution does have all the components loaded | 16:56 |
yvl | hmm | 16:57 |
yvl | for old ST | 16:57 |
yvl | you basically neeed | 16:57 |
yvl | http://bazaar.launchpad.net/~schooltool-owners/schooltool/2.3/view/head:/src/schooltool/app/main.py#L772 | 16:57 |
yvl | StandaloneServer | 16:57 |
yvl | and these lines: | 16:57 |
yvl | options = self.load_options(argv) | 16:57 |
yvl | db = self.setup(options) | 16:57 |
yvl | then open db, get root, set site | 16:58 |
yvl | do your thing | 16:58 |
yvl | commit transaction | 16:58 |
yvl | and close everything | 16:58 |
yvl | (db, connection) | 16:58 |
replaceafill | ok | 16:59 |
yvl | ok | 17:00 |
yvl | so not much else form me today | 17:00 |
yvl | in progress :) | 17:01 |
th1a | Does that get you unstuck replaceafill? | 17:01 |
replaceafill | i'm reading through that code right now | 17:01 |
replaceafill | checking whe the setup part does | 17:02 |
replaceafill | what* | 17:02 |
yvl | well it does some extra crap | 17:03 |
yvl | like setting up logging and such | 17:03 |
replaceafill | i think this is the part giving me headaches: | 17:03 |
replaceafill | setUpUtilities(app, [UtilitySpecification(IntIds, IIntIds)]) | 17:03 |
menesis | sm = app.getSiteManager() | 17:03 |
menesis | sm.registerUtility(IntIds(), IIntIds) | 17:03 |
replaceafill | that makes the utility persistent in the site manager, right? | 17:04 |
menesis | I think does the same | 17:04 |
yvl | IIRC, yes | 17:04 |
replaceafill | if i understand the utility correctly, it has the ids for all the objects created in the db | 17:04 |
yvl | yes | 17:05 |
replaceafill | i tried creating a new IntIds(), like menesis example | 17:05 |
replaceafill | but it was obviously empty | 17:05 |
menesis | right, this is done only in bootstrapSchoolTool | 17:05 |
replaceafill | and this hack works: | 17:05 |
replaceafill | provideUtility(sm.getUtility(IIntIds), IIntIds) | 17:05 |
yvl | also, you could just load all of the machinery | 17:06 |
yvl | that would save you this headache | 17:06 |
replaceafill | yvl, all of the machinery? | 17:06 |
yvl | ALL machinery | 17:06 |
replaceafill | you mean using your branch as model? | 17:06 |
yvl | and also maybe protect you from accidently forgetting some subscriber that does data consistency | 17:06 |
yvl | umm, yes? | 17:06 |
yvl | but actually | 17:07 |
yvl | just | 17:07 |
yvl | from schooltool.app.main import StandaloneServer | 17:07 |
yvl | server = StandaloneServer() | 17:07 |
yvl | server.load_options(argv) | 17:07 |
yvl | db = server.setup(options) | 17:07 |
yvl | now, if you want, you can extract parts of .setup | 17:08 |
replaceafill | ah, i understand now | 17:08 |
yvl | self.siteConfigFile = options.config.site_definition | 17:08 |
yvl | self.configure(options) | 17:08 |
th1a | You also don't have to do this in one self contained script if we have newer libraries that would help. You can zip up some other stuff if that would help. | 17:08 |
yvl | db_configuration = options.config.database | 17:08 |
yvl | try: | 17:08 |
yvl | db = db_configuration.open() | 17:08 |
yvl | notify(DatabaseOpened(db)) | 17:08 |
yvl | self.startApplication(db) | 17:09 |
yvl | provideUtility(db, IDatabase) | 17:09 |
yvl | and that's it | 17:09 |
replaceafill | that would load all the adapters, utilities for me? | 17:09 |
yvl | yep | 17:09 |
replaceafill | no site setup and stuff in my script | 17:10 |
replaceafill | cool | 17:10 |
yvl | umm | 17:10 |
yvl | you'll still need to set the site | 17:10 |
yvl | this only gets you components and d | 17:10 |
yvl | db | 17:10 |
replaceafill | ah ok | 17:10 |
yvl | you need to open connection, get root, get app, setSite(app) | 17:10 |
replaceafill | setting the site is not hard anyway :) | 17:10 |
replaceafill | yes | 17:10 |
yvl | begin the transaction, do stuff | 17:10 |
yvl | then commit, close connection, close db :) | 17:10 |
replaceafill | right | 17:11 |
replaceafill | damn persistent intids :D | 17:11 |
yvl | :D | 17:11 |
th1a | OK. We set? There is no point in rushing these conversations because it saves time in the long run. | 17:13 |
replaceafill | th1a, i think i can move forward now | 17:14 |
replaceafill | at least i'll try ;) | 17:14 |
th1a | So relationship statuses yvl? | 17:15 |
yvl | well, they are in progress | 17:16 |
yvl | it is a bit tricky, so will still be doing that part on Mon I think | 17:16 |
yvl | it's to be expected when one wants to add extra dimension to one's data :) | 17:17 |
th1a | Sure. | 17:17 |
th1a | OK. Thanks yvl . | 17:18 |
th1a | replaceafill? | 17:18 |
replaceafill | well, other than my intids problem | 17:18 |
replaceafill | the script is almost complete | 17:19 |
replaceafill | i made a few decisions: | 17:19 |
th1a | Good! | 17:20 |
*** replaceafill_ has joined #schooltool | 17:21 | |
*** replaceafill_ has joined #schooltool | 17:21 | |
replaceafill_ | ggrr, sorry guys | 17:21 |
*** replaceafill has quit IRC | 17:21 | |
*** replaceafill_ is now known as replaceafill | 17:21 | |
replaceafill | so i was saying i made a few decisions in the script logic i wanted to share: | 17:22 |
replaceafill | * script will look for Grades worksheet | 17:22 |
replaceafill | * grades are treated as text and converted to integers | 17:22 |
th1a | report sheet? | 17:22 |
replaceafill | no the XLS sheet | 17:22 |
replaceafill | in jonathan's sample | 17:23 |
replaceafill | he sent a xls with 3 sheets | 17:23 |
replaceafill | just the first one has grades | 17:23 |
th1a | OK. | 17:23 |
replaceafill | and since i used our importer logic (which looks for a specific worksheet name), i decided to use Grades | 17:23 |
replaceafill | * the report sheet template created by the script is titled Grades, this is | 17:24 |
replaceafill | also the title used to deploy the report sheet to each section | 17:24 |
replaceafill | ...since everything needs a title | 17:24 |
replaceafill | this could be easily changed to allow jonathan to set them through options ofc | 17:24 |
replaceafill | and last, | 17:24 |
replaceafill | * the report sheet template is deployed to every term in every school year | 17:24 |
replaceafill | here's where i hit the intids (when deploying the report sheets) | 17:25 |
replaceafill | other than that, the importer works (on its own) | 17:25 |
replaceafill | ah, also, everything to the right of the student id is considered a grade column | 17:26 |
replaceafill | so he can add more columns if needed | 17:26 |
th1a | You'll just need to write that down for him. | 17:26 |
replaceafill | yes | 17:26 |
replaceafill | and... that's it | 17:27 |
replaceafill | i'll try to have it done today | 17:27 |
replaceafill | and send him the instructions | 17:27 |
th1a | OK. Cool. | 17:28 |
th1a | Thanks replaceafill. We need some practice on this kind of thing because hopefully we'll be doing a lot more. | 17:28 |
th1a | menesis? | 17:29 |
menesis | I have worked on other project last two days | 17:29 |
menesis | so nothing to report | 17:30 |
th1a | OK. Thanks menesis . | 17:30 |
th1a | This was a good week in general for random queries. | 17:31 |
th1a | Some weeks it seems like nobody is using SchoolTool and we're all doomed. | 17:31 |
th1a | This week has been livelier, although it is impossible to tell which random queries will amount to anything. | 17:31 |
th1a | But at least enough to feel like we may have a future. ;-) | 17:32 |
replaceafill | we got a question from Chile :) | 17:32 |
replaceafill | https://answers.launchpad.net/schooltool/+question/232571 | 17:32 |
replaceafill | he says "schooltool is great..." | 17:32 |
replaceafill | :) | 17:32 |
th1a | Ah, cool. | 17:33 |
th1a | OK. We'll meet Monday at the regular time. | 17:35 |
th1a | Thanks guys! | 17:35 |
th1a | Have a good week/end. | 17:35 |
* th1a drops the bag of gravel. | 17:35 | |
yvl | thanks guys | 17:35 |
yvl | see you soon :) | 17:36 |
*** yvl has quit IRC | 17:36 | |
replaceafill | thanks everybody | 17:36 |
*** th1a has quit IRC | 18:46 | |
*** th1a has joined #schooltool | 18:50 | |
*** th1a has quit IRC | 20:04 | |
*** menesis has quit IRC | 20:12 | |
*** th1a has joined #schooltool | 20:34 | |
*** menesis has joined #schooltool | 20:39 | |
replaceafill | th1a, i think i'm done with the script :) | 21:07 |
*** th1a has quit IRC | 21:08 | |
*** th1a has joined #schooltool | 21:21 | |
th1a | hi replaceafill | 21:21 |
replaceafill | hey th1a | 21:21 |
th1a | Are you sending it off? | 21:21 |
replaceafill | i'm going to test my spreadsheets in a raring instance | 21:21 |
replaceafill | yes | 21:21 |
replaceafill | but i want to test the hardcoded stuff (paths mostly) before | 21:22 |
replaceafill | with the debs | 21:22 |
replaceafill | th1a, http://pastebin.com/39QvkPuW | 21:27 |
replaceafill | i hope that makes sense for Jonathan | 21:27 |
th1a | Do you tell him what to actually do with it? | 21:32 |
replaceafill | yes | 21:33 |
replaceafill | stop service, run script (this way), start service | 21:33 |
replaceafill | it works with debs btw | 21:33 |
th1a | OK. Good. | 21:33 |
replaceafill | th1a, http://pastebin.com/efvejHYq | 21:44 |
replaceafill | makes sense? | 21:44 |
th1a | I'd just add that if you have any data in your database you're worried about you should back it up. | 21:48 |
th1a | He's just testing though. | 21:48 |
replaceafill | ah, right | 21:48 |
replaceafill | th1a, email sent | 21:51 |
* replaceafill goes to get lunch, bb in ~1h | 21:54 | |
*** th1a has quit IRC | 21:59 | |
*** th1a has joined #schooltool | 22:22 | |
*** th1a has quit IRC | 22:42 | |
*** th1a has joined #schooltool | 22:47 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!