From ae5d9b240d747d2b32f78aa875bf268c1cdc6ed6 Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Fri, 22 Nov 2024 17:27:02 +0200 Subject: [PATCH] check_changelog_fragments.py: ensure that non-header lines begin with a dash or spaces (#8734) This protects against developers accidentally erasing the dash in line 1 of the list item, as well as not indenting lines 2+. Fix all such mistakes in the current changelog. --- CHANGELOG.md | 53 ++++++++++++++++++-------------- dev/check_changelog_fragments.py | 31 +++++++++++++------ 2 files changed, 52 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd8854040e02..c1c65844cd40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -87,7 +87,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 () - Tags in ground truth job couldn't be deleted via `x` button - () + () - Exception 'Canvas is busy' when change frame during drag/resize a track () @@ -377,7 +377,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deprecated - Client events `upload:annotations`, `lock:object`, `change:attribute`, `change:label` - () + () ### Removed @@ -404,7 +404,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 () - Sometimes it is not possible to switch workspace because active control broken after -trying to create a tag with a shortcut () + trying to create a tag with a shortcut + () ## \[2.16.3\] - 2024-08-13 @@ -445,13 +446,14 @@ trying to create a tag with a shortcut () + **Asset is already related to another guide** + () - Undo can't be done when a shape is rotated () - Exporting a skeleton track in a format defined for shapes raises error -`operands could not be broadcast together with shapes (X, ) (Y, )` + `operands could not be broadcast together with shapes (X, ) (Y, )` () - Delete label modal window does not have cancellation button @@ -470,10 +472,11 @@ trying to create a tag with a shortcut () - API call to run automatic annotations fails on a model with attributes - when mapping not provided in the request () + when mapping not provided in the request + () - Fixed a label collision issue where labels with similar prefixes -and numeric suffixes could conflict, causing error on export. + and numeric suffixes could conflict, causing error on export. () @@ -510,9 +513,9 @@ and numeric suffixes could conflict, causing error on export. ### Added - Set of features to track background activities: importing/exporting datasets, annotations or backups, creating tasks. -Now you may find these processes on Requests page, it allows a user to understand current status of these activities -and enhances user experience, not losing progress when the browser tab is closed -() + Now you may find these processes on Requests page, it allows a user to understand current status of these activities + and enhances user experience, not losing progress when the browser tab is closed + () - User now may update a job state from the corresponding task page () @@ -523,7 +526,8 @@ and enhances user experience, not losing progress when the browser tab is closed ### Changed - "Finish the job" button on annotation view now only sets state to 'completed'. - The job stage keeps unchanged () + The job stage keeps unchanged + () - Log files for individual backend processes are now stored in ephemeral storage of each backend container rather than in the `cvat_logs` volume @@ -535,7 +539,7 @@ and enhances user experience, not losing progress when the browser tab is closed ### Removed - Renew the job button in annotation menu was removed - () + () ### Fixed @@ -583,10 +587,12 @@ and enhances user experience, not losing progress when the browser tab is closed () - Exception 'this.el.node.getScreenCTM() is null' occuring in Firefox when -a user resizes window during skeleton dragging/resizing () + a user resizes window during skeleton dragging/resizing + () - Exception 'Edge's nodeFrom M or nodeTo N do not to refer to any node' -occuring when a user resizes window during skeleton dragging/resizing () + occuring when a user resizes window during skeleton dragging/resizing + () - Slightly broken layout when running attributed face detection model () @@ -644,7 +650,8 @@ occuring when a user resizes window during skeleton dragging/resizing () - When use route `/auth/login-with-token/` without `next` query parameter -the page reloads infinitely () + the page reloads infinitely + () - Fixed kvrocks port naming for istio () @@ -815,7 +822,7 @@ the page reloads infinitely () - Opening update CS page sends infinite requests when CS id does not exist () -Uploading files with TUS immediately failed when one of the requests failed +- Uploading files with TUS immediately failed when one of the requests failed () - Longer analytics report calculation because of inefficient requests to analytics db @@ -985,7 +992,7 @@ Uploading files with TUS immediately failed when one of the requests failed () - 90 deg-rotated video was added with "Prefer Zip Chunks" disabled -was warped, fixed using the static cropImage function. + was warped, fixed using the static cropImage function. () @@ -1023,7 +1030,7 @@ was warped, fixed using the static cropImage function. ### Added - Single shape annotation mode allowing to easily annotate scenarious where a user -only needs to draw one object on one image () + only needs to draw one object on one image () ### Fixed @@ -1151,7 +1158,7 @@ only needs to draw one object on one image () - \[Compose, Helm\] Updated Clickhouse to version 23.11.* @@ -1200,11 +1207,11 @@ longer accepted automatically. Instead, the invitee can now review the invitatio () - Error message `Edge's nodeFrom ${dataNodeFrom} or nodeTo ${dataNodeTo} do not to refer to any node` - when upload a file with some abscent skeleton nodes () + when upload a file with some abscent skeleton nodes () - Wrong context menu position in skeleton configurator (Firefox only) - () + () - Fixed console error `(Error: attribute width: A negative value is not valid` - appearing when skeleton with all outside elements is created () + appearing when skeleton with all outside elements is created () - Updating cloud storage attached to CVAT using Azure connection string () @@ -1215,7 +1222,7 @@ longer accepted automatically. Instead, the invitee can now review the invitatio ### Added - Introduced CVAT actions. Actions allow performing different - predefined scenarios on annotations automatically (e.g. shape converters) + predefined scenarios on annotations automatically (e.g. shape converters) () - The UI will now retry requests that were rejected due to rate limiting diff --git a/dev/check_changelog_fragments.py b/dev/check_changelog_fragments.py index e837842efaf0..437e3fb02cdb 100755 --- a/dev/check_changelog_fragments.py +++ b/dev/check_changelog_fragments.py @@ -29,15 +29,28 @@ def complain(message): for fragment_path in REPO_ROOT.glob("changelog.d/*.md"): with open(fragment_path) as fragment_file: for line_index, line in enumerate(fragment_file): - if not line.startswith(md_header_prefix): - # The first line should be a header, and all headers should be of appropriate level. - if line_index == 0 or line.startswith("#"): - complain(f"line should start with {md_header_prefix!r}") - continue - - category = line.removeprefix(md_header_prefix).strip() - if category not in categories: - complain(f"unknown category: {category}") + line = line.rstrip("\n") + + if line_index == 0: + # The first line should always be a header. + if not line.startswith("#"): + complain("line should be a header") + elif ( + line + and not line.startswith("#") + and not line.startswith("-") + and not line.startswith(" ") + ): + complain("line should be a header, a list item, or indented") + + if line.startswith("#"): + if line.startswith(md_header_prefix): + category = line.removeprefix(md_header_prefix).strip() + if category not in categories: + complain(f"unknown category: {category}") + else: + # All headers should be of the same level. + complain(f"header should start with {md_header_prefix!r}") sys.exit(0 if success else 1)