You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Split code block for building dash in CONTRIBUTING.md
Following Martha's suggestions, the big code block in the build Dash part is split up and the comments, containing explanations, are replaced as regular text
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+38-29Lines changed: 38 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -75,53 +75,62 @@ The build process is mostly the same for Windows and Linux systems. Wherever the
75
75
---
76
76
</details>
77
77
78
-
Open a Bash terminal in the `dash` repository, Git Bash terminal for example on Windows:
78
+
Open a Bash terminal in the `dash` repository, Git Bash terminal for example on Windows. Create and activate virtual environment (skip this part if you manage the Python Interpreter via Pycharm):
79
+
- Linux/Mac:
79
80
80
-
```bash
81
-
# Create and activate virtual environment
82
-
#### LINUX ####
81
+
On some Linux/Mac environments, use `.` instead of `source`
82
+
```bash
83
83
$ python3 -m venv .venv/dev
84
-
# on some linux / mac environments, use `.` instead of `source`
85
84
$ source .venv/dev/bin/activate
86
-
#### WINDOWS ####
87
-
# Skip this if you manage the Python Interpreter via Pycharm.
88
-
# Create and activate virtual environment
85
+
```
86
+
- Windows:
87
+
```bash
89
88
$ python -m venv .venv/dev
90
89
$ source .venv/dev/scripts/activate
91
-
########
90
+
```
92
91
93
-
# install dash and dependencies
92
+
Install dash and dependencies:
93
+
```bash
94
94
$ pip install -e .[ci,dev,testing,celery,diskcache] # in some shells you need \ to escape []
95
-
96
-
# Do a clean install of all packages listed in package-lock.json. Package versions will be
97
-
# exactly like stated in the file
98
95
$ npm ci
96
+
```
97
+
`npm ci` does a clean install of all packages listed in package-lock.json. Package versions will be exactly like stated in the file.
# and renderer bundles; this will build all bundles from source code in their
102
-
# respective directories. The only true source of npm version is defined
103
-
# in package.json for each package.
104
-
#### LINUX ####
99
+
Next, build dash-core-components, dash-html-components, dash-table, and renderer bundles. This will build all bundles from source code in their respective directories. The only true source of npm version is defined in package.json for each package:
100
+
- Linux/Mac:
101
+
```bash
105
102
$ npm run build # runs `renderer build` and `npm build` in dcc, html, table
106
-
#### WINDOWS ####
107
-
# On Windows the build is done via the first-build script. This adds extra steps
108
-
# that are automatically applied on Linux systems, but not on Windows systems.
103
+
```
104
+
105
+
- Windows:
106
+
107
+
On Windows the build is done via the first-build script. This adds extra steps that are automatically applied on Linux systems, but not on Windows systems:
108
+
```bash
109
109
$ npm run first-build
110
-
########
110
+
```
111
111
112
-
# When you first clone the repository, and check out a new branch, you must
113
-
# run the full build as above. Later on, when you only work in one part of
114
-
# the library, you could run part of the build process e.g.
115
-
# $ dash-update-components "dash-core-components"
116
-
# to only build dcc when developing dcc
112
+
When you first clone the repository, and check out a new branch, you must run the full build as above. Later on, when you only work in one part of the library, you could run part of the build process e.g.
113
+
```bash
114
+
$ dash-update-components "dash-core-components"
115
+
116
+
```
117
+
to only build dcc when developing dcc.
117
118
118
-
# Build and install components used in tests
119
+
Build and install components used in tests:
120
+
```bash
119
121
$ npm run setup-tests.py # or npm run setup-tests.R
122
+
```
120
123
121
-
# Verify that Dash is refering to a local source repo
124
+
Finally, check that the installation succeeded by checking the output of this command:
125
+
```bash
122
126
$ pip list | grep dash
123
127
```
124
128
129
+
The output should look like this:
130
+
```bash
131
+
dash <version number> /path/to/local/dash/repo/
132
+
```
133
+
125
134
### Dash-Renderer Beginner Guide
126
135
127
136
`Dash Renderer` began as a separate repository. It was merged into the main `Dash` repository as part of the 1.0 release. It is the common frontend for all Dash backends (**R** and **Python**), and manages React Component layout and backend event handling.
0 commit comments