diff --git a/.github/workflows/pypi-ci.yml b/.github/workflows/pypi-ci.yml new file mode 100644 index 0000000..f32ee0b --- /dev/null +++ b/.github/workflows/pypi-ci.yml @@ -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 }} diff --git a/README.md b/README.md index a7539ed..644be84 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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$ @@ -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 @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 1159767..d057515 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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] @@ -12,5 +13,5 @@ local_scheme = "dirty-tag" line-length = 88 [tool.isort] -profile = "black" multi_line_output = 3 +profile = "black" diff --git a/setup.cfg b/setup.cfg index b670d88..749c2a1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 = gl.giuseppelerario@gmail.com -version = 0.0.1 +license_files = LICENSE + +keywords = + robotics + automatic-differentiation + optimization + casadi + lie-groups + manifolds + [options] packages = find: diff --git a/tests/test_quaternion.py b/tests/test_quaternion.py deleted file mode 100644 index 48da2d7..0000000 --- a/tests/test_quaternion.py +++ /dev/null @@ -1 +0,0 @@ -from liecasadi import Quaternion