-
Notifications
You must be signed in to change notification settings - Fork 66
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
👌 Allow needextend
to use dynamic functions
#1052
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and thanks for the work 👍
return filtered_needs | ||
|
||
|
||
needs_functions = [get_matching_need_ids] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be added with the sphinx API, as in practical use cases (to avoid messing up the incremental build)
Hi man, I see that currently we can use dynamic functions in need_extend directive. And I want to know can we use the dynammic funcitions in need_flow, need_bar, need_pie? |
No, you can't. Mostly because I see no use case for this. But maybe the filter-function feature covers your use case? |
Thanks for your repy, I want to collect the needs info during sphinx build with dynamic functions for the need_flow, need_bar, need_pie directives. You know then I can dynamic filter the directives with the specify needs id. that's quiet convenient. |
Mhh that sounds a little bit like a misuse of dynamic functions. But to be honest, I haven't understood your use case 100%. |
sorry, perhaps what I said was not detaild enough. |
Ok, this specific way is not supported, but filter-code/function should do the trick. |
you know, you guys has said in the filter-function discription that needpie directive support filter-code, and I want to know whether needflow and needbar also support filter function? And I plan to do some testwith filter code. |
Hi Danwos, Thank you for your great suggestions. |
closes #970 (cc @arwedus)
One key change here, which I think makes sense but should be agreed on,
is that we alter the needs data post-processing order, to extend the needs, before processing dynamic values, links and constraints.
This did not break any of the tests, and I feel should not breaking any existing users, unless they are doing something very exotic 😅