Skip to content

Conversation

@jotonedev
Copy link
Owner

  • Removed pydantic
  • Reduced the number and sizes of the dependencies

@github-actions
Copy link

github-actions bot commented Sep 13, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
538 530 99% 0% 🟢

New Files

File Coverage Status
ctftime_api/models/country.py 100% 🟢
TOTAL 100% 🟢

Modified Files

File Coverage Status
ctftime_api/client.py 90% 🟢
ctftime_api/models/duration.py 100% 🟢
ctftime_api/models/event.py 100% 🟢
ctftime_api/models/rating.py 100% 🟢
ctftime_api/models/team.py 100% 🟢
ctftime_api/models/vote.py 100% 🟢
tests/test_client.py 100% 🟢
TOTAL 99% 🟢

updated for commit: 81c264c by action🐍

@jotonedev jotonedev requested a review from Copilot September 13, 2025 19:17
@jotonedev jotonedev added enhancement New feature or request python Pull requests that update python code labels Sep 13, 2025
@jotonedev jotonedev self-assigned this Sep 13, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the models by replacing Pydantic with dataclasses and dataclasses-json, removing several dependencies to reduce package size and complexity.

  • Migrated all model classes from Pydantic BaseModel to frozen dataclasses with dataclasses-json
  • Replaced pydantic-extra-types CountryAlpha2 with a custom CountryCode enum
  • Updated all model instantiation calls from model_validate() to from_dict()

Reviewed Changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pyproject.toml Updated dependencies to remove pydantic and add dataclasses-json, bumped version to 0.2.0
tests/test_client.py Updated test assertions to use new field names (team_id, team_name) instead of aliased names
ctftime_api/models/*.py Converted all models from Pydantic to dataclasses with dataclasses-json mixins
ctftime_api/models/country.py Added custom CountryCode enum to replace pydantic-extra-types dependency
ctftime_api/client.py Updated model instantiation calls and import statements for the new model structure
Comments suppressed due to low confidence (1)

pyproject.toml:17

  • The classifier 'Framework :: Pydantic' should be removed since Pydantic is no longer used in this project.
    "Framework :: Pydantic",

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@jotonedev jotonedev merged commit 8b02e3a into main Sep 13, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant