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

fix(config): solving error configuring environment using Config inste… #92

Merged
merged 5 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion alice/auth/auth_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ def _create_backend_token(self, verbose: Optional[bool] = False) -> Response:
if result.is_failure:
return result.value # type: ignore
login_token = result.unwrap()

url = f"{self.url}/backend_token"
headers = {"Authorization": f"Bearer {login_token}"}
if self.use_cache:
Expand Down
2 changes: 1 addition & 1 deletion alice/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class Config(BaseSettings):
model_config = SettingsConfigDict(arbitrary_types_allowed=True)
model_config = SettingsConfigDict(arbitrary_types_allowed=True, extra="allow")

api_key: Union[str, None] = Field(default=None)
environment: Union[Environment, None] = Field(
Expand Down
4 changes: 2 additions & 2 deletions alice/onboarding/enums/environment.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from enum import Enum
from enum import StrEnum


class Environment(Enum):
class Environment(StrEnum):
SANDBOX = "sandbox"
PRODUCTION = "production"
STAGING = "staging"
3 changes: 2 additions & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ pyjwt>=2.3.0,<3
pydantic>=1.8.2,<3
pydantic-settings<3
requests>=2.26.0,<3
meiga>=1.9.1,<2
meiga>=1.9.1,<2
strenum
Loading