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

Update docstring options parser and add docs cron job #1312

Merged
merged 5 commits into from
Nov 6, 2023

Conversation

coruscating
Copy link
Collaborator

@coruscating coruscating commented Nov 5, 2023

Qiskit 0.45 introduces singleton gates, which have dynamically generated type objects, so their associated module have to be accessed from the base_class attribute. This PR update the docstring options parser to work correctly with these objects. It also specifies the iqp style when drawing circuits to avoid deprecation warnings during the build, and adds the docs build to the daily cron job so this kind of issue can be caught more quickly in the future.

Because Aer 0.13.0 is causing a slowdown in docs builds, this PR also temporarily pins the version to 0.12.2 until the next patch release.

@@ -1,3 +1,4 @@
qiskit-terra>=0.45.0
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Pinned the version here since the iqp style was renamed in 0.45.0.

Copy link
Collaborator

@wshanks wshanks left a comment

Choose a reason for hiding this comment

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

This looks good to me. It should be backported so we can build the docs on 0.5 if needed, but maybe we are hoping not to need another 0.5 release?

@wshanks
Copy link
Collaborator

wshanks commented Nov 6, 2023

Also, should we build the docs in the cron run to catch changes like this?

@coruscating
Copy link
Collaborator Author

@wshanks Yes, I'm hoping to not do another 0.5 release. The docs cron job is a good idea—added to this PR.

sudo apt-get install -y pandoc graphviz
- name: Build Docs
run: tox -edocs-parallel
Copy link
Collaborator

Choose a reason for hiding this comment

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

This will catch a problem the day after a new release (of anything) breaks something. Is that good enough or should run against terra main like we do with the tests so we can catch problems before release?

Copy link
Collaborator Author

@coruscating coruscating Nov 6, 2023

Choose a reason for hiding this comment

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

My bad, thanks for catching. I've added a docs-terra-main environment now. tox.ini keeps getting more bloated, which I hope can be addressed by switching to another tool.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, it is hard to prioritize everything. We could review nox and hatch again. One option might be to stick with tox and to use a separate task running tool like make or just to define commands to run. I think we only need two tox environments (terra release and terra main) and its just different commands that we need to run. With tox exec, we can run different commands in the same tox environment rather than defining a separate environment for each command and using tox run.

@coruscating coruscating changed the title Update docstring options parser Update docstring options parser and add docs cron job Nov 6, 2023
@coruscating coruscating added this pull request to the merge queue Nov 6, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 6, 2023
@wshanks wshanks added this pull request to the merge queue Nov 6, 2023
Merged via the queue into qiskit-community:main with commit f16be3b Nov 6, 2023
10 checks passed
@coruscating coruscating deleted the update-options-parser branch November 6, 2023 18:27
@coruscating coruscating added the backport stable potential The issue or PR might be minimal and/or import enough to backport to stable label Nov 29, 2023
mergify bot pushed a commit that referenced this pull request Nov 29, 2023
Qiskit 0.45 introduces singleton gates, which have dynamically generated
type objects, so their associated module have to be accessed from the
`base_class` attribute. This PR update the docstring options parser to
work correctly with these objects. It also specifies the `iqp` style
when drawing circuits to avoid deprecation warnings during the build,
and adds the docs build to the daily cron job so this kind of issue can
be caught more quickly in the future.

Because Aer 0.13.0 is causing a slowdown in docs builds, this PR also
temporarily pins the version to 0.12.2 until the next patch release.

(cherry picked from commit f16be3b)

# Conflicts:
#	.github/workflows/cron-staging.yml
#	docs/tutorials/calibrations.rst
#	requirements-extras.txt
#	tox.ini
nkanazawa1989 pushed a commit to nkanazawa1989/qiskit-experiments that referenced this pull request Jan 17, 2024
…ty#1312)

Qiskit 0.45 introduces singleton gates, which have dynamically generated
type objects, so their associated module have to be accessed from the
`base_class` attribute. This PR update the docstring options parser to
work correctly with these objects. It also specifies the `iqp` style
when drawing circuits to avoid deprecation warnings during the build,
and adds the docs build to the daily cron job so this kind of issue can
be caught more quickly in the future.

Because Aer 0.13.0 is causing a slowdown in docs builds, this PR also
temporarily pins the version to 0.12.2 until the next patch release.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport stable potential The issue or PR might be minimal and/or import enough to backport to stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants