Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E2E Setup + wallet commands #11

Merged
merged 28 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
96c9123
SubtensorInterface async update, `sudo set` command
thewhaleking Aug 14, 2024
46215ee
`subnets hyperparameters`
thewhaleking Aug 14, 2024
1eca517
`subnets list` command
thewhaleking Aug 14, 2024
08e7d05
MyPy
thewhaleking Aug 15, 2024
e40c70f
MyPy
thewhaleking Aug 15, 2024
a413eb1
`subnets lock-cost` command
thewhaleking Aug 16, 2024
79f5bfc
init commit
ibraheem-opentensor Aug 17, 2024
6ecaef7
Fixed input configs for commands
ibraheem-opentensor Aug 19, 2024
47e338a
command fixes + e2e coverage increase
ibraheem-opentensor Aug 20, 2024
db243f5
Fixes localnet sh path
ibraheem-opentensor Aug 20, 2024
e59d2e0
Fix imports
ibraheem-opentensor Aug 20, 2024
2583623
`subnets create` command
thewhaleking Aug 20, 2024
e7060e5
`pow-register` command
thewhaleking Aug 20, 2024
520c4ed
`subnets register` command
thewhaleking Aug 20, 2024
7221d49
language
thewhaleking Aug 20, 2024
03b77a8
Fixed overview.
thewhaleking Aug 20, 2024
8311c61
Minor fixes
ibraheem-opentensor Aug 20, 2024
9c21994
Merge remote-tracking branch 'origin/feat/thewhaleking/subnets-comman…
ibraheem-opentensor Aug 20, 2024
83da956
Finishes e2e wallet + minor fixes
ibraheem-opentensor Aug 21, 2024
a67cd7b
Fixes wallet balance command
thewhaleking Aug 21, 2024
7691287
Merge branch 'main' into tests/e2e-tests-init
ibraheem-opentensor Aug 21, 2024
e7a0d92
Merged interaction tests
ibraheem-opentensor Aug 21, 2024
21855c3
init file
ibraheem-opentensor Aug 21, 2024
0a59b99
Added workflow + indications in tests
ibraheem-opentensor Aug 21, 2024
0d2522b
Fix extra file
ibraheem-opentensor Aug 21, 2024
29bd7ac
Fixes yml config
ibraheem-opentensor Aug 21, 2024
c3db78e
Code improvements
ibraheem-opentensor Aug 22, 2024
81b9e0a
Merge branch 'main' into tests/e2e-tests-init
ibraheem-opentensor Aug 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .github/workflows/e2e-subtensor-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: E2E Subtensor Tests

concurrency:
group: e2e-subtensor-${{ github.ref }}
cancel-in-progress: true

on:
push:
branches: [main, development, staging]

pull_request:
branches: [main, development, staging]
types: [ opened, synchronize, reopened, ready_for_review ]

workflow_dispatch:
inputs:
verbose:
description: "Output more information when triggered manually"
required: false
default: ""

env:
CARGO_TERM_COLOR: always
VERBOSE: ${{ github.event.inputs.verbose }}

jobs:
run-tests:
runs-on: SubtensorCI
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }}
timeout-minutes: 180
env:
RELEASE_NAME: development
RUSTV: nightly-2024-03-05
RUST_BACKTRACE: full
RUST_BIN_DIR: target/x86_64-unknown-linux-gnu
TARGET: x86_64-unknown-linux-gnu

steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v2

- name: Install dependencies
run: |
sudo apt-get update &&
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler

- name: Install Rust ${{ env.RUSTV }}
uses: actions-rs/[email protected]
with:
toolchain: ${{ env.RUSTV }}
components: rustfmt
profile: minimal

- name: Add wasm32-unknown-unknown target
run: |
rustup target add wasm32-unknown-unknown --toolchain stable-x86_64-unknown-linux-gnu
rustup component add rust-src --toolchain stable-x86_64-unknown-linux-gnu

- name: Clone subtensor repo
run: git clone https://github.com/opentensor/subtensor.git

- name: Setup subtensor repo
working-directory: ${{ github.workspace }}/subtensor
run: git checkout testnet

- name: Install Python dependencies
run: python3 -m pip install -r requirements.txt pytest

- name: Run all tests
run: |
LOCALNET_SH_PATH="${{ github.workspace }}/subtensor/scripts/localnet.sh" pytest src/tests/e2e_tests -s
212 changes: 212 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
# Byte-compiled / optimized / DLL files
**/__pycache__/
*.py[cod]
*$py.class
*.pyc

# Remove notebooks.
*.ipynb

# weigths and biases
wandb/

*.csv
*.torch
*.pt
*.log

# runs/data/models/logs/~
data/
**/data/

# C extensions
*.so

# IDE
*.idea/

# VSCODE
.vscode/

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/
# Generated by Cargo
# will have compiled files and executables
**/target/
# These are backup files generated by rustfmt
**/*.rs.bk

# The cache for docker container dependency
.cargo

# The cache for chain data in container
.local

# State folder for all neurons.
**/data/*
!data/.gitkeep

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

# PIPY Stuff
bittensor.egg-info
bittensor*.egg
bdist.*

npm-debug.log*
yarn-debug.log*
yarn-error.log*

**/build/*
**/dist/*
**/runs/*
**/env/*
**/data/*
**/.data/*
**/tmp/*

**/.bash_history
**/*.xml
**/*.pstats
**/*.png

# Replicate library
**/.replicate
replicate.yaml
**/run.sh

# Notebooks
*.ipynb
Empty file added __init__.py
Empty file.
Loading
Loading