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

Release v3.0.0 #75

Merged
merged 240 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
240 commits
Select commit Hold shift + click to select a range
a30d972
Pin python 3.11 as the desired default version for running this code
Oct 23, 2024
268d48c
Delete old legacy unused code
Oct 23, 2024
3d44d89
Remove unused dependencies and add joblib
Oct 23, 2024
39648dd
These two packages are only referenced in tests
Oct 24, 2024
dcdeead
These two packages are only referenced in docs
Oct 24, 2024
44de288
Update release notes
Oct 24, 2024
3dad1cc
Remove legacy otf workflow
Oct 24, 2024
9d4fb67
Move default otf contribution guidelines
Oct 24, 2024
6dedece
Move default otf docs
Oct 24, 2024
91fb6fd
Move default otf tutorial code
Oct 24, 2024
4bd0cbe
Remove unused empty file
Oct 24, 2024
b7c75d9
Remove unused docker files
Oct 24, 2024
6b07ee8
Place requirements in a directory, inspired by bittensor source code
Oct 24, 2024
9f045b4
Move the foundry logo image to docs folder
Oct 24, 2024
2d4da8f
Remove unused json file
Oct 24, 2024
7882615
Merge pull request #45 from foundryservices/staging
hayden-yuma Oct 29, 2024
ede5985
Merge pull request #46 from foundryservices/dev
Oct 29, 2024
4ccaec1
Merge pull request #41 from foundryservices/226-qol-refactor-file-loc…
hayden-yuma Oct 29, 2024
ae26980
Merge branch 'dev' into 199-reduce-requirements
Oct 29, 2024
25cc9f2
Merge pull request #40 from foundryservices/199-reduce-requirements
hayden-yuma Oct 29, 2024
ce31c1f
Initial attempt at readme badges
Nov 1, 2024
291bcca
Draft poetry dependencies to pull into readme badges
Nov 1, 2024
eff2d95
Remove build syntax from toml file
Nov 1, 2024
82e4a1f
Clean spacing labels and links for badges
Nov 1, 2024
c399da0
Increase line length to 120
Nov 1, 2024
e174fa7
Run pre commit on all files
Nov 1, 2024
b7c00db
Update release notes
Nov 1, 2024
4eebe21
Remove links and center the badge table
Nov 4, 2024
3483736
Increase table font size
Nov 4, 2024
aa40ace
Display one social link per line
Nov 4, 2024
c5e3088
Make badge text larger
Nov 4, 2024
e8138fb
Make row headers larger
Nov 4, 2024
a89a642
Make row headers larger
Nov 4, 2024
ae8e043
Make row headers larger yet again, last attempts were not working
Nov 4, 2024
bddd5df
Make row headers larger yet again, last attempts were not working
Nov 4, 2024
9201b5a
Bold row headers and shrink badges
Nov 4, 2024
6417465
Merge pull request #48 from foundryservices/linting-line-length
hayden-yuma Nov 4, 2024
c74555b
Merge pull request #47 from foundryservices/234-readme-badges
hayden-yuma Nov 7, 2024
49017a4
Point compatibility badges at dev branch
Nov 7, 2024
751ca2e
Merge pull request #49 from foundryservices/234-update-badge-links
hayden-yuma Nov 12, 2024
c26168c
added huggingface utils file
hayden-yuma Dec 2, 2024
97788d7
update title and description
Dec 2, 2024
89640f7
changed hf functions to class object
hayden-yuma Dec 2, 2024
2061907
Created miner_hf, a util file for miner huggingface functions. Create…
Dec 2, 2024
4e83b6f
add repo if it doesn't already exist in miner_hf.py
Dec 2, 2024
2049267
merge
hayden-yuma Dec 2, 2024
2d0820d
added hotkey comparison code
hayden-yuma Dec 3, 2024
7707469
edited validator and forward to check hotkey matches
hayden-yuma Dec 3, 2024
bb816c0
removed unused miner_uids from hotkey confirmation
hayden-yuma Dec 3, 2024
0034438
removed unused miner_uids from hotkey confirmation
hayden-yuma Dec 3, 2024
17431fe
added commit timestamp function
hayden-yuma Dec 3, 2024
b9b8d9e
updated miner_hf to support multiple model uploads to the same repo
Dec 3, 2024
3d6c802
Merge branch 'force-huggingface' of https://github.com/foundryservice…
Dec 3, 2024
c2b1e0d
collection slug to environment variables
hayden-yuma Dec 4, 2024
8ed158c
fixed default values in protocol.py
hayden-yuma Dec 4, 2024
b29c68d
removed old reference to subnet_links.json
hayden-yuma Dec 4, 2024
fba0869
updated neurons/miner.py to include model upload on initialization. a…
peterc-yuma Dec 4, 2024
81eb62c
Merge branch 'force-huggingface' of https://github.com/foundryservice…
peterc-yuma Dec 4, 2024
4a5e8e6
bad function variable
hayden-yuma Dec 4, 2024
a44d729
update gitignore
peterc-yuma Dec 4, 2024
2c1509f
fixed terminal info bug
hayden-yuma Dec 4, 2024
bc545be
fixed terminal info bug
hayden-yuma Dec 4, 2024
998fdca
synapse.axon and synapse.dendrite both contain the validators hotkey,…
hayden-yuma Dec 4, 2024
4ec314f
typo
hayden-yuma Dec 4, 2024
d82c342
metagraph length error
hayden-yuma Dec 4, 2024
e159eb1
fix how config is passed into miner_hf interface
peterc-yuma Dec 4, 2024
bed3c81
Merge branch 'force-huggingface' of https://github.com/foundryservice…
peterc-yuma Dec 4, 2024
16e6e03
missalignment of score code from base template
hayden-yuma Dec 4, 2024
a67caf4
missalignment of score code from base template
hayden-yuma Dec 4, 2024
beabc25
scores were being reset each time
hayden-yuma Dec 4, 2024
655c924
scores were being reset each time
hayden-yuma Dec 4, 2024
a6078cb
changed moving_avg_scores to dict
hayden-yuma Dec 4, 2024
75dd664
typo
hayden-yuma Dec 4, 2024
87fd700
typo
hayden-yuma Dec 4, 2024
0d05c9e
models will now be named after the hotkey that is using them in huggi…
peterc-yuma Dec 5, 2024
23d81a4
update miner.py to send the hotkey and the correct file extension as …
peterc-yuma Dec 5, 2024
a3be638
add logging for debug
peterc-yuma Dec 5, 2024
9a19042
updated defaults for model_id and repo_id
peterc-yuma Dec 5, 2024
8330a90
update validator synapse to send empty strings for repo_id and model_id
peterc-yuma Dec 5, 2024
1680c4b
update model_id and repo_id to be optional
peterc-yuma Dec 5, 2024
2214bda
ensure correct model path and filename in neurons/miner.pf for hf dow…
peterc-yuma Dec 5, 2024
0d79407
item_id needs to be the repo_id when adding to a collection
peterc-yuma Dec 5, 2024
dd137a8
update neurons/validator.py to actually confirm models
peterc-yuma Dec 6, 2024
5cc7ebd
revert back to previous huggingface.py. Still change hotkey comparison
peterc-yuma Dec 6, 2024
6ec0877
fix indentation error
peterc-yuma Dec 6, 2024
8cd024f
add logging for models confirmed
peterc-yuma Dec 6, 2024
51180f5
update huggingface.py to ensure that if model_id is not passed into t…
peterc-yuma Dec 6, 2024
05d9abb
test precommit hooks
peterc-yuma Dec 6, 2024
6bf308d
fix precommit issues
peterc-yuma Dec 6, 2024
90ed90d
rename hf interfaces
peterc-yuma Dec 10, 2024
d010fb3
more pr fixes
peterc-yuma Dec 10, 2024
d03067a
update config to require model and hf_repo_id. Will throw valueerror …
peterc-yuma Dec 10, 2024
10e53f5
Add check for config parameters at neuron.py
peterc-yuma Dec 10, 2024
c24c115
move config check to base miner class
peterc-yuma Dec 10, 2024
9e535de
add debugging
peterc-yuma Dec 10, 2024
7f4a4ee
remove required from argparse
peterc-yuma Dec 10, 2024
3ce5ff6
add more logging
peterc-yuma Dec 10, 2024
11bbef7
move the check for args
peterc-yuma Dec 10, 2024
a15096a
add self
peterc-yuma Dec 10, 2024
12708cc
rename model_id to model to avoid conflict with pydantic protected na…
peterc-yuma Dec 10, 2024
5285267
missed a few renames
peterc-yuma Dec 10, 2024
77689ec
change name of straggling variable
peterc-yuma Dec 10, 2024
e853a2c
comment out self.load_state()
peterc-yuma Dec 11, 2024
fd6af26
changed output of add_model_to_collection from None to bool
hayden-yuma Dec 11, 2024
19cf305
changed iterators from letters to human-intelligible words
hayden-yuma Dec 11, 2024
1cb5e59
fixed issue with unused variable removal
hayden-yuma Dec 11, 2024
1097f25
needed to update huggingface-hub requirements to 0.26.5
hayden-yuma Dec 11, 2024
15c01b6
Merge pull request #50 from foundryservices/force-huggingface
Dec 11, 2024
0eadc3b
added upload data to miner hf utils. Add upload data whenever miner r…
peterc-yuma Dec 11, 2024
d1d98ce
update challenge to accept a decrytion key. Data should now be encrypted
peterc-yuma Dec 11, 2024
fe7701a
decrypt data and upload to foundryservices dataset
peterc-yuma Dec 11, 2024
8e6cdcd
update decrypt_data
peterc-yuma Dec 11, 2024
3fcae57
update decryption_key to be bytes
peterc-yuma Dec 11, 2024
06dfca4
fix deserialization of decription key
peterc-yuma Dec 11, 2024
17b7af8
updated path for decryption to be the full path to the miners encrypt…
peterc-yuma Dec 11, 2024
418294d
ensure that decryption works from hf path
peterc-yuma Dec 11, 2024
b1f10fe
add logging
peterc-yuma Dec 11, 2024
246de6e
ensure proper format for repo_id when downloading from huggingface
peterc-yuma Dec 11, 2024
5203abd
Update forward.py to decrypt data properly
peterc-yuma Dec 12, 2024
ac72f53
add logging for key
peterc-yuma Dec 12, 2024
752fdc6
add decryption and upload for 146
peterc-yuma Dec 13, 2024
2f4f488
add decryption and upload for 146
peterc-yuma Dec 13, 2024
c51e0d6
add logging to forward
peterc-yuma Dec 13, 2024
47b920f
more logging
peterc-yuma Dec 13, 2024
f7c07a2
try to get correct path for downloading hf data
peterc-yuma Dec 13, 2024
30e4334
more logging
peterc-yuma Dec 13, 2024
a94910a
hopefully can actually download data from miner repo
peterc-yuma Dec 13, 2024
c720675
update store_data
peterc-yuma Dec 13, 2024
970b25b
update temporary file creation
peterc-yuma Dec 13, 2024
ba197fa
updated dataset manager to use hfapi only
peterc-yuma Dec 13, 2024
24b19d4
add hotkey to dataset file structure
peterc-yuma Dec 13, 2024
ada6812
remove nested folder
peterc-yuma Dec 13, 2024
74bf79d
generalize the data decryption and upload
peterc-yuma Dec 13, 2024
c5f1e5a
add back the model confirmation check for scoring miners
peterc-yuma Dec 16, 2024
ccd90a5
remove unecessary logs
peterc-yuma Dec 16, 2024
0284664
Add better docstrings to miner_hf.py functions
peterc-yuma Dec 16, 2024
fd97de6
update file type to be parquet
peterc-yuma Dec 16, 2024
45a3c24
update file type to be parquet
peterc-yuma Dec 16, 2024
3c6efca
update dataset_manager to properly instantiate hf git repo
peterc-yuma Dec 16, 2024
6e2a23b
update forward to check daily for files to upload after market close
peterc-yuma Dec 16, 2024
74f064a
replace print statemtents with bittensor logging in dataset_manager.py
peterc-yuma Dec 16, 2024
d5af897
add unit test for dataset_manager
peterc-yuma Dec 16, 2024
8505612
ensure that data upload can scale to 200 plus miners
peterc-yuma Dec 17, 2024
7ec96d3
incorporate data decryption into the reward structure
peterc-yuma Dec 17, 2024
17f417d
silly mistake
peterc-yuma Dec 17, 2024
9f43269
improve logging
peterc-yuma Dec 17, 2024
b5bbb05
Simplify top level README file
Dec 17, 2024
8e4178f
Add testnet UID to top level README
Dec 17, 2024
bd3f29a
Update env template
peterc-yuma Dec 18, 2024
afbb601
Deleted unused shell scripts
Dec 18, 2024
1ba4c9e
Move all python files into a top level package folder
Dec 18, 2024
8cd8235
Remove existing tests and add package version test
Dec 18, 2024
fa3c2c3
Adjust github actions to leverage poetry
Dec 18, 2024
04cec4d
Use poetry for dependency management
Dec 18, 2024
48c3228
Run pre-commit hooks
Dec 18, 2024
be016cf
Delete unused tests
Dec 18, 2024
c83ee56
Add pytest dependency
Dec 18, 2024
1389d07
Merge pull request #57 from foundryservices/235-adopt-poetry
peterc-yuma Dec 18, 2024
4e250b8
merged. needs testing
peterc-yuma Dec 18, 2024
d07beef
fix poetry error
peterc-yuma Dec 18, 2024
a475125
fix isort issue
peterc-yuma Dec 18, 2024
b7c9df2
fix test imports
peterc-yuma Dec 19, 2024
ff0bd02
fix yfinance error
peterc-yuma Dec 19, 2024
0ec8642
update config files to reflect new structure
peterc-yuma Dec 19, 2024
c99e0f2
Merge branch 'dev' into 266-enhance-readme
Dec 19, 2024
728f0a8
Adjust network name case
Dec 19, 2024
9fbe57c
Adjust badge display
Dec 19, 2024
8e93c72
suggested changes
peterc-yuma Dec 19, 2024
8d426fa
Draft individual miner / validator readme instructions
Dec 19, 2024
77a1661
Add incentive mechanism white paper to the git repo
Dec 19, 2024
53f44c5
Fix miner readme typo
Dec 19, 2024
e6ef194
Add working links to top level readme
Dec 19, 2024
cd74600
Adjust network name case
Dec 19, 2024
349acc2
update reward.py
peterc-yuma Dec 19, 2024
877c34e
ensure correct yfinance version
peterc-yuma Dec 19, 2024
a2e21e3
Merge pull request #55 from foundryservices/260-require-data-input
Dec 19, 2024
327a84d
added Makefile
hayden-yuma Dec 19, 2024
eea6e92
missing \ in makefile
hayden-yuma Dec 19, 2024
cd0b143
Merge pull request #58 from foundryservices/add-makefile
peterc-yuma Dec 19, 2024
118d1cb
Alter mainnet miner readme
Dec 20, 2024
67798a3
Merge branch 'dev' into 266-enhance-readme
Dec 20, 2024
a450a90
Rename to a single miners readme
Dec 20, 2024
b8d73d6
Move logging level in makefile
Dec 20, 2024
0d589d2
Alter readme links
Dec 20, 2024
baee969
Rename validator readme
Dec 20, 2024
103fb18
Adjust custom miner readme instructions
Dec 20, 2024
9d3f977
Adjust title of validator readme
Dec 20, 2024
f2a18ac
update validator to check file size before saving to disc. Ensure tha…
peterc-yuma Dec 20, 2024
9600435
Explicitly state open sourcing models and input data in the top level…
Dec 20, 2024
1a36ad9
update max file size default
peterc-yuma Dec 20, 2024
24cba9c
Update validator instructions
Dec 20, 2024
5b3d358
Merge pull request #60 from foundryservices/update-data-upload
hayden-yuma Dec 20, 2024
5cc28b5
Merge branch 'dev' into 266-enhance-readme
Dec 20, 2024
cc9af55
Point at staging branch
Dec 20, 2024
c44978f
Merge pull request #56 from foundryservices/266-enhance-readme
peterc-yuma Dec 20, 2024
1a5ebd8
Increment version and release notes
Dec 20, 2024
56723ec
Merge pull request #61 from foundryservices/v3.0.0-release-notes
peterc-yuma Dec 20, 2024
7cbffe3
Merge pull request #62 from foundryservices/dev
peterc-yuma Dec 20, 2024
1ac966c
include more details about hugging face integration with miner docs
peterc-yuma Dec 24, 2024
e6b82a6
fix spacing
peterc-yuma Dec 24, 2024
41849f8
Merge pull request #63 from foundryservices/update-readme
peterc-yuma Dec 30, 2024
83661ab
Merge pull request #64 from foundryservices/dev
peterc-yuma Dec 30, 2024
44632be
Update to bittensor 8.5.1
peterc-yuma Dec 31, 2024
a87befe
add branch specific environments to .gitignore
peterc-yuma Dec 31, 2024
5c5c90b
ensure that branch specific venvs are ignored properly
peterc-yuma Dec 31, 2024
e2808ed
change regex expression for venv ignore
peterc-yuma Dec 31, 2024
08a0a1b
remove version checking in verify function in base miner.py
peterc-yuma Dec 31, 2024
9410ddb
more cr3 updates
peterc-yuma Jan 3, 2025
10ec23e
update testnet UID
peterc-yuma Jan 7, 2025
43517e1
update docs with new testnet UID
peterc-yuma Jan 8, 2025
56fcaf6
forgot one!
peterc-yuma Jan 8, 2025
cd3591e
update model file path on hf
peterc-yuma Jan 8, 2025
6055198
extra period
peterc-yuma Jan 8, 2025
791dda3
fix collection upload
peterc-yuma Jan 8, 2025
3117597
Merge branch '181-commit-reveal' into 275-necessary-data
peterc-yuma Jan 8, 2025
eb5f70c
update to upload only data used for the prediction
peterc-yuma Jan 8, 2025
5a3943f
update how prediction is passed into synapse
peterc-yuma Jan 8, 2025
988aab8
more fixes
peterc-yuma Jan 8, 2025
81a5629
going back to previous implementation
peterc-yuma Jan 8, 2025
1a444bb
only needed files
peterc-yuma Jan 8, 2025
326122e
I lied
peterc-yuma Jan 8, 2025
b1cfab2
remove verify fn
peterc-yuma Jan 8, 2025
b8630cf
comment out instead
peterc-yuma Jan 8, 2025
5dce481
Merge pull request #65 from foundryservices/181-commit-reveal
hayden-yuma Jan 8, 2025
55dabc5
resolve conflicts
peterc-yuma Jan 8, 2025
f83c3e9
Merge pull request #66 from foundryservices/275-necessary-data
hayden-yuma Jan 8, 2025
3de8242
hotfix
peterc-yuma Jan 8, 2025
69f6cd1
fix
peterc-yuma Jan 8, 2025
bb3f9e4
Merge pull request #67 from foundryservices/hotfix
hayden-yuma Jan 8, 2025
3603df8
comment out
peterc-yuma Jan 8, 2025
f2e4bd6
Merge pull request #68 from foundryservices/hotfix-comment-out-verify-fn
matt-yuma Jan 8, 2025
7b5da0f
Merge pull request #69 from foundryservices/dev
matt-yuma Jan 8, 2025
098ffdd
ensure hotkeys match function works
peterc-yuma Jan 9, 2025
e7ecced
Merge pull request #71 from foundryservices/hotfix-hotkeys-match
peterc-yuma Jan 9, 2025
44801d0
Merge pull request #72 from foundryservices/dev
peterc-yuma Jan 9, 2025
9b79d5f
Put todays date in release notes
Jan 10, 2025
0f4afe5
Link to registration fee schedule in readme
Jan 10, 2025
988cca1
Add CR3 to release notes
Jan 10, 2025
bb9d9ba
Merge pull request #73 from foundryservices/release-notes-date-v3.0.0
peterc-yuma Jan 10, 2025
51326e6
Merge pull request #74 from foundryservices/dev
peterc-yuma Jan 10, 2025
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
161 changes: 0 additions & 161 deletions .circleci/config.yml

