-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
staging: run recipes from firebase (#179)
* [wip] prep recipe data for packing * get creds from local file * save firebase creds to a .creds file * remove cred arg * check for already handled values in remote recipes * can pack one sphere * * adding username to .creds * formatting * move `write_username_to_creds` * download recipe testing * edit comment * code refactor * lint * format tests * add prep_db_doc * changed class name in DBRecipeHandler * fix lint and test errors * initialize firebase handler only once * refactor message * add remote db options in `pack` * remove a print statement * rename and reorg DB handler * fix tests * move database_ids enum to interface_objects * remove db_handler in pack and recipe_loader * send db_handler in to autopack * rename functions * integrate DATABASE_NAMES into interface_objects * lint * Feature/run inherited objects (#198) * turn off resolving inheritance while uploading * able to upload recipes having "inherit" key * get download and pack to work, refactors needed * refactors * formatting * testing and refactor * Feature/save metadata to firebase (#206) * refactor AWS and firebase handler * databases initiation handling * refactor * Update .gitignore Co-authored-by: Saurabh Mogre <[email protected]> * add file existence check * refactor is_nested_list method * revert write_json_file * formatting --------- Co-authored-by: meganrm <[email protected]> Co-authored-by: Saurabh Mogre <[email protected]>
- Loading branch information
1 parent
c5e731c
commit eb4c0fa
Showing
12 changed files
with
715 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from .meta_enum import MetaEnum | ||
from cellpack.autopack.AWSHandler import AWSHandler | ||
from cellpack.autopack.FirebaseHandler import FirebaseHandler | ||
|
||
|
||
class DATABASE_IDS(MetaEnum): | ||
FIREBASE = "firebase" | ||
GITHUB = "github" | ||
AWS = "aws" | ||
|
||
@classmethod | ||
def with_colon(cls): | ||
return [f"{ele}:" for ele in cls.values()] | ||
|
||
@classmethod | ||
def handlers(cls): | ||
def create_aws_handler(bucket_name, sub_folder_name, region_name): | ||
return AWSHandler( | ||
bucket_name=bucket_name, | ||
sub_folder_name=sub_folder_name, | ||
region_name=region_name, | ||
) | ||
|
||
handlers_dict = { | ||
cls.FIREBASE: FirebaseHandler(), | ||
cls.AWS: create_aws_handler, | ||
} | ||
return handlers_dict |
Oops, something went wrong.