Introduces a helper to ensure the archive path shown in CLI output matches the final file created, mirroring the extension logic from core.py. This improves user clarity by displaying the correct archive filename before and after creation.
Introduced _move_file_cross_platform to handle file moves across drives, especially on Windows where rename may fail. Updated archive extraction logic to use this utility, ensuring robust file operations during extraction and conflict resolution.
Refactored error handling, added default behaviors for unknown resolutions, and improved documentation for unsupported modes. Enhanced memory efficiency and compatibility in archive operations, streamlined extraction logic, and validated compression levels more effectively.
Updated compression level validation to use a fallback max level if the zstandard constant is unavailable. Added checks to ensure paths are not None before file operations in the extract_archive function, improving robustness and preventing potential errors.
Enhanced error handling and validation in TzstArchive methods, including better checks for file object initialization and compressed stream creation. Updated compression level validation to use dynamic max level from zstd library. Simplified and clarified comments and error messages for unsupported modes and extraction operations.
Updated the Sphinx configuration to set 'includehidden' to False and revised the documentation index to streamline content. Removed the '--interactive' option from CLI commands 'extract' and 'extract_flat' as it is no longer supported.
Modified the CI workflow to correctly specify the path to the main script for PyInstaller builds. Added a new standalone entry point in src/main.py to serve as the executable script for tzst.
Updated the `extract_archive` function to handle string-based conflict resolution by converting it to an enum. Added fallback to `ConflictResolution.REPLACE` for invalid values, ensuring safer and more predictable behavior.
- Removed outdated tests for missing lines in core.py.
- Added comprehensive tests for conflict resolution functionality, including various resolution strategies and edge cases.
- Improved error handling tests for archive creation and extraction processes.
- Enhanced unit tests for basic functionality and convenience functions with pytest markers.
- Introduced tests for unique filename generation and conflict handling scenarios.
- Added edge case tests for archive extraction and error conditions to improve overall test coverage.
Introduced `_validate_command_in_argv` to check for invalid commands in CLI arguments. Updated compression level validation to include the new `-c` flag. Adjusted tests to reflect changes in error handling, ensuring argparse error codes are maintained for invalid inputs.
Enhanced the TzstArchive class with improved error handling for cleanup and file addition operations. Introduced a new extractall method with filtering options for secure extraction. Updated tests to reflect changes in extraction behavior and error handling.
Added handling for KeyboardInterrupt in `cmd_list` and `cmd_test` functions to gracefully terminate operations and return exit code 130 when interrupted by the user.
Introduced type casting with `Literal` in CLI extraction commands to ensure stricter type safety for filter arguments. Updated extraction logic in `core.py` to differentiate parameters for `extract` and `extractall` methods, improving compatibility and handling of attributes during extraction.
Revised the project description in pyproject.toml and the module docstring in src/tzst/__init__.py to reflect the library's focus on modern archive management and Zstandard compression.
Introduced `_is_extreme_compression_level_in_argv` to detect extreme compression levels (>=1000) and updated `_handle_parsing_errors` to return exit code 1 for such cases. Adjusted related tests to validate the new behavior and fixed inconsistencies in test assertions for compression level and filter validation.
Introduced a `cmd_version` function to handle the `--version` flag, replacing the previous implementation that used `argparse`'s `action='version'`. Updated the argument parser and command execution logic to support the new version handling.
- Created detailed YAML templates for various issue types to streamline user submissions and improve issue tracking.
- Added a comprehensive pull request template to guide contributors in providing necessary information.
- Developed a contributing guide to outline project setup, contribution types, testing procedures, and code style guidelines.
Updated `_create_archive_impl` to handle current directory archiving more robustly, including resolving paths, excluding temporary files, and ensuring the archive file itself is excluded. Added comprehensive tests to verify behavior for edge cases and temporary file exclusion patterns.
Introduced a '--version' argument in the CLI to display version information. Updated test cases to reflect changes in compression level validation and error codes. Adjusted special character handling in test_core.py and added integration test markers in pyproject.toml.
Refactored the archive creation workflow in `cli.py` to improve modularity and error handling. Added helper functions for file validation, argument parsing, and exception handling. Removed `test_fixes.py` as it is no longer relevant to the updated CLI structure.
Enhanced error handling in `cli.py` for invalid compression levels, filters, and file path issues. Added `test_fixes.py` to verify CLI behavior, including tests for help output, invalid arguments, and edge cases.
Updated the `validate_compression_level` function to suppress exception chaining when raising `argparse.ArgumentTypeError`. This improves error clarity by removing unnecessary context from the original `ValueError`.
Introduced a `validate_compression_level` function to ensure compression levels are within the valid range (1-22). Updated CLI argument parsing to use this validation and added tests to verify valid, invalid, and non-numeric compression levels.
Resolves a critical bug in non-atomic archive creation where relative
archive paths failed when the working directory changed during operation.
The fix converts archive paths to absolute before changing directories.
Consolidates duplicate CLI and security tests into comprehensive test
suites to eliminate redundancy and improve maintainability. Adds
extensive edge case coverage including platform-specific features,
Unicode handling, and performance scenarios.
Updates version to 1.0.1 and ensures proper exit code propagation
in the main entry point for better script integration.
Updated `_create_archive_impl` to handle the current directory (".") more effectively by adding its contents without the "./" prefix. Also normalized path separators and improved handling of relative paths in the archive.
Updated the CLI help text in `cli.py` to remove unnecessary line breaks for better readability and consistency in the command reference and argument descriptions.
Extracted verbose and simple archive listing logic into separate helper functions `_print_verbose_listing` and `_print_simple_listing` to improve code readability and maintainability in `cmd_list`.
Updated `pyproject.toml` to include additional Ruff configuration options and improved linting rules. Enhanced docstrings in `cli.py` and `core.py` with `See Also` references for better code navigation and understanding.
Updated the CI workflow to use 'ruff format' instead of 'black' for format checks. Enhanced docstrings across CLI commands and exception classes for better clarity and documentation. Adjusted pyproject.toml to remove 'black' from dev dependencies and added new files to sdist include list.
Updated error messages in `cli.py` for consistency and clarity by replacing colons with dashes. Removed compatibility fix for Python 3.14 in `core.py` as it is no longer needed.
Updated the zstandard dependency version in pyproject.toml to allow versions starting from 0.23.0. Removed a compatibility fix for Python 3.14 in src/tzst/__init__.py as it is no longer needed.
Updated the zstandard dependency to version 0.23.1 in README.md and pyproject.toml. Added a compatibility fix in src/tzst/core.py for Python 3.14 due to the removal of ByteString from the typing module.