Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
0ae0845
Add Mac OS setup instructions
s2t2 Jun 5, 2025
1390714
Update markdown formatting
s2t2 Jun 6, 2025
363ac24
Revert protos - we will update them in a separate PR #92
s2t2 Jun 6, 2025
38bce7b
Update docs
s2t2 Jun 6, 2025
3507dd7
Get closer with Docker but jupyter is not working
s2t2 Jun 6, 2025
74b6464
Test on mac and linux. Let's see a failure
s2t2 Jun 12, 2025
e35f3aa
Fix workflow setup
s2t2 Jun 12, 2025
cb04974
Install os-specific system dependencies on CI
s2t2 Jun 12, 2025
444204f
Don't try to support 3.12 yet
s2t2 Jun 12, 2025
adb6598
Fix dm-reverb installation on Mac
s2t2 Jun 12, 2025
2f45044
Restore previous run commands
s2t2 Jun 12, 2025
e579793
Fix Python version
s2t2 Jun 12, 2025
8ac972f
Resolve Python version compatibility
s2t2 Jun 12, 2025
d8e0d57
Resolve Python version compatibility
s2t2 Jun 12, 2025
5ad6b15
Resolve Python version compatibility
s2t2 Jun 12, 2025
56f9286
Resolve Python version compatibility
s2t2 Jun 12, 2025
65a9aef
Run with intel-based Mac
s2t2 Jun 12, 2025
f8cc675
Fix workflow
s2t2 Jun 12, 2025
6dd3b82
Fix failing test
s2t2 Jun 12, 2025
170cae5
Issues with dm-reverb on Mac
s2t2 Jun 12, 2025
056938d
Update replay_buffer_test.py
s2t2 Jun 13, 2025
452c479
Add notes to the documentation
s2t2 Jun 20, 2025
9815488
Let's document the results of dm-reverb-macos on GitHub Actions
s2t2 Jun 20, 2025
dfe2df5
Conditionally skip dm-reverb test on Mac, to make the build pass, and…
s2t2 Jun 20, 2025
3050efd
Review setup instructions. Use code block to remove slash inserted by…
s2t2 Jun 20, 2025
63e9755
Review linux setup
s2t2 Jun 20, 2025
cb8f023
Review notebook instructions
s2t2 Jun 20, 2025
10dbfaa
Minimize diff
s2t2 Jun 20, 2025
f924203
Python syntax highlighting in docs site
s2t2 Jun 20, 2025
2e4d3b9
Review docs
s2t2 Jun 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 25 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,49 @@ on:

jobs:
test:
runs-on: ubuntu-latest # Use an Ubuntu runner for the job

strategy:
matrix:
python-version: [3.10.12, 3.10.15, 3.11] # Python versions to test
# there is no 3.10.15 on mac
# see: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
os: [ubuntu-latest]
python-version: ['3.10.15', '3.11']

include:
- os: macos-13 # intel-based
python-version: '3.11'

- os: macos-latest # arm-based
python-version: '3.11'

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v4 # Checks out the repository's code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }} # Use Python version from the matrix
python-version: ${{ matrix.python-version }}

- name: Install system dependencies
- name: Install system dependencies (on Linux)
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install -y protobuf-compiler ffmpeg # Install both protobuf and ffmpeg in one step
sudo apt install -y protobuf-compiler ffmpeg

- name: Install system dependencies (on Mac)
if: runner.os == 'macOS'
run: |
brew update
brew install protobuf@21 ffmpeg

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m venv .venv
source .venv/bin/activate
pip install poetry
pip install poetry==2.1.2
poetry install --with dev

- name: Run the Python formatter
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ repos:
language: system
types: [file, python]
files: '^smart_control/'
exclude: '^smart_control/Dockerfile'

- id: isort
name: isort
Expand Down
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@
// using pyink instead of black:
".venv/bin/pyink"
],
"[dockerfile]": {
"editor.formatOnSave": false,
"editor.defaultFormatter": null
}
}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ RUN /opt/venv/bin/pip install \

# Install dependencies from the temporary location
RUN cd /tmp/sbsim && \
poetry lock --no-update && \
poetry lock && \
poetry install --no-root

# Build .proto files
Expand Down
23 changes: 10 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# NOTE: you have to use tabs (not spaces) to define commands in the Makefile

# these are commands to be run, not files to be created:
.PHONY: activate docs docs-build docs-quiet mdformat pyink isort pylint lint test

# variable pointing to the virtual environment executable files:
VENV_BIN := .venv/bin
.PHONY: venv-activate docs docs-build docs-quiet mdformat pyink isort pylint lint test

#
# ENVIRONMENT
Expand All @@ -13,24 +10,24 @@ VENV_BIN := .venv/bin
# https://stackoverflow.com/questions/33839018/activate-virtualenv-in-makefile
# this command uses a different shell, so you must run it manually:
# bash -c "source .venv/bin/activate"
activate:
venv-activate:
@echo "Run this command to activate the environment: source .venv/bin/activate"

#
# LINTING AND FORMATTING
#

mdformat:
${VENV_BIN}/mdformat README.md docs/
poetry run mdformat README.md docs/*

pyink:
${VENV_BIN}/pyink .
poetry run pyink .

isort:
$(VENV_BIN)/isort .
poetry run isort .

pylint:
$(VENV_BIN)/pylint --rcfile=.pylintrc --ignore=proto smart_control
poetry run pylint --rcfile=.pylintrc --ignore=proto smart_control

# mega-command for running all formatters:
format: mdformat pyink isort pylint
Expand All @@ -40,17 +37,17 @@ format: mdformat pyink isort pylint
#

test:
$(VENV_BIN)/pytest --disable-pytest-warnings
poetry run pytest --disable-pytest-warnings

#
# DOCS
#

docs:
$(VENV_BIN)/mkdocs serve
poetry run mkdocs serve

docs-quiet:
${VENV_BIN}/mkdocs serve --quiet
poetry run mkdocs serve --quiet

docs-build:
$(VENV_BIN)/mkdocs build
poetry run mkdocs build
3 changes: 2 additions & 1 deletion docs/api/config.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Configuration

The project uses Gin ("*.gin") configuration files to manage simulation settings, reward function parameters, and environment configurations.
The project uses Gin ("\*.gin") configuration files to manage simulation
settings, reward function parameters, and environment configurations.
Loading
Loading