Edgewall Software
Modify

Opened 10 years ago

Closed 10 years ago

Last modified 6 years ago

#9836 closed enhancement (fixed)

Describe trac.ini sections in code

Reported by: Remy Blank Owned by: Remy Blank
Priority: high Milestone: 1.0
Component: general Version: 0.13dev
Severity: normal Keywords:
Cc: Branch:
Release Notes:

TracIni config sections are now documented, in addition to individual configuration items

API Changes:

config: Added the ConfigSection descriptor to define and document configuration sections. [10341]

Internal Changes:

Description

Configuration options are described in the code (using Option descriptors and subclasses). It would be nice to be able to add a description for complete sections, to be rendered by the [[TracIni]] macro after the section title. This would also allow documenting sections where no explicit options are defined, like [ticket-custom].

Attachments (3)

9836-config-section-doc-r10324.patch (10.7 KB ) - added by Remy Blank 10 years ago.
Add descriptions to TracIni sections.
9836-config-section-doc-r10339.patch (21.1 KB ) - added by Remy Blank 10 years ago.
Full patch containing all the spectial sections from TracIni.
9836-use-section-desc.patch (3.7 KB ) - added by Remy Blank 10 years ago.
Actually use the section descriptors.

Download all attachments as: .zip

Change History (12)

by Remy Blank, 10 years ago

Add descriptions to TracIni sections.

comment:1 by Remy Blank, 10 years ago

9836-config-section-doc-r10324.patch shows what I have in mind. I have copied the documentation from TracIni.

Thoughts?

comment:2 by Christian Boos, 10 years ago

Very cool! Something I wanted to do since a long time…

There's still the [milestone-groups] and [svn:externals] sections or did you want to leave those in the TracIni for some reason?

in reply to:  2 comment:3 by Remy Blank, 10 years ago

Replying to cboos:

There's still the [milestone-groups] and [svn:externals] sections or did you want to leave those in the TracIni for some reason?

No, I just wanted to show a few examples. I'll do the rest (and also add [intertrac], which was missing) now that I have your feedback :)

comment:4 by Sebastian Krysmanski <sebastian@…>, 10 years ago

Cc: sebastian@… added

by Remy Blank, 10 years ago

Full patch containing all the spectial sections from TracIni.

by Remy Blank, 10 years ago

Attachment: 9836-use-section-desc.patch added

Actually use the section descriptors.

comment:5 by Remy Blank, 10 years ago

9836-config-section-doc-r10339.patch contains all the special sections described separately in TracIni. I need feedback on two cosmetic issues before I can apply it:

  • Currently all section descriptor instances have a _section suffix. Should we keep that, or just strip the suffix and name the descriptors the same as the section (as we do for options)?
  • When accessing the descriptor on an instance, the corresponding Section object is returned. 9836-use-section-desc.patch actually uses this functionality, and replaces the corresponding self.config['section'] with accesses to the descriptor. Good or not?

comment:6 by Christian Boos, 10 years ago

I like using the Section instances directly from the descriptor. As for the naming, section names are usually very short which contrasts with most of the option names, so adding a _section suffix helps for readability, IMO.

comment:7 by Remy Blank, 10 years ago

API Changes: modified (diff)
Resolution: fixed
Status: newclosed

Thanks for the feedback. Full patch applied in [10341].

comment:8 by Alex Willmer <al.willmer@…>, 9 years ago

Release Notes: modified (diff)

comment:9 by Sebastian Krysmanski <sebastian@…>, 6 years ago

Cc: sebastian@… removed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Remy Blank.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Remy Blank to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.