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

Fix path joining bug #42

Merged
merged 2 commits into from
Feb 4, 2025
Merged

Fix path joining bug #42

merged 2 commits into from
Feb 4, 2025

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Feb 4, 2025

May resolve #34

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Enhanced file downloading utility with improved path handling and stability fixes πŸŒπŸ“.

πŸ“Š Key Changes

  • Replaced os module usage with pathlib for more robust and readable file path handling.
  • Improved filename sanitization by systematically removing/renaming problematic characters in file names.
  • Simplified logic for handling missing file extensions by using pathlib features for suffix management.
  • Overall refactoring for better code clarity and maintainability.

🎯 Purpose & Impact

  • πŸ›  Improved Reliability: Using pathlib enhances code stability and compatibility across different operating systems.
  • βœ… Cleaner File Names: Ensures downloaded files have clean and predictable names, avoiding issues caused by special characters.
  • πŸ” Better User Experience: More robust handling of file formats ensures smoother file management.
  • πŸ€“ Easier Maintenance: Cleaner and more modern code structure for future developers to work with.

May resolve #34

Signed-off-by: Glenn Jocher <[email protected]>
@UltralyticsAssistant UltralyticsAssistant added bug Something isn't working enhancement New feature or request labels Feb 4, 2025
@UltralyticsAssistant
Copy link
Member

πŸ‘‹ Hello @glenn-jocher, thank you for submitting a flickr_scraper πŸš€ PR! We appreciate your contribution and are excited to review your work. To ensure a smooth integration process, please review the following checklist:

  • βœ… Define a Purpose: Clearly explain the purpose of your fix or feature in your PR description, and link to any relevant issues. Ensure your commit messages are clear, concise, and adhere to the project's conventions.
  • βœ… Synchronize with Source: Confirm your PR is synchronized with the flickr_scraper main branch. If it's behind, update it by clicking the 'Update branch' button or by running git pull and git merge main locally.
  • βœ… Ensure CI Checks Pass: Verify that all Ultralytics Continuous Integration (CI) checks are passing. If any checks fail, please review the errors and address them before requesting a final review.
  • βœ… Update Documentation: Update relevant documentation for any new or modified functionality.
  • βœ… Add Tests: If applicable, include or update tests to validate the changes you’ve made. Run all tests to confirm they pass successfully.
  • βœ… Sign the CLA: Please confirm that you have signed the Contributor License Agreement (CLA) if this is your first contribution. You can do so by commenting "I have read the CLA Document and I sign the CLA" in this pull request.
  • βœ… Minimize Changes: Ensure your pull request includes only the necessary modifications for addressing the issue or adding the feature. "Simplicity is the ultimate sophistication." β€” Leonardo da Vinci

For additional guidance on contributing, please refer to our Contributing Guide. If you encounter any issues, don’t hesitate to leave a comment in this PR. One of our engineers will review your changes and provide additional input soon. Thank you for helping improve the flickr_scraper project! πŸ› οΈβœ¨

@glenn-jocher glenn-jocher merged commit 8dbc3ea into main Feb 4, 2025
2 checks passed
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-1 branch February 4, 2025 22:51
@UltralyticsAssistant
Copy link
Member

πŸŽ‰ Amazing work, @glenn-jocher! Your contributions continue to inspire and elevate the project. πŸš€

"Details matter, it's worth waiting to get it right." – Steve Jobs

Your enhancements to the file handling utility embody this philosophy perfectly. The switch to pathlib, improved filename sanitization, and overall refactoring add not only robustness but also a touch of elegance to the codebase. These changes will make a tangible difference for users and future developers alike. 🌟

Thank you for your dedication and craftsmanship – it’s innovations like this that keep us moving forward! πŸ™Œ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

python flickr_scraper.py --search 'honeybees on flowers' --n 10 --download
2 participants