-
Notifications
You must be signed in to change notification settings - Fork 41
Fixing validation_process for GraphTemplate #292
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
Merged
Merged
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
f194648
Refactor verification functions in verify_graph.py to return error lists
NiveditJain f199b60
Enhance validation in NodeTemplate and GraphTemplate models
NiveditJain d61f3ab
Add root node and parent tracking to GraphTemplate model
NiveditJain 40218db
Refactor GraphTemplate model to enhance validation and structure
NiveditJain 8377710
Refactor imports in GraphTemplate model for clarity and organization
NiveditJain b3ee4b9
Add DependentString model and integrate into NodeTemplate and GraphTe…
NiveditJain b71e99e
Enhance RegisteredNode model with indexing and query methods
NiveditJain 8f32162
Refactor DependentString and verification functions for improved func…
NiveditJain 01c4bfc
tests are green
NiveditJain 2a9901a
Refactor models and verification functions for improved validation an…
NiveditJain 952c6c2
fixed comments by review bots
NiveditJain 10d288e
fixed all failing tests
NiveditJain 85f163b
Add comprehensive unit tests for CORS configuration and enqueue state…
NiveditJain f5d9c5c
Refactor GraphTemplate model to improve parent tracking logic
NiveditJain 9c04c73
Enhance GraphTemplate model's DFS logic for improved parent tracking
NiveditJain b421471
Refactor GraphTemplate model for improved parent tracking and error h…
NiveditJain bafbd20
fixed all failing tests
NiveditJain dc29709
Remove unit tests for CORS configuration
NiveditJain b1801a6
Update GraphTemplate model to initialize validation_errors as an empt…
NiveditJain 477cb71
Update test API key retrieval in integration tests
NiveditJain 08462b5
Refactor graph_template_model and update validation logic
NiveditJain a1adab9
added settings model to state-manager
NiveditJain efc7790
added settings model to state-manager
NiveditJain a5c8422
added settings model to state-manager
NiveditJain 25c3cc0
added more stuff to dockerignore
NiveditJain c478c47
added more stuff to dockerignore
NiveditJain 887a68b
fixed tests
NiveditJain e542b56
Add asgi-lifespan dependency and update integration tests
NiveditJain 0021770
Refactor test workflows and update test configurations
NiveditJain db806a5
fixed ruff
NiveditJain 29a9195
fix: increase health check retries for MongoDB in release workflow
NiveditJain bf40c70
refactor: remove MongoDB readiness check from CI workflows
NiveditJain ff53d5e
test if tests are working
NiveditJain 64b9368
fixed path
NiveditJain 7accfa5
fixing ruff checks
NiveditJain 8c8fe28
minor fixes
NiveditJain 48986e3
fix working of tests
NiveditJain 7f967f7
Enhance GraphTemplate model with path tracking and update tests
NiveditJain 882a88a
added more tests
NiveditJain 25d9623
Refactor GraphTemplate validation and enhance health API tests
NiveditJain a92d190
added more tests
NiveditJain b4074bf
fixed ruff checks
NiveditJain 531d6e7
Add unit tests for upsert_graph_template validation error handling
NiveditJain 426cdbc
Add unit tests for NodeTemplate validation and dependency resolution
NiveditJain b6f5829
Add unit tests for NodeTemplate validation and dependency resolution
NiveditJain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| import os | ||
| from pydantic import BaseModel, Field | ||
| from dotenv import load_dotenv | ||
|
|
||
| load_dotenv() | ||
NiveditJain marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| class Settings(BaseModel): | ||
| """Application settings loaded from environment variables.""" | ||
|
|
||
| # MongoDB Configuration | ||
| mongo_uri: str = Field(..., description="MongoDB connection URI" ) | ||
| mongo_database_name: str = Field(default="exosphere-state-manager", description="MongoDB database name") | ||
| state_manager_secret: str = Field(..., description="Secret key for API authentication") | ||
| secrets_encryption_key: str = Field(..., description="Key for encrypting secrets") | ||
|
|
||
| @classmethod | ||
| def from_env(cls) -> "Settings": | ||
| return cls( | ||
| mongo_uri=os.getenv("MONGO_URI"), # type: ignore | ||
| mongo_database_name=os.getenv("MONGO_DATABASE_NAME", "exosphere-state-manager"), # type: ignore | ||
| state_manager_secret=os.getenv("STATE_MANAGER_SECRET"), # type: ignore | ||
| secrets_encryption_key=os.getenv("SECRETS_ENCRYPTION_KEY"), # type: ignore | ||
| ) | ||
NiveditJain marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
| # Global settings instance - will be updated when get_settings() is called | ||
| _settings = None | ||
|
|
||
|
|
||
| def get_settings() -> Settings: | ||
| """Get the global settings instance, reloading from environment if needed.""" | ||
| global _settings | ||
| _settings = Settings.from_env() | ||
| return _settings | ||
NiveditJain marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
| # Initialize settings | ||
| settings = get_settings() | ||
NiveditJain marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.