Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comparison tool #249

Merged
merged 1 commit into from
Jan 8, 2024
Merged

Comparison tool #249

merged 1 commit into from
Jan 8, 2024

Conversation

kakoeh
Copy link
Contributor

@kakoeh kakoeh commented Dec 15, 2023

New cli tool "compare" (odxtools - Issue 35)
Can be used to compare databases (pdx-files) and/or ecu variants with each other.
Compares all diagnostic services as well as its parameters of the specified databases /variants with each other and displays the changes.

Katja Köhler <[email protected]>, on behalf of MBition GmbH.
Provider Information

odxtools/cli/find.py Outdated Show resolved Hide resolved
odxtools/database.py Outdated Show resolved Hide resolved
odxtools/cli/list.py Outdated Show resolved Hide resolved
@kakoeh kakoeh force-pushed the comparison_tool branch 3 times, most recently from b3343d5 to b2340fe Compare December 18, 2023 12:10
@kayoub5
Copy link
Collaborator

kayoub5 commented Dec 18, 2023

Where did the file examples/somersault_01.01.02.pdx come from?

pyproject.toml Outdated
@@ -42,6 +42,7 @@ dependencies = [
"markdownify >= 0.11",
"deprecation >= 2.1",
"packaging",
"pandas >= 2.1.4"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pandas is a test dependency or library dependency?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did the file examples/somersault_01.01.02.pdx come from?

The file was derived from the file somersault.pdx by adapting somersaultecu.py

pandas is a test dependency or library dependency?

pandas was used by several functions but has been replaced

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what are the adaptations?

@andlaus are you ok with adding a binary file without the logic that created it?

Copy link
Contributor Author

@kakoeh kakoeh Dec 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • new ecu variant somersault_young
  • deleted SingleEcuJob compulsory_program
  • deleted DiagService set_operation_params
  • new DiagService flicflac
  • renamed DiagService start_session from session_start to start_session
  • changed list of request parameter of DiagService headstand
  • changed pos. response parameter of session_start
    (DOP of can_do_backward_flips from boolean to uint8)
  • changed pos. response parameter of tester_present
    (value of status from 0x00 to 0x0043 and type from uint8 to uint16)
  • changed pos. response parameter of grudging_backward
    (byte position of num_flips_done from None to 1)
    (param type of grumpiness_level from ValueParameter to CodedConstParameter,
    incl. byte position from None to 2, value = 0x05)
  • changed pos. response parameter of status_report
    (byte position of happiness_level from 2 to 1)
    (byte position of dizzyness_level from 1 to 2)
  • changed request parameter of stop_session
    (type of id from uint8 to uint16)
  • changed request parameter of tester_present
    (value of id from 0x0 to 0x01)
  • changed request parameter of do_backward_flips
    (short_name of backward_check from backward_soberness_check to backward_check)

image

Copy link
Collaborator

@andlaus andlaus Dec 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andlaus are you ok with adding a binary file without the logic that created it?

I suppose in this case it is okay, because that new file is basically a showcase for the compare tool. (I'd prefer to have a script doing these modifications in-repo, though.)

can this file be renamed to something which better conveys the fact that it is a modified version of the original, though? (something like somersault_modified.pdx.)

- new cli tool 'compare'
- new example pdx to test compare tool
- added unittest for cli tool 'compare'

Signed-off-by: Katja Köhler <[email protected]>
Signed-off-by: Andreas Lauser <[email protected]>
@kakoeh kakoeh mentioned this pull request Jan 5, 2024
@andlaus
Copy link
Collaborator

andlaus commented Jan 8, 2024

nice, thanks all!

@andlaus andlaus merged commit 9d40155 into mercedes-benz:main Jan 8, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants