Skip to content

Commit

Permalink
Merge pull request cvat-ai#7039 from opencv/release-2.8.0
Browse files Browse the repository at this point in the history
Release v2.8.0
  • Loading branch information
cvat-bot[bot] authored Oct 24, 2023
2 parents 56f527a + 5e771bb commit ef436e8
Show file tree
Hide file tree
Showing 72 changed files with 2,030 additions and 589 deletions.
109 changes: 109 additions & 0 deletions .github/workflows/finalize-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: Finalize release
on:
workflow_dispatch:
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Discover pending release
id: discover
env:
GH_TOKEN: "${{ github.token }}"
run: |
gh --repo="${{ github.repository }}" \
pr list --base master --state open --json number,headRefName \
--jq 'map(select(.headRefName | startswith("release-")))' \
> /tmp/release-prs.json
if jq -e 'length < 1' /tmp/release-prs.json > /dev/null; then
echo "No open release pull requests found."
exit 1
elif jq -e 'length > 1' /tmp/release-prs.json > /dev/null; then
echo "Multiple open release pull requests found:"
jq -r '.[] | "https://github.com/${{ github.repository }}/pull/\(.number)"' /tmp/release-prs.json
exit 1
fi
jq -r '.[] | "prNumber=\(.number)", "version=\(.headRefName | ltrimstr("release-"))"' \
/tmp/release-prs.json >> "$GITHUB_OUTPUT"
# When you use the default github.token to make changes in the repository,
# it does not trigger further GitHub pipelines. We want to trigger CI for
# the pull request and artifact building for the release, so we have to use
# an app token.
- name: Generate authentication token
id: gen-token
uses: actions/create-github-app-token@v1
with:
app-id: "${{ secrets.CVAT_BOT_APP_ID }}"
private-key: "${{ secrets.CVAT_BOT_PRIVATE_KEY }}"

- name: Install dependencies
run:
sudo apt-get install -y pandoc

- uses: actions/checkout@v4
with:
ref: "release-${{ steps.discover.outputs.version }}"

- name: Verify that the release is new
env:
NEW_VERSION: "${{ steps.discover.outputs.version }}"
run: |
if git ls-remote --exit-code origin "refs/tags/v$NEW_VERSION" > /dev/null; then
echo "Release v$NEW_VERSION already exists"
exit 1
fi
# Do post-release tasks before publishing the release. If anything goes wrong,
# the dev-release-* branch can be deleted, and the whole process restarted again;
# whereas we can't unmerge the release PR.

- name: Create post-release branch
run:
git checkout -b "dev-release-${{ steps.discover.outputs.version }}"

- name: Bump version
run:
./dev/update_version.py --minor

- name: Commit post-release changes
run: |
git -c user.name='cvat-bot[bot]' -c user.email='147643061+cvat-bot[bot]@users.noreply.github.com' \
commit -a -m "Update ${{ github.ref_name }} after v${{ steps.discover.outputs.version }}"
- name: Push post-release branch
run:
git push -u origin "dev-release-${{ steps.discover.outputs.version }}"

- name: Create post-release pull request
env:
GH_TOKEN: "${{ steps.gen-token.outputs.token }}"
run: |
gh pr create \
--base="${{ github.ref_name }}" \
--title="Update ${{ github.ref_name }} after v${{ steps.discover.outputs.version }}" \
--body=""
# Now publish the release.

- name: Merge release pull request
env:
GH_TOKEN: "${{ steps.gen-token.outputs.token }}"
run:
gh pr merge --merge "${{ steps.discover.outputs.prNumber }}" --delete-branch

- name: Create release
env:
GH_TOKEN: "${{ steps.gen-token.outputs.token }}"
NEW_VERSION: "${{ steps.discover.outputs.version }}"
run: |
# We could grab the release notes from the PR description, but it could
# be outdated if any changes were made on the release branch. So instead,
# just re-extract them from the changelog again.
./dev/gh_release_notes.sh \
| gh release create "v$NEW_VERSION" \
--target=master \
--title="v$NEW_VERSION" \
--notes-file=-
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ jobs:
- name: Verify version consistency
run: ./dev/update_version.py --verify-current

- name: Check changelog fragments
run: ./dev/check_changelog_fragments.py

