Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
D
dorie
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 31
    • Issues 31
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 9
    • Merge Requests 9
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar

The TS-GitLab will have to shut down towards the end of the year — please think about migrating your projects to GitLab.com or GitHub.
(This is still a very early message, meant to keep you informed. There will be more urgent ones in the future.)

  • dorie
  • dorie
  • Issues
  • #166

Closed
Open
Created Oct 04, 2019 by Lukas Riedel@lriedelOwner

Support XML tags specifying version changes of config file parameters

Description

We want to track changes to the config file parameters over the different versions of the software in the documentation. Sphinx provides three useful directives: versionadded, versionchanged, and deprecated. All take the affected version number as argument and optionally one line of explanation, like so:

.. versionchanged:: 2.2
   Renamed ``ssl`` to ``subsamplingLevel``.

This results in a small rendered message like so:

Changed in version 2.2: Renamed ssl to subsamplingLevel.

Proposal

Support XML tags versionadded, versionchanged, and deprecated in the Python XML reader. XML supports the same tag occuring multiple times in the same level, but our parser does not. Therefore, create a new list for every of these tags. The version should be an attribute of the tag:

<category name="output">
  <parameter name="subsamplingLevel">
     <versionadded version="1.0"> </versionadded>
     <versionchanged version="2.0"> Support ``richards+transport`` mode. </versionchanged>
     <versionchanged version="2.1"> Keywords ``richards`` and ``transport`` may be interchanged. </versionchanged>
  </parameter>
</category>

To do so, extend the attributes of dorie.parscraper.parameter to contain this data. The best thing would probably be a dict, storing the version number as key and the description string as value.

class Parameter:

    def __init__():
        # other attributes ...
        self.versionadded = {}
        # and so on ...

How to test the implementation?

Add a Python unit test: Have the parser read an input XML file and check if all attributes of dorie.parscraper.parameter are set correctly.

Related issues

Meta-issue: #164 (closed)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
v2.0 Release
Milestone
v2.0 Release
Assign milestone
Time tracking
None
Due date
None