-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' of https://github.com/InjectiveLabs/sdk-python int…
…o feat/add_chain_streams_support
- Loading branch information
Showing
162 changed files
with
5,268 additions
and
2,202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: pre-commit | ||
on: | ||
pull_request: | ||
push: | ||
branches: [master, dev] | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
|
||
- name: Install poetry | ||
run: python -m pip install poetry | ||
- name: Cache the virtualenv | ||
id: cache-venv | ||
uses: actions/cache@v3 | ||
with: | ||
path: ./.venv | ||
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cache-venv.outputs.cache-hit != 'true' | ||
run: python -m poetry install | ||
|
||
- name: Run pre-commit | ||
run: | | ||
python -m poetry run pre-commit run --show-diff-on-failure --color=always --all-files | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: run-tests | ||
on: | ||
pull_request: | ||
push: | ||
branches: [master, dev] | ||
|
||
jobs: | ||
run-tests: | ||
strategy: | ||
matrix: | ||
python: ["3.9", "3.10", "3.11"] | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
OS: ${{ matrix.os }} | ||
PYTHON: ${{ matrix.python }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install poetry | ||
run: python -m pip install poetry | ||
- name: Cache the virtualenv | ||
id: cache-venv | ||
uses: actions/cache@v3 | ||
with: | ||
path: ./.venv | ||
key: ${{ runner.os }}-${{ matrix.python }}-venv-${{ hashFiles('**/poetry.lock') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cache-venv.outputs.cache-hit != 'true' | ||
run: python -m poetry install | ||
|
||
- name: Run tests and Generate coverage | ||
run: | | ||
poetry run pytest --cov --cov-report=xml | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
env_vars: OS,PYTHON |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,3 +143,5 @@ cython_debug/ | |
|
||
.chain_cookie | ||
.exchange_cookie | ||
|
||
.flakeheaven_cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
exclude: '^pyinjective/proto/.*' | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- repo: https://github.com/flakeheaven/flakeheaven | ||
rev: 3.3.0 | ||
hooks: | ||
- id: flakeheaven | ||
name: flakeheaven | ||
description: '`flakeheaven` is a `flake8` wrapper.' | ||
entry: flakeheaven lint | ||
language: python | ||
types_or: [ python, jupyter, markdown, rst, yaml ] | ||
require_serial: true | ||
minimum_pre_commit_version: 2.9.0 | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
name: isort (python) | ||
- repo: https://github.com/psf/black-pre-commit-mirror | ||
rev: 23.9.1 | ||
hooks: | ||
- id: black |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,6 @@ copy-proto: | |
done | ||
|
||
tests: | ||
pytest -v | ||
poetry run pytest -v | ||
|
||
.PHONY: all gen gen-client copy-proto tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.