8000 Merge branch 'rmaster' · ctc-eng/robotics-toolbox-python@b730796 · GitHub
[go: up one dir, main page]

Skip to content

Commit b730796

Browse files
committed
Merge branch 'rmaster'
2 parents 33f9419 + 55af405 commit b730796

File tree

349 files changed

+50389
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

349 files changed

+50389
-0
lines changed

.github/build-wheels.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
set -e -u -x
3+
4+
function repair_wheel {
5+
wheel="$1"
6+
if ! auditwheel show "$wheel"; then
7+
echo "Skipping non-platform wheel $wheel"
8+
else
9+
auditwheel repair "$wheel" --plat "$PLAT" -w /io/wheelhouse/
10+
fi
11+
}
12+
13+
cd ./io
14+
15+
# Compile wheels
16+
for PYBIN in /opt/python/cp3[5-8]*/bin; do
17+
"${PYBIN}/pip" install .
18+
"${PYBIN}/pip" install pytest
19+
"${PYBIN}/pip" wheel /io/ --no-deps -w wheelhouse/
20+
done
21+
22+
# Bundle external shared libraries into the wheels
23+
for whl in wheelhouse/*.whl; do
24+
repair_wheel "$whl"
25+
done
26+
27+
# Install packages and test
28+
for PYBIN in /opt/python/cp3[5-8]*/bin/; do
29+
"${PYBIN}/pip" install ropy --no-index -f /io/wheelhouse
30+
("${PYBIN}/pytest")
31+
done
32+
33+
ls ./wheelhouse

.github/dev_requirements.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
pytest
2+
pytest-cov
3+
sphinx
4+
sphinx_markdown_tables
5+
sphinx_rtd_theme
6+
flake8
7+
pyyaml

.github/workflows/python-publish.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This workflows will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
name: Upload Python Package
5+
6+
on:
7+
release:
8+
types: [created]
9+
workflow_dispatch:
10+
11+
jobs:
12+
deploy:
13+
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
max-parallel: 2
17+
matrix:
18+
os: [macos-latest, windows-latest]
19+
python-version: [3.5, 3.6, 3.7, 3.8]
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
- name: Set up Python
24+
uses: actions/setup-python@v2
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install -U setuptools wheel twine
31+
- name: Build and publish
32+
env:
33+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
34+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
35+
run: |
36+
python setup.py sdist bdist_wheel
37+
ls ./dist/*.whl
38+
twine upload dist/*.whl
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# This is a basic workflow that is manually triggered
2+
3+
name: Linux Build and Publish
4+
5+
on:
6+
release:
7+
types: [created]
8+
workflow_dispatch:
9+
10+
11+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
12+
jobs:
13+
# This workflow contains a single job called "greet"
14+
deploy:
15+
# The type of runner that the job will run on
16+
runs-on: ubuntu-latest
17+
18+
# Steps represent a sequence of tasks that will be executed as part of the job
19+
steps:
20+
- name: Set up Python 3.7
21+
uses: actions/setup-python@v1
22+
with:
23+
python-version: 3.7
24+
# Runs a single command using the runners shell
25+
- uses: actions/checkout@v2
26+
- name: Make wheels
27+
run: |
28+
sudo docker run -e PLAT=manylinux2010_x86_64 -v ${{ github.workspace }}:/io quay.io/pypa/manylinux2010_x86_64 /io/.github/build-wheels.sh
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install -U setuptools wheel twine
33+
- name: Build and publish
34+
env:
35+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
36+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
37+
run: |
38+
python setup.py sdist bdist_wheel
39+
twine upload dist/*.gz
40+
twine upload wheelhouse/*manylinux*
41+

.github/workflows/pythonpackage.yml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: build
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
unittest:
14+
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
python-version: [3.5, 3.6, 3.7, 3.8]
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v1
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install -r .github/dev_requirements.txt
30+
# - name: Lint with flake8
31+
# run: |
32+
# # stop the build if there are Python syntax errors or undefined names
33+
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
34+
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
35+
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
36+
- name: Test with pytest
37+
run: |
38+
pip install .
39+
pytest
40+
codecov:
41+
# If all tests pass:
42+
# Run coverage and upload to codecov
43+
needs: unittest
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v2
47+
- name: Set up Python 3.7
48+
uses: actions/setup-python@v1
49+
with:
50+
python-version: 3.7
51+
- name: Install dependencies
52+
run: |
53+
python -m pip install --upgrade pip
54+
pip install -r .github/dev_requirements.txt
55+
- name: Run coverage
56+
run: |
57+
pip install .
58+
pytest --cov=ropy --cov-report xml:coverage.xml
59+
coverage report
60+
cat .coverage
61+
- name: upload coverage to Codecov
62+
uses: codecov/codecov-action@master
63+
with:
64+
file: ./coverage.xml
65+
sphinx:
66+
# If the above worked:
67+
# Build docs and upload to GH Pages
68+
needs: unittest
69+
runs-on: ubuntu-latest
70+
steps:
71+
- uses: actions/checkout@v2
72+
- name: Set up Python 3.7
73+
uses: actions/setup-python@v1
74+
with:
75+
python-version: 3.7
76+
- name: Install dependencies
77+
run: |
78+
python -m pip install --upgrade pip
79+
pip install -r .github/dev_requirements.txt
80+
pip install .
81+
- name: Build docs
82+
run: |
83+
cd docs
84+
make html
85+
# Tell GitHub not to use jekyll to compile the docs
86+
touch build/html/.nojekyll
87+
cd ../
88+
- name: Commit documentation changes
89+
run: |
90+
git clone https://github.com/jhavl/ropy.git --branch gh-pages --single-branch gh-pages
91+
cp -r docs/build/html/* gh-pages/
92+
cd gh-pages
93+
git config --local user.email "action@github.com"
94+
git config --local user.name "GitHub Action"
95+
git add .
96+
git commit -m "Update documentation" -a || true
97+
# The above command will fail if no changes were present, so we ignore
98+
# that.
99+
- name: Push changes
100+
uses: ad-m/github-push-action@master
101+
with:
102+
branch: gh-pages
103+
directory: gh-pages
104+
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)
0