Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions flucoma/doc/templates/maxref.xml
Original file line number Diff line number Diff line change
Expand Up @@ -164,5 +164,8 @@ under the European Union’s Horizon 2020 research and innovation programme
<seealsolist>
{% for s in seealso %}
<seealso name='{{ s | as_host_object_name }}' />{% endfor %}
{% for s in max_seealso %}
<seealso name='{{ s }}' />
{% endfor %}
</seealsolist>
</c74object>
4 changes: 4 additions & 0 deletions flucoma/doc/templates/pd_htmlref.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ <h2>See Also</h2>
{%-for s in seealso -%}
<h3 class="seealso_name"><a href="{{ s | as_host_object_name }}.html">{{ s }}</a></h3>
{%- endfor -%}

{%-for s in pd_seealso -%}
<h3 class="seealso_name">{{ s }}</h3>
{%- endfor -%}
</section>
</body>
</html>
11 changes: 10 additions & 1 deletion flucoma/doc/transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
# under the European Union’s Horizon 2020 research and innovation programme
# (grant agreement No 725899).

import logging
from flucoma.doc import logger
from collections import OrderedDict

"""
Expand Down Expand Up @@ -36,7 +38,14 @@ def default_transform(object_name, data):
data['discussion'] = data.pop('discussion','')

data['seealso'] = [x for x in tidy_split(data.pop('see-also',''))]


with logger.add_context([object_name]):
for k in ['max-seealso', 'pd-seealso']:
if k in data:
data[k.replace('-', '_')] = [x.strip() for x in data.get(k, '').split(',')]
else:
logging.warning(f"No {k} entry")

data['parameters'].append({
'name':'warnings',
'constraints': {'max': 1, 'min': 0},
Expand Down