*** menesis has quit IRC | 00:20 | |
*** menesis has joined #schooltool | 00:32 | |
*** menesis has quit IRC | 01:00 | |
*** menesis has joined #schooltool | 01:07 | |
replaceafill | aelkner u there? | 01:41 |
---|---|---|
replaceafill | aelkner you added addTeacher, addStudent and addAdministrator to trunk, right? | 01:41 |
replaceafill | https://bugs.launchpad.net/schooltool/+bug/752021 | 01:42 |
replaceafill | aelkner i assigned it to you | 01:43 |
* replaceafill still doesnt understand bug importance very well... | 01:44 | |
replaceafill | traceback -> critical | 01:45 |
replaceafill | not found -> ? | 01:45 |
th1a | replaceafill: Anything you want aelkner to remember to do has to be marked critical. | 02:32 |
th1a | It is a special case. | 02:32 |
replaceafill | th1a ah ok | 02:32 |
replaceafill | changed to critical | 02:33 |
aelkner | replaceafill, hey | 02:38 |
replaceafill | hey aelkner | 02:38 |
replaceafill | aelkner i added to bugs related to those views, assigned one to you | 02:39 |
replaceafill | s/to/two | 02:39 |
aelkner | that's cool | 02:39 |
aelkner | i'm surprised about the cancel button issue, but i'll check it out | 02:39 |
replaceafill | it seems like a copy from the cambodia case... | 02:40 |
replaceafill | and cambodia does provide those extra views | 02:40 |
aelkner | that would make sense | 02:40 |
replaceafill | aelkner did you ever deal with a custom enum demographics field that need multiple values? | 02:47 |
replaceafill | i have this case for cambodia: | 02:47 |
replaceafill | Special function (list, multiple: Secretary, Librarian, Home Economy/Techonology, Drama/Music/Plastic Arts, Agriculture, Sports, Workshop, Accounting/Cashier, Laboratory, Youth) | 02:47 |
replaceafill | those are 'extra' functions for a teacher/staff member | 02:47 |
*** replaceafill has quit IRC | 02:59 | |
*** yvl_ has joined #schooltool | 04:28 | |
*** th1a_ has joined #schooltool | 04:28 | |
*** th1a has quit IRC | 04:33 | |
*** yvl has quit IRC | 04:33 | |
*** replaceafill has joined #schooltool | 04:45 | |
*** th1a_ has quit IRC | 06:20 | |
*** replaceafill has quit IRC | 07:16 | |
*** yvl_ is now known as yvl | 08:22 | |
*** replaceafill has joined #schooltool | 08:30 | |
*** alga has joined #schooltool | 09:38 | |
*** replaceafill has quit IRC | 09:38 | |
*** yvl has quit IRC | 11:47 | |
*** yvl has joined #schooltool | 11:49 | |
*** menesis has quit IRC | 13:15 | |
*** menesis has joined #schooltool | 14:38 | |
*** menesis has quit IRC | 14:42 | |
*** menesis has joined #schooltool | 15:06 | |
*** menesis has quit IRC | 15:18 | |
*** menesis has joined #schooltool | 15:22 | |
*** jelkner has joined #schooltool | 16:36 | |
*** th1a has joined #schooltool | 16:41 | |
jelkner | th1a: In thinking about next year's setup, do I want one or two instances of ST to accommodate the two sets of terms I need to support? | 16:50 |
th1a | Yes, apparently I forgot that you can't have overlapping terms. | 16:50 |
th1a | So... | 16:50 |
th1a | Can the same student have classes in overlapping terms? | 16:51 |
jelkner | Yes | 16:51 |
jelkner | Since it is two schools | 16:51 |
jelkner | but APS students can take classes at both | 16:51 |
jelkner | that's not a problem | 16:51 |
jelkner | since we import all APS students anyway | 16:52 |
th1a | I guess you're looking at two instances. | 16:52 |
jelkner | That's what I thought | 16:52 |
jelkner | since you told me the rule of thumb is: SchoolTool is designed a present for a single school | 16:52 |
jelkner | so two schools == two instances | 16:52 |
th1a | Yes. | 16:53 |
jelkner | ok, cool | 16:53 |
jelkner | mattva01 told me that means i can't use packages | 16:53 |
jelkner | since the debs don't support multiple instances on the same machine | 16:53 |
jelkner | so i need to talk to replaceafill about setting up two instances on my one vm | 16:54 |
jelkner | i guess from eggs? | 16:54 |
jelkner | or source? | 16:54 |
jelkner | how? | 16:54 |
th1a | I don't think you need that. | 16:54 |
jelkner | i don't need what? | 16:54 |
th1a | You should be able to use the packages with your own configuration in /etc/schooltool | 16:54 |
jelkner | ahh | 16:54 |
th1a | But I can't tell you exactly how. | 16:55 |
jelkner | so matt is mistaken? | 16:55 |
jelkner | he comes in today | 16:55 |
th1a | Well... see what he says to that. | 16:55 |
jelkner | so i wanted to ask now so we can begin thinking about it | 16:55 |
jelkner | ok | 16:55 |
jelkner | will do | 16:55 |
th1a | The packaging machinery shouldn't blow away your configuration. | 16:55 |
jelkner | thanks | 16:55 |
th1a | It shouldn't be any different than running a special configuration of, say, Apache. | 16:55 |
th1a | *shouldn't* | 16:56 |
jelkner | well we are early enough on this to have time to test ;-) | 16:56 |
jelkner | thanks, i'll update you later... | 16:56 |
menesis | you can use packages | 17:12 |
menesis | cp -r /etc/schooltool/schooltool-2009 /etc/schooltool/schooltool-test | 17:13 |
menesis | cp /etc/init.d/schooltool-2009 /etc/init.d/schooltool-test | 17:13 |
menesis | and then edit the new files to refer to the new locations | 17:14 |
*** alga has quit IRC | 17:19 | |
*** menesis has quit IRC | 18:23 | |
*** replaceafill has joined #schooltool | 18:31 | |
*** alga has joined #schooltool | 18:41 | |
*** menesis has joined #schooltool | 18:46 | |
*** menesis has quit IRC | 18:48 | |
*** menesis has joined #schooltool | 19:01 | |
*** menesis has quit IRC | 19:53 | |
*** menesis has joined #schooltool | 20:48 | |
*** menesis has quit IRC | 20:53 | |
*** menesis has joined #schooltool | 21:08 | |
*** fsufitch has joined #schooltool | 21:24 | |
fsufitch | aelkner: ello | 21:25 |
th1a | replaceafill: Do you know if there's a way to control the window size when Selenium server opens Firefox? | 21:26 |
replaceafill | th1a no, but let me look | 21:27 |
aelkner | hey | 21:27 |
th1a | replaceafill: Does it make them really wide for you? | 21:28 |
replaceafill | th1a yes | 21:28 |
replaceafill | full screen i guess | 21:28 |
*** th1a has quit IRC | 21:29 | |
*** th1a has joined #schooltool | 21:29 | |
aelkner | fsufitch, today we should get started with the data model | 21:30 |
fsufitch | yup | 21:30 |
fsufitch | would be quite useful if we were in the same room, with a whiteboard | 21:30 |
aelkner | i want to go over a few things with you about the way our data model works | 21:30 |
aelkner | yes, it would, but we'll make due | 21:30 |
fsufitch | yup | 21:30 |
aelkner | i want you to learn a little by investigating with pdb, but first some explanation | 21:31 |
replaceafill | th1a according to http://release.seleniumhq.org/selenium-core/1.0/reference.html you can change the background of the screenshot :P | 21:31 |
fsufitch | aelkner: be right back, getting a soda | 21:32 |
th1a | I saw that. | 21:32 |
replaceafill | th1a and this? http://stackoverflow.com/questions/1522252/how-to-resize-firefox-window-when-selenium-is-running | 21:32 |
replaceafill | selenium.getEval("window.resizeTo(X, Y); window.moveTo(0,0);") | 21:33 |
th1a | Ah! | 21:33 |
replaceafill | thank you javascript :P | 21:33 |
replaceafill | let me know if it works ;) | 21:33 |
th1a | That may solve the problem of auto-cropping screenshots too! | 21:34 |
replaceafill | auto-cropping? | 21:34 |
fsufitch | aelkner: back | 21:35 |
th1a | Well, making them the right size so there's not a lot of blank space around small forms. | 21:35 |
replaceafill | th1a ah, got it | 21:35 |
th1a | aelkner, fsufitch: If only there was a technology by which fsufitch and aelkner could share a video image over the internet. | 21:35 |
fsufitch | if only... | 21:36 |
replaceafill | :D | 21:36 |
th1a | aelkner: Doesn't your laptop have a camera? | 21:36 |
fsufitch | my laptop does, but i don't have sound recording capabilities, i'd have to go bother jeff for a mic or something | 21:37 |
aelkner | i have a camera, but haven't used it for video chat before | 21:37 |
fsufitch | do you have skype? | 21:37 |
aelkner | i'd have to set up a new account because i haven't used it for so long that i don't remember my signon inf | 21:38 |
aelkner | i'd rather not spend the time dong that rather than working on the data model | 21:38 |
fsufitch | right | 21:39 |
aelkner | at the sprint, we should work out all those issues | 21:39 |
aelkner | anyway | 21:39 |
th1a | LOL | 21:39 |
aelkner | our data model is organized using BTreeContainer objects which can contain one another | 21:39 |
aelkner | forming a tree not unlike folders do in a normal file system | 21:39 |
aelkner | to get to an object, it's easy to travese using the __name__ of each object in the hierachy | 21:40 |
aelkner | for the sake of simplicity, we'll always use 'app' to represent http://localhot:7080 | 21:40 |
aelkner | which also happens to be, in code, ISchoolToolApplication(None) | 21:41 |
aelkner | which is the root object, sub-classed from BtreeContainer, with it's own attributes as well | 21:41 |
fsufitch | yes | 21:41 |
aelkner | so app/schooltool.schoolyear/2010-2011 represents the SchoolYear object for 2010-2011 | 21:41 |
aelkner | we have app/schooltool.courseinfo which is the root of all data for our package | 21:42 |
aelkner | it extends app without getting in the way of the rest of it | 21:42 |
fsufitch | 'schooltool.schoolyear' and 'schooltool.courseinfo' are stored in constants somewhere right? | 21:43 |
aelkner | remember class SchoolToolApplication(BTreeContainer) works like a dict | 21:44 |
aelkner | so app['schooltool.schoolyear'] is the SchoolYearContainer | 21:44 |
aelkner | app['persons'] is the PersonContainer | 21:44 |
aelkner | and app'schooltool.courseinfo'] will be our root container | 21:45 |
aelkner | you need to think in paralell | 21:45 |
fsufitch | yup | 21:45 |
aelkner | and spell better than that :) | 21:45 |
aelkner | so app['persons']['jelkner'] is the python that corresponds to: | 21:46 |
fsufitch | something i noticed is that you can get from ISchoolYear to ICourseInfoSchoolYear, but not back | 21:46 |
aelkner | http://localhost:7080:/persons/jelkner | 21:46 |
fsufitch | this is when i was writing the view, and didn't have a way to display the title of the SchoolYear associated with the CourseInfoSchoolYear | 21:46 |
aelkner | again let's just say app/persons/jelkner for simplicity | 21:46 |
fsufitch | mhm | 21:46 |
aelkner | let's not think about views until we understand traversal better | 21:47 |
aelkner | so anyway | 21:47 |
aelkner | app/schooltool.courseinfo | 21:47 |
aelkner | should contain it's own set of containers | 21:47 |
aelkner | for now we only need to have schoolyears | 21:47 |
fsufitch | yup | 21:48 |
aelkner | later, we will be adding containers for pathways and other things, but let's not get too complex yet | 21:48 |
aelkner | so app/schooltool.courseinfo/schoolyears/2010-2011 would be a ICourseInfoSchoolYear object | 21:48 |
aelkner | so far so good? | 21:49 |
fsufitch | yup | 21:49 |
aelkner | ok, now check this out | 21:49 |
aelkner | we already have defined a traversal adapter | 21:49 |
aelkner | so i'm going to show you how the traversal corresponds to pythoncode | 21:49 |
aelkner | wheras app/schooltool.courseinfo/schoolyears/2010-2011 corresponds to app['schooltool.courseinfo']['schoolyears']['2010-2011'] | 21:50 |
fsufitch | i see | 21:51 |
aelkner | app/schooltool.schoolyear/2010-2011/courseinfo, our traversal adapter | 21:51 |
replaceafill | th1a did the resize trick work/ | 21:51 |
th1a | Oh, I'm still fiddling with other things. | 21:51 |
aelkner | corresponds to ICourseInfoSchoolYear(app['schooltool.schoolyear']['2010-2011']) | 21:52 |
fsufitch | i see, adapter | 21:52 |
aelkner | you see the traversal actually runs the adapter, see traversal.zcml | 21:52 |
fsufitch | yup, i saw it registered there | 21:52 |
aelkner | excellent | 21:52 |
aelkner | so, you see how the data is modeled through containment | 21:53 |
aelkner | but accesible also via taversal adapters | 21:53 |
aelkner | there's more than one way to traverse to the same object | 21:53 |
aelkner | this will come in handy in views when making links | 21:54 |
aelkner | but again, we'll get into that later | 21:54 |
aelkner | for now, i think we should keep it to courseinfo.py, adapters.py and README.txt to unit test it | 21:55 |
fsufitch | yup | 21:55 |
aelkner | btw, you can learn a lot simply by putting a pdb trace anywhere | 21:55 |
aelkner | saying app = ISchoolToolApplication(None) | 21:56 |
aelkner | and looking at the heirarchy | 21:56 |
aelkner | i suggest you do that later to see how the data model looks in code | 21:56 |
aelkner | although, keep in mind, to get the schoolyear container in code | 21:57 |
aelkner | the only acceptible practice at this point is to use the adapter | 21:57 |
aelkner | ISchoolYearContainer(app) | 21:57 |
aelkner | believe it or not, we don't have IPersonContainer(app), so app['persons'] is needed in that case | 21:58 |
aelkner | someone should fix that in core soon | 21:58 |
fsufitch | yeah, for consistency | 21:58 |
aelkner | so, if you look at schooltool.intervention a second | 21:59 |
aelkner | you'll note that the root container is actually simply a container of IInterventionSchoolYear objects | 21:59 |
aelkner | but our root needs to contain more than one type of container | 22:00 |
aelkner | app/schooltool.courseinfo/schoolyears | 22:00 |
aelkner | app/schooltool.courseinfo/pathways (later) | 22:00 |
aelkner | etc. | 22:00 |
fsufitch | yup | 22:00 |
aelkner | so your next commit could involve creating interfaces, implementations and tests | 22:01 |
aelkner | for ICourseInfoSchoolYear | 22:02 |
fsufitch | those already exist | 22:02 |
aelkner | which involves adding the container to CourseInfoRoot as sefl['schoolyears'] | 22:03 |
aelkner | no, only the root exists | 22:03 |
fsufitch | look at courseinfo.py, line 52 | 22:03 |
aelkner | oh, sorry, you're right | 22:03 |
fsufitch | :) | 22:03 |
aelkner | i think it needs fixing the way it is right now | 22:04 |
fsufitch | oh? | 22:04 |
aelkner | the root can't just contain CourseInfoSchoolYear objects as it currently does | 22:04 |
fsufitch | oh right, that. | 22:05 |
fsufitch | so, a new interface for ICourseInfoSchoolYearContainer (that's so long!) | 22:05 |
fsufitch | ? | 22:05 |
aelkner | don't worry about brevity, clarity is more important | 22:05 |
fsufitch | okay | 22:06 |
fsufitch | so, that interface, its implementation, and the adapter for ICourseInfoSchoolYearContainer(app) then | 22:06 |
fsufitch | now, how does this "subscriber" business work? | 22:06 |
aelkner | good question | 22:06 |
aelkner | we don't need to do it that way | 22:07 |
aelkner | we could simply wait until someone needs ICourseInfoSchoolYear(schoolyear) | 22:07 |
fsufitch | i see, and process it in the adapter | 22:07 |
aelkner | and have that adapter create the object if it is already found | 22:07 |
aelkner | isn't | 22:07 |
aelkner | we call that auto-vivifying | 22:08 |
fsufitch | the way it's currently sort of being done in the getCourseInfoSchoolYear adapter | 22:08 |
aelkner | yes, good | 22:08 |
aelkner | auto-vivify means 'bring to life automatically' | 22:08 |
aelkner | ok, maybe the english is obvious, but i felt it needed to be pointed out | 22:09 |
fsufitch | :) | 22:09 |
aelkner | you still have your branch of schooltool.intervention | 22:10 |
fsufitch | yes | 22:10 |
aelkner | look at adapters.py for getStudentYearInterventionStudent | 22:11 |
aelkner | it's atually a multi-adapter, but don't worry about that | 22:11 |
fsufitch | that means it takes multiple arguments, right? | 22:11 |
aelkner | right, adapting multiple things is the same as taking multiple arguments | 22:12 |
aelkner | that's why the concept of adapters is actually quite simple at its core | 22:12 |
fsufitch | yup | 22:12 |
fsufitch | now im remembering how adapters work, and since i've worked with other web development frameworks, i see why adapters are so awesome | 22:13 |
aelkner | no as far as interventionStudent[u'messages'] = intervention.InterventionMessages() | 22:13 |
aelkner | yup | 22:13 |
aelkner | as far as that line of code being there | 22:13 |
aelkner | i'm not sure why i did it that way and not in the __init__ of InterventionStudent | 22:13 |
aelkner | ah, i know why | 22:14 |
fsufitch | oh? | 22:14 |
aelkner | because the line before it, interventionSchoolYear[student.__name__] = interventionStudent | 22:14 |
aelkner | that needs to complete first, meaning __init__ is already run | 22:14 |
aelkner | in order to do the next level of containmemt on the next line | 22:14 |
fsufitch | right | 22:15 |
aelkner | putting those two lines in __init__ crashes because the InterventionStudent object itself | 22:15 |
aelkner | doesn't have a home yet | 22:15 |
aelkner | does that make sense? | 22:16 |
fsufitch | yup | 22:16 |
aelkner | ok, so can you set about fixing the adapter of ICourseInfoRoot(schoolyear) | 22:18 |
aelkner | to create the 'schoolyears' container? | 22:18 |
aelkner | and while you're at it, create adapters.py for all of the adapters | 22:18 |
aelkner | keep just the data object definitions in courseinfo.py | 22:19 |
fsufitch | okay | 22:19 |
aelkner | also, note the way adapters.py uses @adapter and @implementer? | 22:19 |
fsufitch | yeah, i wanted to ask about that | 22:19 |
fsufitch | is that preferred to the ZCML way? | 22:20 |
aelkner | it's nicer i find to use those descriptors because it make registering them trivial | 22:20 |
aelkner | all that's needed is factory=... | 22:20 |
aelkner | the descriptors tell the registration engine what gets adapted and implemented | 22:21 |
aelkner | or 'provided' as it is also refered | 22:21 |
aelkner | also | 22:21 |
aelkner | in unit tests, we need to manually provide adapters in setup | 22:21 |
aelkner | so the provideAdapter(getCourseInfoSchoolYear) call needs no adapts= | 22:22 |
aelkner | or provides= | 22:22 |
aelkner | it's much more convenient for coding purposes | 22:22 |
aelkner | also, having the descriptors is better because it keeps the definition of what's adapted | 22:23 |
aelkner | together with the code that does the job | 22:23 |
fsufitch | i see | 22:24 |
fsufitch | :) alright | 22:24 |
aelkner | things have gotten simpler and clearer over the years | 22:24 |
aelkner | and you're the benificiary :) | 22:24 |
aelkner | beneficiary | 22:25 |
aelkner | had to look it up, i'm embarrassed to admit | 22:25 |
aelkner | so, i think you can make a small, but productive commit just cleaning that stuff up | 22:26 |
fsufitch | yup | 22:27 |
aelkner | ok, i'll leave you to it then | 22:27 |
aelkner | remember, always make sure bin/test works before commiting | 22:28 |
aelkner | and if you want me to check out the diff before you commit, email it to me | 22:28 |
aelkner | and wait for me to respond to your ping | 22:28 |
fsufitch | okay :) | 22:29 |
aelkner | oh, bin/test -u is much faster | 22:29 |
aelkner | so use that until it passes before you worry about bin/test -f | 22:29 |
aelkner | bin/test will run that every time, and that wastes your time waiting | 22:30 |
fsufitch | ah, okay | 22:30 |
aelkner | you have your cell? | 22:31 |
aelkner | if i don't respond to ping in five minutes, call my cell, ok? | 22:31 |
fsufitch | yep | 22:31 |
fsufitch | poor signal though | 22:31 |
fsufitch | okay | 22:31 |
aelkner | you have the number programmed in, right? | 22:31 |
fsufitch | yup | 22:32 |
aelkner | cool | 22:32 |
aelkner | fsufitch, btw, reading back i noticed you point out that we don't have an adapter back to ISchoolYEar | 22:42 |
fsufitch | yes | 22:42 |
aelkner | that is a good point, and it wil be easy to add it to this commit and test it | 22:43 |
fsufitch | thing is i don't see any efficient way to code it (less than O(n) efficiency) | 22:43 |
aelkner | the __name__ of CourseInfoSchoolYear objects is the same the correesponding SchoolYear object | 22:44 |
fsufitch | __name__ is the attribute SchoolYear is indexed by? | 22:44 |
fsufitch | so, ISchoolYearContainer(app)[courseinfoschoolyear.__name__] would do it? | 22:45 |
aelkner | bingo, well done | 22:45 |
aelkner | fsufitch, another thing for this commit | 22:46 |
fsufitch | okay :) | 22:46 |
aelkner | see how test_cataloghas its own setup and teardown | 22:46 |
aelkner | i want you to provide the adapters for tests there | 22:47 |
aelkner | rather than in README.txt itself | 22:47 |
aelkner | it's another way we keep things cleaner | 22:47 |
fsufitch | wait, test_catalog? where? | 22:47 |
aelkner | sorry, thought you would get the implied 'in schooltool.intervetnion) | 22:48 |
aelkner | always remember, examples is the mother's milk of software delvelopment | 22:48 |
aelkner | you'll move the provideAdapter calls from README.txt to setup in test_courseinfo.py | 22:49 |
fsufitch | i see | 22:49 |
aelkner | and you won't need the adapter- and provides= anymore | 22:49 |
aelkner | since you are using the descriptors | 22:50 |
fsufitch | yup | 22:50 |
aelkner | so that's enough changes for one commit | 22:50 |
aelkner | i'll try not to think of any more :) | 22:51 |
fsufitch | heh okay | 22:52 |
aelkner | fsufitch, i didn't realize that test_Courseinfo.py already has setup and teardown | 22:52 |
aelkner | so all you need is to add the provide adapter calls | 22:52 |
fsufitch | okay | 22:53 |
aelkner | from schooltool.relationship.tests import setUp, tearDown | 22:53 |
aelkner | that should be removed because it's not used, hence, confusing | 22:53 |
fsufitch | done | 22:54 |
th1a | replaceafill: Sent you the script-in-progress. | 22:54 |
* replaceafill checks | 22:55 | |
th1a | Note that it wants to be run as root and to delete your database. | 22:55 |
replaceafill | os.stat(db_path).st_size > 70000???!?!? | 22:57 |
th1a | If your database isn't empty, delete it. | 22:57 |
replaceafill | is 70k the size for an emtpy one/ | 22:57 |
th1a | Yes. :D | 22:57 |
replaceafill | :D | 22:57 |
replaceafill | 400x400 window :) | 22:59 |
replaceafill | do you need to move the window? | 22:59 |
th1a | That's the default. | 22:59 |
th1a | I'm not sure when you need to position it. | 23:00 |
th1a | I think for the first one the screen is rendered small enough that it has no effect. | 23:00 |
th1a | You can mostly paste the commands from the IDE into a method. | 23:02 |
replaceafill | th1a why dont you give screenshots meaningful names like 'login-form.png', etc? | 23:05 |
replaceafill | wont it make it easier to insert them into the book? | 23:05 |
replaceafill | s/wont/wouldnt | 23:05 |
replaceafill | fsufitch you should check group.py, level.py and course.py for an idea on how to implement object -> schoolyear adapters using intids | 23:13 |
replaceafill | and not depending on ___name__ attributes | 23:13 |
fsufitch | replaceafill: okay | 23:14 |
fsufitch | which part of schooltool are they in? | 23:14 |
replaceafill | group/group.py, level/level.py, course/course.py | 23:14 |
replaceafill | i guess groups dont have the direct Group -> SchoolYear adapter though | 23:15 |
replaceafill | but you will see that usually you get the adapter from the GroupContainer, LevelContainer, CourseContainer -> SchoolYear | 23:15 |
replaceafill | so, if you have a course you do ISchoolYear(course.__parent__) | 23:15 |
replaceafill | ISchoolYear(group.__parent__) | 23:16 |
aelkner | you should be able to do ISchoolYear(course) | 23:16 |
aelkner | i mean, you can | 23:17 |
replaceafill | in the background is really ISchoolYear(course.__parent__) | 23:17 |
replaceafill | all of them are | 23:17 |
replaceafill | @adapter(ICourse) | 23:17 |
replaceafill | @implementer(ISchoolYear) | 23:17 |
replaceafill | def getSchoolYearForCourse(course): | 23:17 |
replaceafill | return ISchoolYear(course.__parent__) | 23:17 |
aelkner | replaceafill, reffing fsufitch to course, group, level implementation is a bit more complex than i wanted to go for now | 23:20 |
replaceafill | ok, refer him later ;) | 23:20 |
aelkner | he can rely on __name__ because his will always match schoolyear's | 23:20 |
aelkner | its one-to-one | 23:20 |
fsufitch | also the advantage of adapters is you can always rewrite them and it won't break other code so long as they keep working | 23:21 |
replaceafill | well, who am i to question you guys ;) | 23:21 |
replaceafill | you know your code better :) | 23:21 |
aelkner | i'm just trying to keep it simple | 23:22 |
aelkner | the whole intids thing should be used only when absolutely nexessary | 23:22 |
aelkner | necessary | 23:22 |
*** menesis has quit IRC | 23:32 | |
aelkner | fsufitch, you had asked about schoolYearAddedSubsciber, and i wanted to make sure we agreed | 23:47 |
aelkner | that you would remove that subscriber since you are auto-vivifying in the adapter | 23:48 |
aelkner | is that what we agreed? | 23:48 |
fsufitch | i dont recall agreeing upon removing that subscriber, but sure, i can do that | 23:49 |
aelkner | were coding the adpater the same way, i.e., duplicate? | 23:49 |
fsufitch | well no, i was going to make the adapter "self-vivifying" | 23:50 |
fsufitch | but i can reimplement that subscriber under adapter functionality | 23:50 |
fsufitch | i don't see any disadvantage in doing so | 23:50 |
aelkner | so yeah, you get rid of the subscriber | 23:50 |
fsufitch | okay :) | 23:50 |
aelkner | this way, when your test creates the schoolyear, none of your code gets run | 23:51 |
aelkner | but then when you adapt to your schoolyear, the auto-vivify will go into effect | 23:51 |
fsufitch | yup | 23:51 |
aelkner | later (in a separate comit) you will want to have a subscriber for when schoolyears are removed | 23:51 |
aelkner | because then you need to auto-killify | 23:52 |
fsufitch | "killify" is a funny word | 23:52 |
aelkner | jost joking around in my own lame way | 23:53 |
fsufitch | :-P | 23:53 |
aelkner | but you do need to remove CourseInfoSchoolYear objects when SchoolYear objects go away | 23:53 |
aelkner | again, in a separate commit | 23:53 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!