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

Raise error if a non-existing string-type path is passed #103

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

flferretti
Copy link
Contributor

@flferretti flferretti commented Nov 4, 2024

This pull request includes a small change to the get_xml_string function in the src/adam/model/std_factories/std_model.py file. The change simplifies the condition for converting a string to a pathlib.Path object by removing the redundant check for the existence of the path. In this way, an error will be raised when a non-existing string-type path is passed

@xela-95
Copy link
Member

xela-95 commented Nov 6, 2024

@flferretti what happens if we are in the following case: we have an input path variable that is a string and it is a urdf, but without being longer than MAX_PATH? is this an edge case we can forget about?

@flferretti
Copy link
Contributor Author

is this an edge case we can forget about?

Yes, but we could also think about something like if "<robot" in path:"

@xela-95
Copy link
Member

xela-95 commented Nov 13, 2024

I think that this PR will also be useful to debug the CI failures on the conda-feedstock for the v0.3.1 release: conda-forge/adam-robotics-feedstock#10

Copy link
Collaborator

@Giulero Giulero left a comment

Choose a reason for hiding this comment

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

Thanks @flferretti and @xela-95! Can we merge this PR?

@flferretti
Copy link
Contributor Author

Thanks @flferretti and @xela-95! Can we merge this PR?

Yes, now it's ready for review. I added the modification mentioned in #103 (comment). Thanks!

@flferretti
Copy link
Contributor Author

@Giulero do you think it would be possible to do a minor release after this? So @xela-95 and me can work on conda-forge/adam-robotics-feedstock#10 and conda-forge/adam-robotics-feedstock#12. Thanks a lot!

@Giulero
Copy link
Collaborator

Giulero commented Nov 18, 2024

Sure! Let's merge this and release.

@Giulero Giulero merged commit 1d6666e into ami-iit:main Nov 18, 2024
9 checks passed
@Giulero
Copy link
Collaborator

Giulero commented Nov 18, 2024

Done! https://github.com/ami-iit/adam/releases/tag/v0.3.2

@flferretti flferretti deleted the patch-1 branch November 18, 2024 13:20
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