Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #830 from engnadeau/fix/linting
Browse files Browse the repository at this point in the history
  • Loading branch information
engnadeau authored Aug 26, 2022
2 parents 5844673 + 6087844 commit 8f5dfab
Show file tree
Hide file tree
Showing 25 changed files with 811 additions and 817 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ max-complexity = 10
import-order-style = pep8
application-import-names = pybotics
max-line-length = 88
ignore = E741,W503
extend-ignore = E203,E741
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ check-package:

.PHONY: check-typing
check-typing:
poetry run mypy --strict .
poetry run mypy --strict --show-error-codes .

.PHONY: check-format
check-format:
Expand All @@ -22,6 +22,11 @@ lint:
.PHONY: check
check: check-format check-package check-typing lint

.PHONY: debug
debug:
@echo "Git version: $(shell git describe --tags)"
poetry debug

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# formatting

Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Social | ![Twitter Follow](https://img.shields.io/twitter/follow/engnadeau?style
- [Citing](#citing)
- [Development and Community Guidelines](#development-and-community-guidelines)
- [Local Development](#local-development)
- [Docker Development](#docker-development)
- [Dependency Management](#dependency-management)
- [Submit an Issue](#submit-an-issue)
- [Contributing](#contributing)
Expand Down Expand Up @@ -135,6 +136,23 @@ Please cite the following articles if you use `pybotics` in your research:
poetry install
```

### Docker Development

- Docker is a great tool to test the package in an isolated environment
- It is especially useful for debugging issues between python versions

```bash
# launch container attached to current directory
docker run -v $(pwd):/$(basename $(pwd)) -w /$(basename $(pwd)) -it python:3 bash

# install deps
pip install poetry
poetry install

# run tests
make test
```

### Dependency Management

```bash
Expand Down
8 changes: 5 additions & 3 deletions examples/basic_usage.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
"""Basic usage of the pybotics package."""
import numpy as np

from pybotics.geometry import vector_2_matrix
from pybotics.predefined_models import ur10
from pybotics.robot import Robot
from pybotics.tool import Tool


def main():
def main() -> None:
"""
Demonstrate pybotics usage.
Expand All @@ -16,11 +18,11 @@ def main():

# add tool
tool = Tool()
tool.position = [1, 2, 3]
tool.position = np.array([1, 2, 3])
robot.tool = tool

# set world frame
world_frame = vector_2_matrix([100, 200, 300, 0, 0, 0])
world_frame = vector_2_matrix(np.array([100, 200, 300, 0, 0, 0]))
robot.world_frame = world_frame

print(f"Robot: {robot}")
Expand Down
Loading

0 comments on commit 8f5dfab

Please sign in to comment.