Skip to content

Commit 4a8b4c7

Browse files
committed
Clean up based on review comments
1 parent aa99279 commit 4a8b4c7

5 files changed

Lines changed: 25 additions & 21 deletions

File tree

docker-compose.docs-snapshots.yml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,33 @@
1-
version: '3'
1+
volumes:
2+
# This is a temporary directory that is used to store the test sets and results.
3+
# It is mounted in the extractor and snapshotter containers.
4+
# The results are then copied back to the plugins directories.
5+
test-sets:
6+
driver: local
7+
driver_opts:
8+
type: none
9+
device: ./docker/build/test-sets
10+
o: bind
211

312
services:
4-
deephaven-plugins-docs:
13+
# Test server that has all the plugins loaded. Test sets are run against this server.
14+
deephaven-plugins-docs-test-server:
515
container_name: deephaven-plugins
616
build:
717
dockerfile: ./Dockerfile
818
pull: true # We need to always pull the latest server image used in the Dockerfile
919
ports:
1020
- '${DEEPHAVEN_SNAPSHOT_PORT:-10090}:10000'
1121
volumes:
22+
# Override the /app.d/ directory with a blank directory. We don't want to run any of the default apps.
1223
- /app.d/
1324
environment:
1425
- START_OPTS=-Xmx4g -DAuthHandlers=io.deephaven.auth.AnonymousAuthenticationHandler -Ddeephaven.console.type=python -Ddeephaven.application.dir=./app.d
1526

27+
# Extract the code blocks from the docs in the plugins directories and output them to a results directory.
1628
deephaven-plugins-docs-extractor:
1729
image: ghcr.io/deephaven/salmon-extractor
30+
pull_policy: always
1831
container_name: deephaven-plugins-docs-extractor
1932
command:
2033
[
@@ -25,25 +38,27 @@ services:
2538
volumes:
2639
- ./plugins/ui/docs/build/markdown:/extract/ui
2740
- ./plugins/plotly-express/docs/build/markdown:/extract/plotly-express
28-
- ./docker/build/test-sets:/results # Output to a temporary build directory
41+
- test-sets:/results # Output to a temporary build directory
2942

43+
# Read the test sets from the results directory and run them against the test server, taking a snapshot of the results.
3044
deephaven-plugins-docs-snapshotter:
3145
image: ghcr.io/deephaven/salmon-snapshotter
46+
pull_policy: always
3247
depends_on:
33-
deephaven-plugins-docs:
48+
deephaven-plugins-docs-test-server:
3449
condition: service_healthy
3550
deephaven-plugins-docs-extractor:
3651
condition: service_completed_successfully
3752
environment:
38-
HOST_URL: 'http://deephaven-plugins-docs:10000'
53+
HOST_URL: 'http://deephaven-plugins-docs-test-server:10000'
3954
command:
4055
[
4156
'sh',
4257
'-c',
4358
'node snapshot.cjs --directory /test-sets/plotly-express --output /results/plotly-express; node snapshot.cjs --directory /test-sets/ui --output /results/ui',
4459
]
4560
volumes:
46-
- ./docker/build/test-sets:/test-sets
61+
- test-sets:/test-sets
4762
# Map all the results back to the snapshots directory for those docs
4863
- ./plugins/ui/docs/snapshots:/results/ui
4964
- ./plugins/plotly-express/docs/snapshots:/results/plotly-express

plugins/plotly-express/docs/bar.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ Bar plots are appropriate when the data contain a continuous response variable t
1616

1717
Visualize the relationship between a continuous variable and a categorical or discrete variable by passing the column names to the `x` and `y` arguments.
1818

19-
<!-- TODO: Need to figure out how to get this info string through, without dropping it! Sphinx parser seems to just drop it -->
20-
2119
```python order=bar_plot,tips
2220
import deephaven.plot.express as dx
2321
tips = dx.data.tips()

plugins/ui/docs/components/markdown.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def latex_markdown():
9090
latex_example = latex_markdown()
9191
```
9292

93-
<!-- TODO: Need to find a way to get this working correctly. Myst parser does not handle nested code blocks correctly.
93+
<!-- TODO (DOC-770): Need to find a way to get this working correctly. Myst parser does not handle nested code blocks correctly.
9494
## Code Blocks
9595
9696
Code blocks follow Deephaven's formatting.
@@ -146,7 +146,3 @@ style_example = style_markdown()
146146
```{eval-rst}
147147
.. dhautofunction:: deephaven.ui.markdown
148148
```
149-
150-
```
151-
152-
```

sphinx_ext/make_docs_utilities.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,7 @@ def copy_snapshots() -> int:
136136
f"cp -r docs/snapshots {BUILT_DOCS}/snapshots",
137137
]
138138

139-
code = attempt_command_sequence(commands)
140-
if code != 0:
141-
return 1
142-
143-
return 0
139+
return attempt_command_sequence(commands)
144140

145141

146142
def build_documents() -> int:

tests/docker-compose.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,13 @@ services:
1717

1818
e2e-tests:
1919
build:
20-
context: ../
21-
dockerfile: ./tests/Dockerfile
20+
dockerfile: ./Dockerfile
2221
pull: true # We only use FROM with a pinned version here, but adding this just in case that changes in the future
2322
ports:
2423
- '9323:9323'
2524
ipc: host
2625
volumes:
27-
- ../tests:/work/tests
26+
- .:/work/tests
2827
- ../test-results:/work/test-results
2928
- ../playwright-report:/work/playwright-report
3029
entrypoint: 'npx playwright test --config=playwright-docker.config.ts'

0 commit comments

Comments
 (0)