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

References outside function #214

Closed
hoxbro opened this issue Apr 27, 2019 · 17 comments · Fixed by #259
Closed

References outside function #214

hoxbro opened this issue Apr 27, 2019 · 17 comments · Fixed by #259

Comments

@hoxbro
Copy link
Contributor

hoxbro commented Apr 27, 2019

I have seen a similar problem as mentioned here. Problem is for docstrings but only for docstrings outside of functions. I have attached an example, and by running the command sphinx-build -b singlehtml -d _build/doctrees . _build/singlehtml l i get the following for output:
56817105-2daf3500-6845-11e9-9571-f758848d6cc7

If I delete :members: from manual.rst the docstring outside the function works as expected.
Screenshot 2019-04-27 at 14 21 26

Am i doing anything wrong? I'm running the newest version (0.9.1).

@sebp
Copy link

sebp commented May 13, 2019

I observed the same using sphinx==1.7.9 and numpydoc==0.9.1, the reference is rendered correctly for a function, but is messed up when used in a class.

@MatthewFlamm
Copy link
Contributor

MatthewFlamm commented Jun 13, 2019

I have the same issue with version 0.9.1 for a reference in a class as well. I reverted to version 0.8.0 and all works as expected.

I confirmed that the only package changed when reverting to version 0.8.0 was numpydoc.

@larsoner
Copy link
Collaborator

Are either of you comfortable enough with git to do a git blame to isolate the commit that causes this issue?

@MatthewFlamm
Copy link
Contributor

I thought I was, but your comment makes me question that. I thought that git blame requires knowledge of what file or line is suspected to cause the issue. Did you mean git bisect?

@larsoner
Copy link
Collaborator

Argh yes, sorry. git bisect is what I meant

@larsoner
Copy link
Collaborator

(I don't mean to scare you off -- it can be difficult for people totally unfamiliar with git but if you've already used git before you'll probably be fine.)

@MatthewFlamm
Copy link
Contributor

I'll give it a try. Although I first need to figure out how to get my environment to work with a development version of numpydoc, as I currently have it installed from pypi. Is it as simple as cloning the repo and then pip install -e numpydoc?

@larsoner
Copy link
Collaborator

Usually I use pip install -e . after cloning and cd to the clone dir.

@larsoner
Copy link
Collaborator

(But looking at it I guess this would be functionally equivalent!)

@sebp
Copy link

sebp commented Jun 18, 2019

According to my investigation, commit c8513c5 is to blame.

@MatthewFlamm
Copy link
Contributor

Beat me to it. This is the same commit that breaks functionality for me.

@hoxbro
Copy link
Contributor Author

hoxbro commented Apr 13, 2020

I seem to have fixed this issue:

image

@larsoner
Copy link
Collaborator

@hoxbro do you want to open a PR to fix it?

larsoner pushed a commit that referenced this issue Apr 19, 2020
* Fixes references outside function (#214)

* Fixes reference in class with a method in it (#259)

* Added unittest to reference

* Check if reference list in test_full is correct size
@dizcza
Copy link

dizcza commented Nov 8, 2020

@hoxbro
Copy link
Contributor Author

hoxbro commented Nov 8, 2020

I think your problem is related to #130, which is also commented in the documentation https://numpydoc.readthedocs.io/en/latest/format.html.

@dizcza
Copy link

dizcza commented Nov 8, 2020

@hoxbro
The workaround posted in #130, unfortunately, does not help. Now it parses the references in an overview section as [Rfe594912252b-R1] instead of [Rfe594912252b-1].

@hoxbro
Copy link
Contributor Author

hoxbro commented Nov 9, 2020

What I was trying to say is that there have been some problems with reference in tables for a long time.

If I were you I will make a new issue with a minimal working example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants