Skip to content

Commit

Permalink
Merge pull request #134 from AD-SDL/dev
Browse files Browse the repository at this point in the history
Workflow Parameters Support; Documentation Improvements
  • Loading branch information
LuckierDodge authored Nov 5, 2024
2 parents ac6ad7f + de3c4d4 commit 3d00c43
Show file tree
Hide file tree
Showing 76 changed files with 1,250 additions and 1,426 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ jobs:
steps:
- uses: actions/checkout@v3
name: Checkout code
- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
name: Setup Python
with:
python-version: 3.12
- uses: pre-commit/action@v3.0.0
name: Run Pre-Commit Checks
6 changes: 3 additions & 3 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:
steps:
- uses: actions/checkout@v3
name: Checkout code
- name: Set up Python 3.9
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: 3.12
- name: Setup PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: 3.9
python-version: 3.12
- name: Install dependencies
run: pdm install
- name: Publish to PyPi
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ jobs:
steps:
- uses: actions/checkout@v3
name: Checkout code
- name: Set up Python 3.9
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: 3.12
- name: Setup PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: 3.9
- name: Build the Project
run: make init build
python-version: 3.12
- name: Test with pytest
run: make test
run: make init build test
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-yaml
- id: check-json
Expand All @@ -17,7 +17,7 @@ repos:
- id: nbstripout
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.6.5
rev: v0.7.0
hooks:
# Run the linter.
- id: ruff
Expand Down
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ COPY requirements/requirements.txt wei/requirements/requirements.txt
COPY requirements/dev.txt wei/requirements/dev.txt
RUN --mount=type=cache,target=/root/.cache \
pip install --upgrade setuptools wheel pip && \
pip install -r wei/requirements/requirements.txt
pip install -r wei/requirements/requirements.txt && \
pip install -r wei/requirements/dev.txt

ENV PATH="${PATH}:~/.local/bin"

# Copy rest of wei files
COPY src wei/src
Expand Down
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ else
@sed -i 's/^USER_ID=.*/USER_ID=$(shell id -u)/' .env
@sed -i 's/^GROUP_ID=.*/GROUP_ID=$(shell id -g)/' .env
endif
ifeq ($(OS),Windows_NT)
@where pdm || (Invoke-WebRequest -Uri https://pdm-project.org/install-pdm.py -UseBasicParsing).Content | py -
else
@where pdm || curl -sSL https://pdm-project.org/install-pdm.py | python3 -
endif


.env: init
Expand All @@ -23,7 +28,7 @@ checks: # Runs all the pre-commit checks
@pre-commit run --all-files || { echo "Checking fixes\n" ; pre-commit run --all-files; }

test: init .env build up # Runs all the tests
@docker compose run test_wei_server pytest -p no:cacheprovider wei
@docker compose exec test_wei_server pytest -p no:cacheprovider wei
@#docker compose down

down:
Expand Down Expand Up @@ -52,7 +57,7 @@ build: build-python # Builds the project

# (Make sure you've installed PDM)

init-python: init pdm.lock deps # Installs the python environment (requires PDM)
init-python: init pdm-update pdm.lock deps # Installs the python environment (requires PDM)

build-python: init-python # Builds the pypi package for APP_NAME
pdm build
Expand All @@ -66,6 +71,9 @@ publish-python: init-python # Publishes the pypi package for wei
# Python Dependency Managment #
###############################

pdm-update:
pdm self update

pdm.lock: pyproject.toml # Generates the pdm.lock file
pdm install --group :all

Expand Down
19 changes: 1 addition & 18 deletions docs/source/pages/_autosummary/wei.config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,9 @@ wei.config
.. automodule:: wei.config











.. rubric:: Classes

.. autosummary::

Config










19 changes: 1 addition & 18 deletions docs/source/pages/_autosummary/wei.core.admin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ wei.core.admin
.. automodule:: wei.core.admin







.. rubric:: Functions

.. autosummary::
Expand All @@ -22,16 +17,4 @@ wei.core.admin
send_safety_stop
send_shutdown
send_unlock














19 changes: 1 addition & 18 deletions docs/source/pages/_autosummary/wei.core.events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,15 @@ wei.core.events
.. automodule:: wei.core.events







.. rubric:: Functions

.. autosummary::

send_event





.. rubric:: Classes

.. autosummary::

EventHandler










19 changes: 1 addition & 18 deletions docs/source/pages/_autosummary/wei.core.experiment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,11 @@ wei.core.experiment
.. automodule:: wei.core.experiment







.. rubric:: Functions

.. autosummary::

get_experiment
parse_experiments_from_disk
register_new_experiment














Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,4 @@ wei.core.interfaces.rest\_interface

.. automodule:: wei.core.interfaces.rest_interface




















Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,4 @@ wei.core.interfaces.ros2\_interface

.. automodule:: wei.core.interfaces.ros2_interface




















28 changes: 5 additions & 23 deletions docs/source/pages/_autosummary/wei.core.interfaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,14 @@ wei.core.interfaces
.. automodule:: wei.core.interfaces



















.. rubric:: Modules

.. autosummary::
:toctree:
:recursive:

wei.core.interfaces.rest_interface
wei.core.interfaces.ros2_interface
wei.core.interfaces.simulate_interface
wei.core.interfaces.tcp_interface
wei.core.interfaces.zmq_interface

rest_interface
ros2_interface
simulate_interface
tcp_interface
zmq_interface
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,9 @@ wei.core.interfaces.simulate\_interface
.. automodule:: wei.core.interfaces.simulate_interface







.. rubric:: Functions

.. autosummary::

silent_callback














Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,4 @@ wei.core.interfaces.tcp\_interface

.. automodule:: wei.core.interfaces.tcp_interface




















Loading

0 comments on commit 3d00c43

Please sign in to comment.