-
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.
- Loading branch information
Showing
184 changed files
with
10,347 additions
and
2,318 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,92 @@ | ||
# Git | ||
# .git | ||
# .gitignore | ||
.gitattributes | ||
|
||
|
||
# CI | ||
.codeclimate.yml | ||
.travis.yml | ||
.taskcluster.yml | ||
|
||
# Docker | ||
docker-compose.yml | ||
Dockerfile | ||
.docker | ||
.dockerignore | ||
|
||
# Byte-compiled / optimized / DLL files | ||
**/__pycache__/ | ||
**/*.py[cod] | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Virtual environment | ||
.env | ||
.venv/ | ||
venv/ | ||
|
||
# PyCharm | ||
.idea | ||
|
||
# Python mode for VIM | ||
.ropeproject | ||
**/.ropeproject | ||
|
||
# Vim swap files | ||
**/*.swp | ||
|
||
# VS Code | ||
.vscode/ | ||
|
||
# Server config file | ||
**/web_config.ini |
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 |
---|---|---|
@@ -1,29 +1,31 @@ | ||
name: Automerge master into alberobotics | ||
|
||
on: | ||
on: | ||
push: | ||
branches: | ||
- "master" | ||
|
||
jobs: | ||
merge-master-into-alberobotics: | ||
runs-on: ubuntu-20.04 | ||
env: | ||
CI_COMMIT_MESSAGE: Continuous Integration Build Artifacts | ||
CI_COMMIT_AUTHOR: Continuous Integration | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set Git config | ||
- name: Set up git | ||
run: | | ||
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" | ||
git config --global user.email "[email protected]" | ||
git config --global user.name $USER_NAME | ||
git config --global user.email $USER_EMAIL | ||
env: | ||
# see https://github.com/orgs/community/discussions/26560#discussioncomment-3531273 | ||
USER_NAME: 'github-actions[bot]' | ||
USER_EMAIL: '41898282+github-actions[bot]@users.noreply.github.com' | ||
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/changed-files@v35 | ||
|
||
- name: Merge master into alberobotics | ||
run: | | ||
|
@@ -39,14 +41,14 @@ jobs: | |
"src/modular/modular_data/cartesio/ModularBot_cartesio_multichain_config.yaml" | ||
) | ||
git fetch --unshallow | ||
git fetch --unshallow | ||
git checkout alberobotics | ||
git merge --no-ff --no-commit master | ||
for file in "${to_keep[@]}"; do | ||
git reset HEAD $file | ||
git checkout -- $file | ||
git checkout -- $file | ||
done | ||
git commit -m "merged master" | ||
git commit -m "merged master" | ||
git push |
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,65 @@ | ||
name: Open PR for new modular_frontend version | ||
# see https://github.com/orgs/community/discussions/26286#discussioncomment-3251208 | ||
# on: | ||
# create: | ||
# branches: | ||
# - 'ci/deps/modular_frontend-v[0-9]+.[0-9]+.[0-9]+*' | ||
on: create | ||
|
||
jobs: | ||
create-pr: | ||
runs-on: ubuntu-latest | ||
name: Create PR to update modular_frontend | ||
# see https://github.com/orgs/community/discussions/26771#discussioncomment-3253330 | ||
if: startsWith(github.ref_name, 'ci/deps/modular_frontend-') | ||
env: | ||
TARGET_BRANCH: feat/linfization | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up git | ||
run: | | ||
git config --global user.name $USER_NAME | ||
git config --global user.email $USER_EMAIL | ||
env: | ||
# see https://github.com/orgs/community/discussions/26560#discussioncomment-3531273 | ||
USER_NAME: 'github-actions[bot]' | ||
USER_EMAIL: '41898282+github-actions[bot]@users.noreply.github.com' | ||
|
||
# - name: Updated static docs | ||
# run: | | ||
# RELEASE_VERSION=$(echo $GITHUB_REF_NAME | sed -e s/.*modular_frontend-//) | ||
# sed -i '/version/c\ \"version\" : \"'RELEASE_VERSION'\",' package.json | ||
# npm ci | ||
# npm run build:swagger | ||
# git add docs | ||
# git commit -m "📝 docs(Swagger): update static swagger docs" | ||
|
||
# - name: Commit version bump | ||
# run: | | ||
# RELEASE_VERSION=$(echo $GITHUB_REF_NAME | sed -e s/.*modular_frontend-//) | ||
# sed -i '/version/c\ \"version\" : \"'RELEASE_VERSION'\",' package.json | ||
# git add package.json | ||
# git commit -m "📦 chore: bump version to RELEASE_VERSION" | ||
|
||
# - name: Push changes | ||
# run: | | ||
# git push -u origin HEAD | ||
|
||
- name: Open new PR | ||
run: | | ||
RELEASE_VERSION=$(echo $GITHUB_REF_NAME | sed -e s/.*modular_frontend-//) | ||
gh pr create \ | ||
--title "⬆️ chore(gui): Bump modular_frontend to $RELEASE_VERSION" \ | ||
--body-file ./src/modular/web/modular_frontend/frontend_release_notes/CHANGELOG.$RELEASE_VERSION.md \ | ||
--base ${{ env.TARGET_BRANCH }} \ | ||
--label refactor \ | ||
--assignee "m-tartari" \ | ||
--reviewer "EdoardoRomiti" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Cleanup ssh configs | ||
run: | | ||
rm -rf ~/.ssh |
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 |
---|---|---|
|
@@ -160,3 +160,6 @@ venv.bak/ | |
|
||
# VS Code folder | ||
.vscode/* | ||
|
||
# Custom setting for API | ||
src/modular/web/web_config.ini |
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,41 @@ | ||
ARG BASE_IMAGE | ||
FROM ${BASE_IMAGE} | ||
|
||
ARG RECIPES_BRANCH=master | ||
ARG RECIPES_PROVIDER=https://github.com/ADVRHumanoids/multidof_recipes.git | ||
|
||
ARG FOREST_WS=$HOME/modular_ws | ||
ARG USER_PWD=user | ||
ARG MODE=&NoNe& | ||
ARG JOBS=1 | ||
|
||
# run apt update as root | ||
USER root | ||
SHELL ["/bin/bash", "-ic"] | ||
RUN sudo apt-get update | ||
|
||
USER user | ||
|
||
# Add github.com to known hosts | ||
RUN mkdir -p -m 0700 $HOME/.ssh && ssh-keyscan github.com >> $HOME/.ssh/known_hosts | ||
|
||
# Initialize forest workspace | ||
WORKDIR ${FOREST_WS} | ||
RUN forest init | ||
RUN echo "source $FOREST_WS/setup.bash" >> ~/.bashrc | ||
|
||
# Add recipes to forest workspace | ||
RUN forest add-recipes https://github.com/ADVRHumanoids/multidof_recipes.git --tag $RECIPES_BRANCH | ||
|
||
# Install dependencies using forest | ||
RUN --mount=type=ssh,uid=${USER_ID} forest grow concert_description -m ${MODE} -j${JOBS} --pwd ${USER_PWD} --clone-depth 1 \ | ||
&& forest grow iit-dagana-ros-pkg -m ${MODE} -j${JOBS} --pwd ${USER_PWD} --clone-depth 1 \ | ||
&& rm -fr $FOREST_WS/build | ||
|
||
# Build local version of modular | ||
WORKDIR ${FOREST_WS}/src/modular | ||
COPY --chown=user:user . ${FOREST_WS}/src/modular | ||
RUN pip install -e . | ||
|
||
# Set entrypoint | ||
CMD ./scripts/entrypoint.sh |
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
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,26 @@ | ||
version: "3.8" | ||
services: | ||
|
||
modular: | ||
image: "${TARGET_IMAGE}" | ||
container_name: modular | ||
restart: 'unless-stopped' | ||
build: | ||
context: ./ | ||
dockerfile: Dockerfile | ||
ssh: | ||
# mount the default ssh agent | ||
- default | ||
args: | ||
- BASE_IMAGE | ||
- RECIPES_BRANCH | ||
- RECIPES_PROVIDER | ||
- FOREST_WS | ||
- USER_PWD | ||
- MODE | ||
- JOBS | ||
ports: | ||
- "5003:5003" | ||
volumes: | ||
# We might want to change the local path of the web_config.ini file | ||
- ./src/modular/web/web_config.ini:${FOREST_WS}/src/modular/src/modular/web/web_config.ini |
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,13 @@ | ||
#!/bin/bash | ||
|
||
# Start detached roscore | ||
nohup roscore & | ||
|
||
# Start Modular Server | ||
gunicorn --workers 1 --threads 4 --bind '0.0.0.0:5003' wsgi:app | ||
|
||
# Wait for any process to exit | ||
wait -n | ||
|
||
# Exit with status of process that exited first | ||
exit $? |
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
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
Oops, something went wrong.