Ticket #662 (new defect)

Opened 2 years ago

Last modified 2 years ago

Port to 0.10

Reported by: cboos Assigned to: cboos
Priority: normal Component: DoxygenPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

I've started to port this plugin to trac:milestone:0.10.

See also Trac:TracDev/ApiChanges/0.10.

I'll upload the patch here when it's ready.

Attachments

initial-migration-r1202.diff (14.0 kB) - added by cboos on 08/30/06 11:16:32.
That's a start... Only notable change was the need to specify a new [doxygen] encoding setting, so that we know what are the bytes to look for in the index file.
more_fixes-r1216.diff (14.0 kB) - added by cboos on 08/31/06 13:22:22.
Some additional changes - see next comment

Change History

08/29/06 10:59:22 changed by Blackhex

  • status changed from new to assigned.

OK.

08/30/06 11:16:32 changed by cboos

  • attachment initial-migration-r1202.diff added.

That's a start... Only notable change was the need to specify a new [doxygen] encoding setting, so that we know what are the bytes to look for in the index file.

08/30/06 12:03:04 changed by Blackhex

How shoud I apply a diff.

patch -p1 < initial-migration-r1202.diff

in 0.10 directory gives me errors:

patching file doxygentrac/doxygentrac.py
Hunk #1 FAILED at 11.
Hunk #2 FAILED at 33.
Hunk #3 FAILED at 69.
Hunk #4 FAILED at 113.
Hunk #5 FAILED at 126.
Hunk #6 FAILED at 137.
Hunk #7 FAILED at 154.
Hunk #8 FAILED at 172.
Hunk #9 FAILED at 199.
Hunk #10 FAILED at 226.
Hunk #11 FAILED at 268.
Hunk #12 FAILED at 295.
Hunk #13 FAILED at 316.
Hunk #14 FAILED at 337.
Hunk #15 FAILED at 377.
15 out of 15 hunks FAILED -- saving rejects to file doxygentrac/doxygentrac.py.rej

08/30/06 16:08:53 changed by cboos

oops, sorry, probably EOL issues. I did those changes on Linux, where I did first a conversion to LF line endings. I forgot to adapt the patch back to DOS format. I'll upload a fixed diff tomorrow.

08/30/06 16:53:12 changed by Blackhex

I thought that there is problem too, but I'm using Linux too, so LF shoudn't be a problem.

08/30/06 17:00:13 changed by Blackhex

Ahh, I see that original source is in CR/LF format, obviously previous developer worked on Windows. I'll changed it myself.

08/30/06 17:32:08 changed by Blackhex

I've created 0.10 branch with your patch but I've united code indentation: 4 spaces for block structure 2 spaces for line continuation.

08/31/06 05:17:19 changed by cboos

Hm, Emacs' Python mode is not that pleased with 2 spaces for line continuations the way you did it... why not stick with PEP:0008? (look for "Make sure to indent the continued line appropriately.")

I'm working on some more changes, so stay tuned ;)

08/31/06 05:46:56 changed by Blackhex

Yes, there is that sentence but that isn't instructing any specific way of line continuing indentation. I'm using two spaces because it seems more standartized than undefined number of spaces as in example.

This kind of indentation is easier to overlook:

if width == 0 and height == 0 and \
   color == 'red' and emphasis == 'strong' or \
   highlight > 100:
    raise ValueError("sorry, you lose")

than this one:

if width == 0 and height == 0 and \
  color == 'red' and emphasis == 'strong' or \
  highlight > 100:
    raise ValueError("sorry, you lose")

and this is much space consuming:

Blob.__init__(self, width, height,
              color, emphasis, highlight
              font, lenght)

than this one:

Blob.__init__(self, width, height,
  color, emphasis, highlight, font, lenght)

08/31/06 06:17:22 changed by cboos

The "extended" citation of PEP:0008 is:

Make sure to indent the continued line appropriately. Emacs Python-mode does this right.

And indeed, Emacs' Python mode will indent the first example like that:

if width == 0 and height == 0 and \
       color == 'red' and emphasis == 'strong' or \
       highlight > 100:
    raise ValueError("sorry, you lose")

which is even clearer, IMO.

The second example will be indented like that:

Blob.__init__(self, width, height,
              color, emphasis, highlight
              font, length)

which really seems to be the "canonical" way to do it... (ok, actually the wrapping should only be done if really needed, i.e. if the call can't be written within 80 columns)

08/31/06 13:22:22 changed by cboos

  • attachment more_fixes-r1216.diff added.

Some additional changes - see next comment

08/31/06 13:25:07 changed by cboos

Hm, lots of changes actually... so it's far from finished. You may have want to have a look at the work I've done so far.

In attachment:more_fixes-r1216.diff, I made the following changes:

  • some improvements to the default css
  • doxygen: link resolver and request dispatcher are using a common method for resolving "targets"
  • among those targets, added the summary targets (e.g. 'annotated', 'hierarchy', etc.)
  • changed the logic of splitting documentation project folder and document file;
    • this improves the support for multiple (hierarchical) documentation projects
    • support for Doxygen CREATE_SUBDIRS mode is a bit broken (did it work before?)
  • Wiki Index improvements:
    • use WikiSystem.has_page to check if a page exists
    • redirect to the Wiki index page itself instead of embedding it (seems to be better for being able to edit it, looking at last change, etc.)

(follow-up: ↓ 12 ) 08/31/06 16:04:23 changed by Blackhex

I never tested DoxygenPlugin with documentation generated with CREATE_SUBDIRS directive and I even don't know how struture of that documentation looks. Is it somehow possible to distinguish between them? Redirecting to wiki page was implemented before but I didn't like that active main navigation bar button changed. I wouldn't change page embending unless there will be way how to not change buttons acivity by redirecting. I'll tell athomas to give you write permission to repository so you can commit your changes yourself. You can stop on #trac IRC channel to discuss anythink about.

(in reply to: ↑ 11 ) 09/01/06 03:46:48 changed by anonymous

  • owner changed from Blackhex to cboos.
  • status changed from assigned to new.

Replying to Blackhex:

I never tested DoxygenPlugin with documentation generated with CREATE_SUBDIRS directive and I even don't know how structure of that documentation looks.

Ok

Redirecting to wiki page was implemented before but I didn't like that active main navigation bar button changed.

Oh, good point! So I'll that change, but at least add a link in the template going to the Wiki index page itself.

...unless there will be way how to not change buttons acivity by redirecting.

No, I don't think its possible.

I'll tell athomas to give you write permission to repository so you can commit your changes yourself.

Great, thanks!

11/28/06 04:12:12 changed by somaonline@hotmail.com

  • type changed from enhancement to defect.

Add/Change #662 (Port to 0.10)




Change Properties
Action