Title: Fix issues #8 and #9 by rahlk · Pull Request #10 · codellm-devkit/codeanalyzer-python · GitHub
Open Graph Title: Fix issues #8 and #9 by rahlk · Pull Request #10 · codellm-devkit/codeanalyzer-python
X Title: Fix issues #8 and #9 by rahlk · Pull Request #10 · codellm-devkit/codeanalyzer-python
Description: Summary Fix JSON output formatting and CLI testing issues in CI/CD environments This PR addresses two critical issues that were preventing proper functionality: Issue #8: Fixed TypeError when calling BaseModel.model_dump_json() with unsupported separators argument Issue #9: Fixed ANSI color codes appearing in CLI test output despite color=False setting Motivation and Context Issue #8 was causing the CLI to crash when using --format=json due to Pydantic's model_dump_json() method not supporting the separators parameter that was added in a previous PR. Issue #9 was causing test failures in CI/CD environments (particularly GitHub Actions) where Typer's CliRunner.invoke() with Rich integration was still emitting ANSI color codes despite color=False, making string assertions fail. Changes Made 🔧 Fixed JSON Output (Issue #8) Removed unsupported separators argument from BaseModel.model_dump_json() call in __main__.py Updated to use indent=None for compact JSON output instead Replaced deprecated astor.to_source() with built-in ast.unparse() for better Python 3.12+ compatibility Removed astor dependency from pyproject.toml 🎨 Fixed CLI Testing Color Issues (Issue #9) Updated test configuration to explicitly disable colors using env={"NO_COLOR": "1", "TERM": "dumb"} Enhanced test assertions to properly validate JSON output structure Improved test robustness for CI/CD environments 📊 Enhanced Testing Infrastructure Added comprehensive coverage configuration to pyproject.toml Updated test paths and coverage settings Fixed project root path calculation in test fixtures Added proper logging configuration for tests How Has This Been Tested? ✅ Verified JSON output generation works without crashes ✅ Confirmed CLI tests pass in CI environments without ANSI color code interference ✅ Validated coverage reporting functionality ✅ Tested with Python 3.12+ compatibility Breaking Changes None. All changes are backward compatible and improve existing functionality. Types of changes Bug fix (non-breaking change which fixes an issue) New feature (non-breaking change which adds functionality) Breaking change (fix or feature that would cause existing functionality to change) Documentation update Checklist I have read the Codellm-Devkit Documentation My code follows the repository's style guidelines New and existing tests pass locally I have added appropriate error handling I have added or updated documentation as needed Additional context These fixes improve the stability and reliability of the codeanalyzer tool, particularly in automated environments. The removal of the astor dependency in favor of Python's built-in ast.unparse() also reduces external dependencies while maintaining the same functionality with better Python 3.12+ support. Related Issues: Closes #8 Closes #9
Open Graph Description: Summary Fix JSON output formatting and CLI testing issues in CI/CD environments This PR addresses two critical issues that were preventing proper functionality: Issue #8: Fixed TypeError when call...
X Description: Summary Fix JSON output formatting and CLI testing issues in CI/CD environments This PR addresses two critical issues that were preventing proper functionality: Issue #8: Fixed TypeError when call...
Opengraph URL: https://github.com/codellm-devkit/codeanalyzer-python/pull/10
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:55a18711-a9d0-c022-babf-f22d24719c1b |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C814:4D22B:C6A758:10C4754:698E4585 |
| html-safe-nonce | 1b534608aac7872f051bc2315d7c67b58df4389c3c350ca2a673bce6355c19e5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDODE0OjREMjJCOkM2QTc1ODoxMEM0NzU0OjY5OEU0NTg1IiwidmlzaXRvcl9pZCI6IjE3MzE5NzA2MDc4MzcyMzQ1NjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 56c656451e46623236840db31ab71c77832c6f4ab3fde25b0ffed2c92f1057ff |
| hovercard-subject-tag | pull_request:2659401457 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/codellm-devkit/codeanalyzer-python/pull/10/files |
| twitter:image | https://avatars.githubusercontent.com/u/1433964?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1433964?s=400&v=4 |
| og:image:alt | Summary Fix JSON output formatting and CLI testing issues in CI/CD environments This PR addresses two critical issues that were preventing proper functionality: Issue #8: Fixed TypeError when call... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | a5632af64f7fed7bff1d6a428d1aca1b94fa7a48f760de2d39d9b1effdbf0082 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/codellm-devkit/codeanalyzer-python git https://github.com/codellm-devkit/codeanalyzer-python.git |
| octolytics-dimension-user_id | 197800760 |
| octolytics-dimension-user_login | codellm-devkit |
| octolytics-dimension-repository_id | 978344904 |
| octolytics-dimension-repository_nwo | codellm-devkit/codeanalyzer-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 978344904 |
| octolytics-dimension-repository_network_root_nwo | codellm-devkit/codeanalyzer-python |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3dda52e29a416820ced574e74040033b820613a2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width