diff --git a/flucoma/doc/templates/maxref.xml b/flucoma/doc/templates/maxref.xml index 50c7689..571397c 100644 --- a/flucoma/doc/templates/maxref.xml +++ b/flucoma/doc/templates/maxref.xml @@ -164,5 +164,8 @@ under the European Union’s Horizon 2020 research and innovation programme {% for s in seealso %} {% endfor %} + {% for s in max_seealso %} + + {% endfor %} diff --git a/flucoma/doc/templates/pd_htmlref.html b/flucoma/doc/templates/pd_htmlref.html index e8466e0..10ca662 100644 --- a/flucoma/doc/templates/pd_htmlref.html +++ b/flucoma/doc/templates/pd_htmlref.html @@ -137,6 +137,10 @@

See Also

{%-for s in seealso -%}

{{ s }}

{%- endfor -%} + + {%-for s in pd_seealso -%} +

{{ s }}

+ {%- endfor -%} diff --git a/flucoma/doc/transformers.py b/flucoma/doc/transformers.py index 40bd30a..5b4707b 100644 --- a/flucoma/doc/transformers.py +++ b/flucoma/doc/transformers.py @@ -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 """ @@ -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},