diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index a20a619bb..20430e210 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -8,38 +8,29 @@ env: jobs: build: - # The CMake configure and build commands are platform agnostic and should work equally - # well on Windows or Mac. You can convert this to a matrix build if you need - # cross-platform coverage. - # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: - # recursively checkout all submodules submodules: 'recursive' - + - uses: actions/setup-python@v3 + with: + python-version: '3.10' - name: install ubuntu dependencies run: | sudo apt-get install libboost-system-dev libfcl-dev APTGETYES=1 make -C rai -j1 installUbuntuAll - - - name: install python and pybind + - name: install python dependencies run: | - sudo apt-get install python3 python3-dev python3-numpy python3-pip python3-distutils - sudo pip3 install jupyter nbconvert matplotlib pybind11 - + pip install numpy pybind11 - name: setup build files run: | - make -C rai -j1 unityAll ln -s build_utils/CMakeLists-ubuntu.txt CMakeLists.txt cd $HOME && mkdir -p .local/include && cd .local/include && ln -s /usr/include/libqhull qhull - - name: cmake configure run: | export PYTHONVERSION=`python3 -c "import sys; print(str(sys.version_info[0])+'.'+str(sys.version_info[1]))"` - cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DUSE_PHYSX=OFF -DUSE_BULLET=OFF -DPYBIND11_PYTHON_VERSION=$PYTHONVERSION -DUSE_QHULL8=ON - + ls + cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DUSE_PHYSX=OFF -DUSE_BULLET=OFF -DPYBIND11_PYTHON_VERSION=$PYTHONVERSION -DUSE_QHULL8=ON . - name: cmake build run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml new file mode 100644 index 000000000..ca9d66114 --- /dev/null +++ b/.github/workflows/sphinx.yml @@ -0,0 +1,30 @@ +name: SphinxDocumentation + +on: [push, pull_request] + +permissions: + contents: write + +jobs: + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: 'recursive' + - uses: actions/setup-python@v3 + with: + python-version: '3.10' + - name: install ubuntu dependencies + run: | + sudo apt-get install pandoc freeglut3 libglew-dev + - name: install python dependencies + run: | + pip install sphinx sphinx_rtd_theme myst_parser nbsphinx robotic numpy + - name: Sphinx build + run: | + cd rai-docs && sphinx-build doc ../html + - name: Deploy to GitHub Pages + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: html diff --git a/.gitignore b/.gitignore index 3429962a5..9f2d8256f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,9 +3,10 @@ dist/ robotic.egg-info/ rai-robotModels ry.pyi +build_wheel/ %% compile temporaries -/build +build/ *.o *.a *.so diff --git a/.gitmodules b/.gitmodules index 97e6d6105..44a027480 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "botop"] path = botop url = git@github.com:MarcToussaint/botop.git +[submodule "rai-docs"] + path = rai-docs + url = git@github.com:MarcToussaint/rai-docs.git diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..f817491e9 --- /dev/null +++ b/Makefile @@ -0,0 +1,44 @@ +default: docs + +docs: + cd rai-docs && sphinx-build doc ../html + +docs-clean: + rm -Rf html + +install: + ln -f -s _build_utils/CMakeLists-ubuntu.txt CMakeLists.txt + cmake -B build . + +make -C build _robotic docstrings install + +install-clean: + rm -R ${HOME}/.local/lib/python3.8/site-packages/robotic* + rm ${HOME}/.local/lib/*rai* + rm ${HOME}/.local/bin/*ry* + +wheels: + $(eval id = $(shell _build_utils/run-docker.sh -d)) + @echo "started docker " ${id} + docker exec -it ${id} /bin/bash -C local/_build_utils/build-wheels.sh + docker stop ${id} +# _build_utils/run-docker.sh local/_build_utils/build-wheels.sh + +wheels-upload: + twine upload dist/*.whl --repository robotic + +wheels-local: + python3.8 -m pip install --user dist/robotic-*cp38*.whl --force-reinstall + +test: + cd ${HOME} && python3 -c 'from robotic import ry; print("ry version:", ry.__version__, ry.compiled());' + +pull: + cd rai && git pull + cd rai-robotModels && git pull + cd rai-docs && git pull + cd botop && git pull + +docker-clean: + $(shell docker container kill "$(docker container ls -q)") + docker system prune + diff --git a/README.md b/README.md index 7813919dd..c6b8b578b 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Lab](https://argmin.lis.tu-berlin.de/), operate our robots. ## Documentation -Please follow the documentation and tutorials here: https://marctoussaint.github.io/robotics-course/ +Please follow the documentation and tutorials here: https://marctoussaint.github.io/robotic/ ## Installation via pip (simulation only, no real Franka & realsense support) @@ -24,17 +24,19 @@ sudo apt install liblapack3 freeglut3 libglew-dev python3 python3-pip ``` * pip-install robotic and dependencies (numpy, scipy) ``` -python3 -m pip install --user robotic numpy scipy +pip install robotic ``` -* Test: +* Tests: ``` -python3 -c 'from robotic import ry; print("ry version:", ry.__version__, ry.compiled());' -python3 -c 'from robotic import ry; ry.test.RndScene()' +python3 -c 'import robotic as ry; print("ry version:", ry.__version__, ry.compiled());' +``` +``` +python3 -c 'import robotic as ry; ry.test.RndScene()' ```