File tree Expand file tree Collapse file tree 6 files changed +37
-8
lines changed Expand file tree Collapse file tree 6 files changed +37
-8
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ Add LICENSE /app/
33
33
34
34
# Build the Docs
35
35
# --------------
36
- ADD run_docs.py ./
37
36
ADD docs/__init__.py ./docs/
38
37
ADD docs/app.py ./docs/
39
38
ADD docs/examples.py ./docs/
Original file line number Diff line number Diff line change
1
+ # IDOM's Documentation
2
+
3
+ We provide two main ways to run the docs. Both use ` nox ` which has a ` noxfile.py ` at the
4
+ root of the repository. Running the docs with ` nox -s docs ` will start up an iteractive
5
+ session which will rebuild the docs any time a file is modified. Using `nox -s
6
+ docs_in_docker` on the other hand, will build a docker image and run the docs from
7
+ there. The latter command mimics how the docs will behave in production. As such, if any
8
+ changes to the core of the documentation are made (i.e. to non-` *.rst ` files), then you
9
+ should run a manual test of the documentation using the ` docs_in_docker ` session.
10
+
11
+ If you with to build and run the docs by hand you need to perform two commands, each
12
+ being run from the root of the repository:
13
+
14
+ - ` sphinx-build -b html docs/source docs/build `
15
+ - ` python scripts/run_docs.py `
16
+
17
+ The first command constructs the static HTML and any Javascript. The latter actually
18
+ runs the web server that serves the content.
Original file line number Diff line number Diff line change @@ -1911,7 +1911,7 @@ function mountLayoutWithReconnectingWebSocket(
1911
1911
const updateHookPromise = new LazyPromise ( ) ;
1912
1912
1913
1913
socket . onopen = ( event ) => {
1914
- console . log ( `Connected .`) ;
1914
+ console . info ( `IDOM WebSocket connected .`) ;
1915
1915
1916
1916
if ( mountState . everMounted ) {
1917
1917
reactDom . unmountComponentAtNode ( element ) ;
@@ -1932,7 +1932,7 @@ function mountLayoutWithReconnectingWebSocket(
1932
1932
1933
1933
socket . onclose = ( event ) => {
1934
1934
if ( ! maxReconnectTimeout ) {
1935
- console . log ( `Connection lost.`) ;
1935
+ console . info ( `IDOM WebSocket connection lost.`) ;
1936
1936
return ;
1937
1937
}
1938
1938
@@ -1941,7 +1941,7 @@ function mountLayoutWithReconnectingWebSocket(
1941
1941
mountState
1942
1942
) ;
1943
1943
1944
- console . log ( `Connection lost, reconnecting in ${ reconnectTimeout } seconds`) ;
1944
+ console . info ( `IDOM WebSocket connection lost. Reconnecting in ${ reconnectTimeout } seconds... `) ;
1945
1945
1946
1946
setTimeout ( function ( ) {
1947
1947
mountState . reconnectAttempts ++ ;
Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ def docs(session: Session) -> None:
85
85
86
86
@nox .session
87
87
def docs_in_docker (session : Session ) -> None :
88
+ """Build a docker image for the documentation and run it to mimic production"""
88
89
session .run (
89
90
"docker" ,
90
91
"build" ,
@@ -120,7 +121,7 @@ def test(session: Session) -> None:
120
121
121
122
@nox .session
122
123
def test_short (session : Session ) -> None :
123
- """Run the complete test suite"""
124
+ """Run a shortened version of the test suite"""
124
125
session .notify ("test_suite" , posargs = session .posargs )
125
126
session .notify ("test_docs" )
126
127
@@ -192,6 +193,7 @@ def test_docs(session: Session) -> None:
192
193
193
194
@nox .session
194
195
def tag (session : Session ):
196
+ """Create a new git tag"""
195
197
try :
196
198
session .run (
197
199
"git" ,
@@ -226,6 +228,7 @@ def tag(session: Session):
226
228
227
229
@nox .session
228
230
def update_version (session : Session ) -> None :
231
+ """Update the version of all Python and Javascript packages in this repo"""
229
232
if len (session .posargs ) > 1 :
230
233
session .error ("To many arguments" )
231
234
Original file line number Diff line number Diff line change 1
1
# Scripts
2
2
3
- All scripts should be run from the repository root
4
- (typically using [ ` nox ` ] ( https://nox.thea.codes/en/stable/ ) ).
3
+ All scripts should be run from the repository root (typically using
4
+ [ ` nox ` ] ( https://nox.thea.codes/en/stable/ ) ). Use ` nox --list ` to see the list of
5
+ available scripts.
Original file line number Diff line number Diff line change 1
- from docs import run
1
+ import os
2
+ import sys
3
+
4
+
5
+ # all scripts should be run from the repository root so we need to insert cwd to path
6
+ # to import docs
7
+ sys .path .insert (0 , os .getcwd ())
2
8
3
9
4
10
if __name__ == "__main__" :
11
+ from docs import run
12
+
5
13
run ()
You can’t perform that action at this time.
0 commit comments