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

Selecting tags for changelog automation #3077

Closed
mtreinish opened this issue Sep 6, 2019 · 3 comments · Fixed by #3109
Closed

Selecting tags for changelog automation #3077

mtreinish opened this issue Sep 6, 2019 · 3 comments · Fixed by #3109

Comments

@mtreinish
Copy link
Member

What is the expected behavior?

As a part of automating more of our daily workflow with https://github.com/mtreinish/qiskit-bot
one of the things that we'll no longer have to do manually is create a changelog file. We write real documentation for releases using reno now and the changelog is mostly overlapping with data in the git log and github PRs so there's no need to manually curate that anymore. qiskit-bot will generate a changelog for us by using the commit msg summary from the squashed merge. It looks for tags in the git history and uses that as categories for the changelog. For example see: https://github.com/mtreinish/qiskit-terra-sandbox/releases/tag/0.16.2 which was generated by the bot based on tagged PRs.

For this to work we need to assign tags to each category heading in the changelog, right now there are defaults set in the bot: https://github.com/mtreinish/qiskit-bot/blob/master/qiskit_bot/config.py#L25-L31 but before we deploy the bot into production we need to pick tags and categories that map with them. We can add new tags or reuse existing ones. It doesn't matter as long as we decide.

One idea I had was add a new class of tags with a changelog: prefix to indicate we want this PR included in the changelog. For example adding new tags like: Changelog: New Feature and Changelog: BugFix.

@kdk
Copy link
Member

kdk commented Sep 10, 2019

I like the idea of using specific changelog tags (and probably removing the existing similar tags), we would have to be more diligent about labeling issues (which we rarely do) or PRs (which we very rarely do). Is the label pulled from the PR or from the linked issue?

Also, it's not uncommon for a single PR to result in more than one changelog entry (e.g. deprecate some feature and concurrently add its replacement.) Using two PRs is one option, but it may not always be obvious at the outset of a PR. Is there a way to handle cases like this? Multiple changelog labels?

@mtreinish
Copy link
Member Author

It's based on PR labels (which can be changed after the merging too to give us that adjustment lever). The way it works is when a release is tagged the bot looks at the git log for the release finds all the PR numbers for a release then checks those PRs for labels it knows about. If there are any labels it adds the commit msg summary line to that section in the changelog.

For the multiple entry case I'd argue we would want those cases to be multiple PRs in general. We should strive to have one logical change per commit. But I was thinking about that to a certain degree and it's possible to have a PR labeled with more than one category and the bot will add the commit summary line to all the tagged categories for a PR.

@mtreinish
Copy link
Member Author

mtreinish commented Sep 13, 2019

Just to demonstrate I pushed a release to my sandbox repo with multiple entries for a patch while testing the production deployment configuration. The bot generated this release: https://github.com/mtreinish/qiskit-terra-sandbox/releases/tag/0.18.0

mtreinish added a commit to mtreinish/qiskit-core that referenced this issue Sep 20, 2019
With the introduction of the qiskit-bot release automation for terra we
no longer need to manually maintain or keep a changelog in repo. The
github release pages (which we were manually copy and pasting the
changelog into already) take the place of this file. For all future
releases the creation of this page is completely automatic and handled
by the bot. This works by using the git log and PR tags to figure out
which commits belong in the changelog summary. The commit msg summary
(the first line) is used for the changelog based on the tags. If a
longer explanation is necessary that should be handled in the reno
release notes.

Fixes Qiskit#3077
@kdk kdk closed this as completed in #3109 Sep 23, 2019
kdk pushed a commit that referenced this issue Sep 23, 2019
* Remove changelog and document automated creation

With the introduction of the qiskit-bot release automation for terra we
no longer need to manually maintain or keep a changelog in repo. The
github release pages (which we were manually copy and pasting the
changelog into already) take the place of this file. For all future
releases the creation of this page is completely automatic and handled
by the bot. This works by using the git log and PR tags to figure out
which commits belong in the changelog summary. The commit msg summary
(the first line) is used for the changelog based on the tags. If a
longer explanation is necessary that should be handled in the reno
release notes.

Fixes #3077

* Add README section on changelog

