Spaces:
Sleeping
Sleeping
rmm
commited on
Commit
·
45154b4
1
Parent(s):
c2ad2a8
docs: added some notes for running tools locally
Browse files- docs/dev_notes.md +40 -0
- mkdocs.yaml +3 -2
docs/dev_notes.md
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# How to run the UI
|
2 |
+
|
3 |
+
We set this up so it is hosted as a huggingface space. Each commit to `main` triggers a push and a rebuild on their servers.
|
4 |
+
|
5 |
+
For local testing, assuming you have all the required packages installed in a
|
6 |
+
conda env or virtualenv, and that env is activated:
|
7 |
+
|
8 |
+
```
|
9 |
+
cd src
|
10 |
+
streamlit run main.py
|
11 |
+
```
|
12 |
+
Then use a web browser to view the site indiciated, by default: http://localhost:8501
|
13 |
+
|
14 |
+
# How to build and view docs locally
|
15 |
+
|
16 |
+
We have a CI action to presesnt the docs on github.io.
|
17 |
+
To validate locally, you need the deps listed in `requirements.txt` installed.
|
18 |
+
|
19 |
+
Run
|
20 |
+
```
|
21 |
+
mkdocs serve
|
22 |
+
```
|
23 |
+
And navigate to the wish server running locally, by default: http://127.0.0.1:8888/
|
24 |
+
|
25 |
+
This automatically watches for changes in the markdown files, but if you edit the
|
26 |
+
something else like the docstrings in py files, triggering a rebuild in another terminal
|
27 |
+
refreshes the site, without having to quit and restart the server.
|
28 |
+
```
|
29 |
+
mkdocs build -c
|
30 |
+
```
|
31 |
+
|
32 |
+
|
33 |
+
|
34 |
+
# Set up a venv
|
35 |
+
|
36 |
+
(standard stuff)
|
37 |
+
|
38 |
+
# Set up a conda env
|
39 |
+
|
40 |
+
(Standard stuff)
|
mkdocs.yaml
CHANGED
@@ -35,7 +35,8 @@ nav:
|
|
35 |
- Logging: st_logs.md
|
36 |
- Tab-rendering fix (js): fix_tabrender.md
|
37 |
|
38 |
-
|
39 |
-
|
40 |
- Development clutter:
|
41 |
- Demo app: app.md
|
|
|
|
|
|
|
|
35 |
- Logging: st_logs.md
|
36 |
- Tab-rendering fix (js): fix_tabrender.md
|
37 |
|
|
|
|
|
38 |
- Development clutter:
|
39 |
- Demo app: app.md
|
40 |
+
|
41 |
+
- How to contribute:
|
42 |
+
- Dev Notes: dev_notes.md
|