Skip to content

Commit

Permalink
First Instagram script
Browse files Browse the repository at this point in the history
  • Loading branch information
vloothuis committed Nov 11, 2023
1 parent cda9e49 commit 425f6ef
Show file tree
Hide file tree
Showing 8 changed files with 923 additions and 191 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ release.zip

.vscode/
*.pyc
.vscode/

__pycache__

# dependencies
/node_modules
/.pnp
Expand Down
Binary file modified public/port-0.0.0-py3-none-any.whl
Binary file not shown.
Binary file modified src/framework/processing/py/dist/port-0.0.0-py3-none-any.whl
Binary file not shown.
4 changes: 1 addition & 3 deletions src/framework/processing/py/port/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from port.main import start

__all__ = [
"start"
]
__all__ = ["start"]
20 changes: 16 additions & 4 deletions src/framework/processing/py/port/api/props.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ class Translations(TypedDict):
en: English string to display
nl: Dutch string to display
"""

en: str
nl: str

@dataclass
class Translatable:
"""Wrapper class for Translations"""
"""Wrapper class for Translations"""

translations: Translations

def toDict(self):
Expand All @@ -30,6 +32,7 @@ class PropsUIHeader:
Attributes:
title: title of the page
"""

title: Translatable

def toDict(self):
Expand All @@ -46,6 +49,7 @@ class PropsUIFooter:
Attributes:
progressPercentage: float indicating the progress in the flow
"""

progressPercentage: float

def toDict(self):
Expand All @@ -59,14 +63,15 @@ def toDict(self):
class PropsUIPromptConfirm:
"""Retry submitting a file page
Prompt the user if they want to submit a new file.
This can be used in case a file could not be processed.
Prompt the user if they want to submit a new file.
This can be used in case a file could not be processed.
Attributes:
text: message to display
ok: message to display if the user wants to try again
cancel: message to display if the user wants to continue regardless
"""

text: Translatable
ok: Translatable
cancel: Translatable
Expand Down Expand Up @@ -173,7 +178,7 @@ def toDict(self):

@dataclass
class PropsUIPromptConsentFormTable:
"""Table to be shown to the participant prior to donation
"""Table to be shown to the participant prior to donation
Attributes:
id: a unique string to itentify the table after donation
Expand All @@ -182,6 +187,7 @@ class PropsUIPromptConsentFormTable:
editable: determines whether the table has an editable mode that can be toggled with a button
visualizations: optional list of visualizations to be shown
"""

id: str
title: Translatable
data_frame: pd.DataFrame
Expand Down Expand Up @@ -214,6 +220,7 @@ class PropsUIPromptConsentForm:
tables: a list of tables
meta_tables: a list of optional tables, for example for logging data
"""

tables: list[PropsUIPromptConsentFormTable]
meta_tables: list[PropsUIPromptConsentFormTable]

Expand Down Expand Up @@ -245,6 +252,7 @@ class PropsUIPromptFileInput:
description: text with an explanation
extensions: accepted mime types, example: "application/zip, text/plain"
"""

description: Translatable
extensions: str

Expand All @@ -263,6 +271,7 @@ class RadioItem(TypedDict):
id: id of radio button
value: text to be displayed
"""

id: int
value: str

Expand All @@ -278,6 +287,7 @@ class PropsUIPromptRadioInput:
description: short description of the radio group
items: a list of radio buttons
"""

title: Translatable
description: Translatable
items: list[RadioItem]
Expand Down Expand Up @@ -398,6 +408,7 @@ class PropsUIPageDonation:
body: main body of the page, see the individual classes for an explanation
footer: page footer
"""

platform: str
header: PropsUIHeader
body: PropsUIPromptRadioInput | PropsUIPromptConsentForm | PropsUIPromptFileInput | PropsUIPromptConfirm | PropsUIPromptQuestionnaire
Expand All @@ -416,6 +427,7 @@ def toDict(self):

class PropsUIPageEnd:
"""An ending page to show the user they are done"""

def toDict(self):
dict = {}
dict["__type__"] = "PropsUIPageEnd"
Expand Down
Loading

0 comments on commit 425f6ef

Please sign in to comment.