Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proof of Concept: Only create a target for object descriptions #9675

Closed

Commits on Sep 25, 2021

  1. ObjectDescription: Add option :hidden:

    Add option :hidden: to ObjectDescription.  Currently, this option has no
    effect except being stored as attribute in the resulting node.
    latosha-maltba committed Sep 25, 2021
    Configuration menu
    Copy the full SHA
    a7744cb View commit details
    Browse the repository at this point in the history
  2. ObjectDescription: Hide contents if :hidden: is given

    Do not produce any output only a target node if option :hidden: is
    given.  In this case all nodes representing this ObjectDescription are
    replaced by a single target where the target gets assigned all ids of
    the replaced nodes.
    latosha-maltba committed Sep 25, 2021
    Configuration menu
    Copy the full SHA
    33755b0 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2021

  1. ObjectDescription: Record source location for targets

    Record the source information (class attributes source and line) when
    replacing an object description node with a target node.
    latosha-maltba committed Sep 26, 2021
    Configuration menu
    Copy the full SHA
    082e46d View commit details
    Browse the repository at this point in the history
  2. ObjectDescription: Replace collect_ids() with pure function

    The collect_ids() function uses the its second parameter ``ids:
    List[str]`` as in- and output parameter and always returns None.
    Rewrite the function to become pure and side effect free: return the
    list of ids as the return value not as an output parameter.
    latosha-maltba committed Sep 26, 2021
    Configuration menu
    Copy the full SHA
    051c77d View commit details
    Browse the repository at this point in the history
  3. Reorder consecutive index and target nodes

    An index directive creates a index node followed by a target node.  Two
    consecutive index directives::
    
    .. index:: first
    .. index:: second
    
    create index, target, index, target, i.e. a mixture.  The interspersed
    index nodes prevent other transformations, e.g. PropagateTargets to
    properly work on the target nodes.
    
    Apply a transformation which reorders mixed and consecutive index and
    target nodes such that first all index nodes are before all target
    nodes:
    
    Given the following document as input:
    
        <document>
            <target ids="id1" ...>
            <index entries="...1...">
            <target ids="id2" ...>
            <target ids="id3" ...>
            <index entries="...2...">
            <target ids="id4" ...>
    
    The transformed result will be:
    
        <document>
            <index entries="...1...">
            <index entries="...2...">
            <target ids="id1" ...>
            <target ids="id2" ...>
            <target ids="id3" ...>
            <target ids="id4" ...>
    latosha-maltba committed Sep 26, 2021
    Configuration menu
    Copy the full SHA
    4e1c256 View commit details
    Browse the repository at this point in the history