Skip to content

Commit dbee89f

Browse files
committed
0.2.0 - update tutorials for downloaders
Update the tutorials for introducing the newly implemented downloader components.
1 parent 2c8223d commit dbee89f

File tree

7 files changed

+749
-67
lines changed

7 files changed

+749
-67
lines changed

Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#### :mega: New
1010

1111
1. Bump the document to the new version `0.2.0`.
12+
2. Update the tutorials for introducing the newly implemented downloader components.
1213

1314
#### :wrench: Fix
1415

docs/introduction.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The data cache enables the following features:
2626
1. Load a server-side file dynamically and send the file to users (the frontend).
2727
2. Support in-memory files (like `io.BytesIO()`) or on-disk files (specified by a path).
2828
3. Support different kinds of cache (single-processing, multi-processing, or file-based).
29-
4. A customized component helping the dashboard trigger a download event from the server side.
29+
4. Customized components helping the dashboard trigger a download event from the server side.
3030

3131
## The minimal example
3232

docs/tutorial/install.mdx

Lines changed: 58 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ slug: /install
88

99
import DarkButton from "@site/src/components/DarkButton";
1010
import octInfo16 from "@iconify-icons/octicon/info-16";
11+
import octLogoGist16 from "@iconify-icons/octicon/logo-gist-16";
1112
import IconExternalLink from "@theme/Icon/ExternalLink";
1213

1314
import {repoURL} from "@site/src/envs/variables";
@@ -36,12 +37,39 @@ pip install dash-file-cache[option1,option2...]
3637
## Install the GitHub version
3738

3839
The GitHub version may be newer than the PyPI version during the development.
39-
If users want to install the GitHub version, please ensure that [Git<IconExternalLink/>][link-git] has been installed.
40+
If users want to install the GitHub version, please ensure that
41+
42+
- [Git<IconExternalLink/>][link-git]
43+
- [NodeJS<IconExternalLink/>][link-nodejs]
44+
- [Yarn<IconExternalLink/>][link-yarn]
45+
46+
has been installed.
47+
48+
:::tip
49+
50+
If you are using Ubuntu or Debian (Linux), you can use the following script to install `nodejs/yarn` quickly:
51+
52+
<p>
53+
<DarkButton
54+
href="https://gist.github.com/cainmagi/f028e8ac4b06c3deefaf8ec38d5a7d8f#file-installation-for-nodejs-md"
55+
icon={octLogoGist16}
56+
iconVspace={0}
57+
>
58+
{"installation-for-nodejs.sh"}
59+
</DarkButton>
60+
</p>
61+
62+
:::
63+
4064
After that, run the following command to install the developer's version.
4165

4266
```shell
43-
git clone https://github.com/cainmagi/dash-file-cache
67+
git clone --depth 1 --single-branch https://github.com/cainmagi/dash-file-cache
4468
cd dash-file-cache
69+
python -m pip install -r requirements.txt -r requirements-dev.txt
70+
yarn install
71+
yarn dlx @yarnpkg/sdks vscode
72+
yarn build
4573
python -m pip install .[dev]
4674
```
4775

@@ -54,13 +82,32 @@ will take effects when `dash_file_cache` is imported anywhere.
5482

5583
## Run the tests
5684

57-
To verify whether the package is compatible with your device, please clone the project and run the tests:
85+
To verify whether the package is compatible with your device, please ensure that the
86+
following dependencies are available
87+
88+
- [Git<IconExternalLink/>][link-git]
89+
- [NodeJS<IconExternalLink/>][link-nodejs]
90+
- [Yarn<IconExternalLink/>][link-yarn]
91+
- [Chrome<IconExternalLink/>][link-chrome] or [Chromium<IconExternalLink/>][link-chromium]
92+
93+
:::warning
94+
95+
Note that the browser needs to be Chrome or Chromium. Edge or Opera will not work with
96+
[`dash_duo`<IconExternalLink/>][link-dash-duo].
97+
98+
:::
99+
100+
After that, clone the project and run the tests:
58101

59102
```shell
60-
git clone https://github.com/cainmagi/dash-file-cache
103+
git clone --depth 1 --single-branch https://github.com/cainmagi/dash-file-cache
61104
cd dash-file-cache
105+
python -m pip install -r requirements.txt -r requirements-dev.txt
106+
yarn install
107+
yarn dlx @yarnpkg/sdks vscode
108+
yarn build
62109
python -m pip install .[test]
63-
python -m pytest tests
110+
python -m pytest --with-dash --headless
64111
```
65112

66113
The package is only compatible with `python>=3.8`. If you find the package fails to pass the tests, please
@@ -72,3 +119,9 @@ The package is only compatible with `python>=3.8`. If you find the package fails
72119
</p>
73120

74121
[link-git]: https://git-scm.com/downloads
122+
[link-nodejs]: https://nodejs.org/en/download/package-manager
123+
[link-yarn]: https://yarnpkg.com/getting-started/install
124+
[link-chrome]: https://www.google.com/chrome/dr/download
125+
[link-chromium]: https://www.chromium.org/getting-involved/download-chromium
126+
[link-dash-duo]: https://dash.plotly.com/testing
127+
[link-pytest]: https://docs.pytest.org/

0 commit comments

Comments
 (0)