Skip to content

Commit df38edb

Browse files
Merge branch 'master' into dash-oil-and-gas
2 parents 0f3ac8e + bd0c45b commit df38edb

File tree

547 files changed

+1919054
-674
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

547 files changed

+1919054
-674
lines changed

.DS_Store

4 KB
Binary file not shown.

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
echo $PLOTLY_GA_CODE > ~/dash-sample-apps/apps/"$APP"/assets/plotly_ga.js
103103
git add ~/dash-sample-apps/apps/"$APP"/assets/plotly_ga.js && git commit -m "Deployed commit: $CIRCLE_SHA1"
104104
git remote add $APP https://dash-gallery.plotly.host/GIT/$APP
105-
git push $APP master --force
105+
git push $APP master --force || echo "Deploy failed because there is no such app on Dash Gallery: $APP. Please use the web interface to create an app with this name. Continuing deployments..."
106106
done
107107
- run:
108108
name: Push to production

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
vv/
22
*.pyc
3+
*.DS_Store
34
venv/
45
.idea/
6+
.DS_Store
7+
.Rproj.user

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ want to run is `my_dash_app` and the app filename is `app.py`, you
1111
would need to run `python apps/my_dash_app/app.py` from the root
1212
of the repository.
1313

14-
Each app has a requirements.txt, install the dependecies in a virtual
14+
Each app has a requirements.txt, install the dependecies in a virtual
1515
environment.
1616

1717
## Contributing to the sample apps repo
@@ -117,9 +117,9 @@ branch. Once you have passed your code review, you can merge your PR.
117117

118118
- **`Procfile`** gets run at root level for deployment
119119
- Make sure python working directory is at the app level
120-
- Ex. `web: gunicorn --pythonpath apps/{DASH_APP_NAME} app:server`
120+
- Ex. `web: gunicorn --pythonpath apps/{DASH_APP_NAME} app:server`
121121
- **`requirements.txt`**
122-
- Install project dependecies in a virtual environment
122+
- Install project dependecies in a virtual environment
123123
- **`runtime.txt`**
124124
- App python version
125125

@@ -132,7 +132,7 @@ branch. Once you have passed your code review, you can merge your PR.
132132
│ ├── data/ # all data (csv, json, txt, etc)
133133
│ ├── app.py # dash application entry point
134134
│ ├── Procfile # used for heroku deployment (how to run app)
135-
│ ├── requirements.txt # project dependecies
135+
│ ├── requirements.txt # project dependecies
136136
│ ├── runtime.txt # used for heroku deployment (python version)
137137
│ └── ...
138138
└── ...
@@ -147,7 +147,7 @@ Img(src="./assets/logo.png") will fail at root level
147147
```
148148

149149
Tips
150-
150+
151151
- Use [get_asset_url()](https://dash.plot.ly/dash-deployment-server/static-assets)
152152
- Use [Pathlib](https://docs.python.org/3/library/pathlib.html) for more flexibility
153153

apps/dash-brain-viewer/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
venv
2+
*.pyc
3+
.DS_Store
4+
.env

apps/dash-brain-viewer/Procfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: gunicorn --pythonpath apps/dash-brain-viewer app:server

apps/dash-brain-viewer/README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Dash Brain Viewer
2+
3+
## About this app
4+
5+
6+
This demo represents a brain model. The user is able to annotate the brain.
7+
8+
9+
Original repo: [plotly/dash-brain-surface-viewer](https://github.com/plotly/dash-brain-surface-viewer)
10+
11+
12+
## How to run this app
13+
14+
(The following instructions apply to Posix/bash. Windows users should check
15+
[here](https://docs.python.org/3/library/venv.html).)
16+
17+
First, clone this repository and open a terminal inside the root folder.
18+
19+
Create and activate a new virtual environment (recommended) by running
20+
the following:
21+
22+
```bash
23+
python3 -m venv myvenv
24+
source myvenv/bin/activate
25+
```
26+
27+
Install the requirements:
28+
29+
```bash
30+
pip install -r requirements.txt
31+
```
32+
Run the app:
33+
34+
```bash
35+
python app.py
36+
```
37+
Open a browser at http://127.0.0.1:8050
38+
39+
## Screenshots
40+
41+
![brain.png](brain.png)
42+
43+
### Credit
44+
45+
- [ACE Lab](https://www.mcgill.ca/bic/research/ace-lab-evans) at McGill for the brain data and inspiration from their excellent brain [Surface Viewer](https://brainbrowser.cbrain.mcgill.ca/surface-viewer#ct)
46+
- [Julia Huntenburg](https://github.com/juhuntenburg) for figuring out how to [read MNI objects in Python](https://github.com/juhuntenburg/laminar_python/blob/master/io_mesh.py)
47+
- [E. Petrisor](https://github.com/empet) for her extensive [exploration in Python with Plotly.js meshes](https://plot.ly/~empet/14767/mesh3d-from-a-stl-file/)
48+

0 commit comments

Comments
 (0)