This file was deleted.

Empty file removed .dependencies_installed
Empty file.
10 changes: 8 additions & 2 deletions .env.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Copy the contents on this file to a new file called .env
WANDB_API_KEY='REPLACE_WITH_WANDB_API_KEY'
MINER_HF_ACCESS_TOKEN='REPLACE_WITH_HUGGINGFACE_ACCESS_KEY'
HF_ACCESS_TOKEN='REPLACE_WITH_HUGGINGFACE_ACCESS_KEY'

HF_ACCESS_TOKEN = 'REPLACE_WITH_HUGGINGFACE_ACCESS_KEY'
WANDB_API_KEY = 'REPLACE_WITH_WANDB_API_KEY'
# Git credentials
GIT_TOKEN='REPLACE_WITH_GIT_TOKEN'
GIT_USERNAME='REPLACE_WITH_GIT_USERNAME'
GIT_NAME="REPLACE_WITH_GIT_NAME"
GIT_EMAIL="REPLACE_WITH_GIT_EMAIL"
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ exclude =
scripts,
.venv
max-complexity = 10
max-line-length = 79
max-line-length = 120
per-file-ignores = __init__.py:F401
67 changes: 42 additions & 25 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Cache and Load Build
name: Cache Build

on:
workflow_call:
Expand All @@ -17,7 +17,7 @@ jobs:
steps:

