Skip to content

feat: Add custom exceptions for structured error handling in Futag#114

Merged
thientc merged 4 commits intomainfrom
113-documentation-for-python-package
Mar 19, 2026
Merged

feat: Add custom exceptions for structured error handling in Futag#114
thientc merged 4 commits intomainfrom
113-documentation-for-python-package

Conversation

@thientc
Copy link
Copy Markdown
Collaborator

@thientc thientc commented Mar 19, 2026

  • 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.

- 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.
@thientc thientc linked an issue Mar 19, 2026 that may be closed by this pull request
@thientc
Copy link
Copy Markdown
Collaborator Author

thientc commented Mar 19, 2026

@copilot fix errors with tests

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 19, 2026

@thientc I've opened a new pull request, #115, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits March 19, 2026 10:44
…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>
@thientc thientc merged commit 334b5b8 into main Mar 19, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation for python package

2 participants