-
Notifications
You must be signed in to change notification settings - Fork 2
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
[RPD-260] Add an object to handle the matcha.config.json
file.
#184
[RPD-260] Add an object to handle the matcha.config.json
file.
#184
Conversation
matcha.config.json
file.
matcha.config.json
file.matcha.config.json
file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, just a few changes mostly docstring related
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice - see comments 🦖
for key, value in mocked_matcha_config_json_object["remote_state_bucket"].items(): | ||
properties.append(MatchaConfigComponentProperty(name=key, value=value)) | ||
|
||
return MatchaConfigComponent(name="remote_state_bucket", properties=properties) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit (alternative): could be a one-liner: return MatchaConfig(mocked_matcha_config_json_object).components[0]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* [RPD-287] ZenML version inference for zenserver (#180) * various changes * change variable names to make things more clear * shubham's comment * test for latest * update existing tests * update existing tests * shubham latest comment * add gitflow notation branches to ci (#183) * remove old, commented out code * [RPD-260] Add an object to handle the `matcha.config.json` file. (#184) * adds logic and tests for matcha config module * updates docstrings * adds tests and implements config object throughout matcha * updated for pr comments * updates docstring * fixes ci * updates for comments * enum and metaclass * enum and metaclass * bug removal * docstring stack_set * docstring file exists * fix current tests * add a couple tests, move logic for updating to configservice * lowercase-ify arg to enum * american spelling * american spelling * chris' comment re overwriting * friendlier api * Runtime error if not recognised arg type fpor update() * Runtime error if not recognised arg type fpor update() * update provision to use new update() API * update stack name * tests * tests * tests * quote marks * type version, mypy * various review comments * test for update() function * update tests to include quotes. * fixing tests * tidy tests, test error if resources provisioned * clearer error handling * remove unnecessary context * update test to new error type --------- Co-authored-by: Callum Wells <68609181+swells2020@users.noreply.github.com>
…ing to the stack name in the config file (#187) * [RPD-287] ZenML version inference for zenserver (#180) * various changes * change variable names to make things more clear * shubham's comment * test for latest * update existing tests * update existing tests * shubham latest comment * add gitflow notation branches to ci (#183) * remove old, commented out code * [RPD-260] Add an object to handle the `matcha.config.json` file. (#184) * adds logic and tests for matcha config module * updates docstrings * adds tests and implements config object throughout matcha * updated for pr comments * updates docstring * fixes ci * updates for comments * enum and metaclass * enum and metaclass * bug removal * docstring stack_set * docstring file exists * fix current tests * add a couple tests, move logic for updating to configservice * lowercase-ify arg to enum * american spelling * american spelling * chris' comment re overwriting * friendlier api * Runtime error if not recognised arg type fpor update() * Runtime error if not recognised arg type fpor update() * update provision to use new update() API * update stack name * tests * tests * tests * Move files for selection * Clean up file * Remove a test that no longer describes the expected functionality * Remove a test that no longer describes the expected functionality * Fix tests * Stop creation of config file in local directory when running tests * Update check to use MatchaConfig object instead of to dict * Add get current stack name function to MatchaConfigService * Update get stack function * Fix test * Remove unnecessary lower casing * Fix tests
* [RPD-282] adds stack cli command (#179) * adds tests and logic for stack and stack set cli commands * fixes typos * updated for comments * addresses comments * [RPD-285] Create LLM stack Terraform files (#182) * Add initial LLM Terraform files * Update Terraform Kubernetes Chroma deployment * Update Terraform docs * Revert default variables * Add missing aks module * [RPD-283] add core function for updating stack type (#185) * [RPD-287] ZenML version inference for zenserver (#180) * various changes * change variable names to make things more clear * shubham's comment * test for latest * update existing tests * update existing tests * shubham latest comment * add gitflow notation branches to ci (#183) * remove old, commented out code * [RPD-260] Add an object to handle the `matcha.config.json` file. (#184) * adds logic and tests for matcha config module * updates docstrings * adds tests and implements config object throughout matcha * updated for pr comments * updates docstring * fixes ci * updates for comments * enum and metaclass * enum and metaclass * bug removal * docstring stack_set * docstring file exists * fix current tests * add a couple tests, move logic for updating to configservice * lowercase-ify arg to enum * american spelling * american spelling * chris' comment re overwriting * friendlier api * Runtime error if not recognised arg type fpor update() * Runtime error if not recognised arg type fpor update() * update provision to use new update() API * update stack name * tests * tests * tests * quote marks * type version, mypy * various review comments * test for update() function * update tests to include quotes. * fixing tests * tidy tests, test error if resources provisioned * clearer error handling * remove unnecessary context * update test to new error type --------- Co-authored-by: Callum Wells <68609181+swells2020@users.noreply.github.com> * [RPD-286] Add documentation on "stacks" and the new LLM stack (#189) * Initial version of docs * Add motivation to stacks docs * Various docs updates based on reviews * [RPD-284] Update AzureRunner to select the Terraform files corresponding to the stack name in the config file (#187) * [RPD-287] ZenML version inference for zenserver (#180) * various changes * change variable names to make things more clear * shubham's comment * test for latest * update existing tests * update existing tests * shubham latest comment * add gitflow notation branches to ci (#183) * remove old, commented out code * [RPD-260] Add an object to handle the `matcha.config.json` file. (#184) * adds logic and tests for matcha config module * updates docstrings * adds tests and implements config object throughout matcha * updated for pr comments * updates docstring * fixes ci * updates for comments * enum and metaclass * enum and metaclass * bug removal * docstring stack_set * docstring file exists * fix current tests * add a couple tests, move logic for updating to configservice * lowercase-ify arg to enum * american spelling * american spelling * chris' comment re overwriting * friendlier api * Runtime error if not recognised arg type fpor update() * Runtime error if not recognised arg type fpor update() * update provision to use new update() API * update stack name * tests * tests * tests * Move files for selection * Clean up file * Remove a test that no longer describes the expected functionality * Remove a test that no longer describes the expected functionality * Fix tests * Stop creation of config file in local directory when running tests * Update check to use MatchaConfig object instead of to dict * Add get current stack name function to MatchaConfigService * Update get stack function * Fix test * Remove unnecessary lower casing * Fix tests * updates stack handling * Revert "updates stack handling" This reverts commit b42b31d. * [RPD-289] Update the Chroma Terraform within the LLM stack to use Helm #194 * [RPD-292] [BUG] Update AzureTemplate to not create redundant folders during provisioning (#195) * splits default stack * updates llm stack * [RPD-303] Update stack_set docstring to include example and raises (#196) --------- Co-authored-by: Callum Wells <68609181+swells2020@users.noreply.github.com> Co-authored-by: KirsoppJ <40233184+KirsoppJ@users.noreply.github.com> Co-authored-by: Jonathan Carlton <JonoCX@users.noreply.github.com>
* [RPD-287] ZenML version inference for zenserver (#180) * various changes * change variable names to make things more clear * shubham's comment * test for latest * update existing tests * update existing tests * shubham latest comment * add gitflow notation branches to ci (#183) * remove old, commented out code * [RPD-260] Add an object to handle the `matcha.config.json` file. (#184) * adds logic and tests for matcha config module * updates docstrings * adds tests and implements config object throughout matcha * updated for pr comments * updates docstring * fixes ci * updates for comments * [RPD-249] Refactor `analytics_service` to simplify tracking decorator (#181) * refactor analytics service * adds tests and updates for comments * updates tests * updates for comments * extracts _get_state_uuid logic into private function * removes old _get_state_uuid logic * updates _execute_analytics_event_function * extracts _time_event logic * adds _post_event logic * adds tests * adds dataclass * updates tests * [RPD-236] Improved approach to check ignored folder when uploading and downloading (#186) * [RPD-250] Move `_show_terraform_outputs()` into `provision` (#188) * updates core and azure_runner * adds test * updated for comments * updates test fixtures * [RPD-259] Refactor `build_state_from_terraform_output` within `matcha_state.py` to use objects defined within matcha_state.py (#190) * updates build_state_from_terraform_outputs * updates for comments * fixes tests * removes print statement * updates get_component * updates get_component * updates for comments * [RPD-290] Update MatchaConfig object to not throw an error when a matching property/component is not found (#192) --------- Co-authored-by: KirsoppJ <40233184+KirsoppJ@users.noreply.github.com> Co-authored-by: Callum Wells <68609181+swells2020@users.noreply.github.com>
This PR introduces a new module
matcha_config.py
to store the classes and services associated with thematcha.config.json
file. This PR introduces an object representation of thematcha.config.json
file, alongside a service class for interacting with theMatchaConfig
object.The service class implements two methods currently needed for interacting with the
matcha.config.json
file;read_matcha_config
, for reading in data from the config JSON; anddelete_matcha_config
, for removing the config file.Checklist
Please ensure you have done the following:
Type of change
Tick all those that apply: