saga-project / bliss

ATTENTION: bliss is now saga-python. Please check out the new project website for the latest version: http://saga-project.github.com/saga-python/
http://saga-project.github.com/saga-python/
Other
8 stars 4 forks source link

API Documentation Improvements #45

Closed oweidner closed 12 years ago

oweidner commented 12 years ago

Improvements:

andre-merzky commented 12 years ago

Each 'main' example for a class should be (a) completely runnable using fork://localhost and testable with doctest: http://docs.python.org/library/doctest.html. The idea is that anyone should be able to copy and paste the example into a text editor and run it!

I am not sure that doctest is the right thing to do here. This sounds great in theory, but all examples would need to be formatted as interactive sessions, and cannot contain blank lines for formatting etc -- that would make the longer examples (which your comment meant) quite difficult to read. Also, output verification does not help much, as SAGA commands are usually silent.

So, all that doctest gives you is a semantic check. Which is nice, no doubt about it, but I am not sure this is a good tradeoff?

spellchecked:

I have a spell checker turned on -- it likes what it finds so far ;-) Of course I'll look over it again, in particular in the code sections, but please fix what you stumble over, because I obviously missed it, and will likely miss it again...

code formatting in examples

Same as for spell checking - is supposed to be the case... will check again.

attribute interface:

comparison with dict is really confusing

So, why do we have two approaches? I am totally fine removing either one, and it was really tedious to follow your suggestion to always document both ;-) Or maybe I misunderstood you...

c['Type'] -> c.type etc.

Hmm, why do we have two different approaches, if one is not to be documented/used?

Cheers, Andre.

andre-merzky commented 12 years ago

Each 'main' example for a class should be (a) completely runnable using fork://localhost:

So, I started doing the respective changes, but really think this is a bad idea. For example, the code describing the job package shows how to run a parallel blast on a GRAM endpoint -- a perfectly valid and relevant example for our user community. Changing that to a /bin/date on fork://localhost makes the documentation, well, not useless, but irrelevant...

So, I did the changes for all examples, but not for the job package doc, and also not for session, context and exception...

oweidner commented 12 years ago

Andre,

as you know, Bliss doesn't even have a plug-in for GRAM. It is completely pointless to use this in an example. Please write examples that are functional and make sense in the current Bliss context.

Thanks, Ole

On May 22, 2012, at 7:26 AM, Andre Merzky wrote:

Each 'main' example for a class should be (a) completely runnable using fork://localhost:

So, I started doing the respective changes, but really think this is a bad idea. For example, the code describing the job package shows how to run a parallel blast on a GRAM endpoint -- a perfectly valid and relevant example for our user community. Changing that to a /bin/date on fork://localhost makes the documentation, well, not useless, but irrelevant...

So, I did the changes for all examples, but not for the job package doc...


Reply to this email directly or view it on GitHub: https://github.com/saga-project/bliss/issues/45#issuecomment-5845632

andre-merzky commented 12 years ago

I think I fixed all of the items above, apart from the items raised above. So, I'll close that ticket. Feel free to open new tickets for individual problems of course!