#------------------------------------------------
# Checkout repo and setup python
# check-out repo and set-up python
#------------------------------------------------
- name: Check out repository
uses: actions/checkout@v4
Expand All @@ -27,41 +27,58 @@ jobs:
python-version: '3.11'

#------------------------------------------------
# Load cached venv if cache exists
# ----- install & configure poetry -----
#------------------------------------------------
- name: Restore cached virtualenv
uses: actions/cache/restore@v4
id: restore-cache
- name: Load cached Poetry installation
id: cached-poetry
uses: actions/cache@v4
with:
path: ~/.local # the path depends on the OS
key: poetry-0 # increment to reset cache

- name: Install Poetry
if: steps.cached-poetry.outputs.cache-hit != 'true'
uses: snok/install-poetry@v1
with:
version: latest
virtualenvs-create: true
virtualenvs-in-project: true
virtualenvs-path: .venv
installer-parallel: true

# If cache was loaded, we must redo configuration
- name: Configure poetry
if: steps.cached-poetry.outputs.cache-hit == 'true'
run: |
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
poetry config virtualenvs.path .venv

#------------------------------------------------
# Load cached venv if exists
#------------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('dev_requirements.txt') }}
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}

#------------------------------------------------
# Install dependencies - if cache does not exist
# Install dependencies if cache does not exist
#------------------------------------------------
- name: Install dependencies
if: steps.restore-cache.outputs.cache-hit != 'true'
run: |
python -m venv .venv
source .venv/bin/activate
python -m pip install .[DEV]
echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root

