admin script¶
-
class
admin.
Admin
(completekey='tab', stdin=None, stdout=None)¶ Bases:
cmd.Cmd
-
compile_frontend
()¶ Compile sass to css and run npm build task
-
copy_main_file
(path)¶ Copy main.{path}.py file corresponding to Python build stage
-
deploy_function
(name, timeout: int = 60, region='europe-west2')¶ Deploy function with required environment variables
-
do_app
(args)¶ Compile front-end and deploy to App Engine
-
do_cron_functions
(args)¶ Deploy background functions including cron job scheduling for update actions (run_all_playlists, run_all_playlist_stats, run_all_tags)
-
do_docs
(args)¶ Compile documentation using sphinx
-
do_exit
(args)¶ Exit script
-
do_main_group
(args)¶ Compile front-end and deploy to App Engine. Deploy primary functions (run_user_playlist, update_tag)
-
do_playlist
(args)¶ Deploy run_user_playlist function
-
do_playlist_cron
(args)¶ Deploy run_all_playlists function
-
do_playlist_stats_cron
(args)¶ Deploy run_all_playlist_stats function
-
do_prepare_local_stage
(args)¶ Prepare local working directory for deployment using static sarsoolib injections
-
do_pydepend
(args)¶ Generate and export requirements.txt from Poetry manifest
-
do_rename
(args)¶ Rename playlist in firestore
-
do_run
(args)¶ Run Flask app
-
do_sass
(args)¶ Compile sass to css
-
do_set_project
(args)¶ Set project setting in gcloud console
-
do_tag
(args)¶ Deploy update_tag function
Deploy run_all_tags function
-
do_test
(args)¶ Run Python unit tests
-
do_watchsass
(args)¶ Run sass compiler with watch argument to begin watching source folder for changes
-
export_filtered_dependencies
()¶
-
function_deploy
(main, function_id)¶ Deploy Cloud Function, copy main file and initiate gcloud command
- Parameters
main (str) – main path
function_id (str) – function id to deploy to
-
intro
= 'Music Tools Admin... ? for help'¶
-
locals
= ['spotframework', 'fmframework', 'spotfm']¶
-
prompt
= '> '¶
-
-
admin.
docs
()¶
-
admin.
folders_to_ignore
= ['venv', 'docs', '.git', '.idea', 'node_modules']¶ COMPONENTS:
App Engine
- Cloud Functions:
run_user_playlist update_tag
run_all_playlists run_all_playlist_stats run_all_tags
-
admin.
run
()¶
-
admin.
test
()¶