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

Add new examples to overwrite the inheritance problem #3178

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

mcasquer
Copy link
Collaborator

@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

  • update the specification

@mcasquer
Copy link
Collaborator 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.

@mcasquer mcasquer force-pushed the wrong_spec_inheritance branch 2 times, most recently from d73f9d6 to 998292d Compare October 7, 2024 08:07
@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
Collaborator 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

@psss psss added this to the 1.38 milestone Oct 17, 2024
Copy link
Collaborator

@psss psss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok, just two comments.

@psss psss added the specification Metadata specification (core, tests, plans, stories) label Oct 17, 2024
@mcasquer mcasquer force-pushed the wrong_spec_inheritance branch 2 times, most recently from b7178a1 to 7af3095 Compare October 23, 2024 07:21
@thrix thrix modified the milestones: 1.38, 1.39 Oct 25, 2024
@mcasquer mcasquer force-pushed the wrong_spec_inheritance branch from 7af3095 to e6a1fa0 Compare October 31, 2024 10:01
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]>
@psss psss force-pushed the wrong_spec_inheritance branch from e6a1fa0 to bbd45cc Compare October 31, 2024 11:30
@psss psss changed the title Adds new examples to overwrite the inheritance problem Add new examples to overwrite the inheritance problem Oct 31, 2024
Copy link
Collaborator

@psss psss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this! Looks good, I've only adjusted the example indentation.

@psss psss self-assigned this Oct 31, 2024
@psss
Copy link
Collaborator

psss commented Oct 31, 2024

Spec change only, merging.

@psss psss merged commit 05814dc into teemtee:main Oct 31, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
specification Metadata specification (core, tests, plans, stories)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants