Skip to content

Commit eae1a91

Browse files
Update dev environment instructions
1 parent 08d2470 commit eae1a91

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

README.md

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -109,16 +109,30 @@ As the schema and API stabilizes a mid-term goal might be to replace PyMC `BaseT
109109
Getting rid of `MultiTrace` was a [long-term goal](https://github.com/pymc-devs/pymc/issues/4372#issuecomment-770100410) behind making `pm.sample(return_inferencedata=True)` the default.
110110

111111
## Development
112-
First clone the repository and install `mcbackend` locally:
112+
113+
First clone the repository and set up a development environment containing the protobuf compiler.
113114

114115
```bash
116+
mamba create -n mcb python=3.11 grpcio-tools protobuf -y
117+
activate mcb
118+
pip install -r requirements-dev.txt
119+
pip install --pre "betterproto[compiler]"
115120
pip install -e .
116121
```
117122

123+
To compile the `*.proto` files for languages other than Python, check the [ProtocolBuffers documentation](https://developers.google.com/protocol-buffers/docs/tutorials).
124+
125+
The following script compiles them for Python using the [`betterproto`](https://github.com/danielgtaylor/python-betterproto) compiler plugin to get nice-looking dataclasses.
126+
It also copies the generated files to the right place in `mcbackend`.
127+
128+
```bash
129+
python protobufs/generate.py
130+
pre-commit run --all
131+
```
132+
118133
To run the tests:
119134

120135
```bash
121-
pip install -r requirements-dev.txt
122136
pytest -v
123137
```
124138

@@ -128,19 +142,3 @@ To start one in Docker:
128142
```bash
129143
docker run --detach --rm --name mcbackend-db -p 9000:9000 --ulimit nofile=262144:262144 clickhouse/clickhouse-server
130144
```
131-
132-
### Compiling the ProtocolBuffers
133-
If you don't already have it, first install the protobuf compiler:
134-
```bash
135-
conda install protobuf
136-
pip install --pre "betterproto[compiler]"
137-
```
138-
139-
To compile the `*.proto` files for languages other than Python, check the [ProtocolBuffers documentation](https://developers.google.com/protocol-buffers/docs/tutorials).
140-
141-
The following script compiles them for Python using the [`betterproto`](https://github.com/danielgtaylor/python-betterproto) compiler plugin to get nice-looking dataclasses.
142-
It also copies the generated files to the right place in `mcbackend`.
143-
144-
```bash
145-
python protobufs/generate.py
146-
```

requirements-dev.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
arviz
22
clickhouse-driver
33
flake8
4+
pre-commit
5+
pymc==5.0.2
46
pytest
57
pytest-cov
68
twine

0 commit comments

Comments
 (0)