mercedes-benz / odxtools

odxtools is a collection of utilities to interact with the diagnostic functionality of automotive electronic control units using python
MIT License
171 stars 70 forks source link

Improve the file loading mechansims #307

Closed andlaus closed 3 months ago

andlaus commented 3 months ago

This PR refactors the file loading mechanism with the goal to be able to create databases from multiple constitutive files. It works by introducing a new user facing odxtools.load_files(filename1, filename2, ...) function.

Besides this, odxtools.load_directory(dirname) is added. This function loads all files contained in a directory into a single database. The main application is probably to directly load an unzipped PDX file. This is a quite convenient feature when developing tools or a dataset.

Andreas Lauser <andreas.lauser@mercedes-benz.com>, on behalf of MBition GmbH. Provider Information

andlaus commented 3 months ago

this fixes #224 and hopefully #283.

@QWander: can you check if the references are properly resolved if you load your dataset using

odxtools.load_files('myFile1.odx-d', 'myFile2.odx-d', ...)