Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .claude/settings.local.json

This file was deleted.

5 changes: 1 addition & 4 deletions .github/workflows/presubmits.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: json-yaml-validate
name: json-yaml-validate
on:
push:
branches:
Expand All @@ -13,17 +13,14 @@ jobs:
validate-signals:
runs-on: ubuntu-latest
steps:
# Step 1: Check out the current repository
- uses: actions/checkout@v4

# Step 2: Check out the central schema repository
- name: Checkout schemas repo
uses: actions/checkout@v4
with:
repository: OBDb/.schemas
path: .schemas

# Step 3: Validate with schema from the central repository
- name: Validate signalsets
id: json-yaml-validate-v3
uses: GrantBirki/json-yaml-validate@v2.7.1
Expand Down
65 changes: 42 additions & 23 deletions .github/workflows/response_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,58 @@ on:

permissions:
contents: read
pull-requests: write

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout main repository
- name: Checkout repository
uses: actions/checkout@v4

- name: Checkout schemas repo
uses: actions/checkout@v4
- name: Run tests in devcontainer
id: test
uses: devcontainers/ci@v0.3
with:
repository: OBDb/.schemas
path: tests/schemas
imageName: ghcr.io/obdb/devcontainer
push: never
env: |
GITHUB_SERVER_URL=${{ github.server_url }}
GITHUB_REPOSITORY=${{ github.repository }}
GITHUB_SHA=${{ github.sha }}
GITHUB_RUN_ID=${{ github.run_id }}
runCmd: |
pytest tests/ --ignore=tests/schemas -xvs -n auto > ./test-output.txt 2>&1
TEST_EXIT=$?
cat ./test-output.txt

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.13'
cache: 'pip'
# Format results for PR comment with all required arguments
/usr/local/bin/format-test-results.sh \
test-output.txt \
$TEST_EXIT \
"$GITHUB_SERVER_URL" \
"$GITHUB_REPOSITORY" \
"$GITHUB_SHA" \
"$GITHUB_RUN_ID" \
> ./test-results.md || true

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r tests/schemas/requirements.txt
# Exit with the actual test result
exit $TEST_EXIT

- name: Run tests
id: run_tests
- name: Set test results output
if: always() && github.event_name == 'pull_request'
run: |
pytest tests/ --ignore=tests/schemas -xvs -n auto
continue-on-error: true
if [ -f test-results.md ]; then
{
echo 'TEST_RESULTS<<EOFMARKER'
cat test-results.md
echo 'EOFMARKER'
} >> $GITHUB_ENV
fi

