Spaces:
Paused
Paused
Download patch_constants_workflows.py from GraziePrego/jules: direct link, hf CLI and curl.
- Browser
- Download file 858 Bytes
-
https://huggingface.co/spaces/GraziePrego/jules/resolve/main/patch_constants_workflows.py
- Command line
-
hf download hf://spaces/GraziePrego/jules/patch_constants_workflows.py
-
curl -L -o patch_constants_workflows.py https://huggingface.co/spaces/GraziePrego/jules/resolve/main/patch_constants_workflows.py
858 Bytes
| with open("constants.ts", "r") as f: | |
| content = f.read() | |
| # Add WORKFLOWS storage key | |
| old_storage = "SESSIONS_CACHE: 'jules_sessions_cache'\n };" | |
| new_storage = "SESSIONS_CACHE: 'jules_sessions_cache',\n WORKFLOWS: 'jules_workflows',\n MESSAGE_QUEUE: 'jules_message_queue'\n };" | |
| content = content.replace(old_storage, new_storage) | |
| # Add default workflow constant | |
| new_consts = """ | |
| export const DEFAULT_WORKFLOWS = [ | |
| { | |
| id: 'hf-deployment-cue', | |
| name: 'HF Deployment Cue', | |
| description: 'Deploy code and run HF tests sequentially 30 minutes apart.', | |
| steps: [ | |
| { templateId: 'Deployment', delayMinutes: 0 }, | |
| { templateId: 'HF_App_Testing', delayMinutes: 30 } | |
| ] | |
| } | |
| ]; | |
| """ | |
| content = content + new_consts | |
| with open("constants.ts", "w") as f: | |
| f.write(content) | |