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

Update is_writeable() for 2 methods #4744

Merged
merged 3 commits into from
Sep 10, 2021
Merged

Update is_writeable() for 2 methods #4744

merged 3 commits into from
Sep 10, 2021

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Sep 10, 2021

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Enhanced directory write permission checking in Ultralytics YOLOv5's utility functions.

πŸ“Š Key Changes

  • πŸ› οΈ Modified the is_writeable function in utils/general.py to include two methods for checking directory write permissions.
  • ✨ Added a test parameter to the existing function to toggle between the original file creation method (method 1) and a new method using os.access (method 2).

🎯 Purpose & Impact

  • πŸ’‘ The purpose is to improve the reliability of the write permission check across different environments, including potential edge cases on Windows.
  • πŸ”’ Potential Impact: Provides users and developers with a more robust way to determine if a directory is writeable, which can prevent errors and improve the overall experience when interacting with file systems.

@glenn-jocher glenn-jocher changed the title Writeable test Update is_writeable() for 2 methods Sep 10, 2021
@glenn-jocher glenn-jocher merged commit 22ee6fb into master Sep 10, 2021
@glenn-jocher glenn-jocher deleted the test/writeable branch September 10, 2021 15:52
@glenn-jocher glenn-jocher self-assigned this Sep 10, 2021
CesarBazanAV pushed a commit to CesarBazanAV/yolov5 that referenced this pull request Sep 29, 2021
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
* Writeable test

* Fix

* Cleanup
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.

None yet

1 participant