Skip to content

Add generic task config and activity#200

Merged
GianlucaFicarelli merged 4 commits into
mainfrom
add_generic_tasks
Mar 6, 2026
Merged

Add generic task config and activity#200
GianlucaFicarelli merged 4 commits into
mainfrom
add_generic_tasks

Conversation

@GianlucaFicarelli

@GianlucaFicarelli GianlucaFicarelli commented Mar 2, 2026

Copy link
Copy Markdown
Collaborator

Changes for openbraininstitute/entitycore#542

Besides adding TaskActivity and TaskConfig, this PR adds the context to the serialization functions, allowing to specify a different serialization depending on context.when: create, update, read.

This would allow to keep a single model, that can be serialized differently.
In many cases, entitycore would ignore additional attributes passed in the create or update requests, but they can now be filtered out in this way.
In this PR, this is applied to TaskConfig.inputs only, but it could be applied in other cases (including activities, to serialize used and generated)

EDIT: changed in the commit ff94fc5, now the serialization is done directly in serdes.py

@GianlucaFicarelli GianlucaFicarelli self-assigned this Mar 2, 2026
@codecov

codecov Bot commented Mar 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
pytest 99.94% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/entitysdk/_server_schemas.py 100.00% <100.00%> (ø)
src/entitysdk/models/__init__.py 100.00% <100.00%> (ø)
src/entitysdk/models/task_activity.py 100.00% <100.00%> (ø)
src/entitysdk/models/task_config.py 100.00% <100.00%> (ø)
src/entitysdk/route.py 100.00% <ø> (ø)
src/entitysdk/serdes.py 100.00% <100.00%> (ø)
src/entitysdk/types.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@GianlucaFicarelli GianlucaFicarelli merged commit 646aaf8 into main Mar 6, 2026
17 of 18 checks passed
@GianlucaFicarelli GianlucaFicarelli deleted the add_generic_tasks branch March 6, 2026 08:18
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