File tree Expand file tree Collapse file tree 2 files changed +57
-80
lines changed Expand file tree Collapse file tree 2 files changed +57
-80
lines changed Original file line number Diff line number Diff line change
1
+ # Developer Guide
2
+
3
+ This document provides a guide for developers who contribute to the Omron subnet.
4
+
5
+ ## Adding Dependencies
6
+
7
+ We use ` uv ` to manage dependencies. To add new dependencies, follow the steps below:
8
+
9
+ 1 . Add the package to ` pyproject.toml ` :
10
+
11
+ ``` sh
12
+ uv add < package-name>
13
+ ```
14
+
15
+ 2 . Lock dependencies and generate ` requirements.txt ` :
16
+
17
+ ``` sh
18
+ uv lock
19
+ uv export -o requirements.txt
20
+ ```
21
+
22
+ 3 . Sync dependencies:
23
+
24
+ ``` sh
25
+ uv sync --locked
26
+ ```
27
+
28
+ ## Updating Dependencies
29
+
30
+ To force uv to update all packages in an existing ` pyproject.toml ` , run ` uv sync --upgrade ` .
31
+
32
+ ``` sh
33
+ # only update the bittensor package
34
+ $ uv sync --upgrade-package bittensor
35
+
36
+ # update both the bittensor and requests packages
37
+ $ uv sync --upgrade-package bittensor --upgrade-package requests
38
+
39
+ # update the bittensor package to the latest, and requests to v2.0.0
40
+ $ uv sync --upgrade-package bittensor --upgrade-package requests==2.0.0
41
+ ```
42
+
43
+ ## Running Locally for Development
44
+
45
+ For local development, we suggest running a [ local devnet node] ( https://github.com/inference-labs-inc/bittensor-devnet ) .
46
+
47
+ ### Miner
48
+
49
+ ``` sh
50
+ python ./neurons/miner.py --localnet
51
+ ```
52
+
53
+ ### Validator
54
+
55
+ ``` sh
56
+ python ./neurons/validator.py --localnet
57
+ ```
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments