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

Variants for need options #671

Merged
merged 6 commits into from
Aug 25, 2022
Merged

Variants for need options #671

merged 6 commits into from
Aug 25, 2022

Conversation

iSOLveIT
Copy link
Collaborator

This PR implements variant handling based on need options.

Usecase 1
In conf.py:

needs_variants = {
  "var_a": "'var_a' in sphinx_tags"  # filter_string
  "var_b": "assignee == 'me'"
}

In any .rst file:

.. req:: Example
   :id: x
   :status: var_a:open, var_b:closed, unknown

From the above example, there are pre-defined variants, which have a “filter string” that defines to which variant a need belongs in the current situations.

Usecase 2 - Filter in option
There shall also be a way to use the filter string inside the options

.. req:: Example
   :id: x
   :status: ['var_a' in tags]:open, [assignee == 'me']:closed, unknown 

Default option
The last option can exist without a filter, so we consider it if no other options fulfil their filter rules.

@iSOLveIT iSOLveIT requested a review from danwos August 20, 2022 05:47
Copy link
Member

@danwos danwos left a comment

Choose a reason for hiding this comment

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

Only small findings in the docs.

We should also add already the Sphinx-Tags support.
Then the feature is already complete and users can go on bug hunt.

docs/configuration.rst Outdated Show resolved Hide resolved
docs/configuration.rst Outdated Show resolved Hide resolved
docs/configuration.rst Outdated Show resolved Hide resolved
docs/configuration.rst Outdated Show resolved Hide resolved
docs/directives/need.rst Outdated Show resolved Hide resolved
docs/directives/need.rst Show resolved Hide resolved
docs/directives/need.rst Show resolved Hide resolved
@iSOLveIT iSOLveIT requested a review from danwos August 22, 2022 14:45
Copy link
Member

@danwos danwos 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 the great work.

@danwos danwos merged commit 526a74d into master Aug 25, 2022
@iSOLveIT iSOLveIT deleted the variant_dac_60 branch August 28, 2022 03:47
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