Skip to content

Commit 6f32f2c

Browse files
committed
add note about 'tanco run' to readme
1 parent 27c027e commit 6f32f2c

1 file changed

Lines changed: 50 additions & 3 deletions

File tree

README.md

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,29 @@ https://tangentcode.com/setup
1414

1515
## Installation
1616

17+
There are two main ways to install Tanco:
18+
19+
**1. From PyPI (Recommended for users):**
20+
21+
If you just want to use Tanco to follow a course or run tests, you can install it directly from the Python Package Index (PyPI):
22+
1723
```bash
18-
# eventually:
19-
# pip install tanco
24+
pip install tanco
25+
```
26+
27+
You can find the package details on [PyPI](https://pypi.org/project/tanco).
28+
29+
**2. Editable Install (Recommended for developers):**
2030

21-
# but for now, this is still very alpha stage, so:
31+
If you plan to contribute to Tanco development or want the latest changes, clone the repository and install it in editable mode:
32+
33+
```bash
2234
git clone https://github.com/tangentcode/tanco.git
2335
cd tanco
2436
pip install -e .
2537
```
2638

39+
This command links the installed package to your local source code, so any changes you make are immediately effective.
2740

2841
## Using the Client
2942

@@ -86,3 +99,37 @@ Or (on platforms that support it) use hypercorn:
8699
```bash
87100
hypercorn tanco.app:app # --reload
88101
```
102+
103+
## Local Usage
104+
105+
Tanco is primarily used via its command-line interface.
106+
107+
**Running Local Tests from Org Files:**
108+
109+
Tanco can now run tests defined directly within an `.org` file, independent of the server. This is useful for local development, testing, and creating new challenges.
110+
111+
Use the `run` command with the `--tests` flag:
112+
113+
```bash
114+
tanco run --tests path/to/your/tests.org [program_and_args...]
115+
```
116+
117+
* `--tests path/to/your/tests.org`: Specifies the org file containing the test definitions (using `#+name:`, `#+begin_src`, etc.).
118+
* `[program_and_args...]`: The command and arguments needed to execute the program being tested.
119+
* If your program needs to be run via the shell (e.g., using interpreters like `node` or `python`), prefix the command with `-c`. For example:
120+
```bash
121+
tanco run --tests tests.org -c 'node your_script.js'
122+
tanco run --tests tests.org -c 'python your_script.py arg1'
123+
```
124+
* If your program is a direct executable (like `myprogram.exe` on Windows or `./myprogram` on Linux), just provide the path and arguments:
125+
```bash
126+
tanco run --tests tests.org path/to/your_program arg1 arg2
127+
```
128+
129+
**Verbose Output:**
130+
131+
You can add the `-v` or `--verbose` flag to the `run` command to print the configuration Tanco is using before executing the tests. This is helpful for debugging paths and arguments:
132+
133+
```bash
134+
tanco run -v --tests tests.org ...
135+
```

0 commit comments

Comments
 (0)