-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Inspired from https://github.com/ami-iit/rod
- Loading branch information
Showing
7 changed files
with
262 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
name: Python CI/CD | ||
|
||
on: | ||
push: | ||
pull_request: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
|
||
package: | ||
name: Package the project | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install Python tools | ||
run: pip install build twine | ||
|
||
- name: Create distributions | ||
run: python -m build -o dist/ | ||
|
||
- name: Inspect dist folder | ||
run: ls -lah dist/ | ||
|
||
- name: Check wheel's abi and platform tags | ||
run: test $(find dist/ -name *-none-any.whl | wc -l) -gt 0 | ||
|
||
- name: Run twine check | ||
run: twine check dist/* | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: dist/* | ||
name: dist | ||
|
||
test: | ||
name: 'Python${{ matrix.python }}@${{ matrix.os }}' | ||
needs: package | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-22.04 | ||
- macos-latest | ||
- windows-latest | ||
python: | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
|
||
steps: | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Download Python packages | ||
uses: actions/download-artifact@v3 | ||
with: | ||
path: dist | ||
name: dist | ||
|
||
- name: Install wheel | ||
shell: bash | ||
run: pip install dist/*.whl | ||
|
||
- name: Import the package | ||
run: python -c "import stepwise" | ||
|
||
publish: | ||
name: Publish to PyPI | ||
needs: test | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
|
||
- name: Download Python packages | ||
uses: actions/download-artifact@v3 | ||
with: | ||
path: dist | ||
name: dist | ||
|
||
- name: Inspect dist folder | ||
run: ls -lah dist/ | ||
|
||
- name: Publish to PyPI | ||
if: | | ||
github.repository == 'ami-iit/stepwise' && | ||
((github.event_name == 'push' && github.ref == 'refs/heads/main') || | ||
(github.event_name == 'release')) | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
skip_existing: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Code Style | ||
|
||
on: | ||
push: | ||
branches: [ "**" ] | ||
tags-ignore: [ "**" ] | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
black: | ||
|
||
name: black | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: "🔀 Checkout repository" | ||
uses: actions/checkout@v2 | ||
|
||
- name: '🐍 Initialize Python' | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: "📝 Black Code Formatter" | ||
uses: psf/black@stable | ||
with: | ||
options: --check --diff --color | ||
|
||
isort: | ||
|
||
name: isort | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: "🔀 Checkout repository" | ||
uses: actions/checkout@v2 | ||
|
||
- name: '🐍 Initialize Python' | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.10" | ||
|
||
# Workaround for https://github.com/isort/isort-action/issues/70 | ||
- run: pip install colorama | ||
|
||
- name: "📝 isort" | ||
uses: isort/isort-action@master | ||
with: | ||
configuration: --check --diff --color |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,3 +127,6 @@ dmypy.json | |
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# Pycharm files | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[build-system] | ||
requires = [ | ||
"wheel", | ||
"setuptools>=45", | ||
"setuptools_scm[toml]>=6.2", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools_scm] | ||
local_scheme = "dirty-tag" | ||
|
||
[tool.black] | ||
line-length = 88 | ||
|
||
[tool.isort] | ||
profile = "black" | ||
multi_line_output = 3 | ||
|
||
[tool.cibuildwheel] | ||
build-frontend = "build" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
[metadata] | ||
name = stepwise | ||
description = A Python-based Trajectory Optimization Framework | ||
long_description = file: README.md | ||
long_description_content_type = text/markdown | ||
author = Stefano Dafarra | ||
author_email = [email protected] | ||
license = BSD-2 | ||
license_files = LICENSE | ||
platforms = any | ||
url = https://github.com/ami-iit/stepwise | ||
|
||
project_urls = | ||
Changelog = https://github.com/ami-iit/stepwise/releases | ||
Source = https://github.com/ami-iit/stepwise | ||
Tracker = https://github.com/ami-iit/stepwise/issues | ||
|
||
keywords = | ||
trajectory | ||
optimization | ||
robots | ||
humanoids | ||
quadrupeds | ||
kinematics | ||
dynamics | ||
contacts | ||
|
||
classifiers = | ||
Development Status :: 5 - Production/Stable | ||
Framework :: Robot Framework | ||
Intended Audience :: Science/Research | ||
Intended Audience :: Developers | ||
Intended Audience :: Education | ||
License :: OSI Approved :: BSD License | ||
Operating System :: OS Independent | ||
Operating System :: POSIX :: Linux | ||
Operating System :: MacOS | ||
Operating System :: Microsoft :: Windows | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3.8 | ||
Programming Language :: Python :: 3.9 | ||
Programming Language :: Python :: 3.10 | ||
Programming Language :: Python :: 3.11 | ||
Programming Language :: Python :: 3 :: Only | ||
Programming Language :: Python :: Implementation :: CPython | ||
Topic :: Games/Entertainment :: Simulation | ||
|
||
[options] | ||
zip_safe = False | ||
packages = find: | ||
package_dir = | ||
=src | ||
python_requires = >=3.8 | ||
install_requires = | ||
coloredlogs | ||
mashumaro | ||
numpy | ||
packaging | ||
scipy | ||
xmltodict | ||
|
||
[options.extras_require] | ||
style = | ||
black | ||
isort | ||
pptree = | ||
pptree | ||
all = | ||
%(style)s | ||
%(pptree)s | ||
|
||
[options.packages.find] | ||
where = src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import setuptools | ||
|
||
setuptools.setup() |
Empty file.