Skip to content

Commit

Permalink
Back out 111 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwinWiseOne committed Nov 20, 2024
1 parent 3ce8641 commit 76bd7bb
Show file tree
Hide file tree
Showing 28 changed files with 85 additions and 116 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

env:
SHELL: /bin/bash
INSTALLED_EDM_VERSION: "4.0.0"
INSTALLED_EDM_VERSION: "3.7.0"
EDM_API_TOKEN: ${{ secrets.HATCHER_TOKEN }}

strategy:
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
fetch-depth: 0

- name: Set up EDM
uses: enthought/setup-edm-action@v4
uses: enthought/setup-edm-action@v2
with:
edm-version: ${{ env.INSTALLED_EDM_VERSION }}

Expand Down
4 changes: 2 additions & 2 deletions Kubernetes/devspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ hooks:
command: |-
$!(
if ! [ -f ./src/app_environment.zbundle ] || [ $(get_flag "rebuild-zbundle") == "true" ]; then
echo 'edm bundle generate -i --version 3.11 --platform rh8-x86_64 -m 2.0 -f ./src/app_environment.zbundle ${EDM_APP_DEPENDENCIES}'
echo 'edm bundle generate -i --version 3.8 --platform rh7-x86_64 -m 2.0 -f ./src/app_environment.zbundle ${EDM_APP_DEPENDENCIES}'
else
echo ''
fi
Expand Down Expand Up @@ -77,7 +77,7 @@ commands:
cd deploy/terraform/deployments/devspace
terraform init
create-edm-devenv: |-
edm env create ${DEVSPACE_NAME} --version 3.11 --platform rh8-x86_64
edm env create ${DEVSPACE_NAME} --version 3.8
edm install -e ${DEVSPACE_NAME} -y ${EDM_APP_DEPENDENCIES}
functions:
Expand Down
7 changes: 2 additions & 5 deletions Minimal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

ARG BASE_IMAGE=quay.io/enthought/edm-rockylinux-8:latest

FROM $BASE_IMAGE AS stage_one
FROM $BASE_IMAGE as stage_one

ARG EDGE_BUNDLE=app_environment.zbundle
COPY $EDGE_BUNDLE /tmp/app_environment.zbundle
Expand All @@ -32,13 +32,10 @@ WORKDIR /home/app
# Create a default EDM environment using the enthought_edge bundle
RUN edm env import -f /tmp/app_environment.zbundle edm && edm cache purge --yes

# Add any 'pip' packages to the application environment
COPY requirements.txt /tmp/requirements.txt
RUN edm run -- python -m pip install -r /tmp/requirements.txt --no-cache-dir

# Second stage

FROM $BASE_IMAGE AS stage_two
FROM $BASE_IMAGE as stage_two

LABEL source="https://github.com/enthought/edge-examples/blob/main/Minimal/Dockerfile"

Expand Down
11 changes: 4 additions & 7 deletions Minimal/app_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,10 @@ env_deps:
pip:
- questionary
app_deps:
edm:
- flask
- pip
- setuptools
- gunicorn
- enthought_edge
pip: []
- flask
- setuptools
- gunicorn
- enthought_edge
cmd_deps:
- docker
exclude:
Expand Down
3 changes: 1 addition & 2 deletions Minimal/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ def bootstrap(ci_mode):

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

cmd = ["edm", "install", "-e", ENV_NAME, "-y"] + EDM_DEPS
Expand Down
7 changes: 4 additions & 3 deletions Minimal/ci/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ def build(config, bundle_image, rebuild_zbundle, verbose):
# Configuration details
bundle_image = bundle_image or _bundle_image(config)
version = config["app_version"]
app_deps = config["app_deps"]["edm"]
app_deps = config["app_deps"]
python_version = str(config["python_version"])
if python_version == "3.8":
raise RuntimeError("Python 3.8 is not supported")
platform = "rh8-x86_64"
platform = "rh7-x86_64"
else:
platform = "rh8-x86_64"

# First, we build a "zbundle" which contains all the eggs needed to
# build the environment within the Docker image.
Expand Down
1 change: 0 additions & 1 deletion Minimal/requirements.txt

This file was deleted.

3 changes: 0 additions & 3 deletions Panel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ WORKDIR /home/app
# Create a default EDM environment using the enthought_edge bundle
RUN edm env import -f /tmp/app_environment.zbundle edm && edm cache purge --yes

# Add any 'pip' packages to the application environment
COPY requirements.txt /tmp/requirements.txt
RUN edm run -- python -m pip install -r /tmp/requirements.txt --no-cache-dir

# Second stage

Expand Down
24 changes: 11 additions & 13 deletions Panel/app_config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
app_id: edge-panel-example
framework: panel
app_version: 1.3.0
python_version: 3.11
python_version: 3.8
repository: quay.io
organisation: enthought
env_deps:
Expand All @@ -18,18 +18,16 @@ env_deps:
pip:
- questionary
app_deps:
edm:
- enthought_edge>=2.16.0
- packaging
- pip
- pyparsing
- setuptools
- six
- numpy
- pandas
- matplotlib
pip:
- panel
- enthought_edge>=2.16.0
- packaging
- pip
- pyparsing
- setuptools
- six
- panel
- numpy
- pandas
- matplotlib
cmd_deps:
- docker
exclude:
Expand Down
3 changes: 1 addition & 2 deletions Panel/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ def bootstrap(ci_mode):

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

cmd = ["edm", "install", "-e", ENV_NAME, "-y"] + EDM_DEPS
Expand Down
7 changes: 4 additions & 3 deletions Panel/ci/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ def build(config, bundle_image, rebuild_zbundle, verbose):
# Configuration details
bundle_image = bundle_image or _bundle_image(config)
version = config["app_version"]
app_deps = config["app_deps"]["edm"]
app_deps = config["app_deps"]
python_version = str(config["python_version"])
if python_version == "3.8":
raise RuntimeError("Python 3.8 is not supported")
platform = "rh8-x86_64"
platform = "rh7-x86_64"
else:
platform = "rh8-x86_64"

# First, we build a "zbundle" which contains all the eggs needed to
# build the environment within the Docker image.
Expand Down
1 change: 0 additions & 1 deletion Panel/requirements.txt

This file was deleted.

6 changes: 3 additions & 3 deletions Plotly Dash/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ WORKDIR /home/app
# Create a default EDM environment using the enthought_edge bundle
RUN edm env import -f /tmp/app_environment.zbundle edm && edm cache purge --yes

# Add any 'pip' packages to the application environment
COPY requirements.txt /tmp/requirements.txt
RUN edm run -- python -m pip install -r /tmp/requirements.txt --no-cache-dir
# Install any 'pip' dependencies
RUN edm run -- pip install --no-cache-dir Flask-Session


# Second stage

Expand Down
27 changes: 12 additions & 15 deletions Plotly Dash/app_config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
app_id: edge-plotly-dash-example
framework: plotly-dash
app_version: 1.3.0
python_version: 3.11
python_version: 3.8
repository: quay.io
organisation: enthought
env_deps:
Expand All @@ -18,20 +18,17 @@ env_deps:
pip:
- questionary
app_deps:
edm:
- enthought_edge>=2.16.0
- packaging
- pip
- pyparsing
- setuptools
- six
- requests
- gunicorn
- pandas
- flask>2
pip:
- dash
- Flask-Session
- enthought_edge>=2.16.0
- packaging
- pip
- pyparsing
- setuptools
- six
- requests
- gunicorn
- pandas
- flask>2
- dash
cmd_deps:
- docker
exclude:
Expand Down
3 changes: 1 addition & 2 deletions Plotly Dash/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ def bootstrap(ci_mode):

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

cmd = ["edm", "install", "-e", ENV_NAME, "-y"] + EDM_DEPS
Expand Down
7 changes: 4 additions & 3 deletions Plotly Dash/ci/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ def build(config, bundle_image, rebuild_zbundle, verbose):
# Configuration details
bundle_image = bundle_image or _bundle_image(config)
version = config["app_version"]
app_deps = config["app_deps"]["edm"]
app_deps = config["app_deps"]
python_version = str(config["python_version"])
if python_version == "3.8":
raise RuntimeError("Python 3.8 is not supported")
platform = "rh8-x86_64"
platform = "rh7-x86_64"
else:
platform = "rh8-x86_64"

# First, we build a "zbundle" which contains all the eggs needed to
# build the environment within the Docker image.
Expand Down
2 changes: 0 additions & 2 deletions Plotly Dash/requirements.txt

This file was deleted.

6 changes: 3 additions & 3 deletions React/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ WORKDIR /home/app
# Create a default EDM environment using the enthought_edge bundle
RUN edm env import -f /tmp/app_environment.zbundle edm && edm cache purge --yes

# Add any 'pip' packages to the application environment
COPY requirements.txt /tmp/requirements.txt
RUN edm run -- python -m pip install -r /tmp/requirements.txt --no-cache-dir
# Install any 'pip' dependencies
RUN edm run -- pip install --no-cache-dir Flask-Session


# Second stage

Expand Down
23 changes: 10 additions & 13 deletions React/app_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,16 @@ env_deps:
pip:
- questionary
app_deps:
edm:
- enthought_edge>=2.16.0
- packaging
- pip
- pyparsing
- setuptools
- six
- click
- flask>2
- gunicorn
- opencv_python
pip:
- Flask-Session
- enthought_edge>=2.16.0
- packaging
- pip
- pyparsing
- setuptools
- six
- click
- flask>2
- gunicorn
- opencv_python
cmd_deps:
- docker
exclude:
Expand Down
3 changes: 1 addition & 2 deletions React/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ def bootstrap(ci_mode):

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

cmd = ["edm", "install", "-e", ENV_NAME, "-y"] + EDM_DEPS
Expand Down
7 changes: 4 additions & 3 deletions React/ci/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ def build(config, bundle_image, rebuild_zbundle, verbose):
# Configuration details
bundle_image = bundle_image or _bundle_image(config)
version = config["app_version"]
app_deps = config["app_deps"]["edm"]
app_deps = config["app_deps"]
python_version = str(config["python_version"])
if python_version == "3.8":
raise RuntimeError("Python 3.8 is not supported")
platform = "rh8-x86_64"
platform = "rh7-x86_64"
else:
platform = "rh8-x86_64"

# First, build the React application
jsdir = op.join(SRC_ROOT, "src", "application", "frontend")
Expand Down
1 change: 0 additions & 1 deletion React/requirements.txt

This file was deleted.

6 changes: 3 additions & 3 deletions Streamlit/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ WORKDIR /home/app
# Create a default EDM environment using the enthought_edge bundle
RUN edm env import -f /tmp/app_environment.zbundle edm && edm cache purge --yes

# Add any 'pip' packages to the application environment
COPY requirements.txt /tmp/requirements.txt
RUN edm run -- python -m pip install -r /tmp/requirements.txt --no-cache-dir
# Add a few 'pip' packages to the application environment
RUN edm run -- python -m pip install --no-cache-dir \
streamlit streamlit-javascript streamlit-extras

# Second stage

Expand Down
19 changes: 7 additions & 12 deletions Streamlit/app_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,13 @@ env_deps:
pip:
- questionary
app_deps:
edm:
- enthought_edge>=2.16.0
- packaging
- pip
- pyparsing
- setuptools
- six
- requests
pip:
- streamlit
- streamlit-javascript
- streamlit-extras
- enthought_edge>=2.16.0
- packaging
- pip
- pyparsing
- setuptools
- six
- requests
cmd_deps:
- docker
exclude:
Expand Down
3 changes: 1 addition & 2 deletions Streamlit/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ def bootstrap(ci_mode):

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

cmd = ["edm", "install", "-e", ENV_NAME, "-y"] + EDM_DEPS
Expand Down
Loading

0 comments on commit 76bd7bb

Please sign in to comment.