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

Adds new examples to overwrite the inheritance problem #3178

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mcasquer
Copy link
Contributor

@mcasquer mcasquer commented Aug 29, 2024

The examples code block from spec/plans/main.fmf
is being wrongly inherited by some of the specs. Adding
new examples blocks to avoid this problem.

Pull Request Checklist

  • implement the feature
  • write the documentation
  • update the specification
  • mention the version
  • include a release note

@mcasquer
Copy link
Contributor Author

The same idea needs to be implemented for the discover specification where the same happens and perhaps in the execute as well. The point is that using the same approach will erase the full spec from the documentation. So my guess is that further modifications (still unknown to me) are needed for both cases.

@mcasquer mcasquer marked this pull request as ready for review August 29, 2024 10:25
@psss
Copy link
Collaborator

psss commented Sep 26, 2024

I was thinking a bit more about the possible solutions, here's my brainstorm:

  • introduce inherit: false plus define the story key down in the structure key keep stories being stories
  • add a simple motivational example for each step (e.g. showing html plugin for the report step)
  • modify the tmt story export implementation to ignore child keys which are the same for parent

Last one would probably break some other export cases, so probably not a good choice. Adding stories would not bring much benefit to the user. So, I believe, the second option would be the best one.

@mcasquer, could you add a simple, few-lines example, for each step? This would override the inherited general one. Anyway, we don't want to spend much time on this as the long-term plan is to deduplicate the step plugin docs by moving the to the plugin code.

The examples code block from spec/plans/main.fmf
is being wrongly inherited by some of the specs. Adding
new examples blocks to avoid this problem.

Signed-off-by: mcasquer <[email protected]>
@mcasquer mcasquer changed the title Fix inheritance problem in report spec Adds new examples to overwrite the inheritance problem Oct 7, 2024
@mcasquer
Copy link
Contributor Author

mcasquer commented Oct 7, 2024

@psss added an empty :example statement in the main report section, this way the wrong inherited example is not displayed and for the file spec I considered the YAML could be the example (I wanted for it to be displayed at the beginning but seems not possible) What do you think of this change now? Then the work in the de-duplication could be started

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants