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

Fixes references outside function (#214) #259

Merged
merged 4 commits into from
Apr 19, 2020
Merged

Fixes references outside function (#214) #259

merged 4 commits into from
Apr 19, 2020

Conversation

hoxbro
Copy link
Contributor

@hoxbro hoxbro commented Apr 13, 2020

Closes #214

@larsoner
Copy link
Collaborator

@sebp @MatthewFlamm can you see if this fixes #214 for you?

@MatthewFlamm
Copy link
Contributor

It still fails on my usage, but I haven't compared precisely to the small test example that @hoxbro gave in #214. So there may be still some unresolved issue, or I'm using it incorrectly. It does work for me on 0.8.0 however.

image

@hoxbro
Copy link
Contributor Author

hoxbro commented Apr 14, 2020

@MatthewFlamm Can you give me a small code example of your problem? Then I can look into it.

@MatthewFlamm
Copy link
Contributor

These days I unfortunately won't have time to try and simplify my case down to a simple example. Here is an example from how I used it though:

https://github.com/Merck/rtdpy/blob/master/source/AxialDispersion_cc.rst
https://github.com/Merck/rtdpy/blob/master/rtdpy/ad_cc.py

@hoxbro
Copy link
Contributor Author

hoxbro commented Apr 14, 2020

That's okay, the linked files were more than enough. I think that I have fixed your problem to:

image

@larsoner The more underlying problem, seem to be that the DEDUPLICATION_TAG is not necessary placed last in the sibling_section list. I have fixed this with a for-loop but I don´t know if there is a more underlying problem here.

@MatthewFlamm
Copy link
Contributor

@hoxbro Great work! This works better than 0.8.0 even. I was getting some duplication of links in 0.8.0, but it was still understandable unlike 0.9+. Current behavior is below which works in my full code too.

image
image

@larsoner
Copy link
Collaborator

@hoxbro do you see some easy way to add a test? For example, you could add something to numpydoc/tests/tinybuild (it's a tiny sphinx-buildable thing) that fails to do the right thing on master, then assert that there is some suitable substring (or regex) that shows it's working on this PR.

@larsoner
Copy link
Collaborator

(the tests for tinybuild are in numpydoc/tests/test_full.py)

@larsoner
Copy link
Collaborator

Awesome, thanks @hoxbro !

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

Successfully merging this pull request may close these issues.

References outside function
3 participants