File tree Expand file tree Collapse file tree
python_interface_to_workflows Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5353 " --env-file" ,
5454 " src/.env"
5555 ],
56- "forwardPorts" : [
57- 5173
58- ],
59- "portsAttributes" : {
60- "5173" : {
61- "onAutoForward" : " ignore"
62- }
63- },
6456 "mounts" : [
6557 // Mount in the user terminal config folder so it can be edited
6658 {
Original file line number Diff line number Diff line change 5353 " --env-file" ,
5454 " src/.env"
5555 ],
56- "forwardPorts" : [
57- 5173
58- ],
5956 "mounts" : [
6057 // Mount in the user terminal config folder so it can be edited
6158 {
Original file line number Diff line number Diff line change 11# Setting up a development environment
2- 1. Build the dev container
3- 2. run "uv lock" to generate the uv.lock file
4- 3. Create .env in this folder (with the path src/.env) containing the following variables:
2+ 1. run "uv lock" to generate the uv.lock file
3+ 2. Create .env in this folder (with the path src/.env) containing the following variables:
54
6- HOST=https://argo-workflows.workflows.diamond.ac.uk/ (to submit to the production repo)
7- IMAGE= (usually python 3.10)
8- TOKEN=
5+ HOST=https://argo-workflows.workflows.diamond.ac.uk/ (to submit to the production cluster)
6+ DEFAULT_IMAGE= (usually python 3.10)
97NAMESPACE= (the cluster you wish to run the templates on)
10- AUTH=
118
9+ 3. Build the dev container
1210
1311# Submitting a workflow to Argo
14121. At the start of your workflow definition file, add:
Original file line number Diff line number Diff line change @@ -10,13 +10,14 @@ from {{project_name}}.auth.keycloak_checker import set_token_env_variable
1010
1111
1212def submit_workflow_to_argo(w: Workflow):
13- set_token_env_variable(staging=True )
13+ set_token_env_variable()
1414 dotenv.load_dotenv(dotenv_path="src/.env", override=True)
1515 w.namespace = os.environ.get("NAMESPACE")
1616 w.workflows_service = WorkflowsService(
1717 host=str(os.environ.get("HOST")).strip("'"),
1818 token=str(os.environ.get("TOKEN")).strip("'"),
1919 )
20+ global_config.image = str(os.environ.get("DEFAULT_IMAGE"))
2021 submitted_w = cast(m.Workflow, w.create())
2122 name = submitted_w.metadata.name
2223 namespace = submitted_w.metadata.namespace
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ def set_token_env_variable(staging: bool) -> str:
2020 port = 5173
2121 case False :
2222 keycloak_openid = KeycloakOpenID (
23- client_id = "workflows-dashboard " ,
23+ client_id = "workflows-cli " ,
2424 server_url = "https://identity.diamond.ac.uk/" ,
2525 realm_name = "dls" ,
2626 client_secret_key = "" ,
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ def submit_workflow_to_argo(w: Workflow):
1717 host = str (os .environ .get ("HOST" )).strip ("'" ),
1818 token = str (os .environ .get ("TOKEN" )).strip ("'" ),
1919 )
20- global_config .image = str (os .environ .get ("IMAGE " ))
20+ global_config .image = str (os .environ .get ("DEFAULT_IMAGE " ))
2121 submitted_w = cast (m .Workflow , w .create ())
2222 name = submitted_w .metadata .name
2323 namespace = submitted_w .metadata .namespace
You can’t perform that action at this time.
0 commit comments