Thread: [Rest2web-develop] Re: We forked validate.py
Brought to you by:
mjfoord
From: Michael F. <mi...@pc...> - 2005-07-18 14:54:19
|
Hello Nicola, I've got meld - I'll have to merge back in what you've done with the docs. Not today - it's a bit manic :-( Obviously for any further work we need to agree specific areas that we should each work on - then we can just discuss how we integrate the different things we do, rather than both working on the same things at the same time ! I do have an implementation question. My current implementation for ConfigObj puts an attribute called 'configspec' on the main ConfigObj. This is the parsed configspec with all the tests, the structure follows the expected structure of your config file (obviously). I'm wondering if it would be better to have a configspec attribute for each Section - (as a dictionary). This would allow you to *individually* test values as well. The disadvantage of doing this is that you have to create each section at the point you parse the configspec, which is before you parse the config file. This means that sections that appear in the configspec, but *not* in the config file, will have to be created anyway. What do you think ? Anyway - I don't *think* I can blag IRC until I've put a proper effort into poking a hole in our work firewall. (Requires me to construct a website that looks like a building related website - I have registered a domain specially !). *But* - I'm going to try and get Jabber working. Best Regards, Fuzzy http://www.voidspace.org.uk/python Nicola Larosa wrote: > >>>>Michael, >>>>I'm looking (via the wonderful Meld program) at the differences between the >>>>last validate.py I committed, and the one you sent me yesterday. >>>> >>>>They do not have much in common. It looks like we started from a common >>>>point, and then worked indipendently from each other, going in two >>>>different directions. Probably you took a copy for working on it during >>>>your travel before my commit, that I did on Sunday 10. > > >>>Yes - I left on Saturday the ninth. >>> >>>As soon as you said you'd worked on it my heart sank. I've appreciated >>>your input so far and was looking forward to actually coding with you - >>>*and* moving to doctests is a very good idea. >>> >>>*But* - we'd already discussed how the previous system for validate.py >>>was insufficient - it needed to do type conversion instead of just >>>returning True/False for pass/fail. I didn't see any alternative but >>>reworking chunks of it. > > > Of course. I'm not looking for someone to blame, mostly because that > someone would be me. :-) I got enthusiastic and eager to use doctest, and > somehow forgot our discussion. > > I'll reuse most of what I did anyway, it was all good experience. > > > >>>>We'll have to better coordinate our efforts in the future, to avoid >>>>repeating such unfortunate occurrences. I now intend to adapt the tests in >>>>your new version to doctest, dropping the one I committed, but this time >>>>I'll wait for confirmation from you before proceeding. > > >>>Ok - I'm pretty sure I've made no changes to validate.py since I sent it >>>to you. Feel free to add an alphanumeric test (and/or url_safe test which >>>might be a more useful set of characters to test for). > > > Mmh... alphanumeric? url_safe? Not exactly the answer I was waiting for, > but I'll go ahead and integrate doctest in the new validate.py, while > crossing fingers at the same time (kind of hard programming this way, > actually...). ;-) > > -- > Nicola Larosa - ni...@te... > > Learning C after learning Python can be done via Pyrex. [...] > Learning Java after learning Python can be done via Jython. [...] > Learning Perl after learning Python can ... never mind. ;-) > -- André Roberge, May 2005 > |
From: Nicola L. <ni...@te...> - 2005-07-18 21:50:45
|
> I've got meld - I'll have to merge back in what you've done with the > docs. Not today - it's a bit manic :-( Bricks flying left and right, eh? ;-) > Obviously for any further work we need to agree specific areas that we > should each work on - then we can just discuss how we integrate the > different things we do, rather than both working on the same things at > the same time ! So, tell me what you think of my last commits to validate.py, before I go on and tackle configreader.py . :-) > I do have an implementation question. > > My current implementation for ConfigObj puts an attribute called > 'configspec' on the main ConfigObj. This is the parsed configspec with > all the tests, the structure follows the expected structure of your > config file (obviously). > > I'm wondering if it would be better to have a configspec attribute for > each Section - (as a dictionary). This would allow you to *individually* > test values as well. Individually as opposed to what? I'm not sure I understand. > The disadvantage of doing this is that you have to create each section > at the point you parse the configspec, which is before you parse the > config file. This means that sections that appear in the configspec, but > *not* in the config file, will have to be created anyway. This does not seem a big disadvantage, but again, I'm not sure I get it all. > What do you think ? Not much, I'm sure you're be able to explain it better, once the pressure subsides. > Anyway - I don't *think* I can blag IRC until I've put a proper effort > into poking a hole in our work firewall. (Requires me to construct a > website that looks like a building related website - I have registered a > domain specially !). *But* - I'm going to try and get Jabber working. So it's easier to chat from Romania than from Britain. Bah! ;-) See what you can do. -- Nicola Larosa - ni...@te... Learning C after learning Python can be done via Pyrex. [...] Learning Java after learning Python can be done via Jython. [...] Learning Perl after learning Python can ... never mind. ;-) -- André Roberge, May 2005 |
From: Michael F. <mi...@pc...> - 2005-07-19 09:35:18
|
Hello Nicola, Nicola Larosa wrote: >>I've got meld - I'll have to merge back in what you've done with the >>docs. Not today - it's a bit manic :-( >> >> > >Bricks flying left and right, eh? ;-) > > > > Something like that - *sigh*. Staff problems, meetings, customer problems, customers..... I'm actually quite fond of the bricks... it's the people I struggle with ;-) >>Obviously for any further work we need to agree specific areas that we >>should each work on - then we can just discuss how we integrate the >>different things we do, rather than both working on the same things at >>the same time ! >> >> > >So, tell me what you think of my last commits to validate.py, before I go >on and tackle configreader.py . :-) > > > > Yes - very impressed. I generally like all the changes. The new errors, the neat way you've improved the Validator object and the list tests, the docutils tests. Of course it means I have to rework the docs ! Bah..... I intend to rename configreader to configobj at some point - and have it as a standalone module. I wasn't intending to have an ``__init__.py`` in the final version. We've ended up with the wrong filename because my first implementation was a reader only. In writing the documentation I've uncovered about 15 issues (including two bugfixes) that I *need* to resolve. This is along with implementing ``writein`` and the comments stuff. All that won't take too long, but can you hold off configreader until then ? In the meantime if you want to implement any more built in tests for validate.py, do the timestamp and a regex test for example..... feel free :-) It looks like we need another project to work on together. Maybe you could look at Firedrop - there's still a lot to do for that. Or we could pick up rest2web.... >>I do have an implementation question. >> >>My current implementation for ConfigObj puts an attribute called >>'configspec' on the main ConfigObj. This is the parsed configspec with >>all the tests, the structure follows the expected structure of your >>config file (obviously). >> >>I'm wondering if it would be better to have a configspec attribute for >>each Section - (as a dictionary). This would allow you to *individually* >>test values as well. >> >> > >Individually as opposed to what? I'm not sure I understand. > > > Don't worry - my new way is better. It just means re-implementing some stuff and rewriting some docs :-) Bugger. > [snip..] > > > > >>Anyway - I don't *think* I can blag IRC until I've put a proper effort >>into poking a hole in our work firewall. (Requires me to construct a >>website that looks like a building related website - I have registered a >>domain specially !). *But* - I'm going to try and get Jabber working. >> >> > >So it's easier to chat from Romania than from Britain. Bah! ;-) See what >you can do. > > > > Unfortunately that seems to be true at the moment. Regards, Fuzzy http://www.voidspace.org.uk/python |
From: Nicola L. <ni...@te...> - 2005-07-19 11:11:33
|
> Something like that - *sigh*. Staff problems, meetings, customer > problems, customers..... I'm actually quite fond of the bricks... it's > the people I struggle with ;-) You're not the only one. ;-) >> So, tell me what you think of my last commits to validate.py, before I go >> on and tackle configreader.py . :-) > Yes - very impressed. I generally like all the changes. The new errors, > the neat way you've improved the Validator object and the list tests, > the docutils tests. Great. :-) > Of course it means I have to rework the docs ! Bah..... Yes, slightly. ;-) I tried to keep the docstrings up to date, though. Speaking of which, we could do worse than generating the API docs with epydoc, or something. I'll see what I can do about this too. > I intend to rename configreader to configobj at some point - and have it > as a standalone module. I wasn't intending to have an ``__init__.py`` in > the final version. We've ended up with the wrong filename because my > first implementation was a reader only. > > In writing the documentation I've uncovered about 15 issues (including > two bugfixes) that I *need* to resolve. This is along with implementing > ``writein`` and the comments stuff. All that won't take too long, but > can you hold off configreader until then ? Good to know. ;-) Yes, of course. I'm itching to understand its code, though, so I think I'll give it a read-only look. ;-) > In the meantime if you want to implement any more built in tests for > validate.py, do the timestamp and a regex test for example..... feel > free :-) More polishing, eh? I'll see what I can do... > It looks like we need another project to work on together. Maybe you > could look at Firedrop - there's still a lot to do for that. Or we could > pick up rest2web.... Of course we *will*. ConfigObj is useful in itself, and it's a simpler testbench for both our collaboration and the introduction of a few new tools and techniques, but once done with it I definitely intend to get back to rest2web. As far as Firedrop is concerned, we'll see. :-) >> Individually as opposed to what? I'm not sure I understand. > Don't worry - my new way is better. It just means re-implementing some > stuff and rewriting some docs :-) > > Bugger. What else is new? ;-) >> So it's easier to chat from Romania than from Britain. Bah! ;-) See what >> you can do. > Unfortunately that seems to be true at the moment. That's a pity, though. :-( P.S.: are you still using, and fixing, DrPython? ;-D -- Nicola Larosa - ni...@te... Learning C after learning Python can be done via Pyrex. [...] Learning Java after learning Python can be done via Jython. [...] Learning Perl after learning Python can ... never mind. ;-) -- André Roberge, May 2005 |
From: Michael F. <mi...@pc...> - 2005-07-19 12:50:30
|
Hello Again, Nicola Larosa wrote: > [snip..] > > > >>Of course it means I have to rework the docs ! Bah..... >> >> > >Yes, slightly. ;-) I tried to keep the docstrings up to date, though. >Speaking of which, we could do worse than generating the API docs with >epydoc, or something. I'll see what I can do about this too. > > > > Yes - API generation is an interesting subject which I'd like to work on sometimes. Preferably an answer integrated with docutils in some way or other. There are Epydoc generated docs for ConfigObj 3 online (and in the distro) - and I imagine we'll do the same for ConfigObj 4. > [snip..] > >>In the meantime if you want to implement any more built in tests for >>validate.py, do the timestamp and a regex test for example..... feel >>free :-) >> >> > >More polishing, eh? I'll see what I can do... > > > > Well.... a regex test mechanism is more than polishing (it has to be extensible). Also I suspect timestamp is non trivial but possible. >>It looks like we need another project to work on together. Maybe you >>could look at Firedrop - there's still a lot to do for that. Or we could >>pick up rest2web.... >> >> > >Of course we *will*. ConfigObj is useful in itself, and it's a simpler >testbench for both our collaboration and the introduction of a few new >tools and techniques, but once done with it I definitely intend to get back >to rest2web. As far as Firedrop is concerned, we'll see. :-) > > > Cool. > [snip..] > >>>So it's easier to chat from Romania than from Britain. Bah! ;-) See what >>>you can do. >>> >>> >>Unfortunately that seems to be true at the moment. >> >> > >That's a pity, though. :-( > > > > Yes - I enjoyed chatting. >P.S.: are you still using, and fixing, DrPython? ;-D > > > No... SPE is my current IDE. I doubt I will do any development on it though, just with it. I'm growing to appreciate it more and more.. All the best, Fuzzball http://www.voidspace.org.uk/python |
From: Nicola L. <ni...@te...> - 2005-07-19 13:39:55
|
> Yes - API generation is an interesting subject which I'd like to work on > sometimes. Preferably an answer integrated with docutils in some way or > other. That would be better, but at least Epydoc can read ReST. > There are Epydoc generated docs for ConfigObj 3 online (and in the > distro) - and I imagine we'll do the same for ConfigObj 4. Great. >> More polishing, eh? I'll see what I can do... > Well.... a regex test mechanism is more than polishing (it has to be > extensible). > > Also I suspect timestamp is non trivial but possible. Sure, in their own right they're not trivial, but in the Big Validation Picture, they could appear as polish, maybe. :-) >> P.S.: are you still using, and fixing, DrPython? ;-D > No... SPE is my current IDE. I doubt I will do any development on it > though, just with it. I'm growing to appreciate it more and more.. Yesterday I was looking for Python IDEs (Eric3 is good but its development is not particularly open), looked at DrPython, but summarily dismissed SPE, I don't remember why anymore. I'll have another look at it. -- Nicola Larosa - ni...@te... Learning C after learning Python can be done via Pyrex. [...] Learning Java after learning Python can be done via Jython. [...] Learning Perl after learning Python can ... never mind. ;-) -- André Roberge, May 2005 |
From: Michael F. <mi...@pc...> - 2005-07-19 14:01:03
|
I've just done a commit. I've checked in the cleaned up your cleaned up version of the docs for validate and configobj. So at least they are now in SVN. I've not done any real work yet. Nicola Larosa wrote: >>Yes - API generation is an interesting subject which I'd like to work on >>sometimes. Preferably an answer integrated with docutils in some way or >>other. >> >> > >That would be better, but at least Epydoc can read ReST. > > > Yeah... unfortunately it looks like there is no new work on Epydoc, which is worrying for the future. > > >>There are Epydoc generated docs for ConfigObj 3 online (and in the >>distro) - and I imagine we'll do the same for ConfigObj 4. >> >> > >Great. > > > > >>>More polishing, eh? I'll see what I can do... >>> >>> > > > >>Well.... a regex test mechanism is more than polishing (it has to be >>extensible). >> >>Also I suspect timestamp is non trivial but possible. >> >> > >Sure, in their own right they're not trivial, but in the Big Validation >Picture, they could appear as polish, maybe. :-) > > > > Oh - you mean 'coz I've already done all the real work ;-) >>>P.S.: are you still using, and fixing, DrPython? ;-D >>> >>> > > > >>No... SPE is my current IDE. I doubt I will do any development on it >>though, just with it. I'm growing to appreciate it more and more.. >> >> > >Yesterday I was looking for Python IDEs (Eric3 is good but its development >is not particularly open), looked at DrPython, but summarily dismissed SPE, >I don't remember why anymore. I'll have another look at it. > > > > Right - before this IDLE was my IDE, so I'm probably not used to using some of the features you would take for granted. Best Regards, Fuzzy http://www.voidspace.org.uk/python |
From: Nicola L. <ni...@te...> - 2005-07-19 15:22:37
|
> I've just done a commit. I've checked in the cleaned up your cleaned up > version of the docs for validate and configobj. So at least they are now > in SVN. I've not done any real work yet. Got'em. > Yeah... unfortunately it looks like there is no new work on Epydoc, > which is worrying for the future. Among others, the Twisted team uses it, so some bit of maintenance may still happen. >> Sure, in their own right they're not trivial, but in the Big Validation >> Picture, they could appear as polish, maybe. :-) > Oh - you mean 'coz I've already done all the real work ;-) Maybe then I should stop doing all this imaginary work... ;-P >> Yesterday I was looking for Python IDEs (Eric3 is good but its development >> is not particularly open), looked at DrPython, but summarily dismissed SPE, >> I don't remember why anymore. I'll have another look at it. > Right - before this IDLE was my IDE, so I'm probably not used to using > some of the features you would take for granted. I'll let you know. -- Nicola Larosa - ni...@te... Learning C after learning Python can be done via Pyrex. [...] Learning Java after learning Python can be done via Jython. [...] Learning Perl after learning Python can ... never mind. ;-) -- André Roberge, May 2005 |