Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
d31e883
Update git configs
SeiyaKobayashi May 12, 2025
8e3a411
Reconstruct monorepo with uv instead of poetry
SeiyaKobayashi May 12, 2025
4828ac3
Add clients & utils; renamed directories
SeiyaKobayashi May 13, 2025
ecc193d
Update utils
SeiyaKobayashi May 14, 2025
7032c6d
Simplify ABI
SeiyaKobayashi May 14, 2025
42a8d01
Refactor client
SeiyaKobayashi May 14, 2025
1a2c3ac
Add JPYC client
SeiyaKobayashi May 14, 2025
b22c1e9
Rename package name
SeiyaKobayashi May 15, 2025
dcc1c34
Add & refactor utils
SeiyaKobayashi May 15, 2025
ee49f4b
Refactor clients
SeiyaKobayashi May 15, 2025
b46dd20
Fix JPYC client
SeiyaKobayashi May 15, 2025
c8a6b80
Add tx simulation
SeiyaKobayashi May 15, 2025
2f3c105
Update s
SeiyaKobayashi May 15, 2025
76e940f
Resolve import errors & Fixed typos
SeiyaKobayashi May 15, 2025
3f2c1a1
Update dependencies
SeiyaKobayashi May 15, 2025
fbc07cb
Add arg validation; refactor clients
SeiyaKobayashi May 15, 2025
5a79f6f
Rename & refactor artifacts-related utils
SeiyaKobayashi May 17, 2025
9cdb342
Update dependencies
SeiyaKobayashi May 17, 2025
8ac0567
Improve imports; more refactoring
SeiyaKobayashi May 17, 2025
a8ed8bd
Refactor web3 client
SeiyaKobayashi May 18, 2025
7d501bb
Fix & refactor JPYC SDK
SeiyaKobayashi May 18, 2025
7224f11
Update & refactor utils modules
SeiyaKobayashi May 19, 2025
666cf59
Update & refactor clients
SeiyaKobayashi May 19, 2025
e4d4a40
Fix clients & imports
SeiyaKobayashi May 19, 2025
e9c4a4f
Add example code for basic usage
SeiyaKobayashi May 19, 2025
1351742
Add code examples for eip-3009 methods
SeiyaKobayashi May 20, 2025
2b40d3d
Add 'README' at 'examples' directory
SeiyaKobayashi May 20, 2025
6f5f48e
Fix & refactor broken code examples
SeiyaKobayashi May 20, 2025
0dcf944
Update 'examples/README'
SeiyaKobayashi May 20, 2025
658456f
Configure ruff; apply linter & formatter
SeiyaKobayashi May 20, 2025
1f1d7df
Configure & apply mypy
SeiyaKobayashi May 20, 2025
ba5e570
Enable pre-commit
SeiyaKobayashi May 20, 2025
9d0aa97
Update 'gitignore's
SeiyaKobayashi May 20, 2025
a32ba39
Update pre-commit config
SeiyaKobayashi May 21, 2025
531a290
Update '.gitignore's
SeiyaKobayashi May 21, 2025
3649cab
Add unit tests for 'utils' modules; fix pre-commit hooks
SeiyaKobayashi May 21, 2025
52e3958
Add unit tests for 'client' module
SeiyaKobayashi May 21, 2025
354a9e2
Refactor jpyc client
SeiyaKobayashi May 22, 2025
9912a37
Fix typos in 'examples' modules
SeiyaKobayashi May 22, 2025
8e372e0
Add more tests
SeiyaKobayashi May 22, 2025
44f3d63
Remove unnecessary packages
SeiyaKobayashi May 22, 2025
bd68d6d
Update 'core/README'
SeiyaKobayashi May 22, 2025
698de93
Add github workflows & composite-actions
SeiyaKobayashi May 22, 2025
d763325
Fix 'check' workflow
SeiyaKobayashi May 22, 2025
be01413
Remove temp filter
SeiyaKobayashi May 22, 2025
05fbc9b
Add dev docs
SeiyaKobayashi May 22, 2025
b99d416
Remove unnecessary packages
SeiyaKobayashi May 22, 2025
5f05ecb
Add 'README's
SeiyaKobayashi May 22, 2025
d0cb905
Add contributing guidelines
SeiyaKobayashi May 22, 2025
d4ced7a
Update 'REAEME's
SeiyaKobayashi May 22, 2025
742b30b
Modify workflows
SeiyaKobayashi May 22, 2025
9f83ab2
Update 'core/pyproject.toml'
SeiyaKobayashi May 22, 2025
def77de
Update 'README's
SeiyaKobayashi May 22, 2025
c8423d5
Update 'uv.lock'
SeiyaKobayashi May 22, 2025
c55d3c0
Fix 'README'
SeiyaKobayashi May 23, 2025
dce5275
Update 'core/README'
SeiyaKobayashi May 24, 2025
2c6e2c8
Merge pull request #5 from jcam1/fix/develop
SeiyaKobayashi May 24, 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
15 changes: 15 additions & 0 deletions .github/actions/install-packages/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: install packages
description: set up uv & install packages

runs:
using: composite
steps:
- uses: astral-sh/setup-uv@v6
with:
version: "0.7.6"
- uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: Install packages
shell: bash
run: uv sync --locked --all-extras --dev
48 changes: 48 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: check

on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop

