Skip to content

Add print_version and replace_version to module.py #4399

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

Merged
merged 11 commits into from
Aug 11, 2021

Conversation

balopat
Copy link
Contributor

@balopat balopat commented Aug 10, 2021

Adds print_version and replace_version to dev_tools/modules.py.

This helps with #4129 - automating releases.

@balopat balopat requested review from cduck, vtomole and a team as code owners August 10, 2021 03:28
@balopat balopat requested a review from dstrain115 August 10, 2021 03:28
@google-cla google-cla bot added the cla: yes Makes googlebot stop complaining. label Aug 10, 2021
@balopat balopat requested review from MichaelBroughton and removed request for dstrain115 August 10, 2021 03:30
@balopat
Copy link
Contributor Author

balopat commented Aug 10, 2021

@MichaelBroughton - in preparation for our v0.12 release.

@balopat balopat changed the title Add module version utilities Add print_version and replace_version to module.py Aug 10, 2021
Copy link
Collaborator

@MichaelBroughton MichaelBroughton left a comment

Choose a reason for hiding this comment

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

LGTM



def _validate_version(new_version: str):
if not re.match(r"\d+\.\d+\.\d+(\.dev)?", new_version):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider using regex from here: https://semver.org/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, cool, didn't know about it - however, interestingly it doesn't seem to match 1.2.3.dev

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does match 1.2.3-dev...hmmm...

@balopat balopat added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Aug 10, 2021
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Aug 10, 2021
@CirqBot
Copy link
Collaborator

CirqBot commented Aug 10, 2021

Automerge cancelled: A required status check is not present.

Missing statuses: ['Build docs', 'Build protos', 'Changed files test', 'Coverage check', 'Doc test', 'Format check', 'Lint check', 'Misc check', 'Notebook formatting', 'Pytest MacOS (3.7)', 'Pytest MacOS (3.8)', 'Pytest MacOS (3.9)', 'Pytest Ubuntu (3.7)', 'Pytest Ubuntu (3.8)', 'Pytest Ubuntu (3.9)', 'Pytest Windows (3.7)', 'Pytest Windows (3.8)', 'Pytest Windows (3.9)', 'Type check', 'Typescript lint check', 'Typescript tests', 'Typescript tests coverage']

@CirqBot CirqBot removed automerge Tells CirqBot to sync and merge this PR. (If it's running.) front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. labels Aug 10, 2021
@balopat balopat added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Aug 10, 2021
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Aug 10, 2021
@CirqBot
Copy link
Collaborator

CirqBot commented Aug 10, 2021

Automerge cancelled: A required status check is not present.

Missing statuses: ['Build docs', 'Build protos', 'Changed files test', 'Coverage check', 'Doc test', 'Format check', 'Lint check', 'Misc check', 'Notebook formatting', 'Pytest MacOS (3.7)', 'Pytest MacOS (3.8)', 'Pytest MacOS (3.9)', 'Pytest Ubuntu (3.7)', 'Pytest Ubuntu (3.8)', 'Pytest Ubuntu (3.9)', 'Pytest Windows (3.7)', 'Pytest Windows (3.8)', 'Pytest Windows (3.9)', 'Type check', 'Typescript lint check', 'Typescript tests', 'Typescript tests coverage']

@CirqBot CirqBot removed the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Aug 10, 2021
@CirqBot CirqBot removed the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Aug 10, 2021
@balopat balopat added this to the v0.12 milestone Aug 10, 2021
@balopat balopat added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Aug 11, 2021
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Aug 11, 2021
@CirqBot CirqBot merged commit 10c78c9 into quantumlib:master Aug 11, 2021
@CirqBot CirqBot removed automerge Tells CirqBot to sync and merge this PR. (If it's running.) front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. labels Aug 11, 2021
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
Adds print_version and replace_version to dev_tools/modules.py.

This helps with quantumlib#4129 - automating releases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Makes googlebot stop complaining.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants