Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update 0.5.0 #1

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@
!smarts/sstudio/tests/*.rou.xml

# Keep model assets
!**/models/*.glb
!**/models/*.glb
61 changes: 61 additions & 0 deletions .github/workflows/ci-auto-commit-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: SMARTS CI Auto Commit Linux

on:
push:
branches:
- develop
pull_request:
branches:
- develop

env:
venv_dir: .venv

jobs:
auto-commit-linux:
runs-on: ubuntu-18.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
container: huaweinoah/smarts:v0.4.18-minimal
steps:
- name: Install packages
run: |
add-apt-repository -y ppa:git-core/ppa
apt-get update
apt-get install -y git curl ca-certificates
curl -sL https://deb.nodesource.com/setup_14.x | bash -
apt-get install -y nodejs
- name: Checkout
uses: actions/checkout@v2
with:
ref: develop
- name: Install SMARTS
run: |
python3.7 -m venv ${{env.venv_dir}}
. ${{env.venv_dir}}/bin/activate
pip install --upgrade pip wheel
pip install .[camera-obs,test,train]
- name: Update requirements
run: |
. ${{env.venv_dir}}/bin/activate
pip freeze | grep -v 'smarts' | grep -v 'pkg-resources==0.0.0' > requirements.txt
- name: Commit requirement changes
uses: EndBug/add-and-commit@v7
with:
add: 'requirements.txt'
branch: develop
default_author: user_info
message: 'GitHub Actions: Update requirements.txt'
- name: isort, Black, and prettier
run: |
. ${{env.venv_dir}}/bin/activate
pip install .[dev]
isort -m VERTICAL_HANGING_INDENT --skip-gitignore --ac --tc --profile black ./baselines/marl_benchmark/ ./cli ./envision ./examples/ ./utils/ ./scenarios/ ./smarts ./ultra ./zoo
black .
npx prettier --write ./envision/web/src
- name: Commit format changes
uses: EndBug/add-and-commit@v7
with:
add: '["*.py", "*.html", "*.js"]'
branch: develop
default_author: user_info
message: 'GitHub Actions: Format'
40 changes: 40 additions & 0 deletions .github/workflows/ci-auto-commit-mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: SMARTS CI Auto Commit Mac

on:
schedule:
- cron: '0 23 * * 1'
# Runs at 11.00pm, UTC, every Monday
workflow_dispatch:

env:
venv_dir: .venv

jobs:
auto-commit-mac:
runs-on: macos-11
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: develop
- name: Setup Python
run: |
brew update
brew install [email protected]
brew unlink [email protected]
brew link --force --overwrite [email protected]
- name: Update requirements
run: |
cd $GITHUB_WORKSPACE
python3.7 -m venv ${{env.venv_dir}}
. ${{env.venv_dir}}/bin/activate
pip install --upgrade pip wheel
pip install .[train,test,camera-obs]
pip freeze | grep -v 'smarts' | grep -v 'pkg-resources==0.0.0' > utils/setup/mac_requirements.txt
- name: Commit changes
uses: EndBug/add-and-commit@v7
with:
add: 'utils/setup/mac_requirements.txt'
branch: develop
default_author: user_info
message: 'GitHub Actions: Update mac_requirements.txt'
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: SMARTS CI Base Tests
name: SMARTS CI Base Tests Linux

on:
push:
Expand All @@ -12,52 +12,47 @@ on:
- ultra_**
- ultra/**

env:
venv_dir: .venv

jobs:
test:
base-tests-linux:
runs-on: ubuntu-18.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
container: huaweinoah/smarts:v0.4.13-minimal
container: huaweinoah/smarts:v0.4.18-minimal
strategy:
matrix:
tests:
- ./envision
- ./smarts/contrib
- ./smarts/core
- ./smarts/core --nb-exec-timeout 65536
- ./smarts/env --ignore=./smarts/env/tests/test_rllib_hiway_env.py
- ./smarts/env/tests/test_rllib_hiway_env.py
- ./smarts/sstudio
- ./tests
- ./examples/tests --ignore=./examples/tests/test_learning.py
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup X11
run: |
/usr/bin/Xorg \
-noreset \
+extension GLX \
+extension RANDR \
+extension RENDER \
-logfile ./xdummy.log \
-config /etc/X11/xorg.conf :1 &
- name: Install dependencies
run: |
python3.7 -m venv .venv
. .venv/bin/activate
python3.7 -m venv ${{env.venv_dir}}
. ${{env.venv_dir}}/bin/activate
pip install --upgrade pip
pip install --upgrade wheel
pip install --upgrade -r requirements.txt
pip install --upgrade -e .[train,test,camera-obs]
pip install -e .[train,test,camera-obs]
- name: Run smoke tests
run: |
. .venv/bin/activate
. ${{env.venv_dir}}/bin/activate
make build-all-scenarios
PYTHONHASHSEED=42 pytest -v \
--doctest-modules \
--forked \
--dist=no \
-n auto \
--ignore-glob="**/ros.py" \
${{matrix.tests}} \
--ignore=./smarts/core/tests/test_smarts_memory_growth.py \
--ignore=./smarts/core/tests/test_env_frame_rate.py \
--ignore=./smarts/env/tests/test_benchmark.py \
--ignore=./smarts/env/tests/test_learning.py \
--ignore=./examples/tests/test_learning.py \
-k 'not test_long_determinism'
68 changes: 68 additions & 0 deletions .github/workflows/ci-base-tests-mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: SMARTS CI Base Tests Mac

on:
workflow_run:
workflows: ["SMARTS CI Auto Commit Mac"]
types:
- completed
workflow_dispatch:

env:
venv_dir: .venv

jobs:
base-tests-mac:
runs-on: macos-11
strategy:
matrix:
tests:
- ./envision
- ./smarts/contrib
- ./examples/tests --ignore=./examples/tests/test_learning.py
- ./smarts/sstudio
- ./smarts/env/tests/test_rllib_hiway_env.py
- ./smarts/core --nb-exec-timeout 65536
- ./smarts/env --ignore=./smarts/env/tests/test_rllib_hiway_env.py
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: develop
- name: Setup Python
run: |
brew update
brew install [email protected]
brew unlink [email protected]
brew link --force --overwrite [email protected]
- name: Setup SUMO
run: |
brew install xquartz
brew tap dlr-ts/sumo
brew install sumo spatialindex
brew install geos
- name: Install dependencies
run: |
python3.7 -m venv ${{env.venv_dir}}
. ${{env.venv_dir}}/bin/activate
pip install --upgrade pip
pip install --upgrade wheel
pip install -r utils/setup/mac_requirements.txt
pip install -e .[train,test,camera-obs]
- name: Run smoke tests
run: |
. ${{env.venv_dir}}/bin/activate
export SUMO_HOME="/usr/local/opt/sumo/share/sumo"
open -g -a XQuartz.app
make build-all-scenarios
PYTHONHASHSEED=42 pytest -v \
--doctest-modules \
-n auto \
${{matrix.tests}} \
--ignore=./smarts/core/tests/test_smarts_memory_growth.py \
--ignore=./smarts/env/tests/test_benchmark.py \
--ignore=./smarts/env/tests/test_frame_stack.py \
--ignore=./smarts/env/tests/test_determinism.py \
--ignore=./smarts/core/tests/test_renderers.py \
--ignore=./smarts/core/tests/test_smarts.py \
--ignore=./smarts/core/tests/test_env_frame_rate.py \
--ignore=./smarts/core/tests/test_observations.py
39 changes: 39 additions & 0 deletions .github/workflows/ci-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: SMARTS CI Format

on: [push, pull_request]

env:
venv_dir: .venv

jobs:
test-header:
runs-on: ubuntu-18.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
container: huaweinoah/smarts:v0.4.18-minimal
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check header
run: |
cd $GITHUB_WORKSPACE
make header-test

test-docstring:
runs-on: ubuntu-18.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
container: huaweinoah/smarts:v0.4.18-minimal
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check docstring
run: |
cd $GITHUB_WORKSPACE
pip install --upgrade pip
pip install pylint
pylint -d all \
-e missing-function-docstring \
-e missing-class-docstring \
-s n \
--ignore marl_benchmark,examples,scenarios,docs,manager_pb2_grpc.py,worker_pb2_grpc.py \
--msg-template='{path}: line {line}: {msg_id}: {msg}' \
./smarts ./envision
37 changes: 0 additions & 37 deletions .github/workflows/ci-formatting-and-dependencies.yml

This file was deleted.

14 changes: 3 additions & 11 deletions .github/workflows/ci-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,17 @@ env:
jobs:
test-benchmark:
runs-on: ubuntu-18.04
container: huaweinoah/smarts:v0.4.13-minimal
container: huaweinoah/smarts:v0.4.18-minimal
steps:
- name: Checkout
uses: actions/checkout@v1.2.0
uses: actions/checkout@v2
- name: Setup package
run: |
/usr/bin/Xorg \
-noreset \
+extension GLX \
+extension RANDR \
+extension RENDER \
-logfile ./xdummy.log \
-config /etc/X11/xorg.conf :1 &
cd $GITHUB_WORKSPACE
python3.7 -m venv ${{env.venv_dir}}
. ${{env.venv_dir}}/bin/activate
pip install --upgrade pip
pip install wheel
pip install -r requirements.txt
pip install --upgrade wheel
pip install -e .[train,test,camera-obs]
- name: SMARTS benchmark
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci-smarts-run-ultra-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
. .venv/bin/activate
scl scenario build-all ultra/scenarios/pool
pytest -v ./tests/

test-package-via-setup:
runs-on: ubuntu-18.04
container: huaweinoah/smarts:v0.4.13-minimal
Expand Down Expand Up @@ -72,6 +73,7 @@ jobs:
. .venv/bin/activate
scl scenario build-all ultra/scenarios/pool
pytest -v ./tests/test_ultra_package.py

test-package-via-wheel:
runs-on: ubuntu-18.04
container: huaweinoah/smarts:v0.4.13-minimal
Expand Down
Loading