Skip to content

Commit 0a67e77

Browse files
authored
test: add basic support for pytest codeblocks (ai-dynamo#117)
1 parent 1c09ef3 commit 0a67e77

File tree

2 files changed

+30
-14
lines changed

2 files changed

+30
-14
lines changed

README.md

+29-14
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@ limitations under the License.
2323
[![GitHub Release](https://img.shields.io/github/v/release/ai-dynamo/dynamo)](https://github.com/ai-dynamo/dynamo/releases/latest)
2424

2525

26-
Dynamo is a flexible, component based, data center scale
27-
inference serving framework designed to leverage the strengths of the
28-
standalone Dynamo Inference Server while expanding its capabilities
29-
to meet the demands of complex use cases including those of Generative
30-
AI. It is designed to enable developers to implement and customize
31-
routing, load balancing, scaling and workflow definitions at the data
32-
center scale without sacrificing performance or ease of use.
26+
Dynamo is a flexible, component based, data center scale inference
27+
serving framework designed to meet the demands of complex use cases
28+
including those of Generative AI. It is designed to enable developers
29+
to implement and customize routing, load balancing, scaling and
30+
workflow definitions at the data center scale without sacrificing
31+
performance or ease of use.
3332

3433
> [!NOTE]
3534
> This project is currently in the alpha / experimental /
@@ -58,7 +57,10 @@ We provide 3 types of builds:
5857

5958
For example, if you want to build a container for the `STANDARD` backends you can run
6059

61-
`./container/build.sh`
60+
<!--pytest.mark.skip-->
61+
```bash
62+
./container/build.sh
63+
```
6264

6365
Please see the instructions in the corresponding example for specific build instructions.
6466

@@ -71,24 +73,37 @@ The run script offers a few common workflows:
7173

7274
1. Running a command in a container and exiting.
7375

74-
```
76+
<!--pytest.mark.skip-->
77+
```bash
7578
./container/run.sh -- python3 -c "import dynamo.runtime; help(dynamo.runtime)"
7679
```
80+
<!--
7781
78-
2. Starting an interactive shell.
82+
# This tests the above the line but from within the container
83+
# using pytest-codeblocks
84+
85+
```bash
86+
python3 -c "import dynamo.runtime; help(dynamo.runtime)"
7987
```
88+
-- >
89+
90+
2. Starting an interactive shell.
91+
92+
<!--pytest.mark.skip-->
93+
```bash
8094
./container/run.sh -it
8195
```
8296

8397
3. Mounting the local workspace and Starting an interactive shell.
8498

85-
```
99+
<!--pytest.mark.skip-->
100+
```bash
86101
./container/run.sh -it --mount-workspace
87102
```
88103

89-
The last command also passes common environment variables ( ```-e
90-
HF_TOKEN```) and mounts common directories such as ```/tmp:/tmp```,
91-
```/mnt:/mnt```.
104+
The last command also passes common environment variables ( `-e
105+
HF_TOKEN` ) and mounts common directories such as `/tmp:/tmp`,
106+
`/mnt:/mnt`.
92107

93108
Please see the instructions in the corresponding example for specific
94109
deployment instructions.

container/deps/requirements.test.txt

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ pyright
1717
pytest
1818
pytest-asyncio
1919
pytest-benchmark
20+
pytest-codeblocks
2021
pytest-cov
2122
pytest-md-report
2223
pytest-mypy

0 commit comments

Comments
 (0)