Version 0.8.2 - #84
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR enhances cross-platform compatibility and test reliability by improving file handling, normalizing line endings, and adding comprehensive CI/CD testing across Ubuntu, macOS, and Windows.
Key Changes:
- Refactored file copying logic to normalize line endings to LF and handle binary files more robustly
- Added GitHub Actions workflow for automated cross-platform testing
- Fixed null pointer handling in cache staleness checking
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| setup.py | Bumped version from 0.8.1 to 0.8.2 |
| lib/distman/init.py | Updated version number to 0.8.2 |
| lib/distman/util.py | Refactored copy_file function to normalize line endings, handle UTF-8/binary files, and improve symlink preservation |
| lib/distman/logger.py | Changed log level from error to debug when log file creation fails |
| lib/distman/cache.py | Added null check for dst_epoch to prevent TypeError |
| dist.json | Removed unused formatting pipeline configuration |
| tests/test_util.py | Added Path-based comparisons for cross-platform compatibility and improved symlink tests with Windows extended path prefix handling |
| tests/test_dist.py | Updated tests to use Path comparisons and fixed temp file handling to properly close files before use |
| .github/workflows/tests.yml | Added CI/CD workflow for testing on Ubuntu, macOS, and Windows |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several improvements for cross-platform compatibility, reliability, and test consistency in the
distmanproject. The most significant changes are enhanced file copying logic to normalize line endings and handle symlinks robustly, adjustments to tests to usePathobjects for platform-independent comparisons, and the addition of a GitHub Actions workflow for automated testing across multiple operating systems.Cross-platform file handling and reliability:
copy_filefunction inlib/distman/util.pyto normalize line endings to LF, handle UTF-8/binary files more robustly, and preserve symlinks and file modes, reducing issues when distributing files between Windows and Linux.copy_directoryandcopy_objectto clarify parameter usage and improve reliability. [1] [2]Testing and platform consistency:
tests/test_dist.pyandtests/test_util.pyto usePathobjects for file path comparisons, ensuring correctness across different operating systems. Also improved symlink tests to resolve targets properly on Windows. [1] [2] [3] [4] [5] [6] [7].github/workflows/tests.yml) to run tests automatically on Ubuntu, macOS, and Windows, increasing CI coverage and reliability.Other improvements:
0.8.1to0.8.2insetup.pyandlib/distman/__init__.pyto reflect these changes. [1] [2]lib/distman/logger.pyto uselog.debuginstead oflog.errorwhen failing to create a log file, reducing unnecessary error noise.dist.jsonfor simplicity.print_stalenessto check for missing destination epoch files.