- name: CVAT server. Getting cache from the default branch
uses: actions/cache@v3
with:
Expand Down
27 changes: 21 additions & 6 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,20 @@ jobs:
exit 1
fi
# When you use the default github.token to make changes in the repository,
# it does not trigger further GitHub pipelines. We want to trigger CI for
# the pull request, so we have to use an app token.
- name: Generate authentication token
id: gen-token
uses: actions/create-github-app-token@v1
with:
app-id: "${{ secrets.CVAT_BOT_APP_ID }}"
private-key: "${{ secrets.CVAT_BOT_PRIVATE_KEY }}"

- name: Install dependencies
run:
sudo apt-get install -y pandoc

- uses: actions/checkout@v4

- name: Verify that the release is new
Expand All @@ -42,7 +56,7 @@ jobs:

- name: Commit release preparation changes
run: |
git -c user.name='github-actions[bot]' -c user.email='github-actions[bot]@users.noreply.github.com' \
git -c user.name='cvat-bot[bot]' -c user.email='147643061+cvat-bot[bot]@users.noreply.github.com' \
commit -a -m "Prepare release v${{ inputs.newVersion }}"
- name: Push release branch
Expand All @@ -51,9 +65,10 @@ jobs:

- name: Create release pull request
env:
GH_TOKEN: "${{ github.token }}"
GH_TOKEN: "${{ steps.gen-token.outputs.token }}"
run: |
gh pr create \
--base=master \
--title="Release v${{ inputs.newVersion }}" \
--body="$(awk '/^## / { hn += 1; next } hn == 1 && !/^</' CHANGELOG.md)"
./dev/gh_release_notes.sh \
| gh pr create \
--base=master \
--title="Release v${{ inputs.newVersion }}" \
--body-file=-
3 changes: 1 addition & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -527,8 +527,7 @@
"server: RQ - scheduler",
"server: RQ - quality reports",
"server: RQ - analytics reports",
"server: RQ - cleaning",
"server: git",
"server: RQ - cleaning"
]
}
]
Expand Down
69 changes: 65 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,66 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

<!-- scriv-insert-here -->

<a id='changelog-2.8.0'></a>

## \[2.8.0\] - 2023-10-23

### Added

