@@ -8,6 +8,7 @@ slug: /install
88
99import DarkButton from " @site/src/components/DarkButton" ;
1010import octInfo16 from " @iconify-icons/octicon/info-16" ;
11+ import octLogoGist16 from " @iconify-icons/octicon/logo-gist-16" ;
1112import IconExternalLink from " @theme/Icon/ExternalLink" ;
1213
1314import {repoURL } from " @site/src/envs/variables" ;
@@ -36,12 +37,39 @@ pip install dash-file-cache[option1,option2...]
3637## Install the GitHub version
3738
3839The 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+
4064After 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
4468cd 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
4573python -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
61104cd 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
62109python -m pip install .[test]
63- python -m pytest tests
110+ python -m pytest --with-dash --headless
64111```
65112
66113The 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