From dd10b65b8a661d199dd6b0e74e5c0a3aa83515ca Mon Sep 17 00:00:00 2001 From: Cameron Fairchild Date: Mon, 22 Jul 2024 10:32:07 -0400 Subject: [PATCH 1/2] Bumps version --- VERSION | 2 +- bittensor/__init__.py | 2 +- bittensor/subtensor.py | 2 +- requirements/prod.txt | 6 +++--- scripts/environments/apple_m1_environment.yml | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/VERSION b/VERSION index 6020dfc232..6f4f7b895d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.9.3 \ No newline at end of file +6.9.4 \ No newline at end of file diff --git a/bittensor/__init__.py b/bittensor/__init__.py index ed4d6814f0..4f49637776 100644 --- a/bittensor/__init__.py +++ b/bittensor/__init__.py @@ -27,7 +27,7 @@ nest_asyncio.apply() # Bittensor code and protocol version. -__version__ = "6.9.3" +__version__ = "6.9.4" version_split = __version__.split(".") __version_as_int__: int = ( diff --git a/bittensor/subtensor.py b/bittensor/subtensor.py index d43973b94e..5a1b3feffc 100644 --- a/bittensor/subtensor.py +++ b/bittensor/subtensor.py @@ -18,6 +18,7 @@ import os import copy +import socket import time import torch import argparse @@ -91,7 +92,6 @@ T = TypeVar("T") - class ParamWithTypes(TypedDict): name: str # Name of the parameter. type: str # ScaleType string of the parameter. diff --git a/requirements/prod.txt b/requirements/prod.txt index cf1a6ba7ad..068276e968 100644 --- a/requirements/prod.txt +++ b/requirements/prod.txt @@ -24,9 +24,9 @@ pytest retry requests rich -scalecodec==1.2.7 -shtab==1.6.5 -substrate-interface==1.7.5 +scalecodec==1.2.11 +shtab~=1.6.5 +substrate-interface~=1.7.9 termcolor torch>=1.13.1 tqdm diff --git a/scripts/environments/apple_m1_environment.yml b/scripts/environments/apple_m1_environment.yml index 3c2c6a5826..5fcf6338da 100644 --- a/scripts/environments/apple_m1_environment.yml +++ b/scripts/environments/apple_m1_environment.yml @@ -228,7 +228,7 @@ dependencies: - retry==0.9.2 - rich==12.5.1 - rsa==4.9 - - scalecodec==1.2.7 + - scalecodec==1.2.11 - scikit-learn==1.2.2 - scipy==1.10.1 - sentencepiece==0.1.99 @@ -241,7 +241,7 @@ dependencies: - sqlalchemy==2.0.19 - starlette==0.27.0 - streamlit==1.22.0 - - substrate-interface==1.5.2 + - substrate-interface==1.7.9 - tenacity==8.2.2 - termcolor==2.1.1 - threadpoolctl==3.1.0 From 364b4d71ea046a93efc118e504a6df7980a80f53 Mon Sep 17 00:00:00 2001 From: Gus Date: Thu, 25 Jul 2024 18:13:20 -0400 Subject: [PATCH 2/2] ci: adds release workflow --- .github/workflows/release.yml | 72 +++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000..2cdfe5dfa0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,72 @@ +name: Build and Publish Python Package + +on: + workflow_dispatch: + inputs: + version: + description: 'Version to release' + required: true + type: string + +jobs: + build: + name: Build Python distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build wheel twine + + - name: Build package + run: python setup.py sdist bdist_wheel + + - name: Check if package version already exists + run: | + PACKAGE_NAME=$(python setup.py --name) + PACKAGE_VERSION=${{ github.event.inputs.version }} + if twine check dist/*; then + if pip install $PACKAGE_NAME==$PACKAGE_VERSION; then + echo "Error: Version $PACKAGE_VERSION of $PACKAGE_NAME already exists on PyPI" + exit 1 + else + echo "Version $PACKAGE_VERSION of $PACKAGE_NAME does not exist on PyPI. Proceeding with upload." + fi + else + echo "Error: Twine check failed." + exit 1 + fi + + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: dist + path: dist/ + + approve-and-publish: + needs: build + runs-on: ubuntu-latest + environment: release + permissions: + contents: read + id-token: write + + steps: + - name: Download artifact + uses: actions/download-artifact@v3 + with: + name: dist + path: dist/ + + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + verbose: true + print-hash: true \ No newline at end of file