Skip to content

Adds semantic versioning and release publishing#39

Merged
srinivas212 merged 8 commits intomlcommons:mainfrom
AlexandruAntonescuKeysight:version_update_release_publish
May 17, 2024
Merged

Adds semantic versioning and release publishing#39
srinivas212 merged 8 commits intomlcommons:mainfrom
AlexandruAntonescuKeysight:version_update_release_publish

Conversation

@AlexandruAntonescuKeysight
Copy link
Copy Markdown
Contributor

Summary

This PR is intended to enhance the CI pipeline and simplify the modules calling. It has the following additions:

A new workflow file was created for versioning task and it contains the following:

  1. installs protolock for backward compatibility checking
  2. adds semantic versioning and backward compatibility checking
  • a few files have been added: VERSION, version.py, proto.lock

    • VERSION contains the version (major.minor.patch) in plain text; it is necessary for manually updating the major and dynamic version retrieval in pyproject.toml when installing with pip
    • proto.lock is a file generated by running the command protolock init (only once, after that when there are modification it is ran protolock commit); this tool is used for checking protobuff backward compatibility
    • version.py is a python script that checks if backward compatibility is broken by calling protolock status and if so, the minor version is incremented, otherwise the patch number is incremented. Also, it manages the incrementing step of the version and also updates the VERSION file with the new version
  • the pyproject.toml was also updated to dynamically read the version from the VERSION file when building or installing

  • also after the version is updated, a commit is made for submitting the new VERSION and proto.lock files to the repo

  • the previous commit is done by an action and the commiter is actions-user. Because of this, actions-user was added to the allow list in the CLA-bot workflow

  1. adds steps for publishing the release on the main project page under the Releases section
  2. adds steps for building a python wheel of the project and publishing it to the assets section of the last added release

Test Plan

I've tested this by locally running version.py script after randomly making changes to the proto (to check if protolock is working fine).
Also, I've made test branches on my fork and on Dan's to see if the workflows are working good on github runners.

@AlexandruAntonescuKeysight AlexandruAntonescuKeysight requested a review from a team as a code owner April 12, 2024 15:37
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 12, 2024

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@TaekyungHeo
Copy link
Copy Markdown
Contributor

TaekyungHeo commented Apr 15, 2024

Short Summary: This PR has been thoroughly tested by Dan and @AlexandruAntonescuKeysight. It automatically increases the minor version of semantic versioning when there is a minor change in the protobuf definition. The major version should be updated manually.

cc: @srinivas212

@AlexandruAntonescuKeysight AlexandruAntonescuKeysight force-pushed the version_update_release_publish branch from 69c62ee to 40a32dd Compare May 15, 2024 16:25
.gitignore Outdated
*.et
*.dot
.pyre
.vscode/ No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nit seems a bit user editor specific

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've removed it

@briancoutinho
Copy link
Copy Markdown

Looks good (y)
QQ @AlexandruAntonescuKeysight what happens when we increment major version, then the code need to not be compatible with previous minor, it was not clear how to do that with version.py

@danmih-ixia
Copy link
Copy Markdown

Looks good (y) QQ @AlexandruAntonescuKeysight what happens when we increment major version, then the code need to not be compatible with previous minor, it was not clear how to do that with version.py

Major version is only incremented manually. version.py does not increment it.

Copy link
Copy Markdown
Contributor

@srinivas212 srinivas212 left a comment

Choose a reason for hiding this comment

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

lgtm. Thank you for your contributions @AlexandruAntonescuKeysight!

@srinivas212 srinivas212 merged commit 946834d into mlcommons:main May 17, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants