OasisLMF / OasisPlatform

Loss modelling platform.
BSD 3-Clause "New" or "Revised" License
42 stars 16 forks source link

Review and clean up any unused worker environment variables. #1049

Open sambles opened 1 month ago

sambles commented 1 month ago

Issue Description

For example MODEL_DATA_DIRECTORY was historically used to point the worker to mode data (set in conf.ini) https://github.com/OasisLMF/OasisPlatform/blob/20b0aa391335a420bf4dcdd70caa8e02b771fb60/conf.ini#L1-L2

In more recent versions its now only used to find the default oasislmf.json file https://github.com/OasisLMF/OasisPlatform/blob/20b0aa391335a420bf4dcdd70caa8e02b771fb60/src/model_execution_worker/utils.py#L110-L114

We would be better of using the explicit OASIS_OASISLMF_CONFIG=<path-to-model-config.json> and removing MODEL_DATA_DIRECTORY

carlfischerjba commented 1 month ago

Is this the same as the environment variable OASIS_MODEL_DATA_DIRECTORY used in the model registration script?

sambles commented 1 month ago

Oh good point.. it might be, i'd need to double check how its read into model_registration.sh but feels likely