Skip to content

Commit

Permalink
feat: store writer framework IDE into project directory instead of ui…
Browse files Browse the repository at this point in the history
….json

* feat: add support for workflow
  • Loading branch information
FabienArcellier committed Sep 22, 2024
1 parent 7d287be commit a1aa6c7
Show file tree
Hide file tree
Showing 29 changed files with 352 additions and 332 deletions.
3 changes: 2 additions & 1 deletion alfred/apps.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os

from writer import wf_project
from writer import wf_project, audit_and_fix

import alfred

Expand Down Expand Up @@ -40,5 +40,6 @@ def apps_update(app: str = None):
print("The app is already up to date")
else:
metadata['writer_version'] = writer.VERSION
components = audit_and_fix.fix_components(components)
wf_project.write_files(abs_path, metadata, components)
print(f"{app} : app is up to date")
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{"id": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "type": "page", "content": {"pageMode": "compact"}, "isCodeManaged": false, "position": 0, "parentId": "root", "handlers": {}, "visible": true}
{"id": "bebc5fe9-63a7-46a7-b0fa-62303555cfaf", "type": "header", "content": {"text": "@{my_app.title}"}, "isCodeManaged": false, "position": 0, "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "handlers": {}, "visible": true}
{"id": "ejpasds0o8qyjs1n", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 1, "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "handlers": {}, "visible": true}
{"id": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "type": "page", "content": {"pageMode": "compact"}, "isCodeManaged": false, "position": 0, "parentId": "root", "handlers": {}, "visible": {"expression": true, "binding": "", "reversed": false}}
{"id": "bebc5fe9-63a7-46a7-b0fa-62303555cfaf", "type": "header", "content": {"text": "@{my_app.title}"}, "isCodeManaged": false, "position": 0, "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "handlers": {}, "visible": {"expression": true, "binding": "", "reversed": false}}
{"id": "ejpasds0o8qyjs1n", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 1, "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "handlers": {}, "visible": {"expression": true, "binding": "", "reversed": false}}
2 changes: 1 addition & 1 deletion apps/ai-starter/.wf/components-root.jsonl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id": "root", "type": "root", "content": {"appName": "AI Starter"}, "isCodeManaged": false, "position": 0, "handlers": {}, "visible": true}
{"id": "root", "type": "root", "content": {"appName": "AI Starter"}, "isCodeManaged": false, "position": 0, "handlers": {}, "visible": {"expression": true, "binding": "", "reversed": false}}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{"id": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "type": "page", "content": {"pageMode": "compact"}, "isCodeManaged": false, "position": 0, "parentId": "root", "handlers": {}, "visible": true}
{"id": "bebc5fe9-63a7-46a7-b0fa-62303555cfaf", "type": "header", "content": {"text": "@{my_app.title}"}, "isCodeManaged": false, "position": 0, "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "handlers": {}, "visible": true}
{"id": "28d3885b-0fb8-4d41-97c6-978540015431", "type": "section", "content": {"title": "", "containerShadow": "0px 4px 11px -12px #000000"}, "isCodeManaged": false, "position": 1, "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "handlers": {}, "visible": true}
{"id": "9556c0e3-8584-4ac9-903f-908a775a33ec", "type": "button", "content": {"text": " Increment", "icon": "arrow_upward"}, "isCodeManaged": false, "position": 1, "parentId": "0d05bc9f-1655-4d0b-bc9b-c2f4c71a5117", "handlers": {"click": "increment"}, "visible": true}
{"id": "51d1554e-1b88-461c-9353-1419cba0053a", "type": "button", "content": {"text": "Decrement", "icon": "arrow_downward"}, "isCodeManaged": false, "position": 0, "parentId": "0d05bc9f-1655-4d0b-bc9b-c2f4c71a5117", "handlers": {"click": "decrement"}, "visible": true}
{"id": "0d05bc9f-1655-4d0b-bc9b-c2f4c71a5117", "type": "horizontalstack", "content": {"contentHAlign": "center"}, "isCodeManaged": false, "position": 0, "parentId": "f3777e75-3659-4d44-8ef7-aeec0d06855b", "handlers": {}, "visible": true}
{"id": "172a14df-f73a-44fa-8fb1-e8648e7d32d2", "type": "metric", "content": {"metricValue": "@{counter}", "note": "@{message}", "name": "Counter"}, "isCodeManaged": false, "position": 0, "parentId": "c2519671-9ce7-44e7-ba4e-b0efda9cb20e", "handlers": {}, "visible": true}
{"id": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", "type": "columns", "content": {}, "isCodeManaged": false, "position": 0, "parentId": "28d3885b-0fb8-4d41-97c6-978540015431", "handlers": {}, "visible": true}
{"id": "f3777e75-3659-4d44-8ef7-aeec0d06855b", "type": "column", "content": {"title": "", "width": "1", "contentHAlign": "center", "contentVAlign": "center"}, "isCodeManaged": false, "position": 2, "parentId": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", "handlers": {}, "visible": true}
{"id": "c2519671-9ce7-44e7-ba4e-b0efda9cb20e", "type": "column", "content": {"width": "1"}, "isCodeManaged": false, "position": 0, "parentId": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", "handlers": {}, "visible": true}
{"id": "d4a71819-7444-4083-a1c7-7995452a7abf", "type": "separator", "content": {}, "isCodeManaged": false, "position": 1, "parentId": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", "handlers": {}, "visible": true}
{"id": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "type": "page", "content": {"pageMode": "compact"}, "isCodeManaged": false, "position": 0, "parentId": "root", "handlers": {}, "visible": {"expression": true, "binding": "", "reversed": false}}
{"id": "bebc5fe9-63a7-46a7-b0fa-62303555cfaf", "type": "header", "content": {"text": "@{my_app.title}"}, "isCodeManaged": false, "position": 0, "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "handlers": {}, "visible": {"expression": true, "binding": "", "reversed": false}}
{"id": "28d3885b-0fb8-4d41-97c6-978540015431", "type": "section", "content": {"title": "", "containerShadow": "0px 4px 11px -12px #000000"}, "isCodeManaged": false, "position": 1, "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "handlers": {}, "visible": {"expression": true, "binding": "", "reversed": false}}
{"id": "9556c0e3-8584-4ac9-903f-908a775a33ec", "type": "button", "content": {"text": " Increment", "icon": "arrow_upward"}, "isCodeManaged": false, "position": 1, "parentId": "0d05bc9f-1655-4d0b-bc9b-c2f4c71a5117", "handlers": {"click": "increment"}, "visible": {"expression": true, "binding": "", "reversed": false}}
{"id": "51d1554e-1b88-461c-9353-1419cba0053a", "type": "button", "content": {"text": "Decrement", "icon": "arrow_downward"}, "isCodeManaged": false, "position": 0, "parentId": "0d05bc9f-1655-4d0b-bc9b-c2f4c71a5117", "handlers": {"click": "decrement"}, "visible": {"expression": true, "binding": "", "reversed": false}}
{"id": "0d05bc9f-1655-4d0b-bc9b-c2f4c71a5117", "type": "horizontalstack", "content": {"contentHAlign": "center"}, "isCodeManaged": false, "position": 0, "parentId": "f3777e75-3659-4d44-8ef7-aeec0d06855b", "handlers": {}, "visible": {"expression": true, "binding": "", "reversed": false}}
{"id": "172a14df-f73a-44fa-8fb1-e8648e7d32d2", "type": "metric", "content": {"metricValue": "@{counter}", "note": "@{message}", "name": "Counter"}, "isCodeManaged": false, "position": 0, "parentId": "c2519671-9ce7-44e7-ba4e-b0efda9cb20e", "handlers": {}, "visible": {"expression": true, "binding": "", "reversed": false}}
{"id": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", "type": "columns", "content": {}, "isCodeManaged": false, "position": 0, "parentId": "28d3885b-0fb8-4d41-97c6-978540015431", "handlers": {}, "visible": {"expression": true, "binding": "", "reversed": false}}
{"id": "f3777e75-3659-4d44-8ef7-aeec0d06855b", "type": "column", "content": {"title": "", "width": "1", "contentHAlign": "center", "contentVAlign": "center"}, "isCodeManaged": false, "position": 2, "parentId": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", "handlers": {}, "visible": {"expression": true, "binding": "", "reversed": false}}
{"id": "c2519671-9ce7-44e7-ba4e-b0efda9cb20e", "type": "column", "content": {"width": "1"}, "isCodeManaged": false, "position": 0, "parentId": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", "handlers": {}, "visible": {"expression": true, "binding": "", "reversed": false}}
{"id": "d4a71819-7444-4083-a1c7-7995452a7abf", "type": "separator", "content": {}, "isCodeManaged": false, "position": 1, "parentId": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", "handlers": {}, "visible": {"expression": true, "binding": "", "reversed": false}}
2 changes: 1 addition & 1 deletion apps/default/.wf/components-root.jsonl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id": "root", "type": "root", "content": {"appName": "My App"}, "isCodeManaged": false, "position": 0, "handlers": {}, "visible": true}
{"id": "root", "type": "root", "content": {"appName": "My App"}, "isCodeManaged": false, "position": 0, "handlers": {}, "visible": {"expression": true, "binding": "", "reversed": false}}
Loading

0 comments on commit a1aa6c7

Please sign in to comment.