-
Notifications
You must be signed in to change notification settings - Fork 10
[Enhance] Add CCE specific see also sections to transformer and template #73
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
Conversation
{%- endfor -%} | ||
|
||
{%-for s in pd_seealso -%} | ||
<h3 class="seealso_name"><a href="{{ s }}.html">{{ s }}</a></h3> |
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.
maybe strip the <a>
– presumably it's not linking anywhere useful if it's for generic PD objects
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.
Ah is the HTML doc a FluCoMa specific thing? In the case, indeed bye bye html
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.
Done
flucoma/doc/transformers.py
Outdated
data['seealso'] = [x for x in tidy_split(data.pop('see-also',''))] | ||
|
||
|
||
try: |
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.
This seems like overkill. Does it need a warning. Wouldn't
data['max_seealso`] = data.get('max_seealso`,'').split(',')
do the trick, without the need for try..except?
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.
give or take some curious use of backticks instead of single quotes
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.
Have to say I prefer my overkill as its obvious what happens in either scenario. Happy to budge if you think its better to go your way though
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.
Just going from my own experience parsing the transformer code for the first time I found the many nested dict.pop() sort of stuff quite windy to get my head around but thats just my 2c.
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.
Okay this is much more simplified now :)
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.
This is great. My only reservation is that now we have
see-also
which is FluCoMa relatedmax-seealso
pd-seealso
sc-related
-- which is actually in SC called "see also", so maybe we need to changesc-related
tosc-seealso
and I wouldnt be opposed to changing see-also
to flucoma-seealso
.
I think this would make more clear to anyone coming into the RST what these are for and which are parallel to each other.
The naming being consistent would make it obvious how all those bits talk to each other, I agree. What does @weefuzzy think of that? |
Ths is also made slightly more complicated by the YAMl to RST conversion so I think it best to put it into a separate PR |
This reverts commit 239fd91.
This enables you to define:
in the YAML docs which is then rendered in the appropriate templates.
I've opted for a relatively permissive
try/Except
block to catch cases where these new things are not defined or just not needed. It thusly throws a warning if they aren't which given the current unfinished state of the docs is a bit noisy.On another note does this block up the YAML to RST milestone?