#------------------------------------------------
# Save venv to cache - if not exists
# Install your root project
#------------------------------------------------
- name: Saved cached virtualenv
if: steps.restore-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
key: ${{ steps.restore-cache.outputs.cache-primary-key }}
path: .venv
- name: Install project
run: poetry install --no-interaction

#------------------------------------------------
# Run custom command(s) within venv
#------------------------------------------------
- name: Run commands
run: |
source .venv/bin/activate
${{ inputs.command }}
run: ${{ inputs.command }}
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Continuous Integration
name: CI

on:
pull_request:
push:
branches: [main, dev]
branches: [main, staging, dev]

jobs:
#----------------------------------------------
Expand All @@ -15,9 +15,10 @@ jobs:
with:
name: Cache
command: |
python -m pip list
python --version
echo "Build successful"
poetry run python -m pip list
poetry run python --version
poetry --version
poetry run echo "Build successful"

#----------------------------------------------
# Run Linters
Expand All @@ -28,29 +29,29 @@ jobs:
uses: ./.github/workflows/build.yml
with:
name: Black
command: python -m black --check .
command: poetry run python -m black --check .
lint-isort:
name: Linter
needs: build
uses: ./.github/workflows/build.yml
with:
name: Isort
command: python -m isort --check-only .
command: poetry run python -m isort --check-only .
lint-mypy:
name: Linter
needs: build
if: false # This condition ensures the job is never executed
uses: ./.github/workflows/build.yml
with:
name: Mypy
command: python -m mypy --verbose 0 .
command: poetry run python -m mypy --verbose 0 .
lint-flake8:
name: Linter
needs: build
uses: ./.github/workflows/build.yml
with:
name: Flake8
command: python -m flake8 .
command: poetry run python -m flake8 .

#----------------------------------------------
# Run Tests
Expand All @@ -63,9 +64,8 @@ jobs:
lint-mypy,
lint-flake8,
]
# `${{ always() }}` will run the tests regardless of linting success
if: false # This condition ensures the job is never executed
if: ${{ always() }} # will run the tests regardless of linting success
uses: ./.github/workflows/build.yml
with:
name: Unittests
command: pytest tests/
command: poetry run pytest tests/
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.python-version

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -130,6 +128,8 @@ venv/
ENV/
env.bak/
venv.bak/
# branch specific environments that start with issue number
.[0-9]*-*

# Spyder project settings
.spyderproject
Expand Down Expand Up @@ -164,3 +164,9 @@ cython_debug/

testing/
timestamp.txt

# localnet config
miner.config.local.js
validator.config.local.js

local_data/
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11
Loading
Loading