Skip to content

Commit

Permalink
cleanup: update python deps, test ghcr publish change
Browse files Browse the repository at this point in the history
  • Loading branch information
zshipko committed Apr 9, 2024
1 parent 3e17db9 commit 3b90c9b
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-latest-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build, tag, & push the latest image
uses: docker/build-push-action@v4
Expand Down
75 changes: 43 additions & 32 deletions client/python/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ python = "^3.9"
requests = "^2.28.1"

[tool.poetry.dev-dependencies]
black = "^22.10.0"
black = "^24.03.0"
python-lsp-server = "^1.5.0"
pytest = "^7.1.3"

Expand Down
15 changes: 5 additions & 10 deletions client/python/wasmstore/wasmstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ def normalize_path(path):

class Client:

def __init__(self,
url="http://127.0.0.1:6384",
version="v1",
auth=None,
branch=None):
def __init__(
self, url="http://127.0.0.1:6384", version="v1", auth=None, branch=None
):
self.url = url + "/api/" + version
self.auth = auth
self.branch = branch
Expand All @@ -40,14 +38,11 @@ def find(self, path):
return res.content

def add(self, path, data):
res = self.request("POST",
"/module/" + normalize_path(path),
body=data)
res = self.request("POST", "/module/" + normalize_path(path), body=data)
return res.text

def set(self, path, hash):
res = self.request("POST",
"/hash/" + hash + "/" + normalize_pathr(path))
res = self.request("POST", "/hash/" + hash + "/" + normalize_pathr(path))
return res.text

def hash(self, path):
Expand Down

0 comments on commit 3b90c9b

Please sign in to comment.