Commit Graph
53 Commits
Author SHA1 Message Date
xixu-me ed4ac6c9fb Add issue templates for feature requests, performance issues, platform-specific issues, questions, and security vulnerabilities
- 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.
2025-06-02 00:25:49 +08:00
xixu-me 0216fcc128 Update README with enhanced library description
Revised the README to include a more detailed and professional description of the **tzst** library, highlighting its features, performance, and compatibility with Python 3.12+.
2025-06-01 23:41:21 +08:00
xixu-me 8cfc1308d6 Merge pull request #4 from xixu-me/alert-autofix-2
Potential fix for code scanning alert no. 2: Workflow does not contain permissions
2025-06-01 23:23:53 +08:00
xixu-meandCopilot Autofix powered by AI 8e41740e0f Potential fix for code scanning alert no. 2: Workflow does not contain permissions
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-06-01 23:22:21 +08:00
xixu-me 4b59c6cad5 Merge pull request #3 from xixu-me/dependabot/github_actions/stefanzweifel/git-auto-commit-action-5
Bump stefanzweifel/git-auto-commit-action from 4 to 5
2025-06-01 23:20:03 +08:00
xixu-me 17c530ef21 Fix current directory archiving logic
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.
2025-06-01 23:19:09 +08:00
xixu-me 3d99d7a6db Add Codecov integration and update CI workflow
Introduced a .codecov.yml file to configure Codecov settings, updated the CI workflow to include Codecov token and slug, added a Codecov badge to README.md, and adjusted coverage options in pyproject.toml for improved reporting.
2025-06-01 20:03:53 +08:00
xixu-me d2095bb7b4 Fix path in no_atomic extraction test
Updated the test to correctly reference the extracted file path in the 'test_no_atomic_extracted' scenario, ensuring the test checks the correct file location.
2025-06-01 19:07:14 +08:00
xixu-me ec04f2935e Add tests for invalid compression levels
Introduced a new test case to verify that invalid compression levels return proper error codes. Minor formatting adjustments were also made to improve code readability.
2025-06-01 18:49:35 +08:00
xixu-me 22dc90259b Add version argument and update tests
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.
2025-06-01 18:37:27 +08:00
xixu-me 97243e6a27 Refactor CLI archive creation logic
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.
2025-06-01 17:45:59 +08:00
xixu-me dc12d122c4 Improve CLI error handling and add tests
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.
2025-06-01 17:28:59 +08:00
xixu-me 6693713143 Fix exception chaining in compression validation
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`.
2025-06-01 17:06:47 +08:00
xixu-me 459b695af0 Add compression level validation to CLI
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.
2025-06-01 17:01:27 +08:00
xixu-me 2a3ccefb21 Refactor CLI tests to use unpacking for file lists
Updated test cases in `test_cli.py` and `test_platform_specific.py` to use argument unpacking (`*files`) for file lists passed to the `main` function. This improves readability and consistency across test cases.
2025-06-01 15:13:56 +08:00
xixu-me acd9ced29e Fixes critical path resolution bug and consolidates tests
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.
2025-06-01 14:57:31 +08:00
dependabot[bot] 47a515536f Bump stefanzweifel/git-auto-commit-action from 4 to 5
Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 4 to 5.
- [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases)
- [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: stefanzweifel/git-auto-commit-action
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-01 04:22:31 +00:00
xixu-me 79d204fc92 Merge pull request #2 from xixu-me/dependabot/github_actions/codecov/codecov-action-5
Bump codecov/codecov-action from 3 to 5
2025-06-01 11:51:58 +08:00
xixu-me 07ea3092e0 Improve archive creation for current directory
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.
2025-06-01 03:26:21 +08:00
xixu-me 003ade93d3 Remove line breaks in CLI help text
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.
2025-06-01 02:34:36 +08:00
xixu-me 7deb6f335d Bump version to 1.0.0
Updated the library version from 0.4.0 to 1.0.0 in __init__.py to reflect a major release.
v1.0.0
2025-06-01 02:20:31 +08:00
xixu-me 48fb66a957 Update README with --no-atomic option
Added documentation for the '--no-atomic' option in the 'create' command, including its usage and a note that it is not recommended. This improves clarity for users regarding atomic file operations.
2025-06-01 01:02:44 +08:00
xixu-me 841b8973bd Update CI script to use GITHUB_OUTPUT
Modified the CI workflow to write the version output to the GITHUB_OUTPUT file instead of using the deprecated 'set-output' command. Added 'os' module import to support this change.
2025-06-01 00:55:16 +08:00
xixu-me 40eae4df14 Refactor archive listing logic
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`.
2025-06-01 00:45:27 +08:00
xixu-me f2d8e6ad03 Refactor CLI command argument handling in tests
Updated test cases to use unpacking syntax (*file_paths) for passing file paths to CLI commands. This improves readability and ensures consistent argument handling across all test scenarios.
2025-06-01 00:37:25 +08:00
xixu-me afc20b794c Enhance documentation and update config
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.
2025-06-01 00:27:54 +08:00
xixu-me 6cc8f28175 Refactor CLI and update CI workflow
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.
2025-05-31 22:49:41 +08:00
xixu-me 4a0ff4c500 Refine error messages and remove Python 3.14 fix
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.
2025-05-31 18:48:02 +08:00
xixu-me 9b411a3f28 Update zstandard dependency version
Lowered the minimum required version of the zstandard dependency from 0.23.0 to 0.19.0 in pyproject.toml to improve compatibility.
2025-05-31 17:43:06 +08:00
xixu-me af2659facf Update Python version support and dependencies
Removed support for Python 3.14 pre-release across CI workflows, README, and pyproject.toml. Updated zstandard dependency version in README and adjusted Ruff target version to Python 3.12.
2025-05-31 17:22:03 +08:00
xixu-me bca4bfaea8 Update dependencies and remove compatibility fix
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.
2025-05-31 17:15:19 +08:00
xixu-me adee9dbdd5 Update zstandard dependency and add Python 3.14 fix
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.
2025-05-31 17:10:45 +08:00
xixu-me e6af81c3ac Fix Python 3.14 compatibility issue
Removed unnecessary version check and simplified compatibility fix for Python 3.14 by directly importing ByteString from collections.abc and assigning it to typing.ByteString.
2025-05-31 16:59:01 +08:00
xixu-me 7c36b7ac34 Update zstandard dependency and add Python 3.14 fix
Updated the zstandard dependency to version 0.23.0 in README.md and pyproject.toml. Added a compatibility fix in src/tzst/__init__.py for Python 3.14 due to the removal of ByteString from typing.
2025-05-31 16:54:01 +08:00
xixu-me aa39f7641d Add support for Python 3.14
Updated CI workflows to include Python 3.14 with pre-release support. Modified README and pyproject.toml to reflect compatibility with Python 3.14. Adjusted ruff target version to Python 3.14.
2025-05-31 16:41:15 +08:00
xixu-me c53637aaf7 Add strict mode to zip iteration in tests
Updated tests in `test_core.py` to use the `strict=True` parameter in `zip` for better error handling when iterating over buffered and streaming contents. This ensures mismatched lengths are caught during testing.
2025-05-31 15:53:56 +08:00
dependabot[bot] 8c7f5e8673 Bump codecov/codecov-action from 3 to 5
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-31 07:49:12 +00:00
xixu-me 6b57409712 Update Python version support to 3.12+
This commit updates the CI configuration, pyproject.toml, and codebase to drop support for Python versions below 3.12 and add support for Python 3.13. Type hints are updated to use modern syntax, and redundant checks for extraction filter support are removed as Python 3.12+ always supports filters.
2025-05-31 15:48:13 +08:00
xixu-me 5de5036bba Remove backward compatibility for Python < 3.12
Dropped custom extraction filter implementations and related exception classes for older Python versions in `core.py`. Updated README to reflect the new minimum Python version requirement (3.12) and removed outdated support section.
2025-05-31 01:39:56 +08:00
xixu-me 4e155d0e05 Refactor test argument order in CLI security tests
Reordered arguments in the test_filter_with_other_options method for better readability and consistency. This change improves clarity in the test setup.
2025-05-31 01:01:24 +08:00
xixu-me e81ac01161 Add security filters for archive extraction
Introduced security filters for extracting `.tzst` archives, including backward compatibility for Python < 3.12. Updated README with documentation on filter usage and added implementation for 'data', 'tar', and 'fully_trusted' filters in `core.py`. Bumped version to 0.4.0 in `__init__.py`.
2025-05-31 00:51:18 +08:00
xixu-me 4c4235ee87 Add security filters for archive extraction
Introduced security filters ('data', 'tar', 'fully_trusted') to enhance safety during archive extraction. Updated CLI commands, core extraction logic, and added comprehensive tests to ensure proper handling of filters and security warnings.
2025-05-31 00:12:39 +08:00
xixu-me 1fb4782009 Add streaming and no-atomic options to CLI
Updated the CLI to support a `--streaming` option for memory-efficient operations and a `--no-atomic` option to disable atomic file operations. Adjusted related functions to handle these new arguments and updated the documentation accordingly. Also bumped the library version to 0.3.1.
2025-05-30 15:52:00 +08:00
xixu-me 34263a2265 Update project status to stable in pyproject.toml
Changed the 'Development Status' classifier from 'Beta' to 'Production/Stable' to reflect the project's maturity.
2025-05-30 15:02:39 +08:00
xixu-me 9c4cf715d4 Update README with streaming mode details
Enhanced the README to include detailed information about streaming mode for large archives, atomic file operations, and improved error handling. Added examples, CLI options, and Python API usage for memory-efficient processing and recovery mechanisms.
2025-05-30 14:47:52 +08:00
xixu-me 521a6858fb Add streaming mode and atomic operations
Introduced streaming mode for memory-efficient handling of large archives and added atomic file operations for reliable archive creation. Updated CLI commands, core functionality, and tests to support these features. Improved error handling and documentation for append mode and compression level validation.
2025-05-30 14:22:07 +08:00
xixu-me 56b427caba Update issue templates 2025-05-30 13:30:06 +08:00
xixu-me 4d6efc4402 Update issue templates 2025-05-30 13:18:21 +08:00
xixu-me 12fe2a8d5e Add funding info and update workflows
Added a FUNDING.yml file to specify sponsorship details. Updated the CI workflow to include a new job for updating badges and improved PyPI version handling. Modified README badges and CLI to include a banner print function and adjusted version display.
2025-05-30 12:01:34 +08:00
xixu-me c26273fd79 Update README.md 2025-05-29 22:31:21 +08:00