#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 |
||
| 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)
Change History (12)
by , 15 years ago
| Attachment: | 9836-config-section-doc-r10324.patch added |
|---|
comment:1 by , 15 years ago
9836-config-section-doc-r10324.patch shows what I have in mind. I have copied the documentation from TracIni.
Thoughts?
follow-up: 3 comment:2 by , 15 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?
comment:3 by , 15 years ago
comment:4 by , 15 years ago
| Cc: | added |
|---|
by , 15 years ago
| Attachment: | 9836-config-section-doc-r10339.patch added |
|---|
Full patch containing all the spectial sections from TracIni.
by , 15 years ago
| Attachment: | 9836-use-section-desc.patch added |
|---|
Actually use the section descriptors.
comment:5 by , 15 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
_sectionsuffix. 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
Sectionobject is returned. 9836-use-section-desc.patch actually uses this functionality, and replaces the correspondingself.config['section']with accesses to the descriptor. Good or not?
comment:6 by , 15 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 , 15 years ago
| API Changes: | modified (diff) |
|---|---|
| Resolution: | → fixed |
| Status: | new → closed |
Thanks for the feedback. Full patch applied in [10341].
comment:8 by , 14 years ago
| Release Notes: | modified (diff) |
|---|
comment:9 by , 11 years ago
| Cc: | removed |
|---|



Add descriptions to TracIni sections.