Skip to content

feat(core): feeder model proposal - #1144

Merged
chrisburr merged 3 commits into
DIRACGrid:mainfrom
amaltaro:feat/1082-1-core
Nov 5, 2026
Merged

chrisburr merged 3 commits into
DIRACGrid:mainfrom
amaltaro:feat/1082-1-core

Conversation

@amaltaro

@amaltaro amaltaro commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Partially fixes #1082 (part 1/5)
Superseds #1143
Waiting on the convergence of hashing in #1154

This pull request contains diracx-core-only changes. In summary:

  • Feeder core model:
    • FeederInput: minimum schema for an input data
    • SetFeederState: schema for a Feeder state (bookmark)
    • NoMoreFeederInputs: model to disable a Feeder

@amaltaro amaltaro changed the title feat(core): feeder models and InputHash feat(core): feeder model proposal Nov 3, 2026
RESOURCES = "diracx.resources"
SERVICES = "diracx.services"
LOCK_OBJECT_TYPES = "diracx.lock_object_types"
FEEDERS = "diracx.transformations.feeders"

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.

I'm not sure about transformations vs transformation.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I can change it to transformation, but honestly, I don't even understand where it comes from. Is it supposed to match a python package somewhere?

Note that diracx-{core,db,logic,tasks,routers} have different patterns, sometimes the package is plural, others it is singular.

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.

It gets used in the pyproject.toml files like: https://github.com/DIRACGrid/diracx/pull/1152/changes#diff-c6028abbeae6cf51d340ddfa1fe61e27d0ac47e8f941ce5db1d4e3cb95f2476f

It's an arbitrary string that just needs to be:

  • vaguely readable
  • unique

We seem to be settling into a namespace like layout with . to separate levels, starting with diracx. I guess we could go for only having two levels like:

diracx.feeders

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd go for diracx.transformation.feeders.

I don't like diracx.feeders because we may come up one day with a concept close to the feeder for something unrelated to transformation

I like the singular in transformation because we are talking about the system (not the multiple transformations we will create), while the plural of feeders makes it clear that you are having multiple feeder for that one system.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

And btw, while we are at it, I would avoid just FEEDER for the same reason

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah-ha, so DiracEntryPoint class and the project.entry-points in diracx-logic needs to match.

If we want to avoid a big transformation namespace, another approach could be to use TS_FEEDER, diracx.ts_feeders and so on.

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.

I've moved this to #1171

feat(core): feeder models proposal

feat(core): feeder model
@amaltaro
amaltaro requested a review from chrisburr November 4, 2026 21:00
@amaltaro
amaltaro marked this pull request as ready for review November 4, 2026 21:00
@amaltaro

amaltaro commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Thank you for the thorough review @chrisburr . I addressed your points in my second commit, and left two comments unresolved - in case follow up is needed. Thanks!


from pydantic import Field, JsonValue, model_validator

from .._base import BaseModel

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

in the packer proposal model this was imported as:

from pydantic import BaseModel

not sure if there is an actual difference, just noting it here since I'm going through all the PRs now.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

also noted by Chris in #1168 (comment)

RESOURCES = "diracx.resources"
SERVICES = "diracx.services"
LOCK_OBJECT_TYPES = "diracx.lock_object_types"
FEEDERS = "diracx.transformation.feeders"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Similar comment (maybe not strictly relevant to this PR): in #1149 the PACKER was not added to the DiracEntryPoint class, should it?

@chrisburr

Copy link
Copy Markdown
Member

I pushed a few unit test improvements but otherwise LGTM 👍

@chrisburr
chrisburr enabled auto-merge (squash) November 5, 2026 09:48
@chrisburr
chrisburr merged commit 266c1c2 into DIRACGrid:main Nov 5, 2026
36 checks passed
@chrisburr chrisburr mentioned this pull request Nov 5, 2026
3 tasks
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.

[Transformation System] Feeder

4 participants