- A new feature allowing users to invite others to the organization via email.
(<https://github.com/opencv/cvat/pull/6901>)

- \[SDK\] In the SDK, a parameter has been introduced to `TaskDataset`
which enables the option to disable annotation loading
(<https://github.com/opencv/cvat/pull/7019>)

- A test has been incorporated for retrieving bucket content in
cases where the bucket includes manually created directories.
(<https://github.com/opencv/cvat/pull/7018>)

### Changed

- The maximum length of the secret access key has been
increased to 64 characters.
(<https://github.com/opencv/cvat/pull/6701>)

- The client will no longer load all organizations upon start
(<https://github.com/opencv/cvat/pull/7004>)

- The default value for Zookeeper from the
Clickhouse subchart has been set to disabled.
(<https://github.com/opencv/cvat/pull/7003>)

### Removed

- The endpoints `/api/projects`, `/api/tasks`, and `/api/jobs`
will no longer return information regarding the count of labels.
This information was complicating SQL queries,
making them hard to optimize.
Instead, use `/api/labels?task_id=tid` or `/api/labels?project_id=pid`.
(<https://github.com/opencv/cvat/pull/6918>)

### Fixed

- Issues causing potential double-sized file writes during task
data uploading have been addressed.
(<https://github.com/opencv/cvat/pull/6952>)

- Issues encountered when retrieving CS content from GCS
buckets containing manually created directories have been resolved.
(<https://github.com/opencv/cvat/pull/7006>)

- \[SDK\] In the SDK, `cvat_sdk.auto_annotation.annotate_task`
has been optimized to avoid unnecessary fetching of
existing annotations.
(<https://github.com/opencv/cvat/pull/7019>)

- The project/task/job update time is now correctly
modified upon label updates.
(<https://github.com/opencv/cvat/pull/6958>)

<a id='changelog-2.7.6'></a>

## \[2.7.6\] - 2023-10-13

### Changed
Expand All @@ -29,7 +88,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Supervisord (<https://github.com/opencv/cvat/pull/6945>):
- added `autorestart=true` option for all workers
- unified program names to use dashes as delimiter instead of mixed '_' and '-'
- unified program names to use dashes as delimiter instead of mixed '\_' and '-'
- minor improvements to supervisor configurations

### Removed
Expand Down Expand Up @@ -75,6 +134,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
(<https://github.com/opencv/cvat/pull/6992>)

<a id='changelog-2.7.5'></a>

## \[2.7.5\] - 2023-10-09

### Added
Expand All @@ -83,6 +143,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
(<https://github.com/opencv/cvat/pull/6965>)

<a id='changelog-2.7.4'></a>

## \[2.7.4\] - 2023-10-06

### Added
Expand Down Expand Up @@ -111,11 +172,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- PCD files with nan values could not be opened on 3D workspace
(<https://github.com/opencv/cvat/pull/6862>)
(<https://github.com/opencv/cvat/pull/6862>)
- Fixed direct navigation to neightbour chunk on 3D workspace
(<https://github.com/opencv/cvat/pull/6862>)
(<https://github.com/opencv/cvat/pull/6862>)
- Intencity level from .bin lidar data ignored when converting .bin -> .pcd
(<https://github.com/opencv/cvat/pull/6862>)
(<https://github.com/opencv/cvat/pull/6862>)
- Incorrectly determined video frame count when the video contains an MP4 edit list
(<https://github.com/opencv/cvat/pull/6929>)
- Internal server error when retrieving data from CS and cache=True
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ questions and get our support.
- [Intel AI blog: New Computer Vision Tool Accelerates Annotation of Digital Images and Video](https://www.intel.ai/introducing-cvat)
- [Intel Software: Computer Vision Annotation Tool: A Universal Approach to Data Annotation](https://software.intel.com/en-us/articles/computer-vision-annotation-tool-a-universal-approach-to-data-annotation)
- [VentureBeat: Intel open-sources CVAT, a toolkit for data labeling](https://venturebeat.com/2019/03/05/intel-open-sources-cvat-a-toolkit-for-data-labeling/)
- [How to Use CVAT (Roboflow guide)](https://blog.roboflow.com/cvat/)
- [How to auto-label data in CVAT with one of 50,000+ models on Roboflow Universe](https://blog.roboflow.com/how-to-use-roboflow-models-in-cvat/)

<!-- prettier-ignore-start -->
<!-- Badges -->
Expand Down
2 changes: 1 addition & 1 deletion cvat-cli/requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
cvat-sdk~=2.7.6
cvat-sdk~=2.8.0
Pillow>=10.0.1
setuptools>=65.5.1 # not directly required, pinned by Snyk to avoid a vulnerability
2 changes: 1 addition & 1 deletion cvat-cli/src/cvat_cli/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "2.7.6"
VERSION = "2.8.0"
31 changes: 29 additions & 2 deletions cvat-core/src/api-implementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,13 @@ export default function implementAPI(cvat) {
return cloudStorages;
};

cvat.organizations.get.implementation = async () => {
const organizationsData = await serverProxy.organizations.get();
cvat.organizations.get.implementation = async (filter) => {
checkFilter(filter, {
search: isString,
filter: isString,
});

const organizationsData = await serverProxy.organizations.get(filter);
const organizations = organizationsData.map((organizationData) => new Organization(organizationData));
return organizations;
};
Expand All @@ -341,6 +346,28 @@ export default function implementAPI(cvat) {
};
};

cvat.organizations.acceptInvitation.implementation = async (
username,
firstName,
lastName,
email,
password,
userConfirmations,
key,
) => {
const orgSlug = await serverProxy.organizations.acceptInvitation(
username,
firstName,
lastName,
email,
password,
userConfirmations,
key,
);

return orgSlug;
};

cvat.webhooks.get.implementation = async (filter) => {
checkFilter(filter, {
page: isInteger,
Expand Down
17 changes: 15 additions & 2 deletions cvat-core/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ function build() {
},
},
organizations: {
async get() {
const result = await PluginRegistry.apiWrapper(cvat.organizations.get);
async get(filter = {}) {
const result = await PluginRegistry.apiWrapper(cvat.organizations.get, filter);
return result;
},
async activate(organization) {
Expand All @@ -271,6 +271,19 @@ function build() {
const result = await PluginRegistry.apiWrapper(cvat.organizations.deactivate);
return result;
},
async acceptInvitation(username, firstName, lastName, email, password, userConfirmations, key) {
const result = await PluginRegistry.apiWrapper(
cvat.organizations.acceptInvitation,
username,
firstName,
lastName,
email,
password,
userConfirmations,
key,
);
return result;
},
},
webhooks: {
async get(filter: any) {
Expand Down
Loading

0 comments on commit ef436e8

Please sign in to comment.