Modify

Opened 8 years ago

Closed 5 years ago

#662 closed defect (fixed)

Port to 0.10

Reported by: cboos Owned by: 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 (2)

initial-migration-r1202.diff (14.0 KB) - added by cboos 8 years ago.
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 8 years ago.
Some additional changes - see next comment

Download all attachments as: .zip

Change History (17)

comment:1 Changed 8 years ago by Blackhex

  • Status changed from new to assigned

OK.

Changed 8 years ago by cboos

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.

comment:2 Changed 8 years ago 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

comment:3 Changed 8 years ago 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.

comment:4 Changed 8 years ago by Blackhex

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

comment:5 Changed 8 years ago by Blackhex

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

comment:6 Changed 8 years ago 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.

comment:7 Changed 8 years ago 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 ;)

comment:8 Changed 8 years ago 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)

comment:9 Changed 8 years ago 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)

Changed 8 years ago by cboos

Some additional changes - see next comment

comment:10 Changed 8 years ago 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.)


comment:11 follow-up: Changed 8 years ago 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.

comment:12 in reply to: ↑ 11 Changed 8 years ago 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!

comment:13 Changed 7 years ago by somaonline@…

  • Type changed from enhancement to defect

comment:14 in reply to: ↑ description Changed 5 years ago by anonymous

Replying to cboos:

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.

comment:15 Changed 5 years ago by cboos

  • Resolution set to fixed
  • Status changed from new to closed

Done since ages... (log:doxygenplugin/0.10)

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from cboos. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.