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

Consider improving deprecations of arguments to show up in docs next to the arg #9699

Open
Eric-Arellano opened this issue Mar 1, 2023 · 0 comments
Labels
documentation Something is not clear or an error documentation

Comments

@Eric-Arellano
Copy link
Collaborator

See discussion at #9685 (comment) and #9685 (comment).

The first step is figuring out how to get Sphinx to properly render the deprecated directive when it's in the args list. To do this, use a repo like qiskit-ibmq-provider (because it's small) and manually add this to the docstring in the Args list:

.. deprecated:: 9.99
  Deprecated!

Make sure Sphinx builds and check the generated HTML to ensure everything renders properly. Make sure this works both when the arg has no content already and when it does. Experiment with different types of indentation that developers may write.

Then, once you figure out how to properly add the directive, refactor the logic in deprecation.py to insert the deprecation in the Args list, rather than in-between the summary and the metadata lines. Make sure to handle indentation properly, and use test driven development (TDD) in test_deprecation.py.

Also, figure out how to handle when the argument is missing from the Args list or there is no list. Should we dynamically create the section? Add it to the section? Or, stick with rendering it in-between the summary and args list (I vote this).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Something is not clear or an error documentation
Projects
Status: No status
Status: No status
Development

No branches or pull requests

1 participant