Skip to content

Commit

Permalink
fixed importflow + readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jhnnsrs committed Jan 29, 2024
1 parent 24063b2 commit 7194f66
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 15 deletions.
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,24 @@
# fluss-server
# Fluss-Server


[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/arkitektio/fluss-server/)
![Maintainer](https://img.shields.io/badge/maintainer-jhnnsrs-blue)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

Fluss is the Arkitekt Workflow Repository. It represents a central repository of all workflows
that users have created and shared. It also provides interfaces to save and retrieve workflow
runs, and to inspect the results of these runs. Importantly fluss is **not** a workflow engine,
but rather a repository for workflows and their runs.

If you are looking for a "reactive" workflow scheduler for fluss-workflows you should look at the [Reaktion](
https://github.com/jhnnsrs/reaktion) plugin or Rekuest, which will be able to schedule fluss workflows
on a connected Arkitekt App (or on multiple connected apps).



## Developmental Notices

Fluss is currently being rewritten to support the modern Arkitekt Stack of [Django](https://djangoproject.com) and [Strawberry GraphQL](https://strawberry.rocks/).
This repository will remain the main repository for Fluss, and the new version will be merged into this repository once the new version is ready for production.


6 changes: 5 additions & 1 deletion flow/graphql/mutations/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,15 @@ class Arguments:
@bounced(anonymous=False)
def mutate(root, info, name, graph=None, brittle=False):

workspace = models.Workspace.objects.create(name=name)
print("IMPORTING FLOW")

workspace = models.Workspace.objects.create(name=name, creator=info.context.user, **fill_created(info))

flow, cr = models.Flow.objects.get_or_create(
workspace=workspace,
hash=graph_hash(graph),
name=name,
creator=info.context.user,
defaults={"graph": graph, "brittle": brittle, **fill_created(info)},

)
Expand Down
6 changes: 4 additions & 2 deletions flow/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class StreamItemInput(graphene.InputObjectType):
class ChoiceInput(graphene.InputObjectType):
value = Any(required=True)
label = graphene.String(required=True)
description = graphene.String(required=False)


class WidgetInput(graphene.InputObjectType):
Expand All @@ -57,8 +58,9 @@ class WidgetInput(graphene.InputObjectType):
graphene.String, description="The dependencies of this port"
)
choices = graphene.List(ChoiceInput, description="The dependencies of this port")
max = graphene.Int(description="Max value for int widget")
min = graphene.Int(description="Max value for int widget")
max = graphene.Float(description="Max value for int widget")
min = graphene.Float(description="Max value for int widget")
step = graphene.Float(description="Max value for int widget")
placeholder = graphene.String(description="Placeholder for any widget")
as_paragraph = graphene.Boolean(description="Is this a paragraph")
hook = graphene.String(description="A hook for the app to call")
Expand Down
5 changes: 3 additions & 2 deletions flow/structures/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ class WidgetInput(graphene.InputObjectType):
query = SearchQuery(description="Do we have a possible")

choices = graphene.List(ChoiceInput, description="The dependencies of this port")
max = graphene.Int(description="Max value for int widget")
min = graphene.Int(description="Max value for int widget")
max = graphene.Float(description="Max value for int widget")
min = graphene.Float(description="Max value for int widget")
step = graphene.Float(description="Max value for int widget")
placeholder = graphene.String(description="Placeholder for any widget")
as_paragraph = graphene.Boolean(description="Is this a paragraph")
hook = graphene.String(description="A hook for the app to call")
Expand Down
5 changes: 3 additions & 2 deletions flow/structures/widgets/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ class Meta:

@register_type
class SliderWidget(graphene.ObjectType):
min = graphene.Int(description="A Complex description")
max = graphene.Int(description="A Complex description")
min = graphene.Float(description="A Complex description")
max = graphene.Float(description="A Complex description")
step = graphene.Float(description="A Complex description")

class Meta:
interfaces = (Widget,)
Expand Down
8 changes: 5 additions & 3 deletions flow/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def resolve_nullable(self, info):
class Choice(graphene.ObjectType):
value = Any(required=True)
label = graphene.String(required=True)
description = graphene.String(required=False)


class Widget(graphene.ObjectType):
Expand All @@ -119,8 +120,9 @@ class Widget(graphene.ObjectType):
graphene.String, description="The dependencies of this port"
)
choices = graphene.List(Choice, description="The dependencies of this port")
max = graphene.Int(description="Max value for int widget")
min = graphene.Int(description="Max value for int widget")
max = graphene.Float(description="Max value for int widget")
min = graphene.Float(description="Max value for int widget")
step = graphene.Float(description="Max value for int widget")
placeholder = graphene.String(description="Placeholder for any widget")
as_paragraph = graphene.Boolean(description="Is this a paragraph")
hook = graphene.String(description="A hook for the app to call")
Expand All @@ -129,7 +131,7 @@ class Widget(graphene.ObjectType):

class ReturnWidget(graphene.ObjectType):
kind = graphene.String(description="type", required=True)
query = graphene.String(description="Do we have a possible")
query = graphene.String(description="The graphql query for this port")
dependencies = graphene.List(
graphene.String, description="The dependencies of this port"
)
Expand Down
4 changes: 2 additions & 2 deletions fluss/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
SUPERUSERS = [
{
"USERNAME": conf.django.admin.username,
"EMAIL": conf.django.admin.email,
"EMAIL": "fake@fake.com",
"PASSWORD": conf.django.admin.password,
}
]
Expand Down Expand Up @@ -88,7 +88,7 @@
AWS_QUERYSTRING_EXPIRE = 3600


AWS_STORAGE_BUCKET_NAME = conf.minio.buckets[0].name
AWS_STORAGE_BUCKET_NAME = conf.minio.buckets.media
AWS_DEFAULT_ACL = "private"
AWS_S3_USE_SSL = True
AWS_S3_SECURE_URLS = False # Should resort to True if using in Production behind TLS
Expand Down
2 changes: 1 addition & 1 deletion run-debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ python manage.py collectstatic --noinput

# Start the first process
echo "=> Starting Server"
python manage.py runserver 0.0.0.0:8070
python manage.py runserver 0.0.0.0:80

2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ echo "=> Collecting Static.."
python manage.py collectstatic --noinput
# Start the first process
echo "=> Starting Server"
python manage.py runserver 0.0.0.0:8070
python manage.py runserver 0.0.0.0:80

0 comments on commit 7194f66

Please sign in to comment.