Skip to content

Conversation

@guptadev21
Copy link
Member

✨ What’s new in this PR

  • 🆕 Added Pydantic models for SDK resources (like Packages, Deployments, Disks, etc.)
  • 🔄 Switched out the old JSONSchema validation for shiny new Pydantic validation
  • 📦 Any manifest you apply or fetch via API now gets checked against these models
  • 🛠️ Validation errors are now crystal clear, showing the exact field + reason (no more cryptic JSONSchema errors 🙌)

💡 Why this matters

  • JSONSchema errors = 😵‍💫 confusing & painful
  • Pydantic errors = 🪄 clean, human-readable, and developer-friendly
  • Makes SDK code easier to maintain + fewer “mystery bugs” slipping into production 🎯

resolves https://github.com/rapyuta-robotics/rapyuta_io/issues/922

@guptadev21 guptadev21 self-assigned this Sep 1, 2025
@guptadev21 guptadev21 requested review from a team as code owners September 1, 2025 12:07
@guptadev21 guptadev21 requested review from amitsingh21, ankitrgadiya and sharmayajush and removed request for a team and sharmayajush September 1, 2025 12:07
@guptadev21 guptadev21 force-pushed the feat/manifest-validation branch 7 times, most recently from 45143e6 to c186df2 Compare September 4, 2025 10:37
@guptadev21 guptadev21 force-pushed the feat/manifest-validation branch 3 times, most recently from 0f1d84e to 889383f Compare September 25, 2025 04:19
@guptadev21 guptadev21 requested a review from Copilot September 25, 2025 04:27

This comment was marked as outdated.

@guptadev21 guptadev21 force-pushed the feat/manifest-validation branch from 1f9e28d to 9af30e9 Compare September 29, 2025 15:59
@guptadev21 guptadev21 force-pushed the feat/manifest-validation branch from 4699832 to 6b4218f Compare October 31, 2025 11:40
@guptadev21 guptadev21 force-pushed the feat/manifest-validation branch from 9eca000 to d135e2b Compare November 18, 2025 11:54
- Added new models for Daemon, Deployment, Disk, ManagedService, Network, Organization, Package, Project, Secret, StaticRoute, and User.
- Introduced a new utils module for shared base classes and constants.
- Updated __init__.py to import all models directly into the main namespace.
- Enhanced validation logic in models using Pydantic's field validators and model validators.
- Bumped version to 0.3.0 to reflect the addition of new features and models.
- Removed unused imports and commented-out code in utils.py.
- Updated walk_pages and walk_pages_async functions to yield items directly instead of using Munch.
- Updated test cases in `test_network.py` to assert against `Network` and `NetworkList` models.
- Refactored `test_organization.py` to utilize `Organization` model for assertions.
- Changed assertions in `test_package.py` to validate against `Package` and `PackageList` models.
- Modified `test_project.py` to use `Project` and `ProjectList` models for response validation.
- Updated `test_secret.py` to assert against `Secret` and `SecretList` models.
- Refactored `test_staticroute.py` to validate responses using `StaticRoute` and `StaticRouteList` models.
- Changed `test_user.py` to assert against user model attributes instead of Munch.
- Improved mock data usage across tests for consistency and clarity.
@guptadev21 guptadev21 force-pushed the feat/manifest-validation branch from d135e2b to 2c282db Compare November 18, 2025 12:10
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.

3 participants