- name: Print fix instructions
if: steps.run_tests.outcome == 'failure'
run: |
echo "::notice title=How to fix failed tests::To fix the failed tests, run: python3 tests/update_yaml_tests.py --verbose"
exit 1
- name: Comment test results on PR
if: always() && github.event_name == 'pull_request'
uses: thollander/actions-comment-pull-request@v2
with:
message: ${{ env.TEST_RESULTS }}
comment_tag: response-tests
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
tests/schemas/
__pycache__
.claude/skills
.claude/settings.local.json
tests/*.py
.vscode/*.json
8 changes: 0 additions & 8 deletions .vscode/settings.json

This file was deleted.

11 changes: 0 additions & 11 deletions .vscode/tasks.json

This file was deleted.

54 changes: 25 additions & 29 deletions signalsets/v3/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,21 @@
]},
{ "hdr": "7E0", "rax": "7E8", "cmd": {"01": "06"}, "freq": 0.25,
"signals": [
{"id": "SHRTFT1", "path": "Engine.Generic", "fmt": { "len": 8, "max": 99.2, "min": -100, "mul": 100, "div": 128, "add": -128, "unit": "percent" }, "name": "Short term fuel trim (bank 1)", "suggestedMetric": "shortTermFuelTrim", "description": "Correction being used by the closed-loop fuel algorithm."}
{"id": "SHRTFT1", "path": "Engine.Generic", "fmt": { "len": 8, "max": 99.2, "min": -100, "mul": 100, "div": 128, "add": -100, "unit": "percent" }, "name": "Short term fuel trim (bank 1)", "suggestedMetric": "shortTermFuelTrim", "description": "Correction being used by the closed-loop fuel algorithm."}
]},
{ "hdr": "7E0", "rax": "7E8", "cmd": {"01": "07"}, "freq": 1,
"signals": [
{"id": "LONGFT1", "path": "Engine.Generic", "fmt": { "len": 8, "max": 99.2, "min": -100, "mul": 100, "div": 128, "add": -128, "unit": "percent" }, "name": "Long term fuel trim (bank 1)"}
{"id": "LONGFT1", "path": "Engine.Generic", "fmt": { "len": 8, "max": 99.2, "min": -100, "mul": 100, "div": 128, "add": -100, "unit": "percent" }, "name": "Long term fuel trim (bank 1)"}
]},
{ "hdr": "7E0", "rax": "7E8", "cmd": {"01": "08"}, "freq": 1,
"signals": [
{"id": "SHRTFT2", "path": "Engine.Generic", "fmt": { "len": 8, "max": 99.2, "min": -100, "mul": 100, "div": 128, "add": -128, "unit": "percent" }, "name": "Short term fuel trim (bank 2)", "suggestedMetric": "shortTermFuelTrim", "description": "Correction being used by the closed-loop fuel algorithm."},
{"id": "SHRTFT4", "path": "Engine.Generic", "fmt": {"bix": 8, "len": 8, "max": 99.2, "min": -100, "mul": 100, "div": 128, "add": -128, "unit": "percent" }, "name": "Short term fuel trim (bank 4)", "description": "Correction being used by the closed-loop fuel algorithm."}
{"id": "SHRTFT2", "path": "Engine.Generic", "fmt": { "len": 8, "max": 99.2, "min": -100, "mul": 100, "div": 128, "add": -100, "unit": "percent" }, "name": "Short term fuel trim (bank 2)", "suggestedMetric": "shortTermFuelTrim", "description": "Correction being used by the closed-loop fuel algorithm."},
{"id": "SHRTFT4", "path": "Engine.Generic", "fmt": {"bix": 8, "len": 8, "max": 99.2, "min": -100, "mul": 100, "div": 128, "add": -100, "unit": "percent" }, "name": "Short term fuel trim (bank 4)", "description": "Correction being used by the closed-loop fuel algorithm."}
]},
{ "hdr": "7E0", "rax": "7E8", "cmd": {"01": "09"}, "freq": 1,
"signals": [
{"id": "LONGFT2", "path": "Engine.Generic", "fmt": { "len": 8, "max": 99.2, "min": -100, "mul": 100, "div": 128, "add": -128, "unit": "percent" }, "name": "Long term fuel trim (bank 2)"},
{"id": "LONGFT4", "path": "Engine.Generic", "fmt": {"bix": 8, "len": 8, "max": 99.2, "min": -100, "mul": 100, "div": 128, "add": -128, "unit": "percent" }, "name": "Long term fuel trim (bank 4)"}
{"id": "LONGFT2", "path": "Engine.Generic", "fmt": { "len": 8, "max": 99.2, "min": -100, "mul": 100, "div": 128, "add": -100, "unit": "percent" }, "name": "Long term fuel trim (bank 2)"},
{"id": "LONGFT4", "path": "Engine.Generic", "fmt": {"bix": 8, "len": 8, "max": 99.2, "min": -100, "mul": 100, "div": 128, "add": -100, "unit": "percent" }, "name": "Long term fuel trim (bank 4)"}
]},
{ "hdr": "7E0", "rax": "7E8", "cmd": {"01": "0A"}, "freq": 1,
"signals": [
Expand Down Expand Up @@ -267,7 +267,7 @@
]},
{ "hdr": "7E0", "rax": "7E8", "cmd": {"01": "2D"}, "freq": 1,
"signals": [
{"id": "EGR_ERR", "path": "Engine.Generic", "fmt": { "len": 8, "max": 99.22, "min": -100, "mul": 100, "div": 128, "add": -128, "unit": "percent" }, "name": "EGR error"}
{"id": "EGR_ERR", "path": "Engine.Generic", "fmt": { "len": 8, "max": 99.22, "min": -100, "mul": 100, "div": 128, "add": -100, "unit": "percent" }, "name": "EGR error"}
]},
{ "hdr": "7E0", "rax": "7E8", "cmd": {"01": "2E"}, "freq": 1,
"signals": [
Expand Down Expand Up @@ -459,19 +459,19 @@
]},
{ "hdr": "7E0", "rax": "7E8", "cmd": {"01": "55"}, "freq": 0.25,
"signals": [
{"id": "STSO2FT1", "path": "Engine.Generic", "fmt": { "len": 8, "max": 99.22, "min": -100, "mul": 100, "div": 128, "add": -128, "unit": "percent" }, "name": "Short term secondary O2 sensor fuel trim (bank 1)"}
{"id": "STSO2FT1", "path": "Engine.Generic", "fmt": { "len": 8, "max": 99.22, "min": -100, "mul": 100, "div": 128, "add": -100, "unit": "percent" }, "name": "Short term secondary O2 sensor fuel trim (bank 1)"}
]},
{ "hdr": "7E0", "rax": "7E8", "cmd": {"01": "56"}, "freq": 0.25,
"signals": [
{"id": "LGSO2FT1", "path": "Engine.Generic", "fmt": { "len": 8, "max": 99.22, "min": -100, "mul": 100, "div": 128, "add": -128, "unit": "percent" }, "name": "Long term secondary O2 sensor fuel trim (bank 1)"}
{"id": "LGSO2FT1", "path": "Engine.Generic", "fmt": { "len": 8, "max": 99.22, "min": -100, "mul": 100, "div": 128, "add": -100, "unit": "percent" }, "name": "Long term secondary O2 sensor fuel trim (bank 1)"}
]},
{ "hdr": "7E0", "rax": "7E8", "cmd": {"01": "57"}, "freq": 0.25,
"signals": [
{"id": "STSO2FT2", "path": "Engine.Generic", "fmt": { "len": 8, "max": 99.22, "min": -100, "mul": 100, "div": 128, "add": -128, "unit": "percent" }, "name": "Short term secondary O2 sensor fuel trim (bank 2)"}
{"id": "STSO2FT2", "path": "Engine.Generic", "fmt": { "len": 8, "max": 99.22, "min": -100, "mul": 100, "div": 128, "add": -100, "unit": "percent" }, "name": "Short term secondary O2 sensor fuel trim (bank 2)"}
]},
{ "hdr": "7E0", "rax": "7E8", "cmd": {"01": "58"}, "freq": 0.25,
"signals": [
{"id": "LGSO2FT2", "path": "Engine.Generic", "fmt": { "len": 8, "max": 99.22, "min": -100, "mul": 100, "div": 128, "add": -128, "unit": "percent" }, "name": "Long term secondary O2 sensor fuel trim (bank 2)"}
{"id": "LGSO2FT2", "path": "Engine.Generic", "fmt": { "len": 8, "max": 99.22, "min": -100, "mul": 100, "div": 128, "add": -100, "unit": "percent" }, "name": "Long term secondary O2 sensor fuel trim (bank 2)"}
]},
{ "hdr": "7E0", "rax": "7E8", "cmd": {"01": "59"}, "freq": 0.25,
"signals": [
Expand Down Expand Up @@ -579,29 +579,25 @@
{"id": "EGR_A_CMD_SUP", "path": "Engine.Generic.Internal", "fmt": {"bix": 7, "len": 1, "max": 1, "unit": "noyes" }, "name": "Commanded EGR A supported", "hidden": true},
{"id": "EGR_A_CMD", "path": "Engine.Generic", "fmt": {"bix": 8, "len": 8, "max": 100, "mul": 100, "div": 255, "unit": "percent" }, "name": "Commanded EGR A duty cycle/position"},
{"id": "EGR_A_ACT", "path": "Engine.Generic", "fmt": {"bix": 16, "len": 8, "max": 100, "mul": 100, "div": 255, "unit": "percent" }, "name": "Actual EGR A duty cycle/position"},
{"id": "EGR_A_ERR", "path": "Engine.Generic", "fmt": {"bix": 24, "len": 8, "max": 99.22, "min": -100, "mul": 100, "div": 128, "add": -128, "unit": "percent" }, "name": "EGR A error"},
{"id": "EGR_A_ERR", "path": "Engine.Generic", "fmt": {"bix": 24, "len": 8, "max": 99.22, "min": -100, "mul": 100, "div": 128, "add": -100, "unit": "percent" }, "name": "EGR A error"},
{"id": "EGR_B_CMD", "path": "Engine.Generic", "fmt": {"bix": 32, "len": 8, "max": 100, "mul": 100, "div": 255, "unit": "percent" }, "name": "Commanded EGR B duty cycle/position"},
{"id": "EGR_B_ACT", "path": "Engine.Generic", "fmt": {"bix": 40, "len": 8, "max": 100, "mul": 100, "div": 255, "unit": "percent" }, "name": "Actual EGR B duty cycle/position"},
{"id": "EGR_B_ERR", "path": "Engine.Generic", "fmt": {"bix": 48, "len": 8, "max": 99.22, "min": -100, "mul": 100, "div": 128, "add": -128, "unit": "percent" }, "name": "EGR B error"}
{"id": "EGR_B_ERR", "path": "Engine.Generic", "fmt": {"bix": 48, "len": 8, "max": 99.22, "min": -100, "mul": 100, "div": 128, "add": -100, "unit": "percent" }, "name": "EGR B error"}
]},
{ "hdr": "7E0", "rax": "7E8", "cmd": {"01": "6B"}, "freq": 0.25,
"signals": [
{"id": "EGRTD_WR_SUP", "path": "Engine.Generic.Internal", "fmt": { "len": 1, "max": 1, "unit": "noyes" }, "name": "EGR Temperature Sensor D (Bank 2, Sensor 2) Wide Range supported?", "hidden": true},
{"id": "EGRTB_WR_SUP", "path": "Engine.Generic.Internal", "fmt": {"bix": 1, "len": 1, "max": 1, "unit": "noyes" }, "name": "EGR Temperature Sensor B (Bank 2, Sensor 1) Wide Range supported?", "hidden": true},
{"id": "EGRTC_WR_SUP", "path": "Engine.Generic.Internal", "fmt": {"bix": 2, "len": 1, "max": 1, "unit": "noyes" }, "name": "EGR Temperature Sensor C (Bank 1, Sensor 2) Wide Range supported?", "hidden": true},
{"id": "EGRTA_WR_SUP", "path": "Engine.Generic.Internal", "fmt": {"bix": 3, "len": 1, "max": 1, "unit": "noyes" }, "name": "EGR Temperature Sensor A (Bank 1, Sensor 1) Wide Range supported?", "hidden": true},
{"id": "EGRTD_SUP", "path": "Engine.Generic.Internal", "fmt": {"bix": 4, "len": 1, "max": 1, "unit": "noyes" }, "name": "EGR Temperature Sensor D (Bank 2, Sensor 2) supported?", "hidden": true},
{"id": "EGRTB_SUP", "path": "Engine.Generic.Internal", "fmt": {"bix": 5, "len": 1, "max": 1, "unit": "noyes" }, "name": "EGR Temperature Sensor B (Bank 2, Sensor 1) supported?", "hidden": true},
{"id": "EGRTC_SUP", "path": "Engine.Generic.Internal", "fmt": {"bix": 6, "len": 1, "max": 1, "unit": "noyes" }, "name": "EGR Temperature Sensor C (Bank 1, Sensor 2) supported?", "hidden": true},
{"id": "EGRTA_SUP", "path": "Engine.Generic.Internal", "fmt": {"bix": 7, "len": 1, "max": 1, "unit": "noyes" }, "name": "EGR Temperature Sensor A (Bank 1, Sensor 1) supported?", "hidden": true},
{"id": "EGRTA", "path": "Engine.Generic", "fmt": {"bix": 8, "len": 8, "max": 215, "min": -40, "add": -40, "unit": "celsius" }, "name": "Exhaust Gas Recirculation Temp Sensor A (Bank 1, Sensor 1)"},
{"id": "EGRTA_WIDE", "path": "Engine.Generic", "fmt": {"bix": 8, "len": 8, "max": 980, "min": -40, "mul": 4, "add": -40, "unit": "celsius" }, "name": "Exhaust Gas Recirculation Temp Sensor A (Bank 1, Sensor 1), wide"},
{"id": "EGRTC", "path": "Engine.Generic", "fmt": {"bix": 16, "len": 8, "max": 215, "min": -40, "add": -40, "unit": "celsius" }, "name": "Exhaust Gas Recirculation Temp Sensor C (Bank 1, Sensor 2)"},
{"id": "EGRTC_WIDE", "path": "Engine.Generic", "fmt": {"bix": 16, "len": 8, "max": 980, "min": -40, "mul": 4, "add": -40, "unit": "celsius" }, "name": "Exhaust Gas Recirculation Temp Sensor C (Bank 1, Sensor 2), wide"},
{"id": "EGRTB", "path": "Engine.Generic", "fmt": {"bix": 24, "len": 8, "max": 215, "min": -40, "add": -40, "unit": "celsius" }, "name": "Exhaust Gas Recirculation Temp Sensor B (Bank 2, Sensor 1)"},
{"id": "EGRTB_WIDE", "path": "Engine.Generic", "fmt": {"bix": 24, "len": 8, "max": 980, "min": -40, "mul": 4, "add": -40, "unit": "celsius" }, "name": "Exhaust Gas Recirculation Temp Sensor B (Bank 2, Sensor 1), wide"},
{"id": "EGRTD", "path": "Engine.Generic", "fmt": {"bix": 32, "len": 8, "max": 215, "min": -40, "add": -40, "unit": "celsius" }, "name": "Exhaust Gas Recirculation Temp Sensor D (Bank 2, Sensor 2)"},
{"id": "EGRTD_WIDE", "path": "Engine.Generic", "fmt": {"bix": 32, "len": 8, "max": 980, "min": -40, "mul": 4, "add": -40, "unit": "celsius" }, "name": "Exhaust Gas Recirculation Temp Sensor D (Bank 2, Sensor 2), wide"}
{"id": "EGRTD_WR_SUP", "path": "Engine.Generic.Internal", "fmt": { "len": 1, "max": 1, "unit": "noyes" }, "name": "EGR Temperature Sensor D (Bank 2, Sensor 2) Wide Range supported?", "hidden": true},
{"id": "EGRTB_WR_SUP", "path": "Engine.Generic.Internal", "fmt": {"bix": 1, "len": 1, "max": 1, "unit": "noyes" }, "name": "EGR Temperature Sensor B (Bank 2, Sensor 1) Wide Range supported?", "hidden": true},
{"id": "EGRTC_WR_SUP", "path": "Engine.Generic.Internal", "fmt": {"bix": 2, "len": 1, "max": 1, "unit": "noyes" }, "name": "EGR Temperature Sensor C (Bank 1, Sensor 2) Wide Range supported?", "hidden": true},
{"id": "EGRTA_WR_SUP", "path": "Engine.Generic.Internal", "fmt": {"bix": 3, "len": 1, "max": 1, "unit": "noyes" }, "name": "EGR Temperature Sensor A (Bank 1, Sensor 1) Wide Range supported?", "hidden": true},
{"id": "EGRTD_SUP", "path": "Engine.Generic.Internal", "fmt": {"bix": 4, "len": 1, "max": 1, "unit": "noyes" }, "name": "EGR Temperature Sensor D (Bank 2, Sensor 2) supported?", "hidden": true},
{"id": "EGRTB_SUP", "path": "Engine.Generic.Internal", "fmt": {"bix": 5, "len": 1, "max": 1, "unit": "noyes" }, "name": "EGR Temperature Sensor B (Bank 2, Sensor 1) supported?", "hidden": true},
{"id": "EGRTC_SUP", "path": "Engine.Generic.Internal", "fmt": {"bix": 6, "len": 1, "max": 1, "unit": "noyes" }, "name": "EGR Temperature Sensor C (Bank 1, Sensor 2) supported?", "hidden": true},
{"id": "EGRTA_SUP", "path": "Engine.Generic.Internal", "fmt": {"bix": 7, "len": 1, "max": 1, "unit": "noyes" }, "name": "EGR Temperature Sensor A (Bank 1, Sensor 1) supported?", "hidden": true},
{"id": "EGRTA", "path": "Engine.Generic", "fmt": {"bix": 8, "len": 8, "max": 215, "min": -40, "add": -40, "unit": "celsius" }, "name": "Exhaust Gas Recirculation Temp Sensor A (Bank 1, Sensor 1)"},
{"id": "EGRTC", "path": "Engine.Generic", "fmt": {"bix": 16, "len": 8, "max": 215, "min": -40, "add": -40, "unit": "celsius" }, "name": "Exhaust Gas Recirculation Temp Sensor C (Bank 1, Sensor 2)"},
{"id": "EGRTB", "path": "Engine.Generic", "fmt": {"bix": 24, "len": 8, "max": 215, "min": -40, "add": -40, "unit": "celsius" }, "name": "Exhaust Gas Recirculation Temp Sensor B (Bank 2, Sensor 1)"},
{"id": "EGRTD", "path": "Engine.Generic", "fmt": {"bix": 32, "len": 8, "max": 215, "min": -40, "add": -40, "unit": "celsius" }, "name": "Exhaust Gas Recirculation Temp Sensor D (Bank 2, Sensor 2)"}
]},
{ "hdr": "7E0", "rax": "7E8", "cmd": {"01": "6C"}, "freq": 0.25,
"signals": [
Expand Down
Loading