Skip to content

Commit

Permalink
Removed the required environment variable check for the GUI
Browse files Browse the repository at this point in the history
incremented the version for the evaluationservice
added dmod_venv to the gitignore
  • Loading branch information
christophertubbs authored Sep 18, 2023
1 parent 18a292e commit 66338dd
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 38 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ __pycache__/
.idea/
/docker_host_volumes/
/venv/
/*_venv/
/venv_*/
.env
docker/main/base/ssh/
Expand Down
13 changes: 0 additions & 13 deletions python/gui/maas_experiment/application_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,19 +262,6 @@ def get_full_localtimezone():
STATIC_RESOURCE_DIRECTORY / "rest_forwarding.json"
)

REQUIRED_ENVIRONMENT_VARIABLES: typing.List[typing.Dict[str, str]] = [
{
"name": "MAAS_ENDPOINT_HOST",
"purpose": "The default host address for MaaS"
},
{
"name": "MAAS_ENDPOINT_PORT",
"purpose": "The port for the default MaaS endpoint"
}
]
"""A list of all environments that are required to get the system to function"""


def load_maas_endpoints() -> typing.Dict[str, typing.Dict[str, str]]:
endpoints: typing.Dict[str, typing.Dict[str, str]] = dict()

Expand Down
24 changes: 0 additions & 24 deletions python/gui/maas_experiment/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,27 +144,3 @@
BASE_DIRECTORY / "static"
]


def ensure_required_environment_variables():
missing_variables = [
variable_name
for variable_name in REQUIRED_ENVIRONMENT_VARIABLES
if variable_name['name'] not in os.environ.keys()
]

if missing_variables:
missing_keys = [
variable['name']
for variable in missing_variables
]

error("The following required environment variables are missing:")

for missing_variable in missing_variables:
error(f"{missing_variable['name']}: {missing_variable['purpose']}")

raise ValueError(f"The following environment variables have not been set: [{', '.join(missing_keys)}]")


ensure_required_environment_variables()

Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.6.1'
__version__ = '0.6.2'

0 comments on commit 66338dd

Please sign in to comment.