Skip to content

Commit

Permalink
feat: publish as oss
Browse files Browse the repository at this point in the history
  • Loading branch information
hayato-m126 committed Jun 23, 2023
0 parents commit aee3799
Show file tree
Hide file tree
Showing 109 changed files with 12,222 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/data/
29 changes: 29 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## Description

<!-- Describe the changes -->

## How to review

<!-- Describe the review procedure -->

## How to test

### test data

<!-- Describe test data -->

### test command

<!-- Describe how to test this PR. -->

```bash

```

## Reference

<!-- Please write external reference if any. -->

## Notes for reviewer

<!-- Write additional information if necessary. It should be written if there are related PRs that should be merged at the same time. -->
103 changes: 103 additions & 0 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: build-and-test

on:
workflow_dispatch:
push:
branches:
- main
pull_request:

jobs:
# Upload and download actions are used since
# gh command is't available in the docker container and
# it's hard to setup it in the container.
download-test-data:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Download test data
run: |
gh release download test-data -D tests/data
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload data for build-and-test
uses: actions/upload-artifact@v3
with:
name: test-data
path: tests/data

build-and-test:
runs-on: ubuntu-latest
container:
image: ros:${{ matrix.rosdistro }}
strategy:
matrix:
rosdistro:
- humble
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install dependencies
run: |
apt update -yqq
apt install -yqq curl python3-venv python-is-python3 \
libgl1-mesa-dev ros-${ROS_DISTRO}-sensor-msgs-py ros-${ROS_DISTRO}-rosbag2-storage-mcap \
unzip tree
- name: Download test data
uses: actions/download-artifact@v3
with:
name: test-data
path: tests/data

- name: Unzip test data
run: |
unzip 'tests/data/*.zip' -d tests/data/
- name: Check test data
run: |
tree tests/data
- name: Build autoware perception messages
uses: autowarefoundation/autoware-github-actions/colcon-build@v1
with:
rosdistro: ${{ matrix.rosdistro }}
target-packages: autoware_auto_perception_msgs autoware_perception_msgs
build-depends-repos: build_depends.repos

- name: Install dependencies
run: |
apt update -yqq
apt install -yqq curl python3-venv python-is-python3 \
libgl1-mesa-dev ros-${ROS_DISTRO}-sensor-msgs-py
- name: Check python version
run: |
python -V
- name: Install poetry
run: |
curl -sSL https://install.python-poetry.org | python3 - --version 1.4.2
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Check poetry version
run: |
poetry --version
- name: Install python packages
run: |
poetry install
- name: Test with pytest
run: |
. /opt/ros/$ROS_DISTRO/setup.sh
. ./install/setup.sh
poetry run pytest
14 changes: 14 additions & 0 deletions .github/workflows/cancel-privious-workflows.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: cancel-previous-workflows

on:
pull_request:

jobs:
cancel-previous-workflows:
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.10.0
with:
workflow_id: all
all_but_latest: true
29 changes: 29 additions & 0 deletions .github/workflows/github-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: github-release

on:
push:
tags:
- v*

jobs:
github-release:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Run generate-changelog
id: generate-changelog
uses: autowarefoundation/autoware-github-actions/generate-changelog@v1

- name: Release to GitHub
run: |
gh release create "${{ github.ref_name }}" \
--draft \
--title "Release ${{ github.ref_name }}" \
--notes "$NOTES"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NOTES: ${{ steps.generate-changelog.outputs.changelog }}
21 changes: 21 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: pre-commit

on:
pull_request:
workflow_dispatch:

jobs:
pre-commit:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Python
uses: actions/setup-python@v3

- name: Run pre-commit
uses: pre-commit/action@v3.0.0
12 changes: 12 additions & 0 deletions .github/workflows/semantic-pull-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: semantic-pull-request

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
semantic-pull-request:
uses: autowarefoundation/autoware-github-actions/.github/workflows/semantic-pull-request.yaml@v1
165 changes: 165 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
# data
tests/scale_to_t4/data_test_scale_to_t4_converter/output_base
/data/
/data*/
/notebooks/data/
/tests/data

# ros
/src
/build
/install
/log

### tmp file ###
node_modules
npm-debug.log
.DS_Store
.vscode

### train file ###
*.pth
*.weights
*.onnx
*.trt

### python ###

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# 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/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/
6 changes: 6 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
default: true
MD013: false
MD024:
siblings_only: true
MD033: false
MD041: false
Loading

0 comments on commit aee3799

Please sign in to comment.