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

Version bump documentation #1768

Merged
merged 2 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/source/modules/submission.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Submission System
To submit a model or benchmark to the Brain-Score leaderboard, Brain-Score provides an automated submission system.
This allows us to publicly score new models on existing benchmarks and score existing models against new benchmarks.

.. image:: docs/source/modules/brainscore_submission.png
.. image:: brainscore_submission.png
:width: 400px
:align: center
:height: 200px
Expand Down
43 changes: 43 additions & 0 deletions docs/source/modules/version_bumping.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Version Bumping
===============

Brain-Score Vision now features an automated version bumping process that follows
`Semantic Versioning <https://semver.org/>`_ (MAJOR.MINOR.PATCH) and is triggered via a GitHub Action.
This ensures that any significant changes to the codebase lead to an appropriate version update.

How It Works
------------

1. **Pull Request Analysis:**
When a pull request (PR) is submitted, a GitHub Action (see the
`workflow file <https://github.com/brain-score/vision/blob/master/.github/workflows/bump_version.yml>`_)
analyzes the changes. If any files outside the plugin directories—namely, ``benchmarks``,
``data``, ``metrics``, and ``models``—are modified, the version bump process is initiated. Changes confined to
plugin directories are considered non-breaking and therefore do not necessitate a version increment.

2. **Determining the Bump Type:**
The type of version bump is determined by labels applied to the PR:

- **MAJOR:** Apply the ``major update`` label to trigger an increase in the major version.
- **MINOR:** Apply the ``minor update`` label to trigger an increase in the minor version.
- **PATCH:** If neither label is applied, the version will automatically increment the patch number.

3. **Version Increment and PR Creation:**
The tool `bump-my-version <https://github.com/callowayproject/bump-my-version>`_ uses the latest
version tag to calculate the new version number. After bumping the version, a new PR is automatically
created containing the updated version. This PR is auto-approved, undergoes status checks, and is then
merged automatically.

Version Releases
----------------

After the version is bumped, release notes are automatically generated. These notes include all commit
details since the previous version bump and can be viewed in the
`Releases section <https://github.com/brain-score/vision/releases>`_ of the repository.

PyPI Publishing
---------------

A version bump also triggers a publishing job that builds the new package and uploads it to PyPI.
You can always find the latest package available on PyPI at the
`PyPI project page <https://pypi.org/project/brainscore-vision/>`_.
Loading