Skip to content

Commit

Permalink
Additions for Edge CLI support (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwinWiseOne authored Jun 19, 2024
1 parent 696128c commit 4457550
Show file tree
Hide file tree
Showing 15 changed files with 71 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Minimal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ version = AppVersion(
description="This Is An Example Edge Application",
icon=ICON,
kind=AppKindEnum.Native,
proxy_kind=AppProxyKindEnum.Generic,
framework=AppProxyKindEnum.Generic,
link="quay.io/<YOUR_ORGANIZATION>/YOUR_IMAGE_NAME_HERE:TAG",
recommended_profile="edge.medium"
)
Expand Down
9 changes: 9 additions & 0 deletions Minimal/app_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
env_name: edge-minimal-example
edm_deps:
- click
- pip
- setuptools
cmd_deps:
- docker
framework: generic
app_id: null
7 changes: 4 additions & 3 deletions Minimal/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import argparse
import subprocess


ENV_NAME = "edge-minimal-example"
EDM_DEPS = ["click", "pip", "setuptools"]

Expand All @@ -25,7 +26,7 @@ def bootstrap(ci_mode):
"""

if ENV_NAME not in _list_edm_envs():
print(f"Creating development environment {ENV_NAME}...")
print(f"Creating development environment '{ENV_NAME}'...")
cmd = ["edm", "envs", "create", ENV_NAME, "--version", "3.8", "--force"]
subprocess.run(cmd, check=True)

Expand All @@ -35,10 +36,10 @@ def bootstrap(ci_mode):
print("Bootstrap complete.")

else:
print("Environment already exists; reusing.")
print(f"Environment '{ENV_NAME}' already exists; reusing.")

if not ci_mode:
print(f"Activating dev environment {ENV_NAME}")
print(f"Activating environment '{ENV_NAME}'")
subprocess.run(["edm", "shell", "-e", ENV_NAME])


Expand Down
2 changes: 1 addition & 1 deletion Panel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ version = AppVersion(
description="This Is An Example Edge Application",
icon=ICON,
kind=AppKindEnum.Native,
proxy_kind=AppProxyKindEnum.Panel,
framework=AppProxyKindEnum.Panel,
link="quay.io/<YOUR_ORGANIZATION>/YOUR_IMAGE_NAME_HERE:TAG",
recommended_profile="edge.medium"
)
Expand Down
9 changes: 9 additions & 0 deletions Panel/app_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
env_name: edge-panel-example
edm_deps:
- click
- pip
- setuptools
cmd_deps:
- docker
framework: panel
app_id: null
7 changes: 4 additions & 3 deletions Panel/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import argparse
import subprocess


ENV_NAME = "edge-panel-example"
EDM_DEPS = ["click", "pip", "setuptools"]

Expand All @@ -25,7 +26,7 @@ def bootstrap(ci_mode):
"""

if ENV_NAME not in _list_edm_envs():
print(f"Creating development environment {ENV_NAME}...")
print(f"Creating development environment '{ENV_NAME}'...")
cmd = ["edm", "envs", "create", ENV_NAME, "--version", "3.8", "--force"]
subprocess.run(cmd, check=True)

Expand All @@ -35,10 +36,10 @@ def bootstrap(ci_mode):
print("Bootstrap complete.")

else:
print("Environment already exists; reusing.")
print(f"Environment '{ENV_NAME}' already exists; reusing.")

if not ci_mode:
print(f"Activating dev environment {ENV_NAME}")
print(f"Activating environment '{ENV_NAME}'")
subprocess.run(["edm", "shell", "-e", ENV_NAME])


Expand Down
2 changes: 1 addition & 1 deletion Plotly Dash/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ version = AppVersion(
description="This Is An Example Edge Application",
icon=ICON,
kind=AppKindEnum.Native,
proxy_kind=AppProxyKindEnum.PlotlyDash,
framework=AppProxyKindEnum.PlotlyDash,
link="quay.io/<YOUR_ORGANIZATION>/YOUR_IMAGE_NAME_HERE:TAG",
recommended_profile="edge.medium"
)
Expand Down
9 changes: 9 additions & 0 deletions Plotly Dash/app_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
env_name: edge-plotly-dash-example
edm_deps:
- click
- pip
- setuptools
cmd_deps:
- docker
framework: plotly-dash
app_id: null
7 changes: 4 additions & 3 deletions Plotly Dash/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import argparse
import subprocess


ENV_NAME = "edge-plotly-dash-example"
EDM_DEPS = ["click", "pip", "setuptools"]

Expand All @@ -25,7 +26,7 @@ def bootstrap(ci_mode):
"""

if ENV_NAME not in _list_edm_envs():
print(f"Creating development environment {ENV_NAME}...")
print(f"Creating development environment '{ENV_NAME}'...")
cmd = ["edm", "envs", "create", ENV_NAME, "--version", "3.8", "--force"]
subprocess.run(cmd, check=True)

Expand All @@ -35,10 +36,10 @@ def bootstrap(ci_mode):
print("Bootstrap complete.")

else:
print("Environment already exists; reusing.")
print(f"Environment '{ENV_NAME}' already exists; reusing.")

if not ci_mode:
print(f"Activating dev environment {ENV_NAME}")
print(f"Activating environment '{ENV_NAME}'")
subprocess.run(["edm", "shell", "-e", ENV_NAME])


Expand Down
2 changes: 1 addition & 1 deletion React/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ version = AppVersion(
description="This Is An Example Edge Application",
icon=ICON,
kind=AppKindEnum.Native,
proxy_kind=AppProxyKindEnum.React,
framework=AppProxyKindEnum.React,
link="quay.io/<YOUR_ORGANIZATION>/YOUR_IMAGE_NAME_HERE:TAG",
recommended_profile="edge.medium"
)
Expand Down
10 changes: 10 additions & 0 deletions React/app_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
env_name: edge-react-example
edm_deps:
- click
- gunicorn
- pip
- setuptools
cmd_deps:
- docker
framework: react
app_id: null
7 changes: 4 additions & 3 deletions React/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import argparse
import subprocess


ENV_NAME = "edge-react-example"
EDM_DEPS = ["click", "gunicorn", "pip", "setuptools"]

Expand All @@ -25,7 +26,7 @@ def bootstrap(ci_mode):
"""

if ENV_NAME not in _list_edm_envs():
print(f"Creating development environment {ENV_NAME}...")
print(f"Creating development environment '{ENV_NAME}'...")
cmd = ["edm", "envs", "create", ENV_NAME, "--version", "3.8", "--force"]
subprocess.run(cmd, check=True)

Expand All @@ -35,10 +36,10 @@ def bootstrap(ci_mode):
print("Bootstrap complete.")

else:
print("Environment already exists; reusing.")
print(f"Environment '{ENV_NAME}' already exists; reusing.")

if not ci_mode:
print(f"Activating dev environment {ENV_NAME}")
print(f"Activating environment '{ENV_NAME}'")
subprocess.run(["edm", "shell", "-e", ENV_NAME])


Expand Down
2 changes: 1 addition & 1 deletion Streamlit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ version = AppVersion(
description="This Is An Example Edge Application",
icon=ICON,
kind=AppKindEnum.Native,
proxy_kind=AppProxyKindEnum.Streamlit,
framework=AppProxyKindEnum.Streamlit,
link="quay.io/<YOUR_ORGANIZATION>/YOUR_IMAGE_NAME_HERE:TAG",
recommended_profile="edge.medium"
)
Expand Down
9 changes: 9 additions & 0 deletions Streamlit/app_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
env_name: edge-streamlit-example
edm_deps:
- click
- pip
- setuptools
cmd_deps:
- docker
framework: streamlit
app_id: null
7 changes: 4 additions & 3 deletions Streamlit/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import argparse
import subprocess


ENV_NAME = "edge-streamlit-example"
EDM_DEPS = ["click", "pip", "setuptools"]

Expand All @@ -25,7 +26,7 @@ def bootstrap(ci_mode):
"""

if ENV_NAME not in _list_edm_envs():
print(f"Creating development environment {ENV_NAME}...")
print(f"Creating development environment '{ENV_NAME}'...")
cmd = ["edm", "envs", "create", ENV_NAME, "--version", "3.8", "--force"]
subprocess.run(cmd, check=True)

Expand All @@ -35,10 +36,10 @@ def bootstrap(ci_mode):
print("Bootstrap complete.")

else:
print("Environment already exists; reusing.")
print(f"Environment '{ENV_NAME}' already exists; reusing.")

if not ci_mode:
print(f"Activating dev environment {ENV_NAME}")
print(f"Activating environment '{ENV_NAME}'")
subprocess.run(["edm", "shell", "-e", ENV_NAME])


Expand Down

0 comments on commit 4457550

Please sign in to comment.