Skip to content

Commit

Permalink
feat: replace hatch with poetry
Browse files Browse the repository at this point in the history
- Also update grpcio to latest version (1.66.2)
- Also update brotobuf to latest version (5.28)
- Also update brotobuf compiler to latest version (28.2). It is
  not entirely clear how protobuf compiler relates to the protobuf
  python library
  • Loading branch information
joekickass committed Oct 11, 2024
1 parent d3cf806 commit c61464f
Show file tree
Hide file tree
Showing 46 changed files with 2,021 additions and 1,258 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/build-docs-mypy.yaml

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/build-remotivelabs-broker-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build remotivelabs-broker package and documentation

on: push

jobs:
build:
name: Build remotivelabs-broker

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Build package and docs
env:
NO_TTY: true
run: ./python/remotivelabs-broker/docker-build.sh
- id: build_output
run: echo "whl_path=$(ls python/remotivelabs-broker/dist/*.whl)" >> $GITHUB_OUTPUT

- uses: actions/upload-artifact@v4
with:
name: remotivelabs-broker-whl
path: ${{ steps.build_output.outputs.whl_path }}
if-no-files-found: error
retention-days: 1
overwrite: true

test:
name: Install remotivelabs-broker
needs: build

strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
os: [ubuntu-22.04, ubuntu-24.04, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- uses: actions/download-artifact@v4
with:
name: remotivelabs-broker-whl

- id: download_artifact
run: echo "library_path=$(ls *.whl)" >> $GITHUB_OUTPUT
shell: bash

- name: Install remotivelabs-broker
run: pip install ${{ steps.download_artifact.outputs.library_path }}
shell: bash
56 changes: 0 additions & 56 deletions .github/workflows/code-qa.yaml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/python-code-qa-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Python Code QA CI

on: push

jobs:
python-ci:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
defaults:
run:
working-directory: ./python/remotivelabs-broker

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: abatilo/actions-poetry@v2
- run: poetry self add 'poethepoet[poetry_plugin]'

- name: Generate stubs (and build package)
env:
NO_TTY: true
run: ./docker-build.sh

- run: poetry install

- name: run pytest
run: poetry poe test

- name: run ruff
run: poetry poe lint

- name: run pylint
run: poetry poe pylint

- name: run mypy
run: poetry poe mypy
24 changes: 24 additions & 0 deletions .github/workflows/rust-code-qa-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Rust Code QA CI

on: push

jobs:
rust-ci:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable

- name: Build and run tests
run: |
pushd rust/remotivelabs-broker
cargo test
popd
- name: Check format
run: |
pushd rust/remotivelabs-broker
cargo fmt --check
popd
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.8
3.10
42 changes: 12 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,31 @@
# RemotiveLabs RemotiveBroker GRPC APIs

This repo contains all public API from [RemotiveLabs](https://remotivelabs.com/) for integrating
with RemotiveBroker using your favourite programming language.
This repo contains all public API from [RemotiveLabs](https://remotivelabs.com/) for integrating with RemotiveBroker using your favourite
programming language.

We currently have pre-built GAPIC (Generated API Client) for python and grpc-web
but will add more moving forward.

For other languages visit https://grpc.io/ to read up how to generate code for your
programming language based on our protocol buffer definition files
We currently have pre-built GAPIC (Generated API Client) for a few languages, but will add more moving forward.

For other languages visit https://grpc.io/ to read up how to generate code for your programming language based on our protocol buffer
definition files.

## Protocol buffer definitions

Use these to generate GAPIC for your programming language.

- [Documentation and source code](protos/)

## Python RemotiveBroker API

Pre-built Python GAPIC + some extra helper functions

- [Documentation and source code](python/remotivelabs-broker/)
- [Code samples](https://github.com/remotivelabs/remotivelabs-samples/tree/main/python)


## gRPC-web RemotiveBroker API
[Protobuf files](./protos/README.md)

Pre-built gRPC-web RemotiveBroker GAPIC. gRPC-web is designed to run in browser and
not in nodejs. This is Javascipt+Typescript.
## Language specific APIs

- [Documentation and source code](grpc-web/grpc-web-stubs)
- [Python](./python/remotivelabs-broker/)
- [gRPC-web](./grpc-web/README.md)
- [Rust](./rust/README.md)

## RemotiveBroker configuration schemas

[JSON schemas](schemas) of configuration files used by RemotiveBroker.

## Coming soon

Pre-built GAPIC for the following languages are coming shortly

* Java and Kotlin
* NodeJS

## Questions

Please use our discussion forum/community for any questions you might have <br>
https://github.com/remotivelabs/remotivelabs-community/discussions
Please use our discussion forum/community for any questions you might have:

https://github.com/remotivelabs/remotivelabs-community/discussions
63 changes: 47 additions & 16 deletions grpc-web/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,57 @@
# RemotiveLabs WEB-GRPC
# RemotiveBroker WEB-GRPC API

Web-grpc is javascript to be used in a browser context, not intended
to bu used with nodejs, read more here https://github.com/grpc/grpc-web
`remotivelabs-grpc-web-stubs` - Javascript SDK for interacting with the RemotiveBroker API in a browser context. Not intended to be used
with NodeJS.

## Grpc-web-stubs
Published to npm on [https://www.npmjs.com/package/remotivelabs-grpc-web-stubs](https://www.npmjs.com/package/remotivelabs-grpc-web-stubs).

[![npm version](https://img.shields.io/npm/v/remotivelabs-grpc-web-stubs.svg)](https://www.npmjs.com/package/remotivelabs-grpc-web-stubs)
## Getting started

Pre-built GRPC stubs generated from protobuf files
```bash
cd grpc-web/grpc-web-stubs

# install dependencies
yarn install

# TODO
```
npm install --save remotivelabs-grpc-web-stubs
```
or
```
yarn add remotivelabs-grpc-web-stubs

## Building

```bash
cd grpc-web/grpc-web-stubs

# Build docker image
docker build -t remotivelabs/grpc-web-generator .

# Generate typescript
./generate-ts.sh

# Generate javascript
./generate-js.sh
```

Read more: [grpc-web-stubs/](grpc-web-stubs/)
## Versioning

## Grpc-web-client
Versioning is done using `npm version`, see [Publishing](#publishing).

RemotiveBroker high-level client is coming soon. This API will be based on our
RemotiveBrokerApp that is using the grpc-web-stubs but adds layer on top to make
it simpler to use.
Follow [Semantic versioning](https://semver.org/). Beta versions should be suffixed with `-beta*`, example `0.2.0-beta1`.

## Publishing

Published to npm on [https://www.npmjs.com/package/remotivelabs-grpc-web-stubs](https://www.npmjs.com/package/remotivelabs-grpc-web-stubs).

```bash
# generate stubs
./generate-ts.sh

# update version
npm version x.y.z

# commit version
git add .
git commit -m "release: Prepare a release for version x.y.z"

# publish
npm publish
```
Loading

0 comments on commit c61464f

Please sign in to comment.