Skip to content

Commit 2b0cc7d

Browse files
committed
.
1 parent 3ba0ce2 commit 2b0cc7d

File tree

3 files changed

+24
-80
lines changed

3 files changed

+24
-80
lines changed

docs/agent.md

Lines changed: 0 additions & 30 deletions
This file was deleted.

docs/setupdist.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Commit0 is a command-line tool that allows you to run unit-tests on a
44
variety of libraries in isolated environments.
55

6-
Commit0 uses [modal](https://modal.com/) as a distributed
6+
The defaul tool uses [modal](https://modal.com/) as a distributed
77
test runner.
88

99
```bash
@@ -20,20 +20,27 @@ commit0 setup lite
2020
```
2121

2222
This will clone a set of skeleton libraries in your `repos/` directory.
23-
Commiting changes to branches in this directory
24-
25-
23+
Commiting changes to branches in this directory is how you send changes
24+
to the test runner.
2625

26+
Next to run tests you can run the standard test command.
27+
This command will run a reference unit test for the `simpy` repo.
2728

29+
```bash
30+
commit0 test simpy tests/test_event.py::test_succeed --reference
31+
```
2832

29-
You can pass this configuration file as an argumnet to clone.
33+
To run a test in your codebase you can run with no args.
34+
This one will fail.
3035

3136
```bash
32-
commit0 setup lite
37+
commit0 test simpy tests/test_event.py::test_succeed
3338
```
3439

35-
Next to run tests you can run the standard test command.
40+
To run a test in your codebase with a specific branch
41+
you can commit to the branch and call with the --branch command.
42+
3643

3744
```bash
38-
commit0 test simpy tests/test_event.py::test_succeed
45+
commit0 test simpy tests/test_event.py::test_succeed --branch my_branch
3946
```

docs/setuplocal.md

Lines changed: 9 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
11
## Local Mode
22

3-
4-
First be sure that you have docker tools installed.
3+
To run in local mode you first be sure that you have [docker tools](https://docs.docker.com/desktop/install/mac-install/)
4+
installed. On Debian systems:
55

66
```bash
77
apt install docker
88
```
99

10-
To install the benchmark run,
11-
10+
To get started, run the `setup` command with the dataset
11+
split that you are interested in working with.
12+
We'll start with the `lite` split.
1213

13-
The system is a command-line tool that allows you to run unit-tests on a
14-
variety of libraries in isolated environments. To get started with the full
15-
setup run the `setup` command which will install a clone the code of a subset
16-
of libraries to your `repos/` directory.
1714

1815
```bash
1916
commit0 setup lite
2017
```
2118

19+
This will install a clone the code for subset of libraries to your `repos/` directory.
20+
2221
Next run the `build` command which will configure Docker containers for
2322
each of the libraries with isolated virtual environments. The command uses the
2423
[uv](https://github.com/astral-sh/uv) library for efficient builds.
2524

2625
```bash
27-
commit0 build lit
26+
commit0 build
2827
```
2928

3029
The main operation you can do with these enviroments is to run tests.
@@ -34,36 +33,4 @@ Here we run [a test](https://github.com/commit-0/simpy/blob/master/tests/test_ev
3433
commit0 test simpy tests/test_event.py::test_succeed
3534
```
3635

37-
This test should run and pass, but others will fail.
38-
39-
```bash
40-
commit0 test minitorch tests/test_operators.py::test_relu
41-
```
42-
43-
Let's now manually go in and change that repo.
44-
This is all just standard shell commands.
45-
46-
```bash
47-
cd repos/minitorch/
48-
git checkout -b mychange
49-
```
50-
51-
And apply and commit this patch.
52-
53-
```
54-
--- a/minitorch/operators.py
55-
+++ b/minitorch/operators.py
56-
@@ -81,7 +81,7 @@ def relu(x: float) -> float:
57-
(See https://en.wikipedia.org/wiki/Rectifier_(neural_networks) .)
58-
"""
59-
# TODO: Implement for Task 0.1.
60-
- raise NotImplementedError('Need to implement for Task 0.1')
61-
+ return 1. if x > 0. else 0.
62-
```
63-
64-
Once this is done we can run `test` with
65-
a branch and the environment will sync and run.
66-
67-
```bash
68-
commit0 test minitorch branch=mychange tests/test_operators.py::test_relu
69-
```
36+
See [distributed setup](setupdist) for more commands.

0 commit comments

Comments
 (0)