Skip to content

Reading top level suite documentation from an external file #3983

Closed

Description

@lesnake

I would like to add documentation using -D --doc argument followed with a file rather than a string of text, like
(rebot|robot) --doc topleveldoc.robot other args

The file could be a .robot with just the top level documentation field, like :

*** Settings ***
Documentation    A nice headline that I would like to add to my top level documentation
...
...    Some more documentation

This formatting would enable IDE pretty formatting, linting ... (or python formatting ? like the variable file ?)

It should enable all the formatting features of the documentation.

Use case:
When combining or merging multiple files, there is no other way to fill top level documentation than the --doc argument.
What I'm doing right now:

  • testing various boards
  • generating reports without keywords from main reports
  • combining the report
  • I would like to add links in the top level doc to the main reports. This is where I need the feature of this ticket
  • Add that top level report into our CI job page and save me the hassles of digging into artifacts !

This ticket is connected to #3981 as a dependency to this ticket.

Possibly connected topic : metadata and all other top level features of a report/log.

Activity

  1. pekkaklarck commented on May 25, 2021

    @pekkaklarck
    Member

    Reading documentation from an external file is a good idea, but I think the file should then be used as-is. Needing to use *** Settings *** and especially needing to use ... with multiline documentation wouldn't be too convenient. Using *.robot format would have a benefit that also Metadata and other settings could possibly be specified there, but it would be strange if using --doc would also alter other settings. In my opinion it would be better to add separate support for reading Metadata from an external file with something like --metadata name:example.txt.

  2. pekkaklarck commented on May 25, 2021

    @pekkaklarck
    Member

    In my opinion this should work simply like --doc path/to/file.txt. Implementation would be easy: if the given doc points to an existing file, read file contents and use that as documentation.

    This functionality would also enable using other formats than plain text with Robot's own formatting. For example, HTML could be supported with --doc doc.html and we could also pretty easily convert Markdown and reST formats into HTML. This would, however, require enhancements in how doc is handled in general. At the moment you cannot use other than plain text with it and support for alternative formats would need to be implemented. That part requires its own issue.

  3. lesnake commented on May 25, 2021

    @lesnake
    Author

    I agree, especially with

    it would be strange if using --doc would also alter other settings

  4. pekkaklarck commented on Jun 7, 2021

    @pekkaklarck
    Member

    Could you @lesnake submit a new issue about just reading the doc directly from the file? The current description talks about *.robot files and, as discussed above, that's not so good idea. Alternatively you could update the description, but then this remaining conversation would look strange.

  5. pekkaklarck commented on Jun 9, 2021

    @pekkaklarck
    Member

    Closing in favor of #4008.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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