Skip to content

Commit

Permalink
restructure python
Browse files Browse the repository at this point in the history
  • Loading branch information
yindia committed Oct 16, 2024
1 parent 8efc245 commit 9a4acd1
Show file tree
Hide file tree
Showing 23 changed files with 1,474 additions and 3,369 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*.dll
*.so
*.dylib
build/

# Test binary, built with `go test -c`
*.test
Expand Down
2 changes: 1 addition & 1 deletion buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ managed:
- buf.build/bufbuild/protovalidate
plugins:
- plugin: buf.build/protocolbuffers/python:v28.2
out: modules/
out: pytask/
- plugin: buf.build/connectrpc/go:v1.11.1
out: pkg/gen/
opt:
Expand Down
14 changes: 0 additions & 14 deletions example/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,3 @@ def hello_world_2(a : int, b : int) -> bool:
return True


@Workflow(WorkflowSpec(
name="hello_world",
description="This is a test workflow",
metadata={
"author": "Yuvraj Singh",
"version": "1.0.0",
},
))
def hello_world_workflow(a : int, b : int)-> bool:
return hello_world(a=a, b=b) or hello_world(a=a, b=b)


if __name__ == "__main__":
hello_world()
18 changes: 0 additions & 18 deletions idl/cloud/v1/cloud.proto
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,6 @@ message Task {
map<string, string> env = 14;
}

// Workflow represents a collection of tasks organized in a Directed Acyclic Graph (DAG).
message Workflow {
string id = 1; // Unique identifier for the workflow.
string name = 2; // Name of the workflow.
string description = 3; // Description of the workflow.
repeated Task tasks = 4; // List of tasks in the workflow.
map<string, string> metadata = 5; // Additional metadata for the workflow.
}

// ExecutionStatus represents the current state of a task or workflow execution.
enum ExecutionStatus {
EXECUTION_STATUS_UNSPECIFIED = 0; // Status is not specified.
Expand All @@ -144,15 +135,6 @@ message TaskExecution {
map<string, string> execution_metadata = 5; // Metadata related to the task execution.
}

// WorkflowExecution represents the execution of a workflow.
message WorkflowExecution {
string workflow_id = 1; // Unique identifier for the workflow being executed.
ExecutionStatus status = 2; // Current execution status of the workflow.
repeated TaskExecution task_executions = 3; // List of task executions within the workflow.
google.protobuf.Timestamp created_at = 4; // Timestamp of when the workflow execution started.
google.protobuf.Timestamp updated_at = 5; // Timestamp of the last update to the workflow execution.
map<string, string> execution_metadata = 6; // Metadata related to the workflow execution.
}

// Message for Task history
message TaskHistory {
Expand Down
94 changes: 41 additions & 53 deletions modules/cloud/v1/cloud_pb2.py

Large diffs are not rendered by default.

21 changes: 0 additions & 21 deletions modules/task.py

This file was deleted.

23 changes: 0 additions & 23 deletions modules/workflow.py

This file was deleted.

557 changes: 279 additions & 278 deletions pixi.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ platforms = ["osx-64"]
pre-commit = "~=3.3.0"

git = "2.42.0.*"
python = "=3.10"
python = "=3.9"
pip = "*"
go = "=1.21"
pyarrow = "14.0.2"
Expand Down
Loading

0 comments on commit 9a4acd1

Please sign in to comment.