Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
177 changes: 90 additions & 87 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 2.0
version: 2.1

jobs:
test_black:
Expand All @@ -16,111 +16,114 @@ jobs:
name: run black
command: |
black . --check
deploy_to_playground:
docker:
- image: circleci/python:3.6-stretch
working_directory: ~/dash-sample-apps
steps:
- checkout
- run:
name: Add plotly remote
command: git remote add playground https://dash-playground.plotly.host/GIT/$CIRCLE_BRANCH
- run:
name: Create helper-script
command: printf '#!/bin/bash\necho username=$PLAYGROUND_DEPLOY_USERNAME\necho password=$PLAYGROUND_DEPLOY_PASSWORD' >> /home/circleci/helper-script.sh
- run:
name: Set up git config
command: |
git config --global credential.helper "/bin/bash /home/circleci/helper-script.sh"
git config --global user.email '<>' # Leave email blank
git config --global user.name "Circle MonoRepo Automatic Deployer"
- run:
name: Install curl
command: |
sudo apt update
sudo apt install -y -qq curl
- run:
name: Install dds-client
command: |
curl -sSL -o dds-client.tgz https://github.com/plotly/dds-client/releases/download/v0.3.0/dds-client_0.3.0_linux_x86_64.tgz
mkdir $HOME/bin
tar xzf dds-client.tgz -C $HOME/bin
chmod +x $HOME/bin/dds-client
- run:
name: Deploy
command: |
APPS_MODIFIED=$(git diff origin/master origin/$CIRCLE_BRANCH --dirstat=files,1 apps/ | awk '{ split($2,a,"/"); if (length(a[2]) != 0) { print a[2]} } ' | sort -u)
if [ -z "$APPS_MODIFIED" ]
then
echo "No app change detected. Skipping the deploy.."
exit 0
fi

for APP in $APPS_MODIFIED
do
CREATE_APP=true DASH_ENTERPRISE_URL="$DASH_PLAYGROUND_ENTERPRISE_URL" DASH_ENTERPRISE_API_KEY="$DASH_PLAYGROUND_ENTERPRISE_API_KEY" PATH="$HOME/bin:$PATH" ./deploy "$APP"
done
deploy_to_gallery:
deploy:
docker:
- image: circleci/python:3.6-stretch
- image: cimg/base:stable-20.04
working_directory: ~/dash-sample-apps
parameters:
only_changed_apps:
type: boolean
steps:
- checkout
- run:
name: Add plotly remote
command: git remote add gallery https://dash-playground.plotly.host/GIT/$CIRCLE_BRANCH
- run:
name: Create helper-script
command: printf '#!/bin/bash\necho username=$GALLERY_DEPLOY_USERNAME\necho password=$GALLERY_DEPLOY_PASSWORD' >> /home/circleci/helper-script.sh
- run:
name: Set up git config
command: |
git config --global credential.helper "/bin/bash /home/circleci/helper-script.sh"
git config --global user.email '<>' # Leave email blank
git config --global user.name "Circle MonoRepo Automatic Deployer"
- run:
name: Install curl
command: |
sudo apt update
sudo apt install -y -qq curl
- run:
name: Install dds-client
command: |
curl -sSL -o dds-client.tgz https://github.com/plotly/dds-client/releases/download/v0.3.0/dds-client_0.3.0_linux_x86_64.tgz
mkdir $HOME/bin
tar xzf dds-client.tgz -C $HOME/bin
chmod +x $HOME/bin/dds-client
- run:
name: Deploy
command: |
APPS_MODIFIED=$(ls apps | grep dash- | sort -u)
if [ -z "$APPS_MODIFIED" ]
then
echo "No app change detected. Skipping the deploy.."
exit 0
fi
- dash_git_setup
- install_dds_client
- dash_deploy:
only_changed_apps: << parameters.only_changed_apps >>

for APP in $APPS_MODIFIED
do
CREATE_APP=true DASH_ENTERPRISE_URL="$DASH_GALLERY_ENTERPRISE_URL" DASH_ENTERPRISE_API_KEY="$DASH_GALLERY_ENTERPRISE_API_KEY" PATH="$HOME/bin:$PATH" ./deploy "$APP"
done

workflows:
version: 2
test-and-deploy:
jobs:
- test_black
- deploy_to_playground:

#
#
# Feature branch deploys
- deploy:
name: Deploy to dash-playground
context: dash-playground-credentials
requires:
- test_black
filters:
branches:
ignore:
- master
- deploy_to_gallery:
- main
only_changed_apps: true

- deploy:
name: Deploy to dash-playground-k8s
context: dash-playground-k8s-credentials
requires:
- test_black
filters:
branches:
ignore:
- main
only_changed_apps: true

#
#
# main branch deploys
- deploy:
name: Deploy to dash-gallery
context: dash-gallery-credentials
requires:
- test_black
filters:
branches:
only:
- master
- main
only_changed_apps: false

