Skip to content

Conversation

@jdkent
Copy link
Member

@jdkent jdkent commented Nov 20, 2025

closes #1202

in support of #1197

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +418 to +420
for key in ordered_keys:
descriptor = note_keys.get(key) or {}
note_type = descriptor.get("type")

Choose a reason for hiding this comment

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

P1 Badge Normalize legacy note_keys without crashing

Existing annotations store note_keys as simple key -> "string" mappings, but _normalize_note_keys now assumes each entry is a dict with .get. When a PUT or pipeline application calls this helper on a legacy annotation, descriptor becomes a bare string and descriptor.get("type") raises an AttributeError, turning the request into a 500 rather than normalizing the data. The function needs to accept the old string format as well as the new descriptor objects.

Useful? React with 👍 / 👎.

Copy link
Member Author

Choose a reason for hiding this comment

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

no, I'm just going to migrate the old format to the new format.

Copy link
Member Author

@jdkent jdkent left a comment

Choose a reason for hiding this comment

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

added a util to add numbers to the annotations. overall looks good.

# add notes to annotation
annot.note_keys = {
k: _check_type(v) for k, v in annotation_row._asdict().items()
k: {"type": _check_type(v) or "string", "order": idx}
Copy link
Member Author

Choose a reason for hiding this comment

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

check_type has a fallback to string

@jdkent jdkent merged commit 678b350 into master Nov 20, 2025
18 checks passed
@jdkent jdkent deleted the enh/annotation_order branch November 20, 2025 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No controllable way to order annotation columns

2 participants