Skip to content

display task tags - #56

Merged
woutdenolf merged 2 commits into
mainfrom
add_tags
Oct 22, 2026
Merged

woutdenolf merged 2 commits into
mainfrom
add_tags

Conversation

@woutdenolf

@woutdenolf woutdenolf commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

PR summary

AI Disclosure

  • AI tool claude used for all

🤖 Generated with Claude Code

@woutdenolf
woutdenolf marked this pull request as ready for review October 16, 2026 16:49
@woutdenolf
woutdenolf requested a review from a team October 16, 2026 16:49
@loichuder

Copy link
Copy Markdown
Member

I'd like to be able to review the filtering separately. Could you please separate the display and the filtering in two MR?

Also, it seems there is another change about deprecating example lists that is not mentioned in the MR description. Could you explain what is this about?

@woutdenolf

woutdenolf commented Oct 19, 2026 •

Copy link
Copy Markdown
Member Author

deprecating example lists

Indeed but it is the opposite: examples are lists (always have been) and now non-lists give a warning. Changelog describes it. PR description does not indeed.

@loichuder

Copy link
Copy Markdown
Member

Weird that Pydantic allows to use non-lists as examples. I think we should not allow it (i.e. no deprecation but a straight error)

@woutdenolf

Copy link
Copy Markdown
Member Author

Pydantic doesn't even complain when converting the model to a JSON schema

import json
from pydantic import BaseModel, Field


class User(BaseModel):
    name: str = Field(examples="someone")


print(json.dumps(User.model_json_schema(), indent=2))
{
  "properties": {
    "name": {
      "examples": "someone",
      "title": "Name",
      "type": "string"
    }
  },
  "required": [
    "name"
  ],
  "title": "User",
  "type": "object"
}

To compare

import json
from pydantic import BaseModel, Field


class User(BaseModel):
    name: str = Field(examples=["someone"])


print(json.dumps(User.model_json_schema(), indent=2))
{
  "properties": {
    "name": {
      "examples": [
        "someone"
      ],
      "title": "Name",
      "type": "string"
    }
  },
  "required": [
    "name"
  ],
  "title": "User",
  "type": "object"
}

Only this would raise an error

from jsonschema import Draft202012Validator
from pydantic import BaseModel, Field


class User(BaseModel):
    name: str = Field(examples="someone")


schema = User.model_json_schema()
Draft202012Validator.check_schema(schema)
Traceback (most recent call last):
  File "test.py", line 11, in <module>
    Draft202012Validator.check_schema(schema)
  File "python3.12/site-packages/jsonschema/validators.py", line 316, in check_schema
    raise exceptions.SchemaError.create_from(error)
jsonschema.exceptions.SchemaError: 'someone' is not of type 'array'

Failed validating 'type' in metaschema['allOf'][1]['properties']['properties']['additionalProperties']['$dynamicRef']['allOf'][4]['properties']['examples']:
    {'type': 'array', 'items': True}

On schema['properties']['name']['examples']:
    'someone'

See pydantic/pydantic#5135

@woutdenolf woutdenolf changed the title support task tags: display and filter display task tags Oct 21, 2026
@woutdenolf woutdenolf mentioned this pull request Oct 21, 2026
1 task done
@woutdenolf

Copy link
Copy Markdown
Member Author
  • Split as requested:
  • The examples change is now in its own PR: deprecate non-list examples #58
    • pydantic's Field(examples=...) expects a list of examples, but pydantic does not check it
    • tomwer passes a single dict (examples={"cpu_mem_fraction": 0.24, ...}) for platform_resources in its multicor/multipag models
    • TaskDescription validation failed on it, so discovery of all tomwer tasks failed when building the ewoksdoc task cache
    • ewokssphinx now wraps such a value in a list and emits a FutureWarning; it will become an error in a future release
    • tomwer is fixed separately

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@woutdenolf
woutdenolf requested a review from loichuder October 21, 2026 08:44

@loichuder loichuder left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just pushed a commit to tweak the doc. All good otherwise 👍

@woutdenolf
woutdenolf merged commit 08ff5dc into main Oct 22, 2026
9 checks passed
@woutdenolf
woutdenolf deleted the add_tags branch October 22, 2026 08:16
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.

2 participants