commands:
dash_git_setup:
steps:
- run:
name: Create helper-script
command: printf '#!/bin/bash\necho username=$DASH_ENTERPRISE_USERNAME\necho password=$DASH_ENTERPRISE_PASSWORD' >> /home/circleci/helper-script.sh
- run:
name: Set up git config
command: |
git config --global credential.helper "/bin/bash /home/circleci/helper-script.sh"
git config --global user.email '<>' # Leave email blank
git config --global user.name "Circle MonoRepo Automatic Deployer"
git config --global protocol.version 0

install_dds_client:
steps:
- run:
name: Install dds-client
command: |
curl -sSL -o dds-client.tgz https://github.com/plotly/dds-client/releases/download/v0.3.0/dds-client_0.3.0_linux_x86_64.tgz
mkdir $HOME/bin
tar xzf dds-client.tgz -C $HOME/bin
chmod +x $HOME/bin/dds-client

dash_deploy:
parameters:
only_changed_apps:
type: boolean
steps:
- run:
name: Deploy
environment:
CREATE_APP: "true"
CREATE_DBS: "false"
command: |
APPS_MODIFIED=$(ls apps | sort -u)
<<# parameters.only_changed_apps >>
APPS_MODIFIED=$(git diff origin/main origin/$CIRCLE_BRANCH --dirstat=files,1 apps/ | awk '{ split($2,a,"/"); if (length(a[2]) != 0) { print a[2]} } ' | sort -u)
<</ parameters.only_changed_apps >>

if [ -z "$APPS_MODIFIED" ]
then
echo "No app change detected. Skipping the deploy.."
exit 0
fi

for APP in $APPS_MODIFIED
do
PATH="$HOME/bin:$PATH" ./deploy "$APP"
done
7 changes: 3 additions & 4 deletions .deployignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ dash-chatbot
dash-translate
dash-image-enhancing
dash-mapd-demo
dash-datashader
vtk-dicom
dash-fashion-mnist-explorer
dash-object-detection
dash-lastodash
dash-pileup-demo
dash-gpt3-chatbot
dash-fashion-mnist-explorer
2 changes: 1 addition & 1 deletion apps/cytoscape-editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ You can now run the app:
python app.py
```

and visit http://127.0.0.1:8050/.
and visit http://127.0.0.1:8050/.
2 changes: 1 addition & 1 deletion apps/dash-3d-image-partitioning/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ The data used in this demo app have been taken from the [MICCAI Brain Tumor Segm

[2] S. Bakas, H. Akbari, A. Sotiras, M. Bilello, M. Rozycki, J.S. Kirby, et al., "Advancing The Cancer Genome Atlas glioma MRI collections with expert segmentation labels and radiomic features", Nature Scientific Data, 4:170117 (2017) DOI: 10.1038/sdata.2017.117

[3] S. Bakas, M. Reyes, A. Jakab, S. Bauer, M. Rempfler, A. Crimi, et al., "Identifying the Best Machine Learning Algorithms for Brain Tumor Segmentation, Progression Assessment, and Overall Survival Prediction in the BRATS Challenge", arXiv preprint arXiv:1811.02629 (2018)
[3] S. Bakas, M. Reyes, A. Jakab, S. Bauer, M. Rempfler, A. Crimi, et al., "Identifying the Best Machine Learning Algorithms for Brain Tumor Segmentation, Progression Assessment, and Overall Survival Prediction in the BRATS Challenge", arXiv preprint arXiv:1811.02629 (2018)
2 changes: 1 addition & 1 deletion apps/dash-aerosandbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ An interactive demo of AeroSandbox, powered by Dash! Work in progress.
2. Run `app.py` to launch a local Dash server to host the Dash app. A link will appear in your console; click this to use the Dash app.

## Illustration
![Screenshot of Demo](assets/screenshot.png)
![Screenshot of Demo](assets/screenshot.png)
3 changes: 2 additions & 1 deletion apps/dash-airfoil-design/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ By Peter Sharpe

Tools for airfoil analysis in your browser.

This repository contains the code for the Dash web app itself. All aerodynamics math is contained in [AeroSandbox](https://github.com/peterdsharpe/AeroSandbox); specifically, [here](https://github.com/peterdsharpe/AeroSandbox/blob/master/aerosandbox/aerodynamics/aero_2D/airfoil_inviscid.py).
This repository contains the code for the Dash web app itself. All aerodynamics math is contained in [AeroSandbox](https://github.com/peterdsharpe/AeroSandbox); specifically, [here](https://github.com/peterdsharpe/AeroSandbox/blob/master/aerosandbox/aerodynamics/aero_2D/airfoil_inviscid.py).

2 changes: 1 addition & 1 deletion apps/dash-aix360-heart/Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: gunicorn app:server --workers 2
web: gunicorn app:server
2 changes: 1 addition & 1 deletion apps/dash-aix360-heart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ and visit http://127.0.0.1:8050/.

### Windows virtualenv

If you are on Windows, and you cannot use Windows Subsystem for Linux (WSL)
If you are on Windows, and you cannot use Windows Subsystem for Linux (WSL)
8 changes: 8 additions & 0 deletions apps/dash-aix360-heart/dependencies.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
aix360
dash
dash-bootstrap-components
plotly
scikit-learn
numpy
pandas
gunicorn
Loading