-
Notifications
You must be signed in to change notification settings - Fork 189
Fix/cross platform path handling 944 #970
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
base: main
Are you sure you want to change the base?
Fix/cross platform path handling 944 #970
Conversation
🔧 **Core Fixes** - Replace os.path.join() with join_paths() in docs/conf.py and test files - Remove os.path.dirname() usage from libp2p/utils/paths.py - Fix hard-coded Windows paths in test files - Update test patterns to use proper cross-platform path handling 🚀 **CI/CD Enhancements** - Add path audit to pre-commit hooks for early detection - Create dedicated CI workflow (.github/workflows/path-audit.yml) - Fail CI on high-priority path issues (P0/P1) - Test across Python 3.10, 3.11, 3.12 📚 **Documentation Updates** - Add comprehensive 'Cross-Platform Path Handling' section to contributing.rst - Include best practices, examples, and migration guidelines - Document audit script usage and requirements 📊 **Results** - Reduced total path issues from 968 to 957 - Eliminated all P0 (high-priority) temp_hardcode issues - Significantly reduced P1 (medium-priority) issues - Established automated validation to prevent future issues ✅ **Benefits** - Cross-platform compatibility across Windows, macOS, Linux - Automated validation prevents regression - Clear developer guidance and examples - Centralized path utilities reduce inconsistencies Fixes libp2p#944
@SuchitraSwain Currently fixing the pubusb test suite failure on this one. |
… with fewer hosts
@SuchitraSwain I've fixed the |
@yashksaini-coder : Appreciate the efforts. Re-run the CI/CD pipeline. Lets try and have a proper pytest-trio implementation here. I also realize that there are couple of other important test cases that need to be addressed here too. CCing @acul71 for his feedback and pointers too. Hi Luca: we might have to address important test case scenarios before we head towards final review on this PR. Would like you to collaborate here. @yashksaini-coder did fix gossipsub and pubsub CI/CD issues recently too. |
@yashksaini-coder The PR is progressing well. I just wanted to highlight that some commits related to flood publishing (e.g., this commit) are included in this PR. Could you please rebase the PR on the latest main branch and fix the CI/CD issues? |
… comments in migration suggestions
Yes I've refactored the code, and performed all tests |
@yashksaini-coder : Awesome, great to hear. Re-ran the CI/CD pipeline. Waiting for the test results. |
@seetadev Requesting another run again, fixed the timeout issue for the |
@yashksaini-coder : Definitely, Yash :) Appreciate the efforts. |
What was wrong?
Issue #944
How was it fixed?
Summary of approach.
To-Do
Cute Animal Picture