From 6979c474ccebcdfe5ad342b07b958b033dcaf700 Mon Sep 17 00:00:00 2001 From: EdwinWiseOne Date: Wed, 19 Jun 2024 13:54:44 -0500 Subject: [PATCH 01/19] Rename edm_deps to app_deps because that makes more sense I think --- Minimal/app_config.yaml | 2 +- Panel/app_config.yaml | 2 +- Plotly Dash/app_config.yaml | 2 +- React/app_config.yaml | 2 +- Streamlit/app_config.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Minimal/app_config.yaml b/Minimal/app_config.yaml index a0cb5fa..3fe161c 100644 --- a/Minimal/app_config.yaml +++ b/Minimal/app_config.yaml @@ -1,5 +1,5 @@ env_name: edge-minimal-example -edm_deps: +app_deps: - click - pip - setuptools diff --git a/Panel/app_config.yaml b/Panel/app_config.yaml index 3dd089e..41d381a 100644 --- a/Panel/app_config.yaml +++ b/Panel/app_config.yaml @@ -1,5 +1,5 @@ env_name: edge-panel-example -edm_deps: +app_deps: - click - pip - setuptools diff --git a/Plotly Dash/app_config.yaml b/Plotly Dash/app_config.yaml index e82918e..c17d866 100644 --- a/Plotly Dash/app_config.yaml +++ b/Plotly Dash/app_config.yaml @@ -1,5 +1,5 @@ env_name: edge-plotly-dash-example -edm_deps: +app_deps: - click - pip - setuptools diff --git a/React/app_config.yaml b/React/app_config.yaml index 191f239..8b9bad3 100644 --- a/React/app_config.yaml +++ b/React/app_config.yaml @@ -1,5 +1,5 @@ env_name: edge-react-example -edm_deps: +app_deps: - click - gunicorn - pip diff --git a/Streamlit/app_config.yaml b/Streamlit/app_config.yaml index 80ada08..613bb33 100644 --- a/Streamlit/app_config.yaml +++ b/Streamlit/app_config.yaml @@ -1,5 +1,5 @@ env_name: edge-streamlit-example -edm_deps: +app_deps: - click - pip - setuptools From caf2fcf522831e1fb900f35886dc8e1ef9a75d02 Mon Sep 17 00:00:00 2001 From: EdwinWiseOne Date: Wed, 19 Jun 2024 14:59:18 -0500 Subject: [PATCH 02/19] Oops, need BOTH env_deps and app_deps --- Minimal/app_config.yaml | 7 ++++++- Panel/app_config.yaml | 14 +++++++++++++- Plotly Dash/app_config.yaml | 15 ++++++++++++++- React/app_config.yaml | 14 +++++++++++++- Streamlit/app_config.yaml | 11 ++++++++++- 5 files changed, 56 insertions(+), 5 deletions(-) diff --git a/Minimal/app_config.yaml b/Minimal/app_config.yaml index 3fe161c..741cd82 100644 --- a/Minimal/app_config.yaml +++ b/Minimal/app_config.yaml @@ -1,8 +1,13 @@ env_name: edge-minimal-example -app_deps: +env_deps: - click - pip - setuptools +app_deps: +- flask +- setuptools +- gunicorn +- enthought_edge cmd_deps: - docker framework: generic diff --git a/Panel/app_config.yaml b/Panel/app_config.yaml index 41d381a..1f248da 100644 --- a/Panel/app_config.yaml +++ b/Panel/app_config.yaml @@ -1,8 +1,20 @@ env_name: edge-panel-example -app_deps: +env_deps: - click - pip - setuptools +app_deps: +- enthought_edge>=2.16.0 +- appdirs +- packaging +- pip +- pyparsing +- setuptools +- six +- panel +- numpy +- pandas +- matplotlib cmd_deps: - docker framework: panel diff --git a/Plotly Dash/app_config.yaml b/Plotly Dash/app_config.yaml index c17d866..d8c19a7 100644 --- a/Plotly Dash/app_config.yaml +++ b/Plotly Dash/app_config.yaml @@ -1,8 +1,21 @@ env_name: edge-plotly-dash-example -app_deps: +env_deps: - click - pip - setuptools +app_deps: +- enthought_edge>=2.16.0 +- appdirs +- packaging +- pip +- pyparsing +- setuptools +- six +- requests +- gunicorn +- pandas +- flask>2 +- dash cmd_deps: - docker framework: plotly-dash diff --git a/React/app_config.yaml b/React/app_config.yaml index 8b9bad3..6fa3007 100644 --- a/React/app_config.yaml +++ b/React/app_config.yaml @@ -1,9 +1,21 @@ env_name: edge-react-example -app_deps: +env_deps: - click - gunicorn - pip - setuptools +app_deps: +- enthought_edge>=2.16.0 +- appdirs +- packaging +- pip +- pyparsing +- setuptools +- six +- click +- flask>2 +- gunicorn +- opencv_python cmd_deps: - docker framework: react diff --git a/Streamlit/app_config.yaml b/Streamlit/app_config.yaml index 613bb33..7715770 100644 --- a/Streamlit/app_config.yaml +++ b/Streamlit/app_config.yaml @@ -1,8 +1,17 @@ env_name: edge-streamlit-example -app_deps: +env_deps: - click - pip - setuptools +app_deps: +- enthought_edge>=2.16.0 +- appdirs +- packaging +- pip +- pyparsing +- setuptools +- six +- requests cmd_deps: - docker framework: streamlit From 8863f8354603fa26ac477c513049f1f81850f5ae Mon Sep 17 00:00:00 2001 From: EdwinWiseOne Date: Wed, 19 Jun 2024 15:18:39 -0500 Subject: [PATCH 03/19] Need some more cmds for the shell env --- Minimal/app_config.yaml | 3 +++ Panel/app_config.yaml | 3 +++ Plotly Dash/app_config.yaml | 3 +++ React/app_config.yaml | 3 +++ Streamlit/app_config.yaml | 3 +++ 5 files changed, 15 insertions(+) diff --git a/Minimal/app_config.yaml b/Minimal/app_config.yaml index 741cd82..5babf42 100644 --- a/Minimal/app_config.yaml +++ b/Minimal/app_config.yaml @@ -1,7 +1,10 @@ env_name: edge-minimal-example env_deps: - click +- oauthlib - pip +- pyyaml +- questionary - setuptools app_deps: - flask diff --git a/Panel/app_config.yaml b/Panel/app_config.yaml index 1f248da..2d0dc9e 100644 --- a/Panel/app_config.yaml +++ b/Panel/app_config.yaml @@ -1,7 +1,10 @@ env_name: edge-panel-example env_deps: - click +- oauthlib - pip +- pyyaml +- questionary - setuptools app_deps: - enthought_edge>=2.16.0 diff --git a/Plotly Dash/app_config.yaml b/Plotly Dash/app_config.yaml index d8c19a7..64376f8 100644 --- a/Plotly Dash/app_config.yaml +++ b/Plotly Dash/app_config.yaml @@ -1,7 +1,10 @@ env_name: edge-plotly-dash-example env_deps: - click +- oauthlib - pip +- pyyaml +- questionary - setuptools app_deps: - enthought_edge>=2.16.0 diff --git a/React/app_config.yaml b/React/app_config.yaml index 6fa3007..00235ca 100644 --- a/React/app_config.yaml +++ b/React/app_config.yaml @@ -2,7 +2,10 @@ env_name: edge-react-example env_deps: - click - gunicorn +- oauthlib - pip +- pyyaml +- questionary - setuptools app_deps: - enthought_edge>=2.16.0 diff --git a/Streamlit/app_config.yaml b/Streamlit/app_config.yaml index 7715770..9810610 100644 --- a/Streamlit/app_config.yaml +++ b/Streamlit/app_config.yaml @@ -1,7 +1,10 @@ env_name: edge-streamlit-example env_deps: - click +- oauthlib - pip +- pyyaml +- questionary - setuptools app_deps: - enthought_edge>=2.16.0 From 26a80c31c190d38b283f089a23123b3610cdbbaf Mon Sep 17 00:00:00 2001 From: EdwinWiseOne Date: Wed, 19 Jun 2024 15:30:21 -0500 Subject: [PATCH 04/19] Differentiate edm and pip deps, and add ourselves to the list --- Minimal/app_config.yaml | 15 +++++++++------ Panel/app_config.yaml | 15 +++++++++------ Plotly Dash/app_config.yaml | 15 +++++++++------ React/app_config.yaml | 17 ++++++++++------- Streamlit/app_config.yaml | 15 +++++++++------ 5 files changed, 46 insertions(+), 31 deletions(-) diff --git a/Minimal/app_config.yaml b/Minimal/app_config.yaml index 5babf42..6b9dbfb 100644 --- a/Minimal/app_config.yaml +++ b/Minimal/app_config.yaml @@ -1,11 +1,14 @@ env_name: edge-minimal-example env_deps: -- click -- oauthlib -- pip -- pyyaml -- questionary -- setuptools + edm: + - click + - oauthlib + - pip + - pyyaml + - setuptools + pip: + - questionary + - src_edge/src app_deps: - flask - setuptools diff --git a/Panel/app_config.yaml b/Panel/app_config.yaml index 2d0dc9e..217f73b 100644 --- a/Panel/app_config.yaml +++ b/Panel/app_config.yaml @@ -1,11 +1,14 @@ env_name: edge-panel-example env_deps: -- click -- oauthlib -- pip -- pyyaml -- questionary -- setuptools + edm: + - click + - oauthlib + - pip + - pyyaml + - setuptools + pip: + - questionary + - src_edge/src app_deps: - enthought_edge>=2.16.0 - appdirs diff --git a/Plotly Dash/app_config.yaml b/Plotly Dash/app_config.yaml index 64376f8..c76bbca 100644 --- a/Plotly Dash/app_config.yaml +++ b/Plotly Dash/app_config.yaml @@ -1,11 +1,14 @@ env_name: edge-plotly-dash-example env_deps: -- click -- oauthlib -- pip -- pyyaml -- questionary -- setuptools + edm: + - click + - oauthlib + - pip + - pyyaml + - setuptools + pip: + - questionary + - src_edge/src app_deps: - enthought_edge>=2.16.0 - appdirs diff --git a/React/app_config.yaml b/React/app_config.yaml index 00235ca..c69c26e 100644 --- a/React/app_config.yaml +++ b/React/app_config.yaml @@ -1,12 +1,15 @@ env_name: edge-react-example env_deps: -- click -- gunicorn -- oauthlib -- pip -- pyyaml -- questionary -- setuptools + edm: + - click + - gunicorn + - oauthlib + - pip + - pyyaml + - setuptools + pip: + - questionary + - src_edge/src app_deps: - enthought_edge>=2.16.0 - appdirs diff --git a/Streamlit/app_config.yaml b/Streamlit/app_config.yaml index 9810610..5afd67a 100644 --- a/Streamlit/app_config.yaml +++ b/Streamlit/app_config.yaml @@ -1,11 +1,14 @@ env_name: edge-streamlit-example env_deps: -- click -- oauthlib -- pip -- pyyaml -- questionary -- setuptools + edm: + - click + - oauthlib + - pip + - pyyaml + - setuptools + pip: + - questionary + - src_edge/src app_deps: - enthought_edge>=2.16.0 - appdirs From b0b3c42c83b48453750e0b944a10872c2a906a1e Mon Sep 17 00:00:00 2001 From: EdwinWiseOne Date: Wed, 19 Jun 2024 15:38:10 -0500 Subject: [PATCH 05/19] need requests (test in Minimal) --- Minimal/app_config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Minimal/app_config.yaml b/Minimal/app_config.yaml index 6b9dbfb..cfd7736 100644 --- a/Minimal/app_config.yaml +++ b/Minimal/app_config.yaml @@ -5,6 +5,7 @@ env_deps: - oauthlib - pip - pyyaml + - requests - setuptools pip: - questionary From a41d9a1e1f8dd60f99d9f357827ef95c52b32286 Mon Sep 17 00:00:00 2001 From: EdwinWiseOne Date: Wed, 19 Jun 2024 15:41:26 -0500 Subject: [PATCH 06/19] Dateutil --- Minimal/app_config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Minimal/app_config.yaml b/Minimal/app_config.yaml index cfd7736..72e8d4b 100644 --- a/Minimal/app_config.yaml +++ b/Minimal/app_config.yaml @@ -4,6 +4,7 @@ env_deps: - click - oauthlib - pip + - python_dateutil - pyyaml - requests - setuptools From e896f60fa53654f28536dd2c39f465b940858379 Mon Sep 17 00:00:00 2001 From: EdwinWiseOne Date: Wed, 19 Jun 2024 15:43:17 -0500 Subject: [PATCH 07/19] Filetype? Really? --- Minimal/app_config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Minimal/app_config.yaml b/Minimal/app_config.yaml index 72e8d4b..89ccba0 100644 --- a/Minimal/app_config.yaml +++ b/Minimal/app_config.yaml @@ -2,6 +2,7 @@ env_name: edge-minimal-example env_deps: edm: - click + - filetype - oauthlib - pip - python_dateutil From 1f2677a98e7e54a63e83bc1706af73561f331974 Mon Sep 17 00:00:00 2001 From: EdwinWiseOne Date: Wed, 19 Jun 2024 15:55:35 -0500 Subject: [PATCH 08/19] Fill out the other configs --- Panel/app_config.yaml | 3 +++ Plotly Dash/app_config.yaml | 3 +++ React/app_config.yaml | 3 +++ Streamlit/app_config.yaml | 3 +++ 4 files changed, 12 insertions(+) diff --git a/Panel/app_config.yaml b/Panel/app_config.yaml index 217f73b..fa9be96 100644 --- a/Panel/app_config.yaml +++ b/Panel/app_config.yaml @@ -2,9 +2,12 @@ env_name: edge-panel-example env_deps: edm: - click + - filetype - oauthlib - pip + - python_dateutil - pyyaml + - requests - setuptools pip: - questionary diff --git a/Plotly Dash/app_config.yaml b/Plotly Dash/app_config.yaml index c76bbca..a5971d8 100644 --- a/Plotly Dash/app_config.yaml +++ b/Plotly Dash/app_config.yaml @@ -2,9 +2,12 @@ env_name: edge-plotly-dash-example env_deps: edm: - click + - filetype - oauthlib - pip + - python_dateutil - pyyaml + - requests - setuptools pip: - questionary diff --git a/React/app_config.yaml b/React/app_config.yaml index c69c26e..48f6da1 100644 --- a/React/app_config.yaml +++ b/React/app_config.yaml @@ -2,10 +2,13 @@ env_name: edge-react-example env_deps: edm: - click + - filetype - gunicorn - oauthlib - pip + - python_dateutil - pyyaml + - requests - setuptools pip: - questionary diff --git a/Streamlit/app_config.yaml b/Streamlit/app_config.yaml index 5afd67a..7e6cdc3 100644 --- a/Streamlit/app_config.yaml +++ b/Streamlit/app_config.yaml @@ -2,9 +2,12 @@ env_name: edge-streamlit-example env_deps: edm: - click + - filetype - oauthlib - pip + - python_dateutil - pyyaml + - requests - setuptools pip: - questionary From 9123c1506c796bdfe8b1fc292a99a20b602358eb Mon Sep 17 00:00:00 2001 From: EdwinWiseOne Date: Thu, 20 Jun 2024 07:14:42 -0500 Subject: [PATCH 09/19] Exclude bootstrap --- Minimal/app_config.yaml | 6 ++++-- Panel/app_config.yaml | 6 ++++-- Plotly Dash/app_config.yaml | 6 ++++-- React/app_config.yaml | 6 ++++-- Streamlit/app_config.yaml | 6 ++++-- 5 files changed, 20 insertions(+), 10 deletions(-) diff --git a/Minimal/app_config.yaml b/Minimal/app_config.yaml index 89ccba0..8dc1596 100644 --- a/Minimal/app_config.yaml +++ b/Minimal/app_config.yaml @@ -1,4 +1,6 @@ env_name: edge-minimal-example +framework: generic +app_id: null env_deps: edm: - click @@ -19,5 +21,5 @@ app_deps: - enthought_edge cmd_deps: - docker -framework: generic -app_id: null +exclude: +- bootstrap.py diff --git a/Panel/app_config.yaml b/Panel/app_config.yaml index fa9be96..ffa9ffa 100644 --- a/Panel/app_config.yaml +++ b/Panel/app_config.yaml @@ -1,4 +1,6 @@ env_name: edge-panel-example +framework: panel +app_id: null env_deps: edm: - click @@ -26,5 +28,5 @@ app_deps: - matplotlib cmd_deps: - docker -framework: panel -app_id: null +exclude: +- bootstrap.py diff --git a/Plotly Dash/app_config.yaml b/Plotly Dash/app_config.yaml index a5971d8..b54ad18 100644 --- a/Plotly Dash/app_config.yaml +++ b/Plotly Dash/app_config.yaml @@ -1,4 +1,6 @@ env_name: edge-plotly-dash-example +framework: plotly-dash +app_id: null env_deps: edm: - click @@ -27,5 +29,5 @@ app_deps: - dash cmd_deps: - docker -framework: plotly-dash -app_id: null +exclude: +- bootstrap.py diff --git a/React/app_config.yaml b/React/app_config.yaml index 48f6da1..e1d83f5 100644 --- a/React/app_config.yaml +++ b/React/app_config.yaml @@ -1,4 +1,6 @@ env_name: edge-react-example +framework: react +app_id: null env_deps: edm: - click @@ -27,5 +29,5 @@ app_deps: - opencv_python cmd_deps: - docker -framework: react -app_id: null +exclude: +- bootstrap.py diff --git a/Streamlit/app_config.yaml b/Streamlit/app_config.yaml index 7e6cdc3..92e0bd7 100644 --- a/Streamlit/app_config.yaml +++ b/Streamlit/app_config.yaml @@ -1,4 +1,6 @@ env_name: edge-streamlit-example +framework: streamlit +app_id: null env_deps: edm: - click @@ -23,5 +25,5 @@ app_deps: - requests cmd_deps: - docker -framework: streamlit -app_id: null +exclude: +- bootstrap.py From 3bafb5470a04db131cf312860e6ca6d18d5a02d3 Mon Sep 17 00:00:00 2001 From: EdwinWiseOne Date: Thu, 20 Jun 2024 08:07:52 -0500 Subject: [PATCH 10/19] Try using app_config in ci/main --- Minimal/app_config.yaml | 1 + Minimal/bootstrap.py | 2 +- Minimal/ci/__main__.py | 48 +++++++++++++++++++++++++++++++++-------- 3 files changed, 41 insertions(+), 10 deletions(-) diff --git a/Minimal/app_config.yaml b/Minimal/app_config.yaml index 8dc1596..6218814 100644 --- a/Minimal/app_config.yaml +++ b/Minimal/app_config.yaml @@ -1,6 +1,7 @@ env_name: edge-minimal-example framework: generic app_id: null +app_version: 1.2.0 env_deps: edm: - click diff --git a/Minimal/bootstrap.py b/Minimal/bootstrap.py index 7935be2..3487372 100644 --- a/Minimal/bootstrap.py +++ b/Minimal/bootstrap.py @@ -16,7 +16,7 @@ ENV_NAME = "edge-minimal-example" -EDM_DEPS = ["click", "pip", "setuptools"] +EDM_DEPS = ["click", "pip", "pyyaml", "setuptools"] def bootstrap(ci_mode): diff --git a/Minimal/ci/__main__.py b/Minimal/ci/__main__.py index 75ab4ef..fe71aba 100644 --- a/Minimal/ci/__main__.py +++ b/Minimal/ci/__main__.py @@ -14,21 +14,22 @@ import os.path as op import subprocess import json +import yaml SRC_ROOT = op.abspath(op.join(op.dirname(__file__), "..")) +REPOSITORY = "quay.io/enthought" # Docker image will be tagged "IMAGE:VERSION" -IMAGE = "quay.io/enthought/edge-example-minimal" -VERSION = "1.2.0" +# IMAGE = "quay.io/enthought/edge-example-minimal" +# VERSION = "1.2.0" # These will go into the built Docker image. You may wish to modify this # minimal example to pin the dependencies, or use a bundle file to define them. -APP_DEPENDENCIES = ["flask", "setuptools", "gunicorn", "enthought_edge"] +# APP_DEPENDENCIES = ["flask", "setuptools", "gunicorn", "enthought_edge"] # This will be used when running locally ("run" command). # We just use the last component of the full image URL. -CONTAINER_NAME = IMAGE.split("/")[-1] - +# CONTAINER_NAME = IMAGE.split("/")[-1] @click.group() def cli(): @@ -41,6 +42,12 @@ def cli(): def build(rebuild_zbundle): """Build the Docker image""" + # Configuration details + config = _load_config_settings() + bundle_image = "/".join([REPOSITORY, config["env_name"]]) + version = config["app_version"] + app_deps = config["app_deps"] + # First, we build a "zbundle" which contains all the eggs needed to # build the environment within the Docker image. fname = "app_environment.zbundle" @@ -58,12 +65,12 @@ def build(rebuild_zbundle): "2.0", "-f", fname, - ] + APP_DEPENDENCIES + ] + app_deps subprocess.run(cmd, check=True, cwd=SRC_ROOT) # Finally, we run Docker. The Dockerfile will copy the zbundle into # a temp folder and install it. - cmd = ["docker", "build", "-t", f"{IMAGE}:{VERSION}", "."] + cmd = ["docker", "build", "-t", f"{bundle_image}:{version}", "."] subprocess.run(cmd, check=True, cwd=SRC_ROOT) @@ -73,12 +80,16 @@ def run(): # Get values from the dev settings file (API tokens for testing, etc.) envs = _load_dev_settings() + config = _load_config_settings() + container_name = config["env_name"] + bundle_image = "/".join([REPOSITORY, container_name]) + version = config["app_version"] - cmd = ["docker", "run", "--rm", "-p", "9000:9000", "--name", CONTAINER_NAME] + cmd = ["docker", "run", "--rm", "-p", "9000:9000", "--name", container_name] for key, value in envs.items(): cmd += ["--env", f"{key}={value}"] cmd += ["--env", "HOST_ADDRESS=0.0.0.0"] - cmd += [f"{IMAGE}:{VERSION}"] + cmd += [f"{bundle_image}:{version}"] subprocess.run(cmd, check=True, cwd=SRC_ROOT) @@ -104,5 +115,24 @@ def _load_dev_settings(): return {k: v for k, v in data.items() if k.startswith("EDGE_")} +def _load_config_settings(): + """Load the application configuration settings. + + Returns + ------- + dict + The configuration settings. + """ + data = {} + fpath = op.join(SRC_ROOT, "app_config.yaml") + if op.exists(fpath): + with open(fpath, "r") as f: + data = yaml.safe_load(f) + + if not data: + raise ValueError("Could not load app_config.yaml") + return data + + if __name__ == "__main__": cli() From 08cfadd23c98f0230c651c80e084e34fc37a0bb3 Mon Sep 17 00:00:00 2001 From: EdwinWiseOne Date: Thu, 20 Jun 2024 08:57:43 -0500 Subject: [PATCH 11/19] Config repository, cmd verbosity --- Minimal/app_config.yaml | 1 + Minimal/ci/__main__.py | 57 ++++++++++++++++++++++------------------- 2 files changed, 32 insertions(+), 26 deletions(-) diff --git a/Minimal/app_config.yaml b/Minimal/app_config.yaml index 6218814..643c90e 100644 --- a/Minimal/app_config.yaml +++ b/Minimal/app_config.yaml @@ -2,6 +2,7 @@ env_name: edge-minimal-example framework: generic app_id: null app_version: 1.2.0 +repository: quay.io/enthought env_deps: edm: - click diff --git a/Minimal/ci/__main__.py b/Minimal/ci/__main__.py index fe71aba..502f4da 100644 --- a/Minimal/ci/__main__.py +++ b/Minimal/ci/__main__.py @@ -9,7 +9,6 @@ """ This is the "ci" module for the minimal example. """ - import click import os.path as op import subprocess @@ -17,34 +16,24 @@ import yaml SRC_ROOT = op.abspath(op.join(op.dirname(__file__), "..")) -REPOSITORY = "quay.io/enthought" - -# Docker image will be tagged "IMAGE:VERSION" -# IMAGE = "quay.io/enthought/edge-example-minimal" -# VERSION = "1.2.0" -# These will go into the built Docker image. You may wish to modify this -# minimal example to pin the dependencies, or use a bundle file to define them. -# APP_DEPENDENCIES = ["flask", "setuptools", "gunicorn", "enthought_edge"] - -# This will be used when running locally ("run" command). -# We just use the last component of the full image URL. -# CONTAINER_NAME = IMAGE.split("/")[-1] @click.group() -def cli(): +@click.pass_context +def cli(ctx): """Group for Click commands""" - pass - + config = _load_config_settings() + ctx.obj = config @cli.command() @click.option("--rebuild-zbundle", default=False, is_flag=True) -def build(rebuild_zbundle): +@click.option("--verbose", default=False, is_flag=True) +@click.pass_obj +def build(config, rebuild_zbundle, verbose): """Build the Docker image""" # Configuration details - config = _load_config_settings() - bundle_image = "/".join([REPOSITORY, config["env_name"]]) + bundle_image = "/".join([config["repository"], config["env_name"]]) version = config["app_version"] app_deps = config["app_deps"] @@ -66,24 +55,30 @@ def build(rebuild_zbundle): "-f", fname, ] + app_deps + if verbose: + click.echo(" ".join(cmd)) subprocess.run(cmd, check=True, cwd=SRC_ROOT) # Finally, we run Docker. The Dockerfile will copy the zbundle into # a temp folder and install it. cmd = ["docker", "build", "-t", f"{bundle_image}:{version}", "."] + if verbose: + click.echo(" ".join(cmd)) subprocess.run(cmd, check=True, cwd=SRC_ROOT) @cli.command() -def run(): +@click.option("--verbose", default=False, is_flag=True) +@click.pass_obj +def run(config, verbose): """Run the Docker image for testing""" + # Configuration details + container_name = config["env_name"] + bundle_image = "/".join([config["repository"], container_name]) + version = config["app_version"] # Get values from the dev settings file (API tokens for testing, etc.) envs = _load_dev_settings() - config = _load_config_settings() - container_name = config["env_name"] - bundle_image = "/".join([REPOSITORY, container_name]) - version = config["app_version"] cmd = ["docker", "run", "--rm", "-p", "9000:9000", "--name", container_name] for key, value in envs.items(): @@ -91,13 +86,23 @@ def run(): cmd += ["--env", "HOST_ADDRESS=0.0.0.0"] cmd += [f"{bundle_image}:{version}"] + if verbose: + click.echo(" ".join(cmd)) subprocess.run(cmd, check=True, cwd=SRC_ROOT) @cli.command() -def publish(): +@click.option("--verbose", default=False, is_flag=True) +@click.pass_obj +def publish(config, verbose): """Publish the Docker image for use with Edge""" - cmd = ["docker", "push", f"{IMAGE}:{VERSION}"] + # Configuration details + bundle_image = "/".join([config["repository"], config["env_name"]]) + version = config["app_version"] + + cmd = ["docker", "push", f"{bundle_image}:{version}"] + if verbose: + click.echo(" ".join(cmd)) subprocess.run(cmd, check=True) From 7b4b32ef6ec8d120886e9010430ace14e7fcc7b9 Mon Sep 17 00:00:00 2001 From: EdwinWiseOne Date: Thu, 20 Jun 2024 09:33:36 -0500 Subject: [PATCH 12/19] Adjustments for CLI compatability --- Minimal/ci/__main__.py | 3 ++ Panel/app_config.yaml | 2 + Panel/ci/__main__.py | 97 ++++++++++++++++++++++-------------- Plotly Dash/app_config.yaml | 2 + Plotly Dash/ci/__main__.py | 99 +++++++++++++++++++++++-------------- React/app_config.yaml | 2 + React/ci/__main__.py | 98 ++++++++++++++++++++++-------------- Streamlit/app_config.yaml | 2 + Streamlit/ci/__main__.py | 95 ++++++++++++++++++++++------------- 9 files changed, 255 insertions(+), 145 deletions(-) diff --git a/Minimal/ci/__main__.py b/Minimal/ci/__main__.py index 502f4da..21a2778 100644 --- a/Minimal/ci/__main__.py +++ b/Minimal/ci/__main__.py @@ -25,6 +25,7 @@ def cli(ctx): config = _load_config_settings() ctx.obj = config + @cli.command() @click.option("--rebuild-zbundle", default=False, is_flag=True) @click.option("--verbose", default=False, is_flag=True) @@ -72,6 +73,7 @@ def build(config, rebuild_zbundle, verbose): @click.pass_obj def run(config, verbose): """Run the Docker image for testing""" + # Configuration details container_name = config["env_name"] bundle_image = "/".join([config["repository"], container_name]) @@ -96,6 +98,7 @@ def run(config, verbose): @click.pass_obj def publish(config, verbose): """Publish the Docker image for use with Edge""" + # Configuration details bundle_image = "/".join([config["repository"], config["env_name"]]) version = config["app_version"] diff --git a/Panel/app_config.yaml b/Panel/app_config.yaml index ffa9ffa..176d480 100644 --- a/Panel/app_config.yaml +++ b/Panel/app_config.yaml @@ -1,6 +1,8 @@ env_name: edge-panel-example framework: panel app_id: null +app_version: 1.3.0 +repository: quay.io/enthought env_deps: edm: - click diff --git a/Panel/ci/__main__.py b/Panel/ci/__main__.py index 16014f6..7f4d5f4 100644 --- a/Panel/ci/__main__.py +++ b/Panel/ci/__main__.py @@ -13,48 +13,32 @@ import click import os.path as op import subprocess -import sys -import os import json +import yaml SRC_ROOT = op.abspath(op.join(op.dirname(__file__), "..")) -# Docker image will be tagged "IMAGE:VERSION" -IMAGE = "quay.io/enthought/edge-panel-example" -VERSION = "1.3.0" - -# These will go into the built Docker image. You may wish to modify this -# minimal example to pin the dependencies, or use a bundle file to define them. -APP_DEPENDENCIES = [ - "enthought_edge>=2.16.0", - "appdirs", - "packaging", - "pip", - "pyparsing", - "setuptools", - "six", - "panel", - "numpy", - "pandas", - "matplotlib", -] - -# This will be used when running locally ("run" command). -# We just use the last component of the full image URL. -CONTAINER_NAME = IMAGE.split("/")[-1] - @click.group() -def cli(): +@click.pass_context +def cli(ctx): """Group for Click commands""" - pass + config = _load_config_settings() + ctx.obj = config @cli.command() @click.option("--rebuild-zbundle", default=False, is_flag=True) -def build(rebuild_zbundle): +@click.option("--verbose", default=False, is_flag=True) +@click.pass_obj +def build(config, rebuild_zbundle, verbose): """Build the Docker image""" + # Configuration details + bundle_image = "/".join([config["repository"], config["env_name"]]) + version = config["app_version"] + app_deps = config["app_deps"] + # First, we build a "zbundle" which contains all the eggs needed to # build the environment within the Docker image. fname = "app_environment.zbundle" @@ -72,35 +56,57 @@ def build(rebuild_zbundle): "2.0", "-f", fname, - ] + APP_DEPENDENCIES + ] + app_deps + if verbose: + click.echo(" ".join(cmd)) subprocess.run(cmd, check=True, cwd=SRC_ROOT) # Finally, we run Docker. The Dockerfile will copy the zbundle into # a temp folder and install it. - cmd = ["docker", "build", "-t", f"{IMAGE}:{VERSION}", "."] + cmd = ["docker", "build", "-t", f"{bundle_image}:{version}", "."] + if verbose: + click.echo(" ".join(cmd)) subprocess.run(cmd, check=True, cwd=SRC_ROOT) @cli.command() -def run(): +@click.option("--verbose", default=False, is_flag=True) +@click.pass_obj +def run(config, verbose): """Run the Docker image for testing""" + # Configuration details + container_name = config["env_name"] + bundle_image = "/".join([config["repository"], container_name]) + version = config["app_version"] + # Get values from the dev settings file (API tokens for testing, etc.) envs = _load_dev_settings() - cmd = ["docker", "run", "--rm", "-p", "9000:9000", "--name", CONTAINER_NAME] + cmd = ["docker", "run", "--rm", "-p", "9000:9000", "--name", container_name] for key, value in envs.items(): cmd += ["--env", f"{key}={value}"] cmd += ["--env", "HOST_ADDRESS=0.0.0.0"] - cmd += [f"{IMAGE}:{VERSION}"] + cmd += [f"{bundle_image}:{version}"] + if verbose: + click.echo(" ".join(cmd)) subprocess.run(cmd, check=True, cwd=SRC_ROOT) @cli.command() -def publish(): +@click.option("--verbose", default=False, is_flag=True) +@click.pass_obj +def publish(config, verbose): """Publish the Docker image for use with Edge""" - cmd = ["docker", "push", f"{IMAGE}:{VERSION}"] + + # Configuration details + bundle_image = "/".join([config["repository"], config["env_name"]]) + version = config["app_version"] + + cmd = ["docker", "push", f"{bundle_image}:{version}"] + if verbose: + click.echo(" ".join(cmd)) subprocess.run(cmd, check=True) @@ -118,5 +124,24 @@ def _load_dev_settings(): return {k: v for k, v in data.items() if k.startswith("EDGE_")} +def _load_config_settings(): + """Load the application configuration settings. + + Returns + ------- + dict + The configuration settings. + """ + data = {} + fpath = op.join(SRC_ROOT, "app_config.yaml") + if op.exists(fpath): + with open(fpath, "r") as f: + data = yaml.safe_load(f) + + if not data: + raise ValueError("Could not load app_config.yaml") + return data + + if __name__ == "__main__": cli() diff --git a/Plotly Dash/app_config.yaml b/Plotly Dash/app_config.yaml index b54ad18..3d192e4 100644 --- a/Plotly Dash/app_config.yaml +++ b/Plotly Dash/app_config.yaml @@ -1,6 +1,8 @@ env_name: edge-plotly-dash-example framework: plotly-dash app_id: null +app_version: 1.3.0 +repository: quay.io/enthought env_deps: edm: - click diff --git a/Plotly Dash/ci/__main__.py b/Plotly Dash/ci/__main__.py index 3b58e13..408a19a 100644 --- a/Plotly Dash/ci/__main__.py +++ b/Plotly Dash/ci/__main__.py @@ -9,53 +9,35 @@ """ This is the "ci" module for the Plotly Dash example. """ - import click import os.path as op import subprocess -import sys -import os import json +import yaml SRC_ROOT = op.abspath(op.join(op.dirname(__file__), "..")) -# Docker image will be tagged "IMAGE:VERSION" -IMAGE = "quay.io/enthought/edge-plotly-dash-example" -VERSION = "1.3.0" - -# These will go into the built Docker image. You may wish to modify this -# minimal example to pin the dependencies, or use a bundle file to define them. -APP_DEPENDENCIES = [ - "enthought_edge>=2.16.0", - "appdirs", - "packaging", - "pip", - "pyparsing", - "setuptools", - "six", - "requests", - "gunicorn", - "pandas", - "flask>2", - "dash", -] - -# This will be used when running locally ("run" command). -# We just use the last component of the full image URL. -CONTAINER_NAME = IMAGE.split("/")[-1] - @click.group() -def cli(): +@click.pass_context +def cli(ctx): """Group for Click commands""" - pass + config = _load_config_settings() + ctx.obj = config @cli.command() @click.option("--rebuild-zbundle", default=False, is_flag=True) -def build(rebuild_zbundle): +@click.option("--verbose", default=False, is_flag=True) +@click.pass_obj +def build(config, rebuild_zbundle, verbose): """Build the Docker image""" + # Configuration details + bundle_image = "/".join([config["repository"], config["env_name"]]) + version = config["app_version"] + app_deps = config["app_deps"] + # First, we build a "zbundle" which contains all the eggs needed to # build the environment within the Docker image. fname = "app_environment.zbundle" @@ -73,35 +55,57 @@ def build(rebuild_zbundle): "2.0", "-f", fname, - ] + APP_DEPENDENCIES + ] + app_deps + if verbose: + click.echo(" ".join(cmd)) subprocess.run(cmd, check=True, cwd=SRC_ROOT) # Finally, we run Docker. The Dockerfile will copy the zbundle into # a temp folder and install it. - cmd = ["docker", "build", "-t", f"{IMAGE}:{VERSION}", "."] + cmd = ["docker", "build", "-t", f"{bundle_image}:{version}", "."] + if verbose: + click.echo(" ".join(cmd)) subprocess.run(cmd, check=True, cwd=SRC_ROOT) @cli.command() -def run(): +@click.option("--verbose", default=False, is_flag=True) +@click.pass_obj +def run(config, verbose): """Run the Docker image for testing""" + # Configuration details + container_name = config["env_name"] + bundle_image = "/".join([config["repository"], container_name]) + version = config["app_version"] + # Get values from the dev settings file (API tokens for testing, etc.) envs = _load_dev_settings() - cmd = ["docker", "run", "--rm", "-p", "9000:9000", "--name", CONTAINER_NAME] + cmd = ["docker", "run", "--rm", "-p", "9000:9000", "--name", container_name] for key, value in envs.items(): cmd += ["--env", f"{key}={value}"] cmd += ["--env", "HOST_ADDRESS=0.0.0.0"] - cmd += [f"{IMAGE}:{VERSION}"] + cmd += [f"{bundle_image}:{version}"] + if verbose: + click.echo(" ".join(cmd)) subprocess.run(cmd, check=True, cwd=SRC_ROOT) @cli.command() -def publish(): +@click.option("--verbose", default=False, is_flag=True) +@click.pass_obj +def publish(config, verbose): """Publish the Docker image for use with Edge""" - cmd = ["docker", "push", f"{IMAGE}:{VERSION}"] + + # Configuration details + bundle_image = "/".join([config["repository"], config["env_name"]]) + version = config["app_version"] + + cmd = ["docker", "push", f"{bundle_image}:{version}"] + if verbose: + click.echo(" ".join(cmd)) subprocess.run(cmd, check=True) @@ -119,5 +123,24 @@ def _load_dev_settings(): return {k: v for k, v in data.items() if k.startswith("EDGE_")} +def _load_config_settings(): + """Load the application configuration settings. + + Returns + ------- + dict + The configuration settings. + """ + data = {} + fpath = op.join(SRC_ROOT, "app_config.yaml") + if op.exists(fpath): + with open(fpath, "r") as f: + data = yaml.safe_load(f) + + if not data: + raise ValueError("Could not load app_config.yaml") + return data + + if __name__ == "__main__": cli() diff --git a/React/app_config.yaml b/React/app_config.yaml index e1d83f5..52e777d 100644 --- a/React/app_config.yaml +++ b/React/app_config.yaml @@ -1,6 +1,8 @@ env_name: edge-react-example framework: react app_id: null +app_version: 1.3.0 +repository: quay.io/enthought env_deps: edm: - click diff --git a/React/ci/__main__.py b/React/ci/__main__.py index c0c2e6c..2f6bed6 100644 --- a/React/ci/__main__.py +++ b/React/ci/__main__.py @@ -9,52 +9,35 @@ """ This is the "ci" module for the React example. """ - import click import os.path as op import subprocess -import sys -import os import json +import yaml SRC_ROOT = op.abspath(op.join(op.dirname(__file__), "..")) -# Docker image will be tagged "IMAGE:VERSION" -IMAGE = "quay.io/enthought/edge-native-app-flask-demo" -VERSION = "1.3.0" - -# These will go into the built Docker image. You may wish to modify this -# minimal example to pin the dependencies, or use a bundle file to define them. -APP_DEPENDENCIES = [ - "enthought_edge>=2.16.0", - "appdirs", - "packaging", - "pip", - "pyparsing", - "setuptools", - "six", - "click", - "flask>2", - "gunicorn", - "opencv_python", -] - -# This will be used when running locally ("run" command). -# We just use the last component of the full image URL. -CONTAINER_NAME = IMAGE.split("/")[-1] - @click.group() -def cli(): +@click.pass_context +def cli(ctx): """Group for Click commands""" - pass + config = _load_config_settings() + ctx.obj = config @cli.command() @click.option("--rebuild-zbundle", default=False, is_flag=True) -def build(rebuild_zbundle): +@click.option("--verbose", default=False, is_flag=True) +@click.pass_obj +def build(config, rebuild_zbundle, verbose): """Build the Docker image""" + # Configuration details + bundle_image = "/".join([config["repository"], config["env_name"]]) + version = config["app_version"] + app_deps = config["app_deps"] + # First, build the React application jsdir = op.join(SRC_ROOT, "src", "application", "frontend") subprocess.run(["npm", "ci"], cwd=jsdir, check=True) @@ -77,35 +60,57 @@ def build(rebuild_zbundle): "2.0", "-f", fname, - ] + APP_DEPENDENCIES + ] + app_deps + if verbose: + click.echo(" ".join(cmd)) subprocess.run(cmd, check=True, cwd=SRC_ROOT) # Finally, we run Docker. The Dockerfile will copy the zbundle into # a temp folder and install it. - cmd = ["docker", "build", "-t", f"{IMAGE}:{VERSION}", "."] + cmd = ["docker", "build", "-t", f"{bundle_image}:{version}", "."] + if verbose: + click.echo(" ".join(cmd)) subprocess.run(cmd, check=True, cwd=SRC_ROOT) @cli.command() -def run(): +@click.option("--verbose", default=False, is_flag=True) +@click.pass_obj +def run(config, verbose): """Run the Docker image for testing""" + # Configuration details + container_name = config["env_name"] + bundle_image = "/".join([config["repository"], container_name]) + version = config["app_version"] + # Get values from the dev settings file (API tokens for testing, etc.) envs = _load_dev_settings() - cmd = ["docker", "run", "--rm", "-p", "9000:9000", "--name", CONTAINER_NAME] + cmd = ["docker", "run", "--rm", "-p", "9000:9000", "--name", container_name] for key, value in envs.items(): cmd += ["--env", f"{key}={value}"] cmd += ["--env", "HOST_ADDRESS=0.0.0.0"] - cmd += [f"{IMAGE}:{VERSION}"] + cmd += [f"{bundle_image}:{version}"] + if verbose: + click.echo(" ".join(cmd)) subprocess.run(cmd, check=True, cwd=SRC_ROOT) @cli.command() -def publish(): +@click.option("--verbose", default=False, is_flag=True) +@click.pass_obj +def publish(config, verbose): """Publish the Docker image for use with Edge""" - cmd = ["docker", "push", f"{IMAGE}:{VERSION}"] + + # Configuration details + bundle_image = "/".join([config["repository"], config["env_name"]]) + version = config["app_version"] + + cmd = ["docker", "push", f"{bundle_image}:{version}"] + if verbose: + click.echo(" ".join(cmd)) subprocess.run(cmd, check=True) @@ -123,5 +128,24 @@ def _load_dev_settings(): return {k: v for k, v in data.items() if k.startswith("EDGE_")} +def _load_config_settings(): + """Load the application configuration settings. + + Returns + ------- + dict + The configuration settings. + """ + data = {} + fpath = op.join(SRC_ROOT, "app_config.yaml") + if op.exists(fpath): + with open(fpath, "r") as f: + data = yaml.safe_load(f) + + if not data: + raise ValueError("Could not load app_config.yaml") + return data + + if __name__ == "__main__": cli() diff --git a/Streamlit/app_config.yaml b/Streamlit/app_config.yaml index 92e0bd7..a19ed65 100644 --- a/Streamlit/app_config.yaml +++ b/Streamlit/app_config.yaml @@ -1,6 +1,8 @@ env_name: edge-streamlit-example framework: streamlit app_id: null +app_version: 1.3.0 +repository: quay.io/enthought env_deps: edm: - click diff --git a/Streamlit/ci/__main__.py b/Streamlit/ci/__main__.py index 5ea969d..11e2734 100644 --- a/Streamlit/ci/__main__.py +++ b/Streamlit/ci/__main__.py @@ -9,49 +9,35 @@ """ This is the "ci" module for the Streamlit example. """ - import click import os.path as op import subprocess -import sys -import os import json +import yaml SRC_ROOT = op.abspath(op.join(op.dirname(__file__), "..")) -# Docker image will be tagged "IMAGE:VERSION" -IMAGE = "quay.io/enthought/edge-streamlit-example" -VERSION = "1.3.0" - -# These will go into the built Docker image. You may wish to modify this -# minimal example to pin the dependencies, or use a bundle file to define them. -APP_DEPENDENCIES = [ - "enthought_edge>=2.16.0", - "appdirs", - "packaging", - "pip", - "pyparsing", - "setuptools", - "six", - "requests", -] - -# This will be used when running locally ("run" command). -# We just use the last component of the full image URL. -CONTAINER_NAME = IMAGE.split("/")[-1] - @click.group() -def cli(): +@click.pass_context +def cli(ctx): """Group for Click commands""" - pass + config = _load_config_settings() + ctx.obj = config @cli.command() @click.option("--rebuild-zbundle", default=False, is_flag=True) -def build(rebuild_zbundle): +@click.option("--verbose", default=False, is_flag=True) +@click.pass_obj +def build(config, rebuild_zbundle, verbose): """Build the Docker image""" + # Configuration details + bundle_image = "/".join([config["repository"], config["env_name"]]) + version = config["app_version"] + app_deps = config["app_deps"] + # First, we build a "zbundle" which contains all the eggs needed to # build the environment within the Docker image. fname = "app_environment.zbundle" @@ -69,35 +55,57 @@ def build(rebuild_zbundle): "2.0", "-f", fname, - ] + APP_DEPENDENCIES + ] + app_deps + if verbose: + click.echo(" ".join(cmd)) subprocess.run(cmd, check=True, cwd=SRC_ROOT) # Finally, we run Docker. The Dockerfile will copy the zbundle into # a temp folder and install it. - cmd = ["docker", "build", "-t", f"{IMAGE}:{VERSION}", "."] + cmd = ["docker", "build", "-t", f"{bundle_image}:{version}", "."] + if verbose: + click.echo(" ".join(cmd)) subprocess.run(cmd, check=True, cwd=SRC_ROOT) @cli.command() -def run(): +@click.option("--verbose", default=False, is_flag=True) +@click.pass_obj +def run(config, verbose): """Run the Docker image for testing""" + # Configuration details + container_name = config["env_name"] + bundle_image = "/".join([config["repository"], container_name]) + version = config["app_version"] + # Get values from the dev settings file (API tokens for testing, etc.) envs = _load_dev_settings() - cmd = ["docker", "run", "--rm", "-p", "9000:9000", "--name", CONTAINER_NAME] + cmd = ["docker", "run", "--rm", "-p", "9000:9000", "--name", container_name] for key, value in envs.items(): cmd += ["--env", f"{key}={value}"] cmd += ["--env", "HOST_ADDRESS=0.0.0.0"] - cmd += [f"{IMAGE}:{VERSION}"] + cmd += [f"{bundle_image}:{version}"] + if verbose: + click.echo(" ".join(cmd)) subprocess.run(cmd, check=True, cwd=SRC_ROOT) @cli.command() -def publish(): +@click.option("--verbose", default=False, is_flag=True) +@click.pass_obj +def publish(config, verbose): """Publish the Docker image for use with Edge""" - cmd = ["docker", "push", f"{IMAGE}:{VERSION}"] + + # Configuration details + bundle_image = "/".join([config["repository"], config["env_name"]]) + version = config["app_version"] + + cmd = ["docker", "push", f"{bundle_image}:{version}"] + if verbose: + click.echo(" ".join(cmd)) subprocess.run(cmd, check=True) @@ -115,5 +123,24 @@ def _load_dev_settings(): return {k: v for k, v in data.items() if k.startswith("EDGE_")} +def _load_config_settings(): + """Load the application configuration settings. + + Returns + ------- + dict + The configuration settings. + """ + data = {} + fpath = op.join(SRC_ROOT, "app_config.yaml") + if op.exists(fpath): + with open(fpath, "r") as f: + data = yaml.safe_load(f) + + if not data: + raise ValueError("Could not load app_config.yaml") + return data + + if __name__ == "__main__": cli() From a6041b22b613d3a6698dd85688b27fd462680be5 Mon Sep 17 00:00:00 2001 From: EdwinWiseOne Date: Fri, 21 Jun 2024 07:44:18 -0500 Subject: [PATCH 13/19] Rename config env_name to image_name, because that is how it's used --- Minimal/app_config.yaml | 2 +- Minimal/ci/__main__.py | 6 +++--- Panel/app_config.yaml | 2 +- Panel/ci/__main__.py | 6 +++--- Plotly Dash/app_config.yaml | 2 +- Plotly Dash/ci/__main__.py | 6 +++--- React/app_config.yaml | 2 +- React/ci/__main__.py | 6 +++--- Streamlit/app_config.yaml | 2 +- Streamlit/ci/__main__.py | 6 +++--- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Minimal/app_config.yaml b/Minimal/app_config.yaml index 643c90e..e876a51 100644 --- a/Minimal/app_config.yaml +++ b/Minimal/app_config.yaml @@ -1,4 +1,4 @@ -env_name: edge-minimal-example +image_name: edge-minimal-example framework: generic app_id: null app_version: 1.2.0 diff --git a/Minimal/ci/__main__.py b/Minimal/ci/__main__.py index 21a2778..5c7a5ad 100644 --- a/Minimal/ci/__main__.py +++ b/Minimal/ci/__main__.py @@ -34,7 +34,7 @@ def build(config, rebuild_zbundle, verbose): """Build the Docker image""" # Configuration details - bundle_image = "/".join([config["repository"], config["env_name"]]) + bundle_image = "/".join([config["repository"], config["image_name"]]) version = config["app_version"] app_deps = config["app_deps"] @@ -75,7 +75,7 @@ def run(config, verbose): """Run the Docker image for testing""" # Configuration details - container_name = config["env_name"] + container_name = config["image_name"] bundle_image = "/".join([config["repository"], container_name]) version = config["app_version"] @@ -100,7 +100,7 @@ def publish(config, verbose): """Publish the Docker image for use with Edge""" # Configuration details - bundle_image = "/".join([config["repository"], config["env_name"]]) + bundle_image = "/".join([config["repository"], config["image_name"]]) version = config["app_version"] cmd = ["docker", "push", f"{bundle_image}:{version}"] diff --git a/Panel/app_config.yaml b/Panel/app_config.yaml index 176d480..7463856 100644 --- a/Panel/app_config.yaml +++ b/Panel/app_config.yaml @@ -1,4 +1,4 @@ -env_name: edge-panel-example +image_name: edge-panel-example framework: panel app_id: null app_version: 1.3.0 diff --git a/Panel/ci/__main__.py b/Panel/ci/__main__.py index 7f4d5f4..3403ea2 100644 --- a/Panel/ci/__main__.py +++ b/Panel/ci/__main__.py @@ -35,7 +35,7 @@ def build(config, rebuild_zbundle, verbose): """Build the Docker image""" # Configuration details - bundle_image = "/".join([config["repository"], config["env_name"]]) + bundle_image = "/".join([config["repository"], config["image_name"]]) version = config["app_version"] app_deps = config["app_deps"] @@ -76,7 +76,7 @@ def run(config, verbose): """Run the Docker image for testing""" # Configuration details - container_name = config["env_name"] + container_name = config["image_name"] bundle_image = "/".join([config["repository"], container_name]) version = config["app_version"] @@ -101,7 +101,7 @@ def publish(config, verbose): """Publish the Docker image for use with Edge""" # Configuration details - bundle_image = "/".join([config["repository"], config["env_name"]]) + bundle_image = "/".join([config["repository"], config["image_name"]]) version = config["app_version"] cmd = ["docker", "push", f"{bundle_image}:{version}"] diff --git a/Plotly Dash/app_config.yaml b/Plotly Dash/app_config.yaml index 3d192e4..5424fd6 100644 --- a/Plotly Dash/app_config.yaml +++ b/Plotly Dash/app_config.yaml @@ -1,4 +1,4 @@ -env_name: edge-plotly-dash-example +image_name: edge-plotly-dash-example framework: plotly-dash app_id: null app_version: 1.3.0 diff --git a/Plotly Dash/ci/__main__.py b/Plotly Dash/ci/__main__.py index 408a19a..7a64b50 100644 --- a/Plotly Dash/ci/__main__.py +++ b/Plotly Dash/ci/__main__.py @@ -34,7 +34,7 @@ def build(config, rebuild_zbundle, verbose): """Build the Docker image""" # Configuration details - bundle_image = "/".join([config["repository"], config["env_name"]]) + bundle_image = "/".join([config["repository"], config["image_name"]]) version = config["app_version"] app_deps = config["app_deps"] @@ -75,7 +75,7 @@ def run(config, verbose): """Run the Docker image for testing""" # Configuration details - container_name = config["env_name"] + container_name = config["image_name"] bundle_image = "/".join([config["repository"], container_name]) version = config["app_version"] @@ -100,7 +100,7 @@ def publish(config, verbose): """Publish the Docker image for use with Edge""" # Configuration details - bundle_image = "/".join([config["repository"], config["env_name"]]) + bundle_image = "/".join([config["repository"], config["image_name"]]) version = config["app_version"] cmd = ["docker", "push", f"{bundle_image}:{version}"] diff --git a/React/app_config.yaml b/React/app_config.yaml index 52e777d..31b398d 100644 --- a/React/app_config.yaml +++ b/React/app_config.yaml @@ -1,4 +1,4 @@ -env_name: edge-react-example +image_name: edge-react-example framework: react app_id: null app_version: 1.3.0 diff --git a/React/ci/__main__.py b/React/ci/__main__.py index 2f6bed6..4823abb 100644 --- a/React/ci/__main__.py +++ b/React/ci/__main__.py @@ -34,7 +34,7 @@ def build(config, rebuild_zbundle, verbose): """Build the Docker image""" # Configuration details - bundle_image = "/".join([config["repository"], config["env_name"]]) + bundle_image = "/".join([config["repository"], config["image_name"]]) version = config["app_version"] app_deps = config["app_deps"] @@ -80,7 +80,7 @@ def run(config, verbose): """Run the Docker image for testing""" # Configuration details - container_name = config["env_name"] + container_name = config["image_name"] bundle_image = "/".join([config["repository"], container_name]) version = config["app_version"] @@ -105,7 +105,7 @@ def publish(config, verbose): """Publish the Docker image for use with Edge""" # Configuration details - bundle_image = "/".join([config["repository"], config["env_name"]]) + bundle_image = "/".join([config["repository"], config["image_name"]]) version = config["app_version"] cmd = ["docker", "push", f"{bundle_image}:{version}"] diff --git a/Streamlit/app_config.yaml b/Streamlit/app_config.yaml index a19ed65..fc5445e 100644 --- a/Streamlit/app_config.yaml +++ b/Streamlit/app_config.yaml @@ -1,4 +1,4 @@ -env_name: edge-streamlit-example +image_name: edge-streamlit-example framework: streamlit app_id: null app_version: 1.3.0 diff --git a/Streamlit/ci/__main__.py b/Streamlit/ci/__main__.py index 11e2734..b2005b5 100644 --- a/Streamlit/ci/__main__.py +++ b/Streamlit/ci/__main__.py @@ -34,7 +34,7 @@ def build(config, rebuild_zbundle, verbose): """Build the Docker image""" # Configuration details - bundle_image = "/".join([config["repository"], config["env_name"]]) + bundle_image = "/".join([config["repository"], config["image_name"]]) version = config["app_version"] app_deps = config["app_deps"] @@ -75,7 +75,7 @@ def run(config, verbose): """Run the Docker image for testing""" # Configuration details - container_name = config["env_name"] + container_name = config["image_name"] bundle_image = "/".join([config["repository"], container_name]) version = config["app_version"] @@ -100,7 +100,7 @@ def publish(config, verbose): """Publish the Docker image for use with Edge""" # Configuration details - bundle_image = "/".join([config["repository"], config["env_name"]]) + bundle_image = "/".join([config["repository"], config["image_name"]]) version = config["app_version"] cmd = ["docker", "push", f"{bundle_image}:{version}"] From c5e469e6b5d3bfc2cd84f3b219a150427ad64420 Mon Sep 17 00:00:00 2001 From: EdwinWiseOne Date: Fri, 21 Jun 2024 12:30:45 -0500 Subject: [PATCH 14/19] Add python_version --- Minimal/app_config.yaml | 1 + Panel/app_config.yaml | 1 + Plotly Dash/app_config.yaml | 1 + React/app_config.yaml | 1 + Streamlit/app_config.yaml | 1 + 5 files changed, 5 insertions(+) diff --git a/Minimal/app_config.yaml b/Minimal/app_config.yaml index e876a51..66a9b19 100644 --- a/Minimal/app_config.yaml +++ b/Minimal/app_config.yaml @@ -2,6 +2,7 @@ image_name: edge-minimal-example framework: generic app_id: null app_version: 1.2.0 +python_version: 3.8 repository: quay.io/enthought env_deps: edm: diff --git a/Panel/app_config.yaml b/Panel/app_config.yaml index 7463856..e06edc4 100644 --- a/Panel/app_config.yaml +++ b/Panel/app_config.yaml @@ -2,6 +2,7 @@ image_name: edge-panel-example framework: panel app_id: null app_version: 1.3.0 +python_version: 3.8 repository: quay.io/enthought env_deps: edm: diff --git a/Plotly Dash/app_config.yaml b/Plotly Dash/app_config.yaml index 5424fd6..b298575 100644 --- a/Plotly Dash/app_config.yaml +++ b/Plotly Dash/app_config.yaml @@ -2,6 +2,7 @@ image_name: edge-plotly-dash-example framework: plotly-dash app_id: null app_version: 1.3.0 +python_version: 3.8 repository: quay.io/enthought env_deps: edm: diff --git a/React/app_config.yaml b/React/app_config.yaml index 31b398d..3936103 100644 --- a/React/app_config.yaml +++ b/React/app_config.yaml @@ -2,6 +2,7 @@ image_name: edge-react-example framework: react app_id: null app_version: 1.3.0 +python_version: 3.8 repository: quay.io/enthought env_deps: edm: diff --git a/Streamlit/app_config.yaml b/Streamlit/app_config.yaml index fc5445e..4122755 100644 --- a/Streamlit/app_config.yaml +++ b/Streamlit/app_config.yaml @@ -2,6 +2,7 @@ image_name: edge-streamlit-example framework: streamlit app_id: null app_version: 1.3.0 +python_version: 3.8 repository: quay.io/enthought env_deps: edm: From a9088fb38bcc16236928e6142bf357af1e10c782 Mon Sep 17 00:00:00 2001 From: EdwinWiseOne Date: Fri, 21 Jun 2024 12:51:32 -0500 Subject: [PATCH 15/19] Yaml is too clever; force string --- Minimal/app_config.yaml | 2 +- Panel/app_config.yaml | 2 +- Plotly Dash/app_config.yaml | 2 +- React/app_config.yaml | 2 +- Streamlit/app_config.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Minimal/app_config.yaml b/Minimal/app_config.yaml index 66a9b19..d1afd9b 100644 --- a/Minimal/app_config.yaml +++ b/Minimal/app_config.yaml @@ -2,7 +2,7 @@ image_name: edge-minimal-example framework: generic app_id: null app_version: 1.2.0 -python_version: 3.8 +python_version: '3.8' repository: quay.io/enthought env_deps: edm: diff --git a/Panel/app_config.yaml b/Panel/app_config.yaml index e06edc4..7c30167 100644 --- a/Panel/app_config.yaml +++ b/Panel/app_config.yaml @@ -2,7 +2,7 @@ image_name: edge-panel-example framework: panel app_id: null app_version: 1.3.0 -python_version: 3.8 +python_version: '3.8' repository: quay.io/enthought env_deps: edm: diff --git a/Plotly Dash/app_config.yaml b/Plotly Dash/app_config.yaml index b298575..7da0c4e 100644 --- a/Plotly Dash/app_config.yaml +++ b/Plotly Dash/app_config.yaml @@ -2,7 +2,7 @@ image_name: edge-plotly-dash-example framework: plotly-dash app_id: null app_version: 1.3.0 -python_version: 3.8 +python_version: '3.8' repository: quay.io/enthought env_deps: edm: diff --git a/React/app_config.yaml b/React/app_config.yaml index 3936103..070eaaa 100644 --- a/React/app_config.yaml +++ b/React/app_config.yaml @@ -2,7 +2,7 @@ image_name: edge-react-example framework: react app_id: null app_version: 1.3.0 -python_version: 3.8 +python_version: '3.8' repository: quay.io/enthought env_deps: edm: diff --git a/Streamlit/app_config.yaml b/Streamlit/app_config.yaml index 4122755..b0dcfcb 100644 --- a/Streamlit/app_config.yaml +++ b/Streamlit/app_config.yaml @@ -2,7 +2,7 @@ image_name: edge-streamlit-example framework: streamlit app_id: null app_version: 1.3.0 -python_version: 3.8 +python_version: '3.8' repository: quay.io/enthought env_deps: edm: From 80c130a5503267e2b2e2d6a361caa170f5fe7f40 Mon Sep 17 00:00:00 2001 From: EdwinWiseOne Date: Fri, 21 Jun 2024 13:03:55 -0500 Subject: [PATCH 16/19] Screw yaml floats; I'll stringify on the other side. --- Minimal/app_config.yaml | 2 +- Panel/app_config.yaml | 2 +- Plotly Dash/app_config.yaml | 2 +- React/app_config.yaml | 2 +- Streamlit/app_config.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Minimal/app_config.yaml b/Minimal/app_config.yaml index d1afd9b..66a9b19 100644 --- a/Minimal/app_config.yaml +++ b/Minimal/app_config.yaml @@ -2,7 +2,7 @@ image_name: edge-minimal-example framework: generic app_id: null app_version: 1.2.0 -python_version: '3.8' +python_version: 3.8 repository: quay.io/enthought env_deps: edm: diff --git a/Panel/app_config.yaml b/Panel/app_config.yaml index 7c30167..e06edc4 100644 --- a/Panel/app_config.yaml +++ b/Panel/app_config.yaml @@ -2,7 +2,7 @@ image_name: edge-panel-example framework: panel app_id: null app_version: 1.3.0 -python_version: '3.8' +python_version: 3.8 repository: quay.io/enthought env_deps: edm: diff --git a/Plotly Dash/app_config.yaml b/Plotly Dash/app_config.yaml index 7da0c4e..b298575 100644 --- a/Plotly Dash/app_config.yaml +++ b/Plotly Dash/app_config.yaml @@ -2,7 +2,7 @@ image_name: edge-plotly-dash-example framework: plotly-dash app_id: null app_version: 1.3.0 -python_version: '3.8' +python_version: 3.8 repository: quay.io/enthought env_deps: edm: diff --git a/React/app_config.yaml b/React/app_config.yaml index 070eaaa..3936103 100644 --- a/React/app_config.yaml +++ b/React/app_config.yaml @@ -2,7 +2,7 @@ image_name: edge-react-example framework: react app_id: null app_version: 1.3.0 -python_version: '3.8' +python_version: 3.8 repository: quay.io/enthought env_deps: edm: diff --git a/Streamlit/app_config.yaml b/Streamlit/app_config.yaml index b0dcfcb..4122755 100644 --- a/Streamlit/app_config.yaml +++ b/Streamlit/app_config.yaml @@ -2,7 +2,7 @@ image_name: edge-streamlit-example framework: streamlit app_id: null app_version: 1.3.0 -python_version: '3.8' +python_version: 3.8 repository: quay.io/enthought env_deps: edm: From 22abc9198924631382c89003b8e2d130ca29fc02 Mon Sep 17 00:00:00 2001 From: EdwinWiseOne Date: Mon, 24 Jun 2024 08:13:27 -0500 Subject: [PATCH 17/19] Split repository config into two parts --- Minimal/app_config.yaml | 3 ++- Panel/app_config.yaml | 3 ++- Plotly Dash/app_config.yaml | 3 ++- React/app_config.yaml | 3 ++- Streamlit/app_config.yaml | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Minimal/app_config.yaml b/Minimal/app_config.yaml index 66a9b19..fe9c129 100644 --- a/Minimal/app_config.yaml +++ b/Minimal/app_config.yaml @@ -3,7 +3,8 @@ framework: generic app_id: null app_version: 1.2.0 python_version: 3.8 -repository: quay.io/enthought +repo_server: quay.io +repository: enthought env_deps: edm: - click diff --git a/Panel/app_config.yaml b/Panel/app_config.yaml index e06edc4..cd9b06c 100644 --- a/Panel/app_config.yaml +++ b/Panel/app_config.yaml @@ -3,7 +3,8 @@ framework: panel app_id: null app_version: 1.3.0 python_version: 3.8 -repository: quay.io/enthought +repo_server: quay.io +repository: enthought env_deps: edm: - click diff --git a/Plotly Dash/app_config.yaml b/Plotly Dash/app_config.yaml index b298575..1e7f6df 100644 --- a/Plotly Dash/app_config.yaml +++ b/Plotly Dash/app_config.yaml @@ -3,7 +3,8 @@ framework: plotly-dash app_id: null app_version: 1.3.0 python_version: 3.8 -repository: quay.io/enthought +repo_server: quay.io +repository: enthought env_deps: edm: - click diff --git a/React/app_config.yaml b/React/app_config.yaml index 3936103..d59b63d 100644 --- a/React/app_config.yaml +++ b/React/app_config.yaml @@ -3,7 +3,8 @@ framework: react app_id: null app_version: 1.3.0 python_version: 3.8 -repository: quay.io/enthought +repo_server: quay.io +repository: enthought env_deps: edm: - click diff --git a/Streamlit/app_config.yaml b/Streamlit/app_config.yaml index 4122755..d5c48df 100644 --- a/Streamlit/app_config.yaml +++ b/Streamlit/app_config.yaml @@ -3,7 +3,8 @@ framework: streamlit app_id: null app_version: 1.3.0 python_version: 3.8 -repository: quay.io/enthought +repo_server: quay.io +repository: enthought env_deps: edm: - click From dab80a19afd81f6793c0ae629653559b3c124032 Mon Sep 17 00:00:00 2001 From: EdwinWiseOne Date: Mon, 24 Jun 2024 08:26:52 -0500 Subject: [PATCH 18/19] USE the new config split --- Minimal/ci/__main__.py | 13 ++++++++++--- Panel/ci/__main__.py | 14 ++++++++++---- Plotly Dash/ci/__main__.py | 13 ++++++++++--- React/ci/__main__.py | 13 ++++++++++--- Streamlit/ci/__main__.py | 13 ++++++++++--- 5 files changed, 50 insertions(+), 16 deletions(-) diff --git a/Minimal/ci/__main__.py b/Minimal/ci/__main__.py index 5c7a5ad..8893c3c 100644 --- a/Minimal/ci/__main__.py +++ b/Minimal/ci/__main__.py @@ -18,6 +18,13 @@ SRC_ROOT = op.abspath(op.join(op.dirname(__file__), "..")) +def _bundle_image(config: dict) -> str: + """Assemble a bundle image name from the configuration settings.""" + return "/".join([config["repo_server"], + config["repository"], + config["image_name"]]) + + @click.group() @click.pass_context def cli(ctx): @@ -34,7 +41,7 @@ def build(config, rebuild_zbundle, verbose): """Build the Docker image""" # Configuration details - bundle_image = "/".join([config["repository"], config["image_name"]]) + bundle_image = _bundle_image(config) version = config["app_version"] app_deps = config["app_deps"] @@ -75,8 +82,8 @@ def run(config, verbose): """Run the Docker image for testing""" # Configuration details + bundle_image = _bundle_image(config) container_name = config["image_name"] - bundle_image = "/".join([config["repository"], container_name]) version = config["app_version"] # Get values from the dev settings file (API tokens for testing, etc.) @@ -100,7 +107,7 @@ def publish(config, verbose): """Publish the Docker image for use with Edge""" # Configuration details - bundle_image = "/".join([config["repository"], config["image_name"]]) + bundle_image = _bundle_image(config) version = config["app_version"] cmd = ["docker", "push", f"{bundle_image}:{version}"] diff --git a/Panel/ci/__main__.py b/Panel/ci/__main__.py index 3403ea2..d23e1c2 100644 --- a/Panel/ci/__main__.py +++ b/Panel/ci/__main__.py @@ -9,7 +9,6 @@ """ This is the "ci" module for the Panel example. """ - import click import os.path as op import subprocess @@ -19,6 +18,13 @@ SRC_ROOT = op.abspath(op.join(op.dirname(__file__), "..")) +def _bundle_image(config: dict) -> str: + """Assemble a bundle image name from the configuration settings.""" + return "/".join([config["repo_server"], + config["repository"], + config["image_name"]]) + + @click.group() @click.pass_context def cli(ctx): @@ -35,7 +41,7 @@ def build(config, rebuild_zbundle, verbose): """Build the Docker image""" # Configuration details - bundle_image = "/".join([config["repository"], config["image_name"]]) + bundle_image = _bundle_image(config) version = config["app_version"] app_deps = config["app_deps"] @@ -76,8 +82,8 @@ def run(config, verbose): """Run the Docker image for testing""" # Configuration details + bundle_image = _bundle_image(config) container_name = config["image_name"] - bundle_image = "/".join([config["repository"], container_name]) version = config["app_version"] # Get values from the dev settings file (API tokens for testing, etc.) @@ -101,7 +107,7 @@ def publish(config, verbose): """Publish the Docker image for use with Edge""" # Configuration details - bundle_image = "/".join([config["repository"], config["image_name"]]) + bundle_image = _bundle_image(config) version = config["app_version"] cmd = ["docker", "push", f"{bundle_image}:{version}"] diff --git a/Plotly Dash/ci/__main__.py b/Plotly Dash/ci/__main__.py index 7a64b50..8d2814a 100644 --- a/Plotly Dash/ci/__main__.py +++ b/Plotly Dash/ci/__main__.py @@ -18,6 +18,13 @@ SRC_ROOT = op.abspath(op.join(op.dirname(__file__), "..")) +def _bundle_image(config: dict) -> str: + """Assemble a bundle image name from the configuration settings.""" + return "/".join([config["repo_server"], + config["repository"], + config["image_name"]]) + + @click.group() @click.pass_context def cli(ctx): @@ -34,7 +41,7 @@ def build(config, rebuild_zbundle, verbose): """Build the Docker image""" # Configuration details - bundle_image = "/".join([config["repository"], config["image_name"]]) + bundle_image = _bundle_image(config) version = config["app_version"] app_deps = config["app_deps"] @@ -75,8 +82,8 @@ def run(config, verbose): """Run the Docker image for testing""" # Configuration details + bundle_image = _bundle_image(config) container_name = config["image_name"] - bundle_image = "/".join([config["repository"], container_name]) version = config["app_version"] # Get values from the dev settings file (API tokens for testing, etc.) @@ -100,7 +107,7 @@ def publish(config, verbose): """Publish the Docker image for use with Edge""" # Configuration details - bundle_image = "/".join([config["repository"], config["image_name"]]) + bundle_image = _bundle_image(config) version = config["app_version"] cmd = ["docker", "push", f"{bundle_image}:{version}"] diff --git a/React/ci/__main__.py b/React/ci/__main__.py index 4823abb..d7206a9 100644 --- a/React/ci/__main__.py +++ b/React/ci/__main__.py @@ -18,6 +18,13 @@ SRC_ROOT = op.abspath(op.join(op.dirname(__file__), "..")) +def _bundle_image(config: dict) -> str: + """Assemble a bundle image name from the configuration settings.""" + return "/".join([config["repo_server"], + config["repository"], + config["image_name"]]) + + @click.group() @click.pass_context def cli(ctx): @@ -34,7 +41,7 @@ def build(config, rebuild_zbundle, verbose): """Build the Docker image""" # Configuration details - bundle_image = "/".join([config["repository"], config["image_name"]]) + bundle_image = _bundle_image(config) version = config["app_version"] app_deps = config["app_deps"] @@ -80,8 +87,8 @@ def run(config, verbose): """Run the Docker image for testing""" # Configuration details + bundle_image = _bundle_image(config) container_name = config["image_name"] - bundle_image = "/".join([config["repository"], container_name]) version = config["app_version"] # Get values from the dev settings file (API tokens for testing, etc.) @@ -105,7 +112,7 @@ def publish(config, verbose): """Publish the Docker image for use with Edge""" # Configuration details - bundle_image = "/".join([config["repository"], config["image_name"]]) + bundle_image = _bundle_image(config) version = config["app_version"] cmd = ["docker", "push", f"{bundle_image}:{version}"] diff --git a/Streamlit/ci/__main__.py b/Streamlit/ci/__main__.py index b2005b5..8263233 100644 --- a/Streamlit/ci/__main__.py +++ b/Streamlit/ci/__main__.py @@ -18,6 +18,13 @@ SRC_ROOT = op.abspath(op.join(op.dirname(__file__), "..")) +def _bundle_image(config: dict) -> str: + """Assemble a bundle image name from the configuration settings.""" + return "/".join([config["repo_server"], + config["repository"], + config["image_name"]]) + + @click.group() @click.pass_context def cli(ctx): @@ -34,7 +41,7 @@ def build(config, rebuild_zbundle, verbose): """Build the Docker image""" # Configuration details - bundle_image = "/".join([config["repository"], config["image_name"]]) + bundle_image = _bundle_image(config) version = config["app_version"] app_deps = config["app_deps"] @@ -75,8 +82,8 @@ def run(config, verbose): """Run the Docker image for testing""" # Configuration details + bundle_image = _bundle_image(config) container_name = config["image_name"] - bundle_image = "/".join([config["repository"], container_name]) version = config["app_version"] # Get values from the dev settings file (API tokens for testing, etc.) @@ -100,7 +107,7 @@ def publish(config, verbose): """Publish the Docker image for use with Edge""" # Configuration details - bundle_image = "/".join([config["repository"], config["image_name"]]) + bundle_image = _bundle_image(config) version = config["app_version"] cmd = ["docker", "push", f"{bundle_image}:{version}"] From 93492d39564f2561cb2f06b9a97579b7286dfabb Mon Sep 17 00:00:00 2001 From: EdwinWiseOne Date: Mon, 24 Jun 2024 09:51:06 -0500 Subject: [PATCH 19/19] Some renaming of config entries --- Minimal/app_config.yaml | 4 ++-- Minimal/ci/__main__.py | 4 ++-- Panel/app_config.yaml | 4 ++-- Panel/ci/__main__.py | 4 ++-- Plotly Dash/app_config.yaml | 4 ++-- Plotly Dash/ci/__main__.py | 4 ++-- React/app_config.yaml | 4 ++-- React/ci/__main__.py | 4 ++-- Streamlit/app_config.yaml | 4 ++-- Streamlit/ci/__main__.py | 4 ++-- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Minimal/app_config.yaml b/Minimal/app_config.yaml index fe9c129..13e42a5 100644 --- a/Minimal/app_config.yaml +++ b/Minimal/app_config.yaml @@ -3,8 +3,8 @@ framework: generic app_id: null app_version: 1.2.0 python_version: 3.8 -repo_server: quay.io -repository: enthought +repository: quay.io +organisation: enthought env_deps: edm: - click diff --git a/Minimal/ci/__main__.py b/Minimal/ci/__main__.py index 8893c3c..b143e72 100644 --- a/Minimal/ci/__main__.py +++ b/Minimal/ci/__main__.py @@ -20,8 +20,8 @@ def _bundle_image(config: dict) -> str: """Assemble a bundle image name from the configuration settings.""" - return "/".join([config["repo_server"], - config["repository"], + return "/".join([config["repository"], + config["organisation"], config["image_name"]]) diff --git a/Panel/app_config.yaml b/Panel/app_config.yaml index cd9b06c..62afc2e 100644 --- a/Panel/app_config.yaml +++ b/Panel/app_config.yaml @@ -3,8 +3,8 @@ framework: panel app_id: null app_version: 1.3.0 python_version: 3.8 -repo_server: quay.io -repository: enthought +repository: quay.io +organisation: enthought env_deps: edm: - click diff --git a/Panel/ci/__main__.py b/Panel/ci/__main__.py index d23e1c2..7a53f21 100644 --- a/Panel/ci/__main__.py +++ b/Panel/ci/__main__.py @@ -20,8 +20,8 @@ def _bundle_image(config: dict) -> str: """Assemble a bundle image name from the configuration settings.""" - return "/".join([config["repo_server"], - config["repository"], + return "/".join([config["repository"], + config["organisation"], config["image_name"]]) diff --git a/Plotly Dash/app_config.yaml b/Plotly Dash/app_config.yaml index 1e7f6df..1805135 100644 --- a/Plotly Dash/app_config.yaml +++ b/Plotly Dash/app_config.yaml @@ -3,8 +3,8 @@ framework: plotly-dash app_id: null app_version: 1.3.0 python_version: 3.8 -repo_server: quay.io -repository: enthought +repository: quay.io +organisation: enthought env_deps: edm: - click diff --git a/Plotly Dash/ci/__main__.py b/Plotly Dash/ci/__main__.py index 8d2814a..c802712 100644 --- a/Plotly Dash/ci/__main__.py +++ b/Plotly Dash/ci/__main__.py @@ -20,8 +20,8 @@ def _bundle_image(config: dict) -> str: """Assemble a bundle image name from the configuration settings.""" - return "/".join([config["repo_server"], - config["repository"], + return "/".join([config["repository"], + config["organisation"], config["image_name"]]) diff --git a/React/app_config.yaml b/React/app_config.yaml index d59b63d..4301e02 100644 --- a/React/app_config.yaml +++ b/React/app_config.yaml @@ -3,8 +3,8 @@ framework: react app_id: null app_version: 1.3.0 python_version: 3.8 -repo_server: quay.io -repository: enthought +repository: quay.io +organisation: enthought env_deps: edm: - click diff --git a/React/ci/__main__.py b/React/ci/__main__.py index d7206a9..d18fccf 100644 --- a/React/ci/__main__.py +++ b/React/ci/__main__.py @@ -20,8 +20,8 @@ def _bundle_image(config: dict) -> str: """Assemble a bundle image name from the configuration settings.""" - return "/".join([config["repo_server"], - config["repository"], + return "/".join([config["repository"], + config["organisation"], config["image_name"]]) diff --git a/Streamlit/app_config.yaml b/Streamlit/app_config.yaml index d5c48df..a6968e2 100644 --- a/Streamlit/app_config.yaml +++ b/Streamlit/app_config.yaml @@ -3,8 +3,8 @@ framework: streamlit app_id: null app_version: 1.3.0 python_version: 3.8 -repo_server: quay.io -repository: enthought +repository: quay.io +organisation: enthought env_deps: edm: - click diff --git a/Streamlit/ci/__main__.py b/Streamlit/ci/__main__.py index 8263233..9b968e8 100644 --- a/Streamlit/ci/__main__.py +++ b/Streamlit/ci/__main__.py @@ -20,8 +20,8 @@ def _bundle_image(config: dict) -> str: """Assemble a bundle image name from the configuration settings.""" - return "/".join([config["repo_server"], - config["repository"], + return "/".join([config["repository"], + config["organisation"], config["image_name"]])