-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implements initial sync for v2 APIs (#3)
This commit implements the initial sync client that will form the base of the SDK.
- Loading branch information
1 parent
8d15592
commit 8eefdae
Showing
21 changed files
with
968 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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 @@ | ||
* @rapyuta-robotics/io-cli-owner @rapyuta-robotics/io-first-reviewer |
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,20 @@ | ||
name: 💬 Check Commit Hygiene | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- devel | ||
|
||
jobs: | ||
verify: | ||
name: Conventional Commits | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
name: Checkout code | ||
|
||
- uses: rapyuta-robotics/[email protected] | ||
name: Check if commit messages are compliant | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,14 @@ | ||
name: ✅ Quality Checks | ||
on: [ push ] | ||
|
||
jobs: | ||
code-quality-checks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run checks | ||
uses: astral-sh/ruff-action@v1 | ||
with: | ||
args: "check" |
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,23 @@ | ||
name: 📦️ Upload to PyPi | ||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
upload: | ||
runs-on: ubuntu-latest | ||
environment: release | ||
permissions: | ||
id-token: write | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install uv | ||
uses: astral-sh/setup-uv@v3 | ||
|
||
- name: Publish to pypi | ||
run: | | ||
uv build | ||
uv publish --trusted-publishing always |
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,22 @@ | ||
name: 🐍 Python Compatibility Check | ||
on: [push] | ||
|
||
jobs: | ||
python-compatibility: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.8.10', '3.9', '3.10', '3.11', '3.12', '3.13'] | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install uv | ||
uses: astral-sh/setup-uv@v3 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
run: uv python install ${{ matrix.python-version }} | ||
|
||
- name: Try import | ||
run: | | ||
uv run python -c "import rapyuta_io_sdk_v2" |
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,24 @@ | ||
name: 🎉 Release | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/[email protected] | ||
with: | ||
token: ${{ secrets.GH_TOKEN }} | ||
|
||
- name: Run semantic-release | ||
run: | | ||
npm install --save-dev [email protected] | ||
npm install @semantic-release/git -D | ||
npm install @semantic-release/changelog -D | ||
npm install @semantic-release/exec -D | ||
npx semantic-release | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} |
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,17 @@ | ||
# python generated files | ||
__pycache__/ | ||
*.py[oc] | ||
build/ | ||
dist/ | ||
wheels/ | ||
*.egg-info | ||
|
||
# venv | ||
.venv*/ | ||
.ruff_cache | ||
.idea | ||
.vscode | ||
main_test.py | ||
test_config.json | ||
|
||
ignore/ |
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 @@ | ||
3.12.5 |
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,29 @@ | ||
{ | ||
"branches": ["main"], | ||
"plugins": [ | ||
[ | ||
"@semantic-release/commit-analyzer", | ||
{ | ||
"preset": "angular", | ||
"releaseRules": [ | ||
{"type": "docs", "scope": "README", "release": "patch"}, | ||
{"type": "release", "release": "minor"}, | ||
{"scope": "no-release", "release": false} | ||
] | ||
} | ||
], | ||
"@semantic-release/release-notes-generator", | ||
[ | ||
"@semantic-release/changelog", | ||
{ | ||
"changelogFile": "CHANGELOG.md" | ||
} | ||
], | ||
[ | ||
"@semantic-release/exec", | ||
{ | ||
"prepareCmd": "scripts/bump-version.sh ${nextRelease.version}" | ||
} | ||
] | ||
] | ||
} |
Empty file.
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,40 @@ | ||
# Contribution Guidelines | ||
## 🌟 Setup Your Development Environment | ||
|
||
The project uses [uv](https://docs.astral.sh/uv/) for development. It needs to be installed to set up the development environment. | ||
|
||
```bash | ||
curl -LsSf https://astral.sh/uv/install.sh | sh | ||
``` | ||
|
||
> Note: In case of installation error, please refer to this [installation documentation](https://docs.astral.sh/uv/getting-started/installation/). | ||
Once `uv` is installed, a Python virtual environment can be quickly bootstrapped by running the following commands in the root of the repository: | ||
|
||
```bash | ||
uv venv | ||
source .venv/bin/activate | ||
``` | ||
|
||
This will create a virtual environment in the `.venv` directory and activate it. | ||
|
||
Next, install all dependencies using the following command: | ||
|
||
```bash | ||
uv sync | ||
``` | ||
|
||
New dependencies can be installed directly using `uv`. This modifies the `pyproject.toml` and `uv.lock`. | ||
|
||
```bash | ||
uv add <package-name> | ||
``` | ||
|
||
### 🛠️ Linting and Formatting | ||
|
||
You can check and fix the code style by running the following commands: | ||
|
||
```bash | ||
uvx ruff check --fix | ||
uvx ruff format | ||
``` |
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,27 @@ | ||
# Rapyuta IO SDK v2 | ||
Rapyuta IO SDK v2 provides a comprehensive set of tools and functionalities to interact with the rapyut.io platform. | ||
|
||
## Installation | ||
```bash | ||
pip install rapyuta-io-sdk-v2 | ||
``` | ||
|
||
### Quick Start | ||
```python | ||
from rapyuta_io_sdk_v2 import Configuration, Client | ||
|
||
config = Configuration(email="[email protected]", | ||
password="password", | ||
organization_guid="organization_guid", | ||
project_guid="project_guid") | ||
|
||
client = Client(config) | ||
client.login() | ||
|
||
# Get current project | ||
project = client.get_project() | ||
``` | ||
|
||
## Contributing | ||
|
||
We welcome contributions! Please read our [contributing guidelines](CONTRIBUTING.md) to get started. |
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 @@ | ||
[project] | ||
name = "rapyuta-io-sdk-v2" | ||
dynamic = ["version"] | ||
description = "Python SDK for rapyuta.io v2 APIs" | ||
dependencies = [ | ||
"httpx>=0.27.2", | ||
"mock>=5.1.0", | ||
"munch>=4.0.0", | ||
"pytest-mock>=3.14.0", | ||
"pytest>=8.3.3", | ||
"tenacity>=9.0.0", | ||
] | ||
readme = "README.md" | ||
license = { file = "LICENSE" } | ||
requires-python = ">= 3.8" | ||
|
||
[build-system] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[tool.rye] | ||
managed = true | ||
dev-dependencies = [] | ||
|
||
[tool.hatch.version] | ||
path = "rapyuta_io_sdk_v2/__init__.py" | ||
|
||
[tool.hatch.metadata] | ||
allow-direct-references = true | ||
|
||
[tool.hatch.build.targets.wheel] | ||
packages = ["rapyuta_io_sdk_v2"] |
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,5 @@ | ||
# ruff: noqa | ||
from rapyuta_io_sdk_v2.config import Configuration | ||
from rapyuta_io_sdk_v2.client import Client | ||
|
||
__version__ = "0.0.1" |
Oops, something went wrong.