asam-ev / qc-openscenarioxml

6 stars 3 forks source link

Add executable `qc_openscenario` as project command (script) #47

Closed patrickpa closed 1 month ago

patrickpa commented 1 month ago

Description

This PR adds an option for users of the checker bundle to execute the bundle as a command (or python executable) after pip installing the project.

Example:

$ pip install git+https://github.com/asam-ev/qc-openscenarioxml@patrick/add_executable_command
$ qc_openscenario --help     
usage: QC OpenScenario Checker [-h] (-d | -c CONFIG_PATH)

This is a collection of scripts for checking validity of OpenScenario (.xosc) files.

options:
  -h, --help            show this help message and exit
  -d, --default_config
  -c CONFIG_PATH, --config_path CONFIG_PATH

Main changes

  1. Move main.py script to project source structure
  2. Add script command to pyproject.toml
  3. Update tests with the change
  4. Update docs with the change

How was the PR tested?

  1. Unit-test are working as intended.
  2. Installed the project in a new Python environment and tested the project as a python command in some different cases.

Notes