feat: Add custom exceptions for structured error handling in Futag#114
Merged
feat: Add custom exceptions for structured error handling in Futag#114
Conversation
- Introduced a hierarchy of exceptions in `exceptions.py` to replace `sys.exit()` calls. - Implemented specific exceptions: `InvalidPathError`, `InvalidConfigError`, `BuildError`, `GenerationError`, and `AnalysisError`. docs: Enhance documentation for contributing and architecture - Created `CONTRIBUTING.md` with development setup, code style guidelines, and pull request process. - Added `architecture.md` detailing the three-layer architecture of Futag and data flow. feat: Implement GitHub Actions for testing and syntax checking - Added `python-tests.yml` for running tests on multiple Python versions. - Created `syntax-check.yml` for checking Python syntax across the codebase. refactor: Update template script with improved comments and structure - Enhanced comments in `template-script.py` to clarify usage patterns and parameters. test: Add unit tests for exceptions and generator functionality - Created `test_exceptions.py` to validate the exception hierarchy. - Added tests for `FuzzDataProviderGenerator` and `Fuzzer` classes in their respective test files. - Implemented tests for the `Generator` class to ensure correct type generation methods. chore: Add architecture and Python API documentation - Introduced `python-api.md` for comprehensive reference on the Futag Python API.
Collaborator
Author
|
@copilot fix errors with tests |
Contributor
…fix test_newline assertion - Replace `from distutils.dir_util import copy_tree` with `from shutil import copytree` in base_generator.py - Remove unused distutils import from generator.py - Use copytree(..., dirs_exist_ok=True) to match original copy_tree behavior - Fix test_newline in test_fuzzer.py to match actual _xml_escape implementation Co-authored-by: thientc <12711255+thientc@users.noreply.github.com>
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.
exceptions.pyto replacesys.exit()calls.InvalidPathError,InvalidConfigError,BuildError,GenerationError, andAnalysisError.docs: Enhance documentation for contributing and architecture
CONTRIBUTING.mdwith development setup, code style guidelines, and pull request process.architecture.mddetailing the three-layer architecture of Futag and data flow.feat: Implement GitHub Actions for testing and syntax checking
python-tests.ymlfor running tests on multiple Python versions.syntax-check.ymlfor checking Python syntax across the codebase.refactor: Update template script with improved comments and structure
template-script.pyto clarify usage patterns and parameters.test: Add unit tests for exceptions and generator functionality
test_exceptions.pyto validate the exception hierarchy.FuzzDataProviderGeneratorandFuzzerclasses in their respective test files.Generatorclass to ensure correct type generation methods.chore: Add architecture and Python API documentation
python-api.mdfor comprehensive reference on the Futag Python API.