Skip to content

Commit

Permalink
Merge pull request #3 from ami-iit/pipy
Browse files Browse the repository at this point in the history
Deploy library on pypi
  • Loading branch information
Giulero authored May 18, 2022
2 parents 41c9b69 + 92ce830 commit 92a4b94
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 13 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/pypi-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI

on:
push:
branches: ["**"]
tags-ignore: ["**"]
pull_request:
release:
types:
- published
jobs:
build_wheels:
name: Build wheels [${{ matrix.os }}]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version:
- 3.8
os:
- ubuntu-20.04

steps:
- uses: actions/checkout@master
- run: git fetch --prune --unshallow

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install pypa/build
run: pip install build

- name: Build wheel and a source tarball
run: python -m build --sdist --wheel --outdir dist/ .

- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: dist
path: dist

deploy_test_PyPI:
name: 📦 Deploy to TestPyPI
runs-on: ubuntu-20.04
needs: [build_wheels]
if: github.ref == 'refs/heads/main'
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: dist
path: dist

- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/

deploy_PyPI:
name: 📦 Deploy to PyPI
runs-on: ubuntu-20.04
needs: [build_wheels]
if: startsWith(github.ref, 'refs/tags')
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: dist
path: dist

- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
34 changes: 28 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,26 @@

Inspired by [A micro Lie theory for state estimation in robotics](https://arxiv.org/pdf/1812.01537.pdf) and the library [Manif](https://github.com/artivis/manif).

## Install
## 🐍 Install

Create a [virtual environment](https://docs.python.org/3/library/venv.html#venv-def), if you prefer. For example:

```bash
pip install virtualenv
python3 -m venv your_virtual_env
source your_virtual_env/bin/activate
```
pip install --no-deps "liecasadi @ git+https://github.com/ami-iit/lie-casadi.git"

Inside the virtual environment, install the library from pip:

```bash
pip install liecasadi
```

If you want the last version:

```bash
pip install "liecasadi @ git+https://github.com/ami-iit/lie-casadi.git"
```

## Implemented Groups
Expand All @@ -19,13 +35,13 @@ pip install --no-deps "liecasadi @ git+https://github.com/ami-iit/lie-casadi.git
| SO3 | 3D Rotations |
| SE3 | 3D Rigid Transform |

### Operations
### 🚀 Operations

Being:

- $X, Y \in SO3, \ SE3$

- $w \in SO3Tangent, \ SE3Tangent$
- $w \in \text{SO3Tangent}, \ \text{SE3Tangent}$

- $v \in \mathbb{R}^3$

Expand All @@ -40,7 +56,7 @@ Being:
| Manifold left plus | $w \oplus X = \text{exp}(w) \circ X$ | `phi + X` |
| Manifold minus | $X-Y = \text{log}(Y^{-1} \circ X)$ | `X-Y` |

## Example
## 🦸‍♂️ Example

```python
from liecasadi import SE3, SO3, SE3Tangent, SO3Tangent
Expand Down Expand Up @@ -73,6 +89,12 @@ vector6d = (np.random.rand(3) - 0.5) * 5
tangent = SO3Tangent(vector6d)
```

## Work in progress
## 🦸‍♂️ Contributing

**liecasadi** is an open-source project. Contributions are very welcome!

Open an issue with your feature request or if you spot a bug. Then, you can also proceed with a Pull-requests! :rocket:

## ⚠️ Work in progress

- Dual Quaternion class
9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"wheel",
"setuptools>=45",
"setuptools_scm[toml]>=6.0",
"wheel",
"setuptools>=45",
"setuptools_scm[toml]>=6.0",
]

[tool.setuptools_scm]
Expand All @@ -12,5 +13,5 @@ local_scheme = "dirty-tag"
line-length = 88

[tool.isort]
profile = "black"
multi_line_output = 3
profile = "black"
16 changes: 14 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
[metadata]
name = liecasadi
author = "Giuseppe L'Erario"
description = Rigid transform using Lie groups, written in CasADi!
long_description = file: README.md
long_description_content_type = text/markdown
author = Giuseppe L'Erario
author_email = [email protected]
version = 0.0.1
license_files = LICENSE
keywords =
robotics
automatic-differentiation
optimization
casadi
lie-groups
manifolds
[options]
packages = find:
Expand Down
1 change: 0 additions & 1 deletion tests/test_quaternion.py

This file was deleted.

0 comments on commit 92a4b94

Please sign in to comment.