Skip to content

Storage class in MOOSEDocs should have a late initialization routine. #14096

Open
@aeslaughter

Description

@aeslaughter

Reason

To support dependencies ordering within MOOSEDocs the Storage class was created. When adding new items (before, after, replacing, etc.) to the Storage class the thing that it relates to must exist. This limits the ability to add dependencies because the dependent object must exist within the Storage container.

This issue popped up in #10431, which adds the ability to include extra CSS files to the Renderer. The user expects these extra CSS files to be last in the list so they correctly can override other items. The ability to add the extra CSS should be in the base class, but child classes add CSS files to the Storage, so by default the extra CSS files would not show up after the child class adds.

Design

The Storage class should be created, items added with markers to what they depend on (including '_end', '_begin', etc.). Then an "init" method of some sort is called and the items in the storage are organized when nothing more can be added. The Storage should then be locked so it can't be messed with again.

This is a good intern project because the Storage class is stand-alone, so it can be implemented and tested by itself in python unittests.

Impact

None, this will just clean up the hack in #10431 to get this working, but will allow for more complex dependencies as people start to extend MOOSEDocs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions