Skip to content

Commit

Permalink
Merge pull request #38 from inorbit-ai/config/teamcity-badges
Browse files Browse the repository at this point in the history
Adds TeamCity build badges and minor cleanup of README.md
  • Loading branch information
russell-inorbit authored Feb 16, 2024
2 parents b430078 + ba000f6 commit 25637b6
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 63 deletions.
24 changes: 2 additions & 22 deletions .github/workflows/build-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.8, 3.9, 3.10, 3.11]
python-version: ['3.8', '3.9', '3.10', '3.11']
os: [windows-latest, macOS-latest]

steps:
Expand All @@ -34,26 +34,6 @@ jobs:
- name: Upload codecov
uses: codecov/codecov-action@v1

lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install .[test]
- name: Lint with flake8
run: |
flake8 inorbit_edge --count --verbose --show-source --statistics
- name: Check with black
run: |
black --check inorbit_edge --exclude inorbit_edge/inorbit_pb2.py
publish:
if: "contains(github.event.head_commit.message, 'Bump version')"
needs: [test, lint]
Expand All @@ -64,7 +44,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.9
python-version: '3.10'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
Expand Down
24 changes: 2 additions & 22 deletions .github/workflows/test-and-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest, windows-latest, macOS-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
os: [windows-latest, macOS-latest]

steps:
- uses: actions/checkout@v1
Expand All @@ -25,23 +25,3 @@ jobs:
pytest inorbit_edge/tests/
- name: Upload codecov
uses: codecov/codecov-action@v1

lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install .[test]
- name: Lint with flake8
run: |
flake8 inorbit_edge --count --verbose --show-source --statistics
- name: Check with black
run: |
black --diff --check inorbit_edge --exclude inorbit_edge/inorbit_pb2.py
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,5 @@ ENV/
.vscode

# IntelliJ
.idea/
*.iml
5 changes: 0 additions & 5 deletions .idea/.gitignore

This file was deleted.

36 changes: 22 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
[![Build Status](https://github.com/inorbit-ai/edge-sdk-python/workflows/Build%20Main/badge.svg)](https://github.com/inorbit-ai/edge-sdk-python/actions)
[![Code Coverage](https://codecov.io/gh/inorbit/edge-sdk-python/branch/main/graph/badge.svg)](https://codecov.io/gh/inorbit/edge-sdk-python)

The `InOrbit Edge SDK` allows Python programs to communicate with `InOrbit` platform on behalf of robots - providing robot data and handling robot actions. It's goal is to ease the integration between `InOrbit` and any other software that handles robot data.
| Python 3.8 | Python 3.9 | Python 3.10 | Python 3.11 |
|:-----------------------------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------:|
| ![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_Python38QualityRunner/statusIcon.svg) | ![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_Python39QualityRunner/statusIcon.svg) | ![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_Python310QualityRunner/statusIcon.svg) | ![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_Python311QualityRunner/statusIcon.svg) |

The `InOrbit Edge SDK` allows Python programs to communicate with `InOrbit`
platform on behalf of robots - providing robot data and handling robot actions.
Its goal is to ease the integration between `InOrbit` and any other software
that handles robot data.

---

Expand Down Expand Up @@ -31,11 +38,11 @@ def my_command_handler(robot_id, command_name, args, options):
command_name (str): InOrbit command e.g. 'customCommand'
args (list): Command arguments
options (dict): object that includes
- `result_function` can be called to report command execution result. It
has the following signature: `result_function(return_code)`.
- `progress_function` can be used to report command output and has the
following signature: `progress_function(output, error)`.
- `metadata` is reserved for the future and will contains additional
- `result_function` can be called to report command execution
result with the following signature: `result_function(return_code)`
- `progress_function` can be used to report command output with
the following signature: `progress_function(output, error)`
- `metadata` is reserved for the future and will contain additional
information about the received command request.
"""
if command_name == "customCommand":
Expand All @@ -50,7 +57,7 @@ robot_session_factory = RobotSessionFactory(

# Register commands handlers. Note that all handlers are invoked.
robot_session_factory.register_command_callback(my_command_handler)
robot_session_factory.register_executable_commands("./user_scripts", r".*\.sh")
robot_session_factory.register_commands_path("./user_scripts", r".*\.sh")

robot_session_pool = RobotSessionPool(robot_session_factory)

Expand All @@ -72,21 +79,22 @@ For full package documentation please visit [InOrbit Developer Portal](https://d

## Development

See [CONTRIBUTING.md](CONTRIBUTING.md) for information related to developing the code.
See [CONTRIBUTING.md](CONTRIBUTING.md) for information related to developing
the code.

## The Three Commands You Need To Know

1. `pip install -e .[dev]`

This will install your package in editable mode with all the required development
dependencies (i.e. `tox`).
This will install your package in editable mode with all the required
development dependencies (i.e. `tox`).

2. `make build`

This will run `tox` which will run all your tests in both Python 3.7
and Python 3.8 as well as linting your code.
This will run `tox` which will run all your tests in Python 3.8 - 3.11 as
well as linting your code.

3. `make clean`

This will clean up various Python and build generated files so that you can ensure
that you are working in a clean environment.
This will clean up various Python and build generated files so that you can
ensure that you are working in a clean environment.

0 comments on commit 25637b6

Please sign in to comment.