Skip to content

Add tutorials job to CI#4907

Merged
mergify[bot] merged 18 commits into
Qiskit:masterfrom
mtreinish:add-tutorials-ci
Sep 2, 2020
Merged

Add tutorials job to CI#4907
mergify[bot] merged 18 commits into
Qiskit:masterfrom
mtreinish:add-tutorials-ci

Conversation

@mtreinish
Copy link
Copy Markdown
Member

Summary

This commit adds a new job to run the qiskit tutorials in CI. The
tutorials are used as a form of upgrade testing to ensure that for key
examples Qiskit as a whole is N and N+1 releases. This caused friction
during the qiskit 0.20.0 release because the tutorials were never
updated to stop using deprecated code (or in the case of other elements
by merging backwards incompatible changes). To ensure there aren't any
surprises at the last minute when we run the tutorials with a proposed
new metapackage this commit adds a job to CI to ensure that they always
run with terra changes. It means for PRs that change an api (after a
deprecation cycle) the tutorial will need to be updated first. This will
ensure that users will have an upgrade path because CI in
qiskit/qiskit-tutorials runs with the metapackage.

Details and comments

This commit adds a new job to run the qiskit tutorials in CI. The
tutorials are used as a form of upgrade testing to ensure that for key
examples Qiskit as a whole is N and N+1 releases. This caused friction
during the qiskit 0.20.0 release because the tutorials were never
updated to stop using deprecated code (or in the case of other elements
by merging backwards incompatible changes). To ensure there aren't any
surprises at the last minute when we run the tutorials with a proposed
new metapackage this commit adds a job to CI to ensure that they always
run with terra changes. It means for PRs that change an api (after a
deprecation cycle) the tutorial will need to be updated first. This will
ensure that users will have an upgrade path because CI in
qiskit/qiskit-tutorials runs with the metapackage.
@mtreinish mtreinish requested a review from a team as a code owner August 11, 2020 11:12
@mtreinish
Copy link
Copy Markdown
Member Author

The merge of #4593 has broken the tutorials and this PR since the tutorials were not updated about that deprecation. This is the exact situation we need this job for. As an aside I personally feel like we should have kept that deprecation longer than the minimum, qiskit.extensions was a long lived path and we should be conservative and keep it around longer to give users a sufficient chance to migrate.

Copy link
Copy Markdown
Member

@kdk kdk left a comment

Choose a reason for hiding this comment

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

I think this is a good idea. Since, the tutorial job runs tutorials master against the last released qiskit, and this job runs terra master against tutorials master, is there a risk of a change (other than a breaking change) can't be moved forward in either terra or the tutorials without pushing through a failing CI?

Comment thread azure-pipelines.yml Outdated
@1ucian0
Copy link
Copy Markdown
Member

1ucian0 commented Aug 14, 2020

Current error is because Qiskit/qiskit-tutorials#990 with a pending PR Qiskit/qiskit-tutorials#999

@mtreinish
Copy link
Copy Markdown
Member Author

I think this is a good idea. Since, the tutorial job runs tutorials master against the last released qiskit, and this job runs terra master against tutorials master, is there a risk of a change (other than a breaking change) can't be moved forward in either terra or the tutorials without pushing through a failing CI?

I don't think so. There are 3 ways I can see this failing

  1. we change the tutorials in Qiskit/qiskit-tutorials a forward incompatible manner which is possible but unlikely (given the rate of change and the kinds of changes made) in this case we would just revert that tutorial change.
  2. we open a PR making a backwards incompatible change in terra where we break either a tutorial or a downstream dependent used in the tutorials. This case is what this job is here to catch because we want to ensure we don't break things for users without deprecation prior to removal. Basically we want to enforce for any version N that there is a way to write code that will work for N and N+1. When we do break an api, like in a deprecation removal we'll need to update the tutorials or other elements first which is something we want to do anyway.
  3. an upstream dependency changes breaking things in an unexpected manner. This shouldn't result in a bidirectional depdency to resolve on either one we should be able to pin to an old version in either CI to workaround it

This job is just really to mirror the upgrade testing using tutorials we already have on Qiskit/qiskit to block metapackage releases that are backwards incompatible. It was what caught all the issues in qiskit 0.20.0 and why it took so long to release because I had to push out aqua, aer, and terra patch releases to fix backwards incompatibilities (for aqua) and bugs (for aer and terra). But that Qiskit/qiskit job should block the potential risk of PR gridlock because we can't bump the metapackage without have the tutorials work.

@kdk kdk added the automerge label Sep 2, 2020
@mergify mergify Bot merged commit 1f37c24 into Qiskit:master Sep 2, 2020
@mtreinish mtreinish deleted the add-tutorials-ci branch September 6, 2020 15:40
ewinston pushed a commit to ewinston/qiskit that referenced this pull request Sep 9, 2020
* Add tutorials job to CI

