Skip to content
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

improves docstring parser #23

Merged
merged 5 commits into from
May 18, 2021
Merged

improves docstring parser #23

merged 5 commits into from
May 18, 2021

Conversation

joaomcteixeira
Copy link
Member

Solves #22

If:

universe : `~MDAnalysis.core.universe.Universe`

gives MDAnalysis.core.universe.Universe

Takes in consideration also :, : , :, and :.

@PicoCentauri does this address it all? Can you make a local test?

Cheers,

@joaomcteixeira joaomcteixeira added the bug Something isn't working label May 16, 2021
@joaomcteixeira joaomcteixeira added this to the Release v1 milestone May 16, 2021
@joaomcteixeira joaomcteixeira self-assigned this May 16, 2021
@joaomcteixeira joaomcteixeira linked an issue May 16, 2021 that may be closed by this pull request
par_type = type_regex.findall(others_)[0]
if name_type_sep.findall(line):
par_name, others_ = name_type_sep.split(line)
par_type = [_ for _ in type_regex.findall(others_) if _][0]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is because:

types = "`~MDAnalysis.core.universe.Universe`"
t.findall(types)

[('', 'MDAnalysis.core.universe.Universe')]

@PicoCentauri
Copy link
Collaborator

PicoCentauri commented May 16, 2021

with : we ran into additional problems. .. versionadded:: 1.0.1 gives errors 😆. We have to ommit :: or we just stick to just checking for :. This works at least....

I love parsing stuff.

@PicoCentauri
Copy link
Collaborator

I just created a PR in mda fixing the : we are not able to parse if the just look for :
MDAnalysis/mdanalysis#3308

src/mdacli/cli.py Outdated Show resolved Hide resolved
joaomcteixeira and others added 2 commits May 18, 2021 18:44
revert colon to original

Co-authored-by: Philip Loche <ploche@physik.fu-berlin.de>
@PicoCentauri PicoCentauri merged commit 0690207 into main May 18, 2021
@PicoCentauri PicoCentauri deleted the parsedocs_22 branch May 18, 2021 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs parser fails
2 participants