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

feat: implements initial sync for v2 APIs #3

Merged
merged 31 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9d30359
chore(gitignore): ignore temporary files and folders
YaswanthKumar-eng Sep 17, 2024
0f2990c
chore(setup): initialize project structure and basic configuration
YaswanthKumar-eng Sep 17, 2024
725a33b
feat: implement v2 clients for sync and async operations
YaswanthKumar-eng Sep 17, 2024
6fc2706
chore(workflow): add GitHub Actions workflows directory
YaswanthKumar-eng Sep 17, 2024
70a6a75
feat(clients): updates sync and async clients
YaswanthKumar-eng Sep 20, 2024
5fcda9f
feat(v2SDK): updates v2 sdk clients
YaswanthKumar-eng Sep 23, 2024
5b796e5
chore: refactor and add from file function
guptadev21 Oct 21, 2024
b21496e
chore: add `get_token` and related methods to `Client` class
guptadev21 Oct 22, 2024
aff845f
chore: refactor
guptadev21 Oct 22, 2024
a915674
chore: update
guptadev21 Oct 22, 2024
2ee01ed
chore: update
guptadev21 Oct 22, 2024
ff01494
chore: update
guptadev21 Oct 22, 2024
99e0507
chore: add lint check
guptadev21 Oct 22, 2024
387cb43
chore: check on PR
guptadev21 Oct 22, 2024
8320905
chore: Update lint-check workflow and add CONTRIBUTING.md
guptadev21 Oct 22, 2024
35eb4d4
docs: Update README.md with Rapyuta IO SDK v2 information and contrib…
guptadev21 Oct 22, 2024
aa4660b
chore: remove things
guptadev21 Oct 23, 2024
e9b7367
chore: Update lint-check workflow and add CONTRIBUTING.md
guptadev21 Oct 23, 2024
038d953
chore: update
guptadev21 Oct 23, 2024
5c8c714
chore: update
guptadev21 Oct 23, 2024
066f255
chore: update
guptadev21 Oct 23, 2024
b929c7e
chore: Update
guptadev21 Oct 23, 2024
997cb9e
chore: add test files and list projects
guptadev21 Oct 24, 2024
3896d9e
chore: Update Python compatibility workflow and client.py
guptadev21 Oct 24, 2024
0b9144f
feat: add some functions
guptadev21 Oct 24, 2024
f1517ba
refactor: make the sdk work and cleanup
pallabpain Oct 28, 2024
e6b6bef
refactor: sync client
pallabpain Oct 28, 2024
86a70e8
refactor: remove async client
pallabpain Oct 28, 2024
7034692
test: fix broken test
pallabpain Oct 28, 2024
f25f486
ci: fix compatibility workflow
pallabpain Oct 28, 2024
e1796d6
docs: update readme
pallabpain Oct 28, 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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @rapyuta-robotics/io-cli-owner @rapyuta-robotics/io-first-reviewer
20 changes: 20 additions & 0 deletions .github/workflows/conventional-commits.yml
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 }}
14 changes: 14 additions & 0 deletions .github/workflows/pull-request.yml
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"
23 changes: 23 additions & 0 deletions .github/workflows/pypi.yml
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
22 changes: 22 additions & 0 deletions .github/workflows/python-compatibility.yml
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"
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
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 }}
17 changes: 17 additions & 0 deletions .gitignore
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/
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12.5
29 changes: 29 additions & 0 deletions .releaserc.json
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 added CHANGELOG.md
Empty file.
40 changes: 40 additions & 0 deletions CONTRIBUTING.md
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
```
27 changes: 27 additions & 0 deletions README.md
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.
32 changes: 32 additions & 0 deletions pyproject.toml
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"
guptadev21 marked this conversation as resolved.
Show resolved Hide resolved
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"]
5 changes: 5 additions & 0 deletions rapyuta_io_sdk_v2/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# ruff: noqa
from rapyuta_io_sdk_v2.config import Configuration
pallabpain marked this conversation as resolved.
Show resolved Hide resolved
from rapyuta_io_sdk_v2.client import Client

__version__ = "0.0.1"
Loading
Loading