You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using version 0.7.2. I initially thought this would be a griffe feature request but it looks like numpydocstringyieldis supported and it's listed in the docs here:
Would that mean some of this could then be addressed here? Though I assume this is actually just excluding singular rather than plural terms (and I'm using Yields) and perhaps that should raise a different error?
Below is a minimal example inspired by griffedocs:
fromtypingimportIteratordefyielder(max: int=10) ->Iterator[int]:
"""`Yield` `ints` from 0 to `max`. Parameters ---------- max `int` to iterate `yields` starting from 0. Yields ------ : `int`s ascending to `max` Examples -------- >>> ints = yielder() >>> next(ints) 1 """foriinrange(max):
yieldi
$ quartodoc buildTraceback (most recent call last): File "/home/user/example/.venv/bin/quartodoc", line 8, in <module> sys.exit(cli()) ^^^^^ File "/home/user/example/.venv/lib/python3.11/site-packages/click/core.py", line 1157, in __call__ return self.main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/example/.venv/lib/python3.11/site-packages/click/core.py", line 1078, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "/home/user/example/.venv/lib/python3.11/site-packages/click/core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/example/.venv/lib/python3.11/site-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/example/.venv/lib/python3.11/site-packages/click/core.py", line 783, in invoke return __callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/example/.venv/lib/python3.11/site-packages/quartodoc/__main__.py", line 218, in build doc_build() File "/home/user/example/.venv/lib/python3.11/site-packages/quartodoc/autosummary.py", line 568, in build self.write_doc_pages(pages, filter) File "/home/user/example/.venv/lib/python3.11/site-packages/quartodoc/autosummary.py", line 614, in write_doc_pages rendered = self.renderer.render(page) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/example/.venv/lib/python3.11/site-packages/plum/function.py", line 484, in __call__ return self._f(self._instance, *args, **kw_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/example/.venv/lib/python3.11/site-packages/plum/function.py", line 368, in __call__ return _convert(method(*args, **kw_args), return_type) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/example/.venv/lib/python3.11/site-packages/quartodoc/renderers/md_renderer.py", line 212, in render return "\n\n".join([*header, *result]) ^^^^^^^^^^^^^^^^^^ File "/home/user/example/.venv/lib/python3.11/site-packages/plum/function.py", line 484, in __call__ return self._f(self._instance, *args, **kw_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/example/.venv/lib/python3.11/site-packages/plum/function.py", line 368, in __call__ return _convert(method(*args, **kw_args), return_type) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/example/.venv/lib/python3.11/site-packages/quartodoc/renderers/md_renderer.py", line 335, in render [self.render(x) for x in raw_meths if isinstance(x, layout.Doc)] File "/home/user/example/.venv/lib/python3.11/site-packages/quartodoc/renderers/md_renderer.py", line 335, in <listcomp> [self.render(x) for x in raw_meths if isinstance(x, layout.Doc)] ^^^^^^^^^^^^^^ File "/home/user/example/.venv/lib/python3.11/site-packages/plum/function.py", line 484, in __call__ return self._f(self._instance, *args, **kw_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/example/.venv/lib/python3.11/site-packages/plum/function.py", line 368, in __call__ return _convert(method(*args, **kw_args), return_type) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/example/.venv/lib/python3.11/site-packages/quartodoc/renderers/md_renderer.py", line 354, in render return "\n\n".join([title, *sig_part, self.render(el.obj)]) ^^^^^^^^^^^^^^^^^^^ File "/home/user/example/.venv/lib/python3.11/site-packages/plum/function.py", line 484, in __call__ return self._f(self._instance, *args, **kw_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/example/.venv/lib/python3.11/site-packages/plum/function.py", line 368, in __call__ return _convert(method(*args, **kw_args), return_type) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/example/.venv/lib/python3.11/site-packages/quartodoc/renderers/md_renderer.py", line 369, in render body = self.render(section) ^^^^^^^^^^^^^^^^^^^^ File "/home/user/example/.venv/lib/python3.11/site-packages/plum/function.py", line 484, in __call__ return self._f(self._instance, *args, **kw_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/example/.venv/lib/python3.11/site-packages/plum/function.py", line 368, in __call__ return _convert(method(*args, **kw_args), return_type) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/example/.venv/lib/python3.11/site-packages/quartodoc/renderers/md_renderer.py", line 194, in render raise NotImplementedError(f"Unsupported type: {type(el)}")NotImplementedError: Unsupported type: <class 'griffe.docstrings.dataclasses.DocstringSectionYields'>
The text was updated successfully, but these errors were encountered:
griff-rees
changed the title
Yields not supported in a numpydocstringYields not supported in numpydocstringMar 11, 2024
Thanks for the great project!
I'm using version
0.7.2
. I initially thought this would be agriffe
feature request but it looks likenumpydocstring
yield
is supported and it's listed in the docs here:quartodoc/docs/get-started/docstring-examples.qmd
Lines 79 to 89 in 3b673a9
Would that mean some of this could then be addressed here? Though I assume this is actually just excluding singular rather than plural terms (and I'm using
Yields
) and perhaps that should raise a different error?quartodoc/quartodoc/renderers/md_renderer.py
Lines 567 to 576 in 3b673a9
Below is a minimal example inspired by
griffe
docs
:The text was updated successfully, but these errors were encountered: