Skip to content

Commit e2cd716

Browse files
E2E Setup + wallet commands (#11)
* command fixes + e2e coverage increase * Fixes localnet sh path * Finishes e2e wallet + minor fixes * Fixes wallet balance command * Code improvements --------- Co-authored-by: Benjamin Himes <[email protected]>
1 parent f009d65 commit e2cd716

16 files changed

+1583
-91
lines changed
+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: E2E Subtensor Tests
2+
3+
concurrency:
4+
group: e2e-subtensor-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
push:
9+
branches: [main, development, staging]
10+
11+
pull_request:
12+
branches: [main, development, staging]
13+
types: [ opened, synchronize, reopened, ready_for_review ]
14+
15+
workflow_dispatch:
16+
inputs:
17+
verbose:
18+
description: "Output more information when triggered manually"
19+
required: false
20+
default: ""
21+
22+
env:
23+
CARGO_TERM_COLOR: always
24+
VERBOSE: ${{ github.event.inputs.verbose }}
25+
26+
jobs:
27+
run-tests:
28+
runs-on: SubtensorCI
29+
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }}
30+
timeout-minutes: 180
31+
env:
32+
RELEASE_NAME: development
33+
RUSTV: nightly-2024-03-05
34+
RUST_BACKTRACE: full
35+
RUST_BIN_DIR: target/x86_64-unknown-linux-gnu
36+
TARGET: x86_64-unknown-linux-gnu
37+
38+
steps:
39+
- name: Check-out repository under $GITHUB_WORKSPACE
40+
uses: actions/checkout@v2
41+
42+
- name: Install dependencies
43+
run: |
44+
sudo apt-get update &&
45+
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
46+
47+
- name: Install Rust ${{ env.RUSTV }}
48+
uses: actions-rs/[email protected]
49+
with:
50+
toolchain: ${{ env.RUSTV }}
51+
components: rustfmt
52+
profile: minimal
53+
54+
- name: Add wasm32-unknown-unknown target
55+
run: |
56+
rustup target add wasm32-unknown-unknown --toolchain stable-x86_64-unknown-linux-gnu
57+
rustup component add rust-src --toolchain stable-x86_64-unknown-linux-gnu
58+
59+
- name: Clone subtensor repo
60+
run: git clone https://github.com/opentensor/subtensor.git
61+
62+
- name: Setup subtensor repo
63+
working-directory: ${{ github.workspace }}/subtensor
64+
run: git checkout testnet
65+
66+
- name: Install Python dependencies
67+
run: python3 -m pip install -r requirements.txt pytest
68+
69+
- name: Run all tests
70+
run: |
71+
LOCALNET_SH_PATH="${{ github.workspace }}/subtensor/scripts/localnet.sh" pytest src/tests/e2e_tests -s

.gitignore

+212
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
# Byte-compiled / optimized / DLL files
2+
**/__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.pyc
6+
7+
# Remove notebooks.
8+
*.ipynb
9+
10+
# weigths and biases
11+
wandb/
12+
13+
*.csv
14+
*.torch
15+
*.pt
16+
*.log
17+
18+
# runs/data/models/logs/~
19+
data/
20+
**/data/
21+
22+
# C extensions
23+
*.so
24+
25+
# IDE
26+
*.idea/
27+
28+
# VSCODE
29+
.vscode/
30+
31+
# Distribution / packaging
32+
.Python
33+
build/
34+
develop-eggs/
35+
dist/
36+
downloads/
37+
eggs/
38+
.eggs/
39+
lib/
40+
lib64/
41+
parts/
42+
sdist/
43+
var/
44+
wheels/
45+
share/python-wheels/
46+
*.egg-info/
47+
.installed.cfg
48+
*.egg
49+
MANIFEST
50+
51+
# PyInstaller
52+
# Usually these files are written by a python script from a template
53+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
54+
*.manifest
55+
*.spec
56+
57+
# Installer logs
58+
pip-log.txt
59+
pip-delete-this-directory.txt
60+
61+
# Unit test / coverage reports
62+
htmlcov/
63+
.tox/
64+
.nox/
65+
.coverage
66+
.coverage.*
67+
.cache
68+
nosetests.xml
69+
coverage.xml
70+
*.cover
71+
*.py,cover
72+
.hypothesis/
73+
.pytest_cache/
74+
cover/
75+
76+
# Translations
77+
*.mo
78+
*.pot
79+
80+
# Django stuff:
81+
*.log
82+
local_settings.py
83+
db.sqlite3
84+
db.sqlite3-journal
85+
86+
# Flask stuff:
87+
instance/
88+
.webassets-cache
89+
90+
# Scrapy stuff:
91+
.scrapy
92+
93+
# Sphinx documentation
94+
docs/_build/
95+
96+
# PyBuilder
97+
.pybuilder/
98+
target/
99+
100+
# Jupyter Notebook
101+
.ipynb_checkpoints
102+
103+
# IPython
104+
profile_default/
105+
ipython_config.py
106+
107+
# pyenv
108+
# For a library or package, you might want to ignore these files since the code is
109+
# intended to run in multiple environments; otherwise, check them in:
110+
.python-version
111+
112+
# pipenv
113+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
114+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
115+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
116+
# install all needed dependencies.
117+
Pipfile.lock
118+
119+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
120+
__pypackages__/
121+
122+
# Celery stuff
123+
celerybeat-schedule
124+
celerybeat.pid
125+
126+
# SageMath parsed files
127+
*.sage.py
128+
129+
# Environments
130+
.env
131+
.venv
132+
env/
133+
venv/
134+
ENV/
135+
env.bak/
136+
venv.bak/
137+
138+
# Spyder project settings
139+
.spyderproject
140+
.spyproject
141+
142+
# Rope project settings
143+
.ropeproject
144+
145+
# mkdocs documentation
146+
/site
147+
148+
# mypy
149+
.mypy_cache/
150+
.dmypy.json
151+
dmypy.json
152+
153+
# Pyre type checker
154+
.pyre/
155+
156+
# pytype static type analyzer
157+
.pytype/
158+
159+
# Cython debug symbols
160+
cython_debug/
161+
# Generated by Cargo
162+
# will have compiled files and executables
163+
**/target/
164+
# These are backup files generated by rustfmt
165+
**/*.rs.bk
166+
167+
# The cache for docker container dependency
168+
.cargo
169+
170+
# The cache for chain data in container
171+
.local
172+
173+
# State folder for all neurons.
174+
**/data/*
175+
!data/.gitkeep
176+
177+
# misc
178+
.DS_Store
179+
.env.local
180+
.env.development.local
181+
.env.test.local
182+
.env.production.local
183+
184+
# PIPY Stuff
185+
bittensor.egg-info
186+
bittensor*.egg
187+
bdist.*
188+
189+
npm-debug.log*
190+
yarn-debug.log*
191+
yarn-error.log*
192+
193+
**/build/*
194+
**/dist/*
195+
**/runs/*
196+
**/env/*
197+
**/data/*
198+
**/.data/*
199+
**/tmp/*
200+
201+
**/.bash_history
202+
**/*.xml
203+
**/*.pstats
204+
**/*.png
205+
206+
# Replicate library
207+
**/.replicate
208+
replicate.yaml
209+
**/run.sh
210+
211+
# Notebooks
212+
*.ipynb

__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)