Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CI

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
pip install flake8
flake8 src tests
- name: Run tests
run: |
pip install pytest
PYTHONPATH=src pytest
File renamed without changes.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Example Author

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.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
# robot-library-python
# Robot Library Python

A modular Python library for building robot applications. It provides components
for motion control, sensor access, communication, and indicators.

## Installation

```bash
pip install -e .
```

## Usage

```python
from robot.motion import MotionController

controller = MotionController()
```
3 changes: 3 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Documentation

Project documentation goes here.
3 changes: 3 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Examples

Example scripts demonstrating robot usage will be placed here.
15 changes: 15 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "robot-library-python"
version = "0.1.0"
description = "A modular robot control library"
authors = [{name = "Example Author", email = "author@example.com"}]
readme = "README.md"
requires-python = ">=3.8"
dependencies = []

[tool.setuptools.packages.find]
where = ["src"]
11 changes: 11 additions & 0 deletions src/robot/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"""Top-level package for robot library."""

from .robot_base import Robot
from .mqtt_client import RobotMqttClient
from .motion import MotionController

__all__ = [
"Robot",
"RobotMqttClient",
"MotionController",
]
9 changes: 9 additions & 0 deletions src/robot/communication/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"""Communication subpackage."""

from .simple_comm import SimpleCommunication
from .directed_comm import DirectedCommunication

__all__ = [
"SimpleCommunication",
"DirectedCommunication",
]
7 changes: 7 additions & 0 deletions src/robot/communication/directed_comm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"""Directed communication module."""


class DirectedCommunication:
"""Placeholder directed communication class."""

pass
7 changes: 7 additions & 0 deletions src/robot/communication/simple_comm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"""Simple communication module."""


class SimpleCommunication:
"""Placeholder simple communication class."""

pass
9 changes: 9 additions & 0 deletions src/robot/helpers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"""Helper utilities for robot library."""

from .coordinate import Coordinate
from .robot_mqtt import RobotMQTT

__all__ = [
"Coordinate",
"RobotMQTT",
]
7 changes: 7 additions & 0 deletions src/robot/helpers/coordinate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"""Coordinate tracking helper."""


class Coordinate:
"""Placeholder coordinate tracker."""

pass
7 changes: 7 additions & 0 deletions src/robot/helpers/robot_mqtt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"""MQTT helper functions."""


class RobotMQTT:
"""Placeholder MQTT helper."""

pass
5 changes: 5 additions & 0 deletions src/robot/indicators/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""Indicator subpackage."""

from .neopixel import NeoPixel

__all__ = ["NeoPixel"]
7 changes: 7 additions & 0 deletions src/robot/indicators/neopixel.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"""NeoPixel indicator controller."""


class NeoPixel:
"""Placeholder NeoPixel controller."""

pass
7 changes: 7 additions & 0 deletions src/robot/motion.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"""Motion controller algorithms."""


class MotionController:
"""Placeholder motion controller."""

pass
7 changes: 7 additions & 0 deletions src/robot/mqtt_client.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"""MQTT client wrapper for robot communication."""


class RobotMqttClient:
"""Placeholder MQTT client wrapper."""

pass
7 changes: 7 additions & 0 deletions src/robot/robot_base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"""Base Robot class."""


class Robot:
"""Base robot class providing lifecycle management."""

pass
11 changes: 11 additions & 0 deletions src/robot/sensors/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"""Sensor subpackage."""

from .distance import DistanceSensor
from .proximity import ProximitySensor
from .color import ColorSensor

__all__ = [
"DistanceSensor",
"ProximitySensor",
"ColorSensor",
]
7 changes: 7 additions & 0 deletions src/robot/sensors/color.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"""Color sensor implementation."""


class ColorSensor:
"""Placeholder color sensor."""

pass
7 changes: 7 additions & 0 deletions src/robot/sensors/distance.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"""Distance sensor implementation."""


class DistanceSensor:
"""Placeholder distance sensor."""

pass
7 changes: 7 additions & 0 deletions src/robot/sensors/proximity.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"""Proximity sensor implementation."""


class ProximitySensor:
"""Placeholder proximity sensor."""

pass
2 changes: 0 additions & 2 deletions src/robot_emulator/__init__.py

This file was deleted.

98 changes: 0 additions & 98 deletions src/robot_emulator/base.py

This file was deleted.

Empty file.
Empty file removed src/robot_emulator/mqtt_client.py
Empty file.
Empty file.
Empty file removed src/robot_emulator/sample_robot.py
Empty file.
Empty file removed src/robot_emulator/sensors.py
Empty file.
1 change: 1 addition & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Test package for robot library."""
9 changes: 9 additions & 0 deletions tests/test_motion.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"""Tests for the MotionController."""

from robot.motion import MotionController


def test_motion_controller_instantiation():
"""Instantiate MotionController."""
controller = MotionController()
assert isinstance(controller, MotionController)