Skip to content

Commit

Permalink
removed env aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlov721 committed Feb 21, 2025
1 parent c013ab0 commit 4fa835e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unittests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_S3_ENDPOINT_URL: ${{ secrets.AWS_S3_ENDPOINT_URL }}
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}
HUB_AI_API_KEY: ${{ secrets.HUB_AI_API_KEY }}
HUBAI_API_KEY: ${{ secrets.HUBAI_API_KEY }}
run: python -m pytest tests/test_utils

15 changes: 4 additions & 11 deletions modelconverter/utils/environ.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

import keyring
from luxonis_ml.utils import Environ as BaseEnviron
from pydantic import AliasChoices, Field, model_validator
from typing_extensions import Annotated, Self
from pydantic import model_validator
from typing_extensions import Self


def get_password_with_timeout(
Expand All @@ -23,15 +23,8 @@ def _get_password():


class Environ(BaseEnviron):
HUBAI_API_KEY: Annotated[
Optional[str],
Field(
validation_alias=AliasChoices("HUBAI_API_KEY", "HUB_AI_API_KEY")
),
] = None
HUBAI_URL: Annotated[
str, Field(validation_alias=AliasChoices("HUBAI_URL", "HUB_AI_URL"))
] = "https://easyml.cloud.luxonis.com/models/"
HUBAI_API_KEY: Optional[str] = None
HUBAI_URL: str = "https://easyml.cloud.luxonis.com/models/"

@model_validator(mode="after")
def validate_hubai_api_key(self) -> Self:
Expand Down

0 comments on commit 4fa835e

Please sign in to comment.