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

updated the script to consider versioned paths #73

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

Claudio-Chies
Copy link
Contributor

Currently, the script always failed because it can't find the files inside the versioned message folder, with this commit, I'm searching all the subfolders in the msg directory, to find the files. Thereby, messages in the versioned folder are also found.
An open issue is that the px4_msgs are not up-to-date with the version field in the message definition, and thereby the check fails.
There, the question would be if that field will also be present in the px4_msgs repo, or should we just exclude this in the compensation? @bkueng

Copy link
Collaborator

@bkueng bkueng left a comment

Choose a reason for hiding this comment

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

An open issue is that the px4_msgs are not up-to-date with the version field in the message definition, and thereby the check fails.
There, the question would be if that field will also be present in the px4_msgs repo, or should we just exclude this in the compensation? @bkueng

Are you sure it's causing a failed check? I'm asking because constants should explicitly be excluded here already:

@@ -114,12 +114,19 @@ def compare_files(file1: str, file2: str):
with open(file1, 'r') as f1, open(file2, 'r') as f2:
diff = list(difflib.unified_diff(f1.readlines(), f2.readlines(), fromfile=file1, tofile=file2))
if diff:
print(f"Mismatch found between {file1} and {file2}:")
print(f"Mismatch found between {file1} and {file2}: ")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Was this change intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i wasnt able to commit the change without because of the formatting requirements from the precommit hook.

scripts/check-message-compatibility.py Outdated Show resolved Hide resolved
@Claudio-Chies
Copy link
Contributor Author

An open issue is that the px4_msgs are not up-to-date with the version field in the message definition, and thereby the check fails.
There, the question would be if that field will also be present in the px4_msgs repo, or should we just exclude this in the compensation? @bkueng

Are you sure it's causing a failed check? I'm asking because constants should explicitly be excluded here already:

you are right, the version is excluded in the check, i updated the scripts so that they now work. there was an open issue with the path.

Copy link
Collaborator

@bkueng bkueng left a comment

Choose a reason for hiding this comment

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

Looks good, thanks

@bkueng bkueng merged commit ff7be0c into Auterion:main Jan 29, 2025
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.

2 participants