This commit adds a new job to run the qiskit tutorials in CI. The
tutorials are used as a form of upgrade testing to ensure that for key
examples Qiskit as a whole is N and N+1 releases. This caused friction
during the qiskit 0.20.0 release because the tutorials were never
updated to stop using deprecated code (or in the case of other elements
by merging backwards incompatible changes). To ensure there aren't any
surprises at the last minute when we run the tutorials with a proposed
new metapackage this commit adds a job to CI to ensure that they always
run with terra changes. It means for PRs that change an api (after a
deprecation cycle) the tutorial will need to be updated first. This will
ensure that users will have an upgrade path because CI in
qiskit/qiskit-tutorials runs with the metapackage.

* Install pandoc in tutorials job

* Remove aqua tutorials from ci job for run time

* Fix rm path and speed up tutorials clone

* Try pinning matplotlib

* Try fixing archive path

* Add back aqua tutorials

Co-authored-by: Luciano Bello <luciano.bello@ibm.com>
Co-authored-by: Kevin Krsulich <kevin.krsulich@ibm.com>
mergify Bot added a commit that referenced this pull request Sep 24, 2020
* basicaer handling of global_phase.

Also, adapted some transpiler passes to preserve global phase in dag.

* catch non-float global_phase

* update state vector simulator

* linting

* blank line needed

* update Decompose pass for global phase

* update transpiler passes which create new dagcircuits.

This preserves global phase in newly created dagcircuit.

* Drop support for python 3.5 (#4926)

This commit drops support for running with python 3.5. It marks the
minimum supported version of the package as python 3.6, removes python
3.5 package pins, removes the 3.5 CI jobs, and removes the warning on
python 3.5. Looking at the PyPI stats since the deprecation period
started the number of users on Python 3.5 has diminished significantly,
but not disappeared. There were 783 downloads with pip from pypi out of
total of 25782 total pip downloads in the last 30 days. Compared to the
roughly 10% figure when we deprecated Python 3.5.

Merging this means we can not release until after the documented EoL
date for Python 3.5 support of September 13. This shouldn't be a problem
because with #4767 we will need to coordinate the release of all the
qiskit elements and are planning to do that after 09/13/2020.

It's worth noting that we should start planning to deprecate python 3.6
support sooner rather than later it goes EoL upstream at the end of
next year [1] and some of our other upstream dependencies (mainly numpy
et al) are going to remove support before the upstream Python EoL date
[2].

[1] https://devguide.python.org/#branchstatus
[2] https://numpy.org/neps/nep-0029-deprecation_policy.html

Co-authored-by: Kevin Krsulich <kevin.krsulich@ibm.com>

* Explicity set encoding of release notes via reno config (#5013)

The recent reno release 3.2.0 included a new feature [1] for setting the
character encoding that reno uses for all it's files. [2] This commit
sets this option in the reno config file to make the release note files
explicitly utf8. This is important (especially for windows users)
because we have literal inlines of the text drawer in some release notes
which use utf8 characters. This should avoid issues for users who's
system encoding is not compatible with the text drawer output in the
release notes.

[1] https://opendev.org/openstack/reno/commit/984bcba17e4e0b46763f42015d09680e5c5d5a04
[2] https://docs.openstack.org/reno/latest/user/usage.html#configuring-reno

* Fix parameterized Gate.definition to have valid ParameterTable. (#4945)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Allow ParameterExpressions to be cast to ints (#5001)

- Resolves #4978

Co-authored-by: Kevin Krsulich <kevin.krsulich@ibm.com>

* Add tutorials job to CI (#4907)

* Add tutorials job to CI

This commit adds a new job to run the qiskit tutorials in CI. The
tutorials are used as a form of upgrade testing to ensure that for key
examples Qiskit as a whole is N and N+1 releases. This caused friction
during the qiskit 0.20.0 release because the tutorials were never
updated to stop using deprecated code (or in the case of other elements
by merging backwards incompatible changes). To ensure there aren't any
surprises at the last minute when we run the tutorials with a proposed
new metapackage this commit adds a job to CI to ensure that they always
run with terra changes. It means for PRs that change an api (after a
deprecation cycle) the tutorial will need to be updated first. This will
ensure that users will have an upgrade path because CI in
qiskit/qiskit-tutorials runs with the metapackage.

* Install pandoc in tutorials job

* Remove aqua tutorials from ci job for run time

* Fix rm path and speed up tutorials clone

* Try pinning matplotlib

* Try fixing archive path

* Add back aqua tutorials

Co-authored-by: Luciano Bello <luciano.bello@ibm.com>
Co-authored-by: Kevin Krsulich <kevin.krsulich@ibm.com>

* Fix/5015 QuantumCircuit __eq__ should always return a Bool (#5016)

* Check if circuit is an instance of QuantumObject before comparing it
Added a few tests

* Fixed lint error

Co-authored-by: Kevin Krsulich <kevin.krsulich@ibm.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* fixed issue 4936 by updating the docstring (#5014)

Co-authored-by: Luciano Bello <luciano.bello@ibm.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* fix bux in optimize_1q_gates

* minor linting

* fix test

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Co-authored-by: Kevin Krsulich <kevin.krsulich@ibm.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Andrew Meyer <andrewm1100@gmail.com>
Co-authored-by: Luciano Bello <luciano.bello@ibm.com>
Co-authored-by: Raul Otaolea <raul.otaolea@gmail.com>
Co-authored-by: Tanya Garg <62295887+tgag17@users.noreply.github.com>
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.

3 participants