Skip to content

Commit

Permalink
Add windows manifest and __main__.py (#27)
Browse files Browse the repository at this point in the history
Signed-off-by: hoangtungdinh <[email protected]>
  • Loading branch information
hoangtungdinh authored Aug 23, 2024
1 parent e522c6e commit 27fbaa2
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 12 deletions.
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ OTX stands for [Open Test sequence eXchange](https://report.asam.net/otx-iso-132
- [Installation from source](#installation-from-source)
- [Register Checker Bundle to ASAM Quality Checker Framework](#register-checker-bundle-to-asam-quality-checker-framework)
- [Linux Manifest Template](#linux-manifest-template)
- [Windows Manifest Template](#windows-manifest-template)
- [Tests](#tests)
- [Contributing](#contributing)

Expand Down Expand Up @@ -67,11 +68,31 @@ python -m qc_otx.main --help

## Register Checker Bundle to ASAM Quality Checker Framework

Manifest file templates are provided in the [manifest_templates](manifest_templates/) folder to register the ASAM OpenDrive Checker Bundle with the [ASAM Quality Checker Framework](https://github.com/asam-ev/qc-framework/tree/main).
Manifest file templates are provided in the [manifest_templates](manifest_templates/) folder to register the ASAM OTX Checker Bundle with the [ASAM Quality Checker Framework](https://github.com/asam-ev/qc-framework/tree/main).

### Linux Manifest Template

To register this Checker Bundle in Linux, use the [linux_manifest.json](manifest_templates/linux_manifest.json) template file. Replace the path to the Python executable `/home/user/.venv/bin/python` in the `exec_command` with the path to the Python executable where the Checker Bundle is installed.
To register this Checker Bundle in Linux, use the [linux_otx_manifest.json](manifest_templates/linux_otx_manifest.json) template file.

If the asam-qc-otx is installed in a virtual environment, the `exec_command` needs to be adjusted as follows:

```json
"exec_command": "source <venv>/bin/activate && cd $ASAM_QC_FRAMEWORK_WORKING_DIR && qc_otx -c $ASAM_QC_FRAMEWORK_CONFIG_FILE"
```

Replace `<venv>/bin/activate` by the path to your virtual environment.

### Windows Manifest Template

To register this Checker Bundle in Windows, use the [windows_otx_manifest.json](manifest_templates/windows_otx_manifest.json) template file.

If the asam-qc-otx is installed in a virtual environment, the `exec_command` needs to be adjusted as follows:

```json
"exec_command": "C:\\> <venv>\\Scripts\\activate.bat && cd %ASAM_QC_FRAMEWORK_WORKING_DIR% && qc_otx -c %ASAM_QC_FRAMEWORK_CONFIG_FILE%"
```

Replace `C:\\> <venv>\\Scripts\\activate.bat` by the path to your virtual environment.

## Tests

Expand Down
10 changes: 0 additions & 10 deletions manifest_templates/linux_manifest.json

This file was deleted.

10 changes: 10 additions & 0 deletions manifest_templates/linux_otx_manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"module": [
{
"name": "otxBundle",
"exec_type": "executable",
"module_type": "checker_bundle",
"exec_command": "cd $ASAM_QC_FRAMEWORK_WORKING_DIR && qc_otx -c $ASAM_QC_FRAMEWORK_CONFIG_FILE"
}
]
}
10 changes: 10 additions & 0 deletions manifest_templates/windows_otx_manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"module": [
{
"name": "otxBundle",
"exec_type": "executable",
"module_type": "checker_bundle",
"exec_command": "cd %ASAM_QC_FRAMEWORK_WORKING_DIR% && qc_otx -c %ASAM_QC_FRAMEWORK_CONFIG_FILE%"
}
]
}
3 changes: 3 additions & 0 deletions qc_otx/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from qc_otx import main

main.main()

0 comments on commit 27fbaa2

Please sign in to comment.