jobs:
detect-changes:
runs-on: ubuntu-latest
timeout-minutes: 3
permissions:
pull-requests: read
outputs:
core: ${{ steps.filter.outputs.core }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
core:
- 'packages/core/**'

check-core:
needs: detect-changes
if: ${{ needs.detect-changes.outputs.core == 'true' }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/core
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-packages
- name: Lint
run: uv run ruff check .
- name: Format
run: uv run ruff format --check .
- name: Run mypy
run: uv run mypy .
- name: Run tests
run: uv run pytest -v --cov -W ignore::DeprecationWarning
85 changes: 85 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: publish

on:
push:
branches:
- main
paths:
- 'packages/**'

jobs:
detect-changes:
runs-on: ubuntu-latest
timeout-minutes: 3
permissions:
pull-requests: read
outputs:
core: ${{ steps.filter.outputs.core }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
core:
- 'packages/core/**'

push-git-tag:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./
timeout-minutes: 3
outputs:
tag-name: ${{ 'v' }}${{ env.GIT_TAG_VERSION }}
tag-version: ${{ env.GIT_TAG_VERSION }}
tag-exists: ${{ steps.create-tag.outputs.tag_exists }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-packages
- name: get version from `pyproject.toml`
run: |
package_version=($(uv version))
echo "GIT_TAG_VERSION=$package_version[2]" >> $GITHUB_ENV
- uses: rickstaa/action-create-tag@v1
id: create-tag
with:
tag: ${{ 'v' }}${{ env.GIT_TAG_VERSION }}

publish-release-note:
needs: push-git-tag
if: ${{ needs.push-git-tag.outputs.tag-exists == 'false' }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./
timeout-minutes: 5
permissions:
contents: write
pull-requests: read
steps:
- uses: actions/checkout@v4
- uses: release-drafter/release-drafter@v6
with:
name: ${{ needs.push-git-tag.outputs.tag-name }}
tag: ${{ needs.push-git-tag.outputs.tag-name }}
version: ${{ needs.push-git-tag.outputs.tag-version }}
publish: 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish-core:
needs: [detect-changes, publish-release-note]
if: ${{ needs.detect-changes.outputs.core == 'true' }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/core
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-packages
- name: Build package
run: uv build --no-cache
- name: Publish package to PyPI
run: uv publish --no-cache
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
# python
.venv
.python-version
dist
*.egg-info
__pycache__

# mypy
.mypy_cache

# ruff
.ruff_cache

# pytest
.pytest_cache
.coverage

# misc
*_cache
cspell.json
16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
repos:
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.7.6
hooks:
- id: uv-lock
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.10
hooks:
- id: ruff-check
args: [ --fix ]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.15.0
hooks:
- id: mypy
files: ^packages/core/
31 changes: 31 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Contributing Guidelines

We appreciate your interest to contribute to this project! Please read the following to see how you could contribute.

## 📝 Create an Issue

The first thing to do is to create a new issue. Feel free to create new issues from [here](https://github.com/jcam1/python-sdk/issues/new/choose) to propose/request new features or report any bugs you found.

## ⬇️ Clone This Repo

Next, clone this repository. Our default branch is set to `develop`.

```sh
git clone https://github.com/jcam1/python-sdk.git
```

## ⚡ Checkout to a New Branch

You then need to `checkout` to a new branch (name whatever you would like) from the cloned `develop` branch.

```sh
git checkout -b ${your_branch_name}
```

## 🛠 Write Code

Now, write code to implement the proposed features and/or to fix bugs. Please refer to `README`s of respective SDKs for more details.

## 🌟 Open a Pull Request

Finally, open a new PR from your branch to `develop` branch, and describe what you'll have done following [our PR template](./.github/pull_request_template.md).
4 changes: 0 additions & 4 deletions README-ja.md

This file was deleted.

43 changes: 41 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,43 @@
# JPYC Python SDK

> [!IMPORTANT]
> TODO: README in English
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/jcam1/python-sdk/issues/new/choose)

Monorepo for JPYC Python SDKs.

## 💫 Available SDKs

Please refer to `README`s of respective SDKs for more details.

| name | `README` |
| -----: | :----------------------------------------- |
| `core` | [packages/core](./packages/core/README.md) |

## ⬇️ Installation

### 1. Clone Repository

```sh
# clone this repo
$ git clone https://github.com/jcam1/python-sdk.git
# cd into the repo
$ cd python-sdk
```

### 2. Install `uv`

This repo uses `uv` for package management purposes. If not installed, please read & follow [uv's official instructions](https://docs.astral.sh/uv/getting-started/installation/) to install any necessary software for development. For example, the following command installs `uv` on MacOS.

```sh
curl -LsSf https://astral.sh/uv/install.sh | sh
```

### 3. Install packages

```sh
uv sync
```

## 💪🏻 Contributing

Please refer to [CONTRIBUTING.md](./CONTRIBUTING.md).
25 changes: 25 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Docs

> [!IMPORTANT]
> This `README` is mainly for the advanced users (e.g., contributors of this repo).

This directory contains the auto-generated documentation for the SDK.

## 📄 Build

Run the following commands that generate a collection of documents under [`./docs`](./) directory.

```sh
# cd into the root directory
$ cd python-sdk
# generate documentation from the google-styled docstrings
$ uv run pdoc ./packages/core/src -o ./docs/core -d google
```

## 🔍 UI

Type the following into your browser to see the contents.

```sh
{absolute_path_of_any_parent_directories}/python-sdk/docs/core/index.html
```
7 changes: 7 additions & 0 deletions docs/core/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=./src.html"/>
</head>
</html>
46 changes: 46 additions & 0 deletions docs/core/search.js

Large diffs are not rendered by default.

2,254 changes: 2,254 additions & 0 deletions docs/core/src.html

Large diffs are not rendered by default.

1,501 changes: 1,501 additions & 0 deletions docs/core/src/utils.html

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions packages/core/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# python
dist
*.egg-info
__pycache__

# mypy
.mypy_cache

# ruff
.ruff_cache

# pytest
.pytest_cache
.coverage

# misc
DS_STORE
21 changes: 21 additions & 0 deletions packages/core/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 JPYC株式会社

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading
Loading