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

deprecated_args decorator for sphinx formatting #5008

Closed
wants to merge 4 commits into from

Conversation

mjhajharia
Copy link
Member

@mjhajharia mjhajharia commented Sep 21, 2021

this PR is for doing a draft version of adding auto-generate docs for deprecated arguments.

@pymc-devs pymc-devs deleted a comment from codecov bot Oct 3, 2021
@mjhajharia
Copy link
Member Author

[ Things to note: from Oriol ] -> not sure that would work. There could be colons within the parameter description so option 1 would need extra work regarding indentation or something like this (example https://arviz-devs.github.io/arviz/api/generated/arviz.loo.html scale parameter). It also has to accept both name: type or name : type (which is actually the numpydoc compliant formatting) because we have both in the codebase. option two should work but needs a couple caveats: section names should be preceded by an empty line and the number of underlines should be the same as the characters of the section, so the ------- should take something like between 4 or 15 characters, not completely sure they need to be dashes but I do think we always use dashes. The main problem is option 1 which might become too complicated to handle by ourselves with regex or other simple things

pymc/deprecator.py Outdated Show resolved Hide resolved
pymc/deprecator.py Outdated Show resolved Hide resolved
pymc/deprecator.py Outdated Show resolved Hide resolved
pymc/deprecator.py Outdated Show resolved Hide resolved
pymc/deprecator.py Outdated Show resolved Hide resolved
pymc/deprecator.py Outdated Show resolved Hide resolved
@mjhajharia mjhajharia changed the title PyMC deprecation helper deprecated_args decorator for sphinx formatting Oct 4, 2021
@mjhajharia mjhajharia mentioned this pull request Oct 4, 2021
3 tasks
@mjhajharia
Copy link
Member Author

closing in favour of laurent-laporte-pro/deprecated#51

@mjhajharia mjhajharia closed this Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants