Skip to content

Commit

Permalink
added staging environment
Browse files Browse the repository at this point in the history
  • Loading branch information
fzumstein committed Aug 14, 2024
1 parent f16c338 commit 3853f2f
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .env.template
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Get a free trial key from https://www.xlwings.org/trial
XLWINGS_LICENSE_KEY="your-license-key"

# Use one of "dev", "qa", "uat", or "prod". "dev" will activate hotreload for the
# task pane and other dev-specific settings. This setting also takes care of loading
# Use one of "dev", "qa", "uat", "staging", or "prod". "dev" will activate hotreload for
# the task pane and other dev-specific features. This setting also takes care of loading
# the correct ID in the manifest. Except for "prod", the environment name will show up
# in the add-in name (ProjectName [dev]) and custom functions (NAMESPACE_DEV.MYFUNC)
XLWINGS_ENVIRONMENT="dev"
Expand Down
3 changes: 2 additions & 1 deletion app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@ class Settings(BaseSettings):
enable_excel_online: bool = True
enable_htmx: bool = True
enable_socketio: bool = True
environment: Literal["dev", "qa", "uat", "prod"] = "prod"
environment: Literal["dev", "qa", "uat", "staging", "prod"] = "prod"
functions_namespace: str = "XLWINGS"
hostname: Optional[str] = None
log_level: str = "INFO"
# These UUIDs will be overwritten by: python run.py init
manifest_id_dev: UUID4 = "0a856eb1-91ab-4f38-b757-23fbe1f73130"
manifest_id_qa: UUID4 = "9cda34b1-af68-4dc6-b97c-e63ef6284671"
manifest_id_uat: UUID4 = "70428e53-8113-421c-8fe2-9b74fcb94ee5"
manifest_id_staging: UUID4 = "34041f4f-9cb4-4830-afb5-db44b2a70e0e"
manifest_id_prod: UUID4 = "4f342d85-3a49-41cb-90a5-37b1f2219040"
project_name: str = "xlwings Server"
public_addin_store: bool = False
Expand Down
1 change: 1 addition & 0 deletions app/routers/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ async def manifest(
"dev": settings.manifest_id_dev,
"qa": settings.manifest_id_qa,
"uat": settings.manifest_id_uat,
"staging": settings.manifest_id_staging,
"prod": settings.manifest_id_prod,
}
manifest_id = manifest_ids[settings.environment]
Expand Down
1 change: 1 addition & 0 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def replace_uuids():
"0a856eb1-91ab-4f38-b757-23fbe1f73130",
"9cda34b1-af68-4dc6-b97c-e63ef6284671",
"4f342d85-3a49-41cb-90a5-37b1f2219040",
"34041f4f-9cb4-4830-afb5-db44b2a70e0e",
"70428e53-8113-421c-8fe2-9b74fcb94ee5",
]
with open(file_path, "w") as file:
Expand Down
4 changes: 2 additions & 2 deletions tests/.env.test
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Get a free trial key from https://www.xlwings.org/trial
XLWINGS_LICENSE_KEY="noncommercial"

# Use one of "dev", "qa", "uat", or "prod". "dev" will activate hotreload for the
# task pane and other dev-specific settings. This setting also takes care of loading
# Use one of "dev", "qa", "uat", "staging", or "prod". "dev" will activate hotreload for
# the task pane and other dev-specific features. This setting also takes care of loading
# the correct ID in the manifest. Except for "prod", the environment name will show up
# in the add-in name (ProjectName [dev]) and custom functions (NAMESPACE_DEV.MYFUNC)
XLWINGS_ENVIRONMENT="qa"
Expand Down
4 changes: 2 additions & 2 deletions tests/.env.test2
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Get a free trial key from https://www.xlwings.org/trial
XLWINGS_LICENSE_KEY="noncommercial"

# Use one of "dev", "qa", "uat", or "prod". "dev" will activate hotreload for the
# task pane and other dev-specific settings. This setting also takes care of loading
# Use one of "dev", "qa", "uat", "staging", or "prod". "dev" will activate hotreload for
# the task pane and other dev-specific features. This setting also takes care of loading
# the correct ID in the manifest. Except for "prod", the environment name will show up
# in the add-in name (ProjectName [dev]) and custom functions (NAMESPACE_DEV.MYFUNC)
XLWINGS_ENVIRONMENT="qa"
Expand Down

0 comments on commit 3853f2f

Please sign in to comment.