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

Automatically detect type from file name #73

Merged

Conversation

ClemensLinnhoff
Copy link
Contributor

@ClemensLinnhoff ClemensLinnhoff commented May 27, 2024

Reference to a related issue in the repository

#72

Add a description

Automatically detect top-level message type from file name, if no type is specified as an input argument. The default SensorView remains, if no type is set and no type can be detected.

Mention a member

@jdsika

Check the checklist

  • My code and comments follow the contributors guidelines of this project.
  • I have performed a self-review of my own code.
  • I have made corresponding changes to the documentation for osi-validation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests / travis ci pass locally with my changes.

@ClemensLinnhoff ClemensLinnhoff linked an issue May 27, 2024 that may be closed by this pull request
return "SensorView"
if filename.find("_gt_") != -1:
return "GroundTruth"
return "SensorView"
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe a logger warning here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There was no logger warning before when no type is set. Of course we could still add one here, but I am actually not sure, if the logger even works correctly, see #53.

Since this is blocking my development in openMSL/sl-2-0-traffic-participant-model-repository-template#12 I propose to merge without the logger entry and fix this later in #53.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree

@jdsika jdsika added the feature request Proposals which enhance the interface or add additional features. label May 28, 2024
@jdsika jdsika merged commit 3e7d5a4 into master May 28, 2024
6 checks passed
@jdsika jdsika deleted the 72-auto-detect-top-level-message-type-from-trace-file-name branch May 28, 2024 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Proposals which enhance the interface or add additional features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto-detect top-level message type from trace file name
2 participants