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

Express relay python searcher #1319

Merged
merged 59 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
f4f2ba1
move js searcher sdk
Feb 22, 2024
474501d
add the python searcher sdk
Feb 22, 2024
574b8ff
remove pycache
Feb 22, 2024
64b7142
create class for simple searcher
Feb 22, 2024
244d8e0
add websocket to python searcher sdk
Feb 22, 2024
8dd3e74
finish ws, avoid storing liquidation opportunities within client
Feb 23, 2024
fcaff73
python scripts now working w auto type generation
Feb 25, 2024
6cab8b5
minor precommit changes
Feb 25, 2024
c14569e
address comments 1
Feb 27, 2024
2b819bb
add openapi type generations
Feb 28, 2024
7ad0165
fixed precommit issues on generated type files
Feb 28, 2024
069398f
reorg
Mar 4, 2024
e2acc99
fixed openapi_client generated precommit
Mar 4, 2024
616ff4a
fix js filepath issue
Mar 4, 2024
26bc8d2
added close ws
Mar 4, 2024
74b3200
renamings and add send_ws_message method
Mar 4, 2024
206f481
get rid of duplicate error parsing
Mar 4, 2024
3e66a84
cleanup
Mar 4, 2024
35abeca
set up pypi workflow
Mar 4, 2024
ed32ff8
address comments
Mar 6, 2024
e9e6e50
add python precommit
Mar 6, 2024
e64296c
changes + precommit changes
Mar 6, 2024
a3a5961
test precommit change
Mar 6, 2024
ef8a447
test precommit change
Mar 6, 2024
0252a7d
test precommit change
Mar 6, 2024
458f483
test precommit change
Mar 6, 2024
b0c086d
test precommit change
Mar 6, 2024
a6b640e
test precommit change
Mar 6, 2024
f70eefc
test precommit change
Mar 6, 2024
7d263f0
test precommit change
Mar 6, 2024
0902341
test precommit change
Mar 6, 2024
028b870
correct directory for poetry in pypi wf
Mar 7, 2024
6b8bc9f
remove isort
Mar 7, 2024
20bdd30
rename package
Mar 7, 2024
d62498d
add UUID and some cleanup
Mar 7, 2024
6af2df1
new openapi typings
Mar 8, 2024
4b27756
add pydantic to pyproj
Mar 8, 2024
342196e
more changes
Mar 8, 2024
2888be4
precommit
Mar 8, 2024
6b5555f
remove extraneous files, stick w actual_instance
Mar 8, 2024
968f874
added back http as nondefault
Mar 8, 2024
8afe3e7
correction
Mar 8, 2024
3e55b2f
some cleanup and reorg
Mar 8, 2024
fbc5e6b
minor changes
Mar 8, 2024
05f426e
add back api response typing file
Mar 8, 2024
c85480b
minorer changes
Mar 8, 2024
3af2730
exclude openapi_client from end of file fixer
Mar 8, 2024
946ff3a
build internal models via pydantic
Mar 13, 2024
0f90814
chgs
Mar 13, 2024
c40c824
start to reorg classes
Mar 13, 2024
3423ee7
configure precommit to work
Mar 14, 2024
559533e
some cleanup
Mar 14, 2024
c586c60
reorg a bit
Mar 14, 2024
5997608
address comments
Mar 15, 2024
9b0f395
chgs
Mar 15, 2024
dce3eee
fgt
Mar 15, 2024
b3d35b6
morechgs
Mar 15, 2024
81e5956
merge conflix
Mar 15, 2024
6090e3b
some more chgs
Mar 15, 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
20 changes: 19 additions & 1 deletion .github/workflows/ci-pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
push:
branches: [main]

env:
PYTHON_VERSION: "3.11"
POETRY_VERSION: "1.4.2"

jobs:
pre-commit:
runs-on: ubuntu-latest
Expand All @@ -13,7 +17,6 @@ jobs:
with:
# Need to grab the history of the PR
fetch-depth: 0
- uses: actions/setup-python@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
Expand All @@ -24,6 +27,21 @@ jobs:
profile: minimal
toolchain: nightly-2023-07-23
components: rustfmt, clippy
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
id: setup_python
- name: Cache Poetry cache
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry
key: poetry-cache-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ env.POETRY_VERSION }}
- name: Install poetry dependencies
run: poetry -C express_relay/sdk/python/express_relay install
shell: sh
- uses: pre-commit/action@v3.0.0
if: ${{ github.event_name == 'pull_request' }}
with:
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/pypi-express-relay-utils.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Upload express-relay Python Package to PyPI

on:
push:
tags:
- "python-v*"

jobs:
deploy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install dependencies
run: |
python3 -m pip install --upgrade poetry
poetry -C express_relay/sdk/python/express_relay build
- name: Build and publish
run: |
poetry -C express_relay/sdk/python/express_relay build
poetry -C express_relay/sdk/python/express_relay publish --username __token__ --password ${{ secrets.PYPI_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ tsconfig.tsbuildinfo
*mnemonic*
.envrc
*/*.sui.log*
__pycache__
16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,19 @@ repos:
entry: cargo +nightly-2023-03-01 clippy --manifest-path ./target_chains/solana/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
pass_filenames: false
files: target_chains/solana
# For express relay python files
- id: black
name: black
entry: poetry -C express_relay/sdk/python/express_relay run black express_relay/sdk/python/express_relay
pass_filenames: false
language: "system"
- id: pyflakes
name: pyflakes
entry: poetry -C express_relay/sdk/python/express_relay run pyflakes express_relay/sdk/python/express_relay
pass_filenames: false
language: "system"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't these be python?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this hook directly invokes poetry, not python, see https://sam.hooke.me/note/2023/09/poetry-pre-commit-hooks/

- id: mypy
name: mypy
entry: poetry -C express_relay/sdk/python/express_relay run mypy express_relay/sdk/python/express_relay
pass_filenames: false
language: "system"
Loading
Loading