Skip to content

Commit

Permalink
Merge pull request #128 from dragonejt/main
Browse files Browse the repository at this point in the history
Update config file specification format
  • Loading branch information
asgibson authored Jul 26, 2024
2 parents 3f42da8 + 74c983d commit c59d04d
Show file tree
Hide file tree
Showing 7 changed files with 581 additions and 231 deletions.
135 changes: 133 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,135 @@
*.pyc
.DS_Store
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# Visual Studio Code
.vscode/

# macOS
.DS_Store
34 changes: 19 additions & 15 deletions onair/config/default_config.ini
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
# Required Section: DEFAULT section is the basic required elements for running OnAIR
[DEFAULT]
# Required Key: TelemetryDataFilePath is the path for TelemetryFile
TelemetryDataFilePath = onair/data/raw_telemetry_data/data_physics_generation/Errors
# Required Key: TelemetryDataFile is a file used by the selected parser
# NOTE: TelemetryDataFile is required even when selected parser does not use it
# Required Section: FILES section contains the paths of required files for running OnAIR
[FILES]
# Required Key: TelemetryFilePath is the directory of TelemetryFile
TelemetryFilePath = onair/data/raw_telemetry_data/data_physics_generation/Errors
# Required Key: TelemetryFile is the file read by the selected parser
# NOTE: TelemetryFile is required even when selected parser does not use it
TelemetryFile = 700_crash_to_earth_1.csv
# Required Key: TelemetryMetadataFilePath is the path for TelemetryMetadataFilePath
TelemetryMetadataFilePath = onair/data/telemetry_configs/
# Required Key: MetaFilePath is the directory of MetaFile
MetaFilePath = onair/data/telemetry_configs/
# Required Key: MetaFile describes frame composition of data
MetaFile = data_physics_generation_CONFIG.json
# Required Key: ParserFileName is the name of the parser DataSource object to use
ParserFileName = onair/data_handling/csv_parser.py

# Plugins
# Required Section: DATA_HANDLING section specifies which data source parser to use
[DATA_HANDLING]
# Required Key: DataSourceFile is the name of the parser DataSource object to use
DataSourceFile = onair/data_handling/csv_parser.py

# Required Section: PLUGINS section contains the plugins wanted for OnAIR to run
[PLUGINS]
# NOTE: even though keys are required, they may be set to empty dicts
# Required Key: KnowledgeRepPluginDict(s) are used by the VehicleRep
KnowledgeRepPluginDict = {'generic':'plugins/generic/__init__.py'}
Expand All @@ -23,8 +27,8 @@ PlannersPluginDict = {'generic':'plugins/generic/__init__.py'}
# Required Key: ComplexPluginDict(s) are used by Agent for complex reasoning
ComplexPluginDict = {'generic':'plugins/generic/__init__.py'}

# Required Section: RUN_FLAGS are settable values to change running experience
[RUN_FLAGS]
# Optional Section: OPTIONS are settable values to change running experience
[OPTIONS]
# Optional Key: IO_Flag denotes whether or not to provide console output
# IO_Flag defaults to false when not provided
IO_Flag = true
# default = false
IO_Enabled = true
15 changes: 9 additions & 6 deletions onair/config/kalman_csv_output_example.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
[DEFAULT]
TelemetryDataFilePath = onair/data/raw_telemetry_data/data_physics_generation/Errors
[FILES]
TelemetryFilePath = onair/data/raw_telemetry_data/data_physics_generation/Errors
TelemetryFile = 700_crash_to_earth_1.csv
TelemetryMetadataFilePath = onair/data/telemetry_configs/
MetaFilePath = onair/data/telemetry_configs/
MetaFile = data_physics_generation_CONFIG.json
ParserFileName = onair/data_handling/csv_parser.py

[DATA_HANDLING]
DataSourceFile = onair/data_handling/redis_adapter.py

[PLUGINS]
KnowledgeRepPluginDict = {'Kalman Filter': 'plugins/kalman'}
LearnersPluginDict = {'csv output':'plugins/csv_output'}
PlannersPluginDict = {}
ComplexPluginDict = {}

[RUN_FLAGS]
IO_Flag = true
[OPTIONS]
IO_Enabled = true
15 changes: 9 additions & 6 deletions onair/config/redis_example.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
[DEFAULT]
TelemetryDataFilePath = onair/data/raw_telemetry_data/data_physics_generation/Errors
[FILES]
TelemetryFilePath = onair/data/raw_telemetry_data/data_physics_generation/Errors
TelemetryFile = 700_crash_to_earth_1.csv
TelemetryMetadataFilePath = onair/data/telemetry_configs/
MetaFilePath = onair/data/telemetry_configs/
MetaFile = redis_example_CONFIG.json
ParserFileName = onair/data_handling/redis_adapter.py

[DATA_HANDLING]
DataSourceFile = onair/data_handling/redis_adapter.py

[PLUGINS]
KnowledgeRepPluginDict = {'knowledge':'plugins/generic/__init__.py'}
LearnersPluginDict = {'learner':'plugins/generic/__init__.py'}
PlannersPluginDict = {'planner':'plugins/generic/__init__.py'}
ComplexPluginDict = {'complex':'plugins/generic/__init__.py'}

[RUN_FLAGS]
IO_Flag = true
[OPTIONS]
IO_Enabled = true
17 changes: 9 additions & 8 deletions onair/config/reporter_config.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
[DEFAULT]
TelemetryDataFilePath = onair/data/raw_telemetry_data/data_physics_generation/Errors
[FILES]
TelemetryFilePath = onair/data/raw_telemetry_data/data_physics_generation/Errors
TelemetryFile = 700_crash_to_earth_1.csv
TelemetryMetadataFilePath = onair/data/telemetry_configs/
MetaFilePath = onair/data/telemetry_configs/
MetaFile = data_physics_generation_CONFIG.json
ParserFileName = onair/data_handling/csv_parser.py

[DATA_HANDLING]
DataSourceFile = onair/data_handling/csv_parser.py

[PLUGINS]
KnowledgeRepPluginDict = {'Knowledge Reporter 1':'plugins/reporter',
'Knowledge Reporter 2':'plugins/reporter'}
LearnersPluginDict = {'Learners Reporter 1':'plugins/reporter',
Expand All @@ -14,7 +17,5 @@ PlannersPluginDict = {'Planner Reporter 1':'plugins/reporter',
ComplexPluginDict = {'Complex Reporter 1':'plugins/reporter',
'Complex Reporter 2':'plugins/reporter'}

[RUN_FLAGS]
IO_Flag = true
Dev_Flag = false
Viz_Flag = false
[OPTIONS]
IO_Enabled = true
Loading

0 comments on commit c59d04d

Please sign in to comment.