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

Added sconverting Posix to str in get_ontology #327

Merged
merged 5 commits into from
Dec 10, 2021

Conversation

francescalb
Copy link
Collaborator

Description:

get_ontology would fail if given a valid pathlib.Posix

Type of change:

  • Bug fix.
  • New feature.
  • Documentation update.

Checklist:

This checklist can be used as a help for the reviewer.

  • Is the code easy to read and understand?
  • Are comments for humans to read, not computers to disregard?
  • Does a new feature has an accompanying new test (in the CI or unit testing schemes)?
  • Has the documentation been updated as necessary?
  • Does this close the issue?
  • Is the change limited to the issue?
  • Are errors handled for all outcomes?
  • Does the new feature provide new restrictions on dependencies, and if so is this documented?

Comments:

@francescalb francescalb linked an issue Dec 10, 2021 that may be closed by this pull request
Copy link
Collaborator

@CasperWA CasperWA left a comment

Choose a reason for hiding this comment

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

Is this true only for PosixPath or can the more general pathlib.Path be used, which will "turn into" a PosixPath on a POSIX system and a Windows-specific Path on a Windows system, etc.?

Maybe one should also instead use the as_uri() instead of casting to a str?

@francescalb
Copy link
Collaborator Author

Is this true only for PosixPath or can the more general pathlib.Path be used, which will "turn into" a PosixPath on a POSIX system and a Windows-specific Path on a Windows system, etc.?

Maybe one should also instead use the as_uri() instead of casting to a str?

Good point. I ha dnot thought about windows. Indeed the whole test fails on windows already in the master ...

Copy link
Collaborator

@CasperWA CasperWA left a comment

Choose a reason for hiding this comment

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

Approved on the condition that an issue is created for the Windows-issue, which may be solved by implementing a dedicated class that incorporates pathlib.Path as well as URLs.

@francescalb francescalb merged commit 516f047 into master Dec 10, 2021
@francescalb francescalb deleted the flb/close-326-posixpath_in_get_ontology branch December 10, 2021 12:48
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.

make get_ontology accept 'PosixPath'
2 participants