* Make tweaks to readme for clarity
kdk pushed a commit that referenced this issue Sep 26, 2019
* Remove changelog and document automated creation (#3109)

* Remove changelog and document automated creation

With the introduction of the qiskit-bot release automation for terra we
no longer need to manually maintain or keep a changelog in repo. The
github release pages (which we were manually copy and pasting the
changelog into already) take the place of this file. For all future
releases the creation of this page is completely automatic and handled
by the bot. This works by using the git log and PR tags to figure out
which commits belong in the changelog summary. The commit msg summary
(the first line) is used for the changelog based on the tags. If a
longer explanation is necessary that should be handled in the reno
release notes.

Fixes #3077

* Add README section on changelog

* Make tweaks to readme for clarity

* The option fig.tight_layout is triggering warnings in some situations so it is being removed (#3123)

* no fig.tight_layout

* removing the rest of fig.tight_layout()

* check casteable types in Layout  (#3100)

* test

* cast in insinstance

* style

* layouts are already layouts :)

* Travis CI: The sudo: tag is deprecated on Travis (#3134)

https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration

* Fix a syntax error in QuantumCircuit.mirror. (#3138)

* Fix for #3106 gatefacecolor key on circuit diagrams (#3137)

* Issue #3106 gatefacecolor key has no effect on circuit diagrams

If the style property "gatefacecolor" is set to a different value than the default, this color is applied.

Fixes #3106

* Solved style problem

space before : eliminated

* Update plot_state_hinton() formatting (#3093)

Add axes to the image part. It looks like the image axes already exist for non-empty graphs. The change that I made here is to remove if np.any(dataimag != 0): if the desired behavior is to see the axes on graphs that don't contain any elements.

Replace rho with the latex rho

Use standard format for real and imag parts of rho

Fixes #2321

* Set barrier across multi-qubits correctly (#3042)

* Previously it was assumed that specified barrier has
  a single contiguous span across qubits. Qubits for the
  barrier need not be adjacent in the diagram. This commit
  handles this case by adding barrier across correct qubits.

* compute multiple short spans.

Fixes #2918

* Test pulse clipping fix Osx #1. (#3144)

* Remove superfluous reference to timeslots from assemble_schedules (#3139)

* Extend custom multiqubit gates over classical bits for mpl (#3062)

* Got it to extend over the clasical bits

* Fixed a small bug

* Removed a file accidentally modified

* Fix linter

* Deprecate allowing extra keys in circuit drawer style dict (#3105)

* test

* cast in insinstance

* style

* layouts are already layouts :)

* style['plotbarrier'] is being deprecated

* internal param for text drawer renamed to plot_barriers

* error when style contains unknown options

* better error message

* remove #3100, since it was not my intention to be on it

* style

* remove plotbarrier

* unused import

* replace error with warning

* release note

* rochester_layout (#3125)

* Use _append when args already converted and broadcast. (#2936)

* Remove line in init which had been commented out (#3150)

* Fix circuit drawing justification (#3061)

Fixes #2802

qiskit/visualization/utils.py _get_layered_instructions() was erroneous and did not justify left nor right correctly. I have reworked that code which underlies many visual representations of circuits to the user.

* refactored, needs more work on right justification

* Looks like this works for qiskit-terra issue #2802

* May fix first test failure for this pull request, while causing another?

* Draws conditionals on ClassicalRegister correctly now.

* - Occurs check for gate in gates leads to good test results.
- Added a few more self.maxDiff = None while debugging. Should they be pulled out?

* tabs and trailing spaces ;)

* removed the maxDiff's because they make the Style and lint test in Python 3.5 fail

* added tests
modified changelog

* Test case extended to include original issue reported in #2802

* oops, left a maxDiff=None in from testing. Fixed

* changes to utils.py requested by reviewer maddy-tod

* test cases split as requested by reviewer maddy-tod

* added circuit diagrams in comments to new tests

* removed note from changelog and made it a release note per @mtreinish

* made _LayerSpooler a private class

* Revert "Remove changelog and document automated creation (#3109)"

This reverts commit effad12.

* Make _LayerSpooler a subclass of list

The _LayerSpooler class was only ever used as list. While the class was
an independent type it basically just wrapped an internal list. THen
there were helper functions to access and manipulate that list. These
methods just duplicated what python already provides and the list class
itself already implements. This commit fixes this so the _LayerSpooler
itself is a subclass of list so when it's initialized you can just treat
it as the output list it was generating.

* Clean up release note, fix only, not prelude

* un reverted my revert of CONTRIBUTING.md

* refactored, needs more work on right justification

* Looks like this works for qiskit-terra issue #2802

* May fix first test failure for this pull request, while causing another?

* Draws conditionals on ClassicalRegister correctly now.

* - Occurs check for gate in gates leads to good test results.
- Added a few more self.maxDiff = None while debugging. Should they be pulled out?

* tabs and trailing spaces ;)

* removed the maxDiff's because they make the Style and lint test in Python 3.5 fail

* added tests
modified changelog

* Test case extended to include original issue reported in #2802

* oops, left a maxDiff=None in from testing. Fixed

* changes to utils.py requested by reviewer maddy-tod

* test cases split as requested by reviewer maddy-tod

* added circuit diagrams in comments to new tests

* removed note from changelog and made it a release note per @mtreinish

* made _LayerSpooler a private class

* Make _LayerSpooler a subclass of list

The _LayerSpooler class was only ever used as list. While the class was
an independent type it basically just wrapped an internal list. THen
there were helper functions to access and manipulate that list. These
methods just duplicated what python already provides and the list class
itself already implements. This commit fixes this so the _LayerSpooler
itself is a subclass of list so when it's initialized you can just treat
it as the output list it was generating.

* Clean up release note, fix only, not prelude

* put back missing section

* Add partial transpiler support for targeting ion trap backends. (#3122)

* handle reset/barrier/measure (#3130)

* Do not unroll an Rx,Ry,Rxx circuit to U3,CX because of measure. (#3140)
kdk added a commit that referenced this issue Oct 11, 2019
* Add partial transpiler support for targeting ion trap backends. (#3122)

* handle reset/barrier/measure (#3130)

* Do not unroll an Rx,Ry,Rxx circuit to U3,CX because of measure. (#3140)

* rebase ion-trap branch (#3153)

* Remove changelog and document automated creation (#3109)

* Remove changelog and document automated creation

With the introduction of the qiskit-bot release automation for terra we
no longer need to manually maintain or keep a changelog in repo. The
github release pages (which we were manually copy and pasting the
changelog into already) take the place of this file. For all future
releases the creation of this page is completely automatic and handled
by the bot. This works by using the git log and PR tags to figure out
which commits belong in the changelog summary. The commit msg summary
(the first line) is used for the changelog based on the tags. If a
longer explanation is necessary that should be handled in the reno
release notes.

Fixes #3077

* Add README section on changelog

* Make tweaks to readme for clarity

* The option fig.tight_layout is triggering warnings in some situations so it is being removed (#3123)

* no fig.tight_layout

* removing the rest of fig.tight_layout()

* check casteable types in Layout  (#3100)

* test

* cast in insinstance

* style

* layouts are already layouts :)

* Travis CI: The sudo: tag is deprecated on Travis (#3134)

https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration

* Fix a syntax error in QuantumCircuit.mirror. (#3138)

* Fix for #3106 gatefacecolor key on circuit diagrams (#3137)

* Issue #3106 gatefacecolor key has no effect on circuit diagrams

If the style property "gatefacecolor" is set to a different value than the default, this color is applied.

Fixes #3106

* Solved style problem

space before : eliminated

* Update plot_state_hinton() formatting (#3093)

Add axes to the image part. It looks like the image axes already exist for non-empty graphs. The change that I made here is to remove if np.any(dataimag != 0): if the desired behavior is to see the axes on graphs that don't contain any elements.

Replace rho with the latex rho

Use standard format for real and imag parts of rho

Fixes #2321

* Set barrier across multi-qubits correctly (#3042)

* Previously it was assumed that specified barrier has
  a single contiguous span across qubits. Qubits for the
  barrier need not be adjacent in the diagram. This commit
  handles this case by adding barrier across correct qubits.

* compute multiple short spans.

Fixes #2918

* Test pulse clipping fix Osx #1. (#3144)

* Remove superfluous reference to timeslots from assemble_schedules (#3139)

* Extend custom multiqubit gates over classical bits for mpl (#3062)

* Got it to extend over the clasical bits

* Fixed a small bug

* Removed a file accidentally modified

* Fix linter

* Deprecate allowing extra keys in circuit drawer style dict (#3105)

* test

* cast in insinstance

* style

* layouts are already layouts :)

* style['plotbarrier'] is being deprecated

* internal param for text drawer renamed to plot_barriers

* error when style contains unknown options

* better error message

* remove #3100, since it was not my intention to be on it

* style

* remove plotbarrier

* unused import

* replace error with warning

* release note

* rochester_layout (#3125)

* Use _append when args already converted and broadcast. (#2936)

* Remove line in init which had been commented out (#3150)

* Fix circuit drawing justification (#3061)

Fixes #2802

qiskit/visualization/utils.py _get_layered_instructions() was erroneous and did not justify left nor right correctly. I have reworked that code which underlies many visual representations of circuits to the user.

* refactored, needs more work on right justification

* Looks like this works for qiskit-terra issue #2802

* May fix first test failure for this pull request, while causing another?

* Draws conditionals on ClassicalRegister correctly now.

* - Occurs check for gate in gates leads to good test results.
- Added a few more self.maxDiff = None while debugging. Should they be pulled out?

* tabs and trailing spaces ;)

* removed the maxDiff's because they make the Style and lint test in Python 3.5 fail

* added tests
modified changelog

* Test case extended to include original issue reported in #2802

* oops, left a maxDiff=None in from testing. Fixed

* changes to utils.py requested by reviewer maddy-tod

* test cases split as requested by reviewer maddy-tod

* added circuit diagrams in comments to new tests

* removed note from changelog and made it a release note per @mtreinish

* made _LayerSpooler a private class

* Revert "Remove changelog and document automated creation (#3109)"

This reverts commit effad12.

* Make _LayerSpooler a subclass of list

The _LayerSpooler class was only ever used as list. While the class was
an independent type it basically just wrapped an internal list. THen
there were helper functions to access and manipulate that list. These
methods just duplicated what python already provides and the list class
itself already implements. This commit fixes this so the _LayerSpooler
itself is a subclass of list so when it's initialized you can just treat
it as the output list it was generating.

* Clean up release note, fix only, not prelude

* un reverted my revert of CONTRIBUTING.md

* refactored, needs more work on right justification

* Looks like this works for qiskit-terra issue #2802

* May fix first test failure for this pull request, while causing another?

* Draws conditionals on ClassicalRegister correctly now.

* - Occurs check for gate in gates leads to good test results.
- Added a few more self.maxDiff = None while debugging. Should they be pulled out?

* tabs and trailing spaces ;)

* removed the maxDiff's because they make the Style and lint test in Python 3.5 fail

* added tests
modified changelog

* Test case extended to include original issue reported in #2802

* oops, left a maxDiff=None in from testing. Fixed

* changes to utils.py requested by reviewer maddy-tod

* test cases split as requested by reviewer maddy-tod

* added circuit diagrams in comments to new tests

* removed note from changelog and made it a release note per @mtreinish

* made _LayerSpooler a private class

* Make _LayerSpooler a subclass of list

The _LayerSpooler class was only ever used as list. While the class was
an independent type it basically just wrapped an internal list. THen
there were helper functions to access and manipulate that list. These
methods just duplicated what python already provides and the list class
itself already implements. This commit fixes this so the _LayerSpooler
itself is a subclass of list so when it's initialized you can just treat
it as the output list it was generating.

* Clean up release note, fix only, not prelude

* put back missing section

* Add partial transpiler support for targeting ion trap backends. (#3122)

* handle reset/barrier/measure (#3130)

* Do not unroll an Rx,Ry,Rxx circuit to U3,CX because of measure. (#3140)

* Add global Molmer-Sorenson gate (#3149)

* add global ms gate

* clean up

* Update qiskit/extensions/standard/ms.py

Co-Authored-By: Kevin Krsulich <kevin@krsulich.net>

* Update qiskit/extensions/standard/ms.py

Co-Authored-By: Kevin Krsulich <kevin@krsulich.net>

* clean up

* Update qiskit/extensions/standard/ms.py

Co-Authored-By: Lauren Capelluto <laurencapelluto@gmail.com>

* Update MS docstring
faisaldebouni pushed a commit to faisaldebouni/qiskit-terra that referenced this issue Aug 5, 2020
* Remove changelog and document automated creation

With the introduction of the qiskit-bot release automation for terra we
no longer need to manually maintain or keep a changelog in repo. The
github release pages (which we were manually copy and pasting the
changelog into already) take the place of this file. For all future
releases the creation of this page is completely automatic and handled
by the bot. This works by using the git log and PR tags to figure out
which commits belong in the changelog summary. The commit msg summary
(the first line) is used for the changelog based on the tags. If a
longer explanation is necessary that should be handled in the reno
release notes.

Fixes Qiskit#3077

* Add README section on changelog

* Make tweaks to readme for clarity
faisaldebouni pushed a commit to faisaldebouni/qiskit-terra that referenced this issue Aug 5, 2020
* Add partial transpiler support for targeting ion trap backends. (Qiskit#3122)

* handle reset/barrier/measure (Qiskit#3130)

* Do not unroll an Rx,Ry,Rxx circuit to U3,CX because of measure. (Qiskit#3140)

* rebase ion-trap branch (Qiskit#3153)

* Remove changelog and document automated creation (Qiskit#3109)

* Remove changelog and document automated creation

With the introduction of the qiskit-bot release automation for terra we
no longer need to manually maintain or keep a changelog in repo. The
github release pages (which we were manually copy and pasting the
changelog into already) take the place of this file. For all future
releases the creation of this page is completely automatic and handled
by the bot. This works by using the git log and PR tags to figure out
which commits belong in the changelog summary. The commit msg summary
(the first line) is used for the changelog based on the tags. If a
longer explanation is necessary that should be handled in the reno
release notes.

Fixes Qiskit#3077

* Add README section on changelog

* Make tweaks to readme for clarity

* The option fig.tight_layout is triggering warnings in some situations so it is being removed (Qiskit#3123)

* no fig.tight_layout

* removing the rest of fig.tight_layout()

* check casteable types in Layout  (Qiskit#3100)

* test

* cast in insinstance

* style

* layouts are already layouts :)

* Travis CI: The sudo: tag is deprecated on Travis (Qiskit#3134)

https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration

* Fix a syntax error in QuantumCircuit.mirror. (Qiskit#3138)

* Fix for Qiskit#3106 gatefacecolor key on circuit diagrams (Qiskit#3137)

* Issue Qiskit#3106 gatefacecolor key has no effect on circuit diagrams

If the style property "gatefacecolor" is set to a different value than the default, this color is applied.

Fixes Qiskit#3106

* Solved style problem

space before : eliminated

* Update plot_state_hinton() formatting (Qiskit#3093)

Add axes to the image part. It looks like the image axes already exist for non-empty graphs. The change that I made here is to remove if np.any(dataimag != 0): if the desired behavior is to see the axes on graphs that don't contain any elements.

Replace rho with the latex rho

Use standard format for real and imag parts of rho

Fixes Qiskit#2321

* Set barrier across multi-qubits correctly (Qiskit#3042)

* Previously it was assumed that specified barrier has
  a single contiguous span across qubits. Qubits for the
  barrier need not be adjacent in the diagram. This commit
  handles this case by adding barrier across correct qubits.

* compute multiple short spans.

Fixes Qiskit#2918

* Test pulse clipping fix Osx Qiskit#1. (Qiskit#3144)

* Remove superfluous reference to timeslots from assemble_schedules (Qiskit#3139)

* Extend custom multiqubit gates over classical bits for mpl (Qiskit#3062)

* Got it to extend over the clasical bits

* Fixed a small bug

* Removed a file accidentally modified

* Fix linter

* Deprecate allowing extra keys in circuit drawer style dict (Qiskit#3105)

* test

* cast in insinstance

* style

* layouts are already layouts :)

* style['plotbarrier'] is being deprecated

* internal param for text drawer renamed to plot_barriers

* error when style contains unknown options

* better error message

* remove Qiskit#3100, since it was not my intention to be on it

* style

* remove plotbarrier

* unused import

* replace error with warning

* release note

* rochester_layout (Qiskit#3125)

* Use _append when args already converted and broadcast. (Qiskit#2936)

* Remove line in init which had been commented out (Qiskit#3150)

* Fix circuit drawing justification (Qiskit#3061)

Fixes Qiskit#2802

qiskit/visualization/utils.py _get_layered_instructions() was erroneous and did not justify left nor right correctly. I have reworked that code which underlies many visual representations of circuits to the user.

* refactored, needs more work on right justification

* Looks like this works for qiskit-terra issue Qiskit#2802

* May fix first test failure for this pull request, while causing another?

* Draws conditionals on ClassicalRegister correctly now.

* - Occurs check for gate in gates leads to good test results.
- Added a few more self.maxDiff = None while debugging. Should they be pulled out?

* tabs and trailing spaces ;)

* removed the maxDiff's because they make the Style and lint test in Python 3.5 fail

* added tests
modified changelog

* Test case extended to include original issue reported in Qiskit#2802

* oops, left a maxDiff=None in from testing. Fixed

* changes to utils.py requested by reviewer maddy-tod

* test cases split as requested by reviewer maddy-tod

* added circuit diagrams in comments to new tests

* removed note from changelog and made it a release note per @mtreinish

* made _LayerSpooler a private class

* Revert "Remove changelog and document automated creation (Qiskit#3109)"

This reverts commit effad12.

* Make _LayerSpooler a subclass of list

The _LayerSpooler class was only ever used as list. While the class was
an independent type it basically just wrapped an internal list. THen
there were helper functions to access and manipulate that list. These
methods just duplicated what python already provides and the list class
itself already implements. This commit fixes this so the _LayerSpooler
itself is a subclass of list so when it's initialized you can just treat
it as the output list it was generating.

* Clean up release note, fix only, not prelude

* un reverted my revert of CONTRIBUTING.md

* refactored, needs more work on right justification

* Looks like this works for qiskit-terra issue Qiskit#2802

* May fix first test failure for this pull request, while causing another?

* Draws conditionals on ClassicalRegister correctly now.

* - Occurs check for gate in gates leads to good test results.
- Added a few more self.maxDiff = None while debugging. Should they be pulled out?

* tabs and trailing spaces ;)

* removed the maxDiff's because they make the Style and lint test in Python 3.5 fail

* added tests
modified changelog

* Test case extended to include original issue reported in Qiskit#2802

* oops, left a maxDiff=None in from testing. Fixed

* changes to utils.py requested by reviewer maddy-tod

* test cases split as requested by reviewer maddy-tod

* added circuit diagrams in comments to new tests

* removed note from changelog and made it a release note per @mtreinish

* made _LayerSpooler a private class

* Make _LayerSpooler a subclass of list

The _LayerSpooler class was only ever used as list. While the class was
an independent type it basically just wrapped an internal list. THen
there were helper functions to access and manipulate that list. These
methods just duplicated what python already provides and the list class
itself already implements. This commit fixes this so the _LayerSpooler
itself is a subclass of list so when it's initialized you can just treat
it as the output list it was generating.

* Clean up release note, fix only, not prelude

* put back missing section

* Add partial transpiler support for targeting ion trap backends. (Qiskit#3122)

* handle reset/barrier/measure (Qiskit#3130)

* Do not unroll an Rx,Ry,Rxx circuit to U3,CX because of measure. (Qiskit#3140)

* Add global Molmer-Sorenson gate (Qiskit#3149)

* add global ms gate

* clean up

* Update qiskit/extensions/standard/ms.py

Co-Authored-By: Kevin Krsulich <kevin@krsulich.net>

* Update qiskit/extensions/standard/ms.py

Co-Authored-By: Kevin Krsulich <kevin@krsulich.net>

* clean up

* Update qiskit/extensions/standard/ms.py

Co-Authored-By: Lauren Capelluto <laurencapelluto@gmail.com>

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

Successfully merging a pull request may close this issue.

2 participants