Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-43173: Update to ruff linting and pydantic 2 #69

Merged
merged 6 commits into from
Mar 7, 2024

Conversation

jonathansick
Copy link
Member

@jonathansick jonathansick commented Mar 5, 2024

Codebase upgrades to Times Square prior to restarting development:

  • Lint and format codebase with modern Ruff
  • Update to Pydantic 2
  • Update to Python 3.12
  • Use Annotated for FastAPI path operations and Pydantic models.

Ruff replaces the combination of flake8, black, and isort.

While doing this we also upgraded dependencies and realized that
Pydantic would tick up to Pydantic 2, so all of these changes are
unfortunately happening at the same time.
@jonathansick jonathansick force-pushed the tickets/DM-43173 branch 2 times, most recently from d01a5e7 to fb5ea08 Compare March 7, 2024 21:04
This is the slightly more future-proof way of defining Fields, as
opposed to making the field the default value.

This may not be strictly necessary though?
It seems that Annotated doesn't work well with Pydantic SecretStr. For
now we'll convert these to just str and also require values (use foo
values for unit testing and set the enable_github_app config to false
for testing).
@jonathansick jonathansick marked this pull request as ready for review March 7, 2024 21:22
@jonathansick jonathansick merged commit 1d88a1e into main Mar 7, 2024
4 checks passed
@jonathansick jonathansick deleted the tickets/DM-43173 branch March 7, 2024 21:54
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.

None yet

1 participant