Skip to content

refactor: migrate fields to snake_case with alias#917

Draft
HeloiseJoffe wants to merge 3 commits into
DIRACGrid:mainfrom
HeloiseJoffe:refactor/snake-case-models-with-aliases
Draft

refactor: migrate fields to snake_case with alias#917
HeloiseJoffe wants to merge 3 commits into
DIRACGrid:mainfrom
HeloiseJoffe:refactor/snake-case-models-with-aliases

Conversation

@HeloiseJoffe
Copy link
Copy Markdown
Contributor

Closes #618

The FastAPI mapping is not blocking, since this can be handled correctly with the by_alias=True parameter.
I migrated the classes from diracx/core/models/job.py to snake_case with alias but not the other files from diracx/core/models/ because they are already in snake_case.

I also started working on other BaseModel usages still defined in PascalCase, including : diracx/cli/internal/legacy and diracx/core/config/schema.py
However, after re-reading the issue, I am unsure whether these should also be migrated as part of this scope.
In the issue the discussion is about the python models and the DB fields.
Could you confirm @aldbr the intended scope of #618 ?
Should all remaining BaseModel classes be migrated to snake_case + aliases for consistency? Or is the goal limited to models directly tied to DB field mapping ?

@HeloiseJoffe HeloiseJoffe changed the title Refactor: Migrate fields to snake_case with alias refactor: Migrate fields to snake_case with alias May 19, 2026
@HeloiseJoffe HeloiseJoffe changed the title refactor: Migrate fields to snake_case with alias refactor: migrate fields to snake_case with alias May 19, 2026
@HeloiseJoffe HeloiseJoffe force-pushed the refactor/snake-case-models-with-aliases branch from 996b067 to 7fa7c14 Compare June 1, 2026 08:20
@read-the-docs-community
Copy link
Copy Markdown

read-the-docs-community Bot commented Jun 1, 2026

@HeloiseJoffe HeloiseJoffe force-pushed the refactor/snake-case-models-with-aliases branch from 7fa7c14 to 8f93f08 Compare June 2, 2026 15:15
@HeloiseJoffe HeloiseJoffe force-pushed the refactor/snake-case-models-with-aliases branch from 8f93f08 to cc983b1 Compare June 3, 2026 06:17
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.

Need consistency in variable naming between DB fields and Python models

1 participant