GithubHelp home page GithubHelp logo

Comments (4)

PicoCentauri avatar PicoCentauri commented on May 27, 2024

Something like doc = NumpyDocString(NumpyDocString("\n " + TestClass.__doc__) does the job. However, adding an fixed number of spaces doesn't look stable to me. 😅

Adding something like doc = NumpyDocString("\n " + callable_obj.__doc__) in L67 of the cli_main leads to a bunch of parsing errors of numpydoc

philiploche@Philips-MacBook-Air:~/repos/mda_cli$ python3 cli_main.py -h
Warning: Unknown section Example
Traceback (most recent call last):
  File "cli_main.py", line 372, in <module>
    add_to_CLIs(member, analysis_interfaces)
  File "cli_main.py", line 67, in add_to_CLIs
    doc = NumpyDocString("\n     " + callable_obj.__doc__)
  File "/usr/local/lib/python3.8/site-packages/numpydoc/docscrape.py", line 147, in __init__
    self._parse()
  File "/usr/local/lib/python3.8/site-packages/numpydoc/docscrape.py", line 402, in _parse
    self['See Also'] = self._parse_see_also(content)
  File "/usr/local/lib/python3.8/site-packages/numpydoc/docscrape.py", line 324, in _parse_see_also
    raise ParseError("%s is not a item name" % line)
numpydoc.docscrape.ParseError: pmda.density.DensityAnalysis for a parallel version is not a item name in '\n   

Seems like there is still some work todo...

from mdacli.

joaomcteixeira avatar joaomcteixeira commented on May 27, 2024

EDIT:

Geez.... I just reproduced your previous answer.... sorry for this lapse :-o (see history of the comment)

I guess we need to study the NumpyDoc parser in detail because it seems is all a matter of giving the proper spaces in the docstring. File here - > https://github.com/numpy/numpydoc/blob/121c327ddbb1394eccef0fc3cb51bdf66979f5c6/numpydoc/docscrape.py#L111

We will continue on this quest, but it seems that definitively we need to change docstrings upstream.
Cheers!

from mdacli.

joaomcteixeira avatar joaomcteixeira commented on May 27, 2024

I am trying to write a general parser we can use to read the docstrings. In the lines of Numpy doc but not so strict and focusing only on our requirements.

from mdacli.

joaomcteixeira avatar joaomcteixeira commented on May 27, 2024

I forgot to set PR #3 to close this issue.
It may be that we need to readdress this with minor modifications to accommodate edge cases on the documentation of the Analysis Classes. If that comes to be the case, we will revisit this issue.

from mdacli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.