-
Notifications
You must be signed in to change notification settings - Fork 13
Restructure, modernize project structure and CI workflows #253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Introduces general coding standards and a detailed Makefile-based workflow for Python projects using Poetry. Removes the old makefile-workflow rules in favor of more comprehensive and language-agnostic documentation.
Renamed all test files from ssllabsscan/tests/ to tests/ to simplify the project structure. No functional changes were made to the test code.
Added CODEOWNERS, CODE_OF_CONDUCT.md, CONTRIBUTING.md, and SECURITY.md to establish project governance, contribution guidelines, and security policies. Removed _config.yml, indicating the project no longer uses the Jekyll theme configuration.
Introduces GitHub issue templates for bug reports and feature requests, and updates the config for issue templates. Refactors and renames the main CI workflow to 'ci.yml', adds concurrency controls, and improves linting and testing steps. Adds a Snyk security workflow, updates the secrets scan workflow, and improves the stale issues workflow. Cleans up .gitignore and .dockerignore, and simplifies YAML linting configuration.
Refactored the Makefile for improved clarity, modularity, and expanded development workflows, including new targets for linting, formatting, and pre-commit checks. Updated the README with clearer installation, usage, and development instructions, added badges, and improved project documentation. Updated LICENSE copyright years. Added Black and related dev dependencies to pyproject.toml and poetry.lock. Updated test files to align with new structure and workflows.
Bump version to 4.1.0 and update CHANGELOG with new features and improvements. Refactor code for style consistency, improve formatting, and enhance test coverage. Update Makefile to lint and format both source and test directories. Move and clean up test files, modernize code style, and improve docstrings and comments throughout the codebase.
Expanded test coverage in test_main.py and test_ssllabs_client.py to include exception handling in main process, argument parsing, main entry point, and SSLLabsClient retry logic for API rate limits and error statuses. Also added tests for CSV summary skipping, debug and status message printing, and error handling scenarios.
Added details about 15 new unit tests that improve code coverage from 83% to 91%, covering exception handling, CLI parsing, API retry logic, error status handling, endpoint filtering, print message variants, and requests_get implementation.
|
⏳ Code review in progress. Analyzing for code quality issues and best practices. Detailed findings will be posted upon completion. Using Amazon Q Developer for GitHubAmazon Q Developer1 is an AI-powered assistant that integrates directly into your GitHub workflow, enhancing your development process with intelligent features for code development, review, and transformation. Slash Commands
FeaturesAgentic Chat Code Review CustomizationYou can create project-specific rules for Amazon Q Developer to follow:
Example rule: FeedbackTo provide feedback on Amazon Q Developer, create an issue in the Amazon Q Developer public repository. For more detailed information, visit the Amazon Q for GitHub documentation. Footnotes
|
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #253 +/- ##
===========================================
+ Coverage 83.43% 96.22% +12.79%
===========================================
Files 4 4
Lines 163 159 -4
===========================================
+ Hits 136 153 +17
+ Misses 27 6 -21 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent Modernization Effort! 🚀
This is a comprehensive and well-executed modernization of the project structure and CI workflows. The changes demonstrate strong engineering practices and attention to detail.
✅ Highlights
- Modern Python tooling: Great addition of Black formatter and improved Makefile targets
- Enhanced CI/CD: Improved workflows with concurrency control and better organization
- Community health: Excellent addition of CODE_OF_CONDUCT.md, CONTRIBUTING.md, SECURITY.md, and issue templates
- Dependency cleanup: Smart removal of redundant dependencies and proper Poetry configuration
- Test structure: Moving tests to root-level
tests/directory follows Python best practices - Docker improvements: Better layer caching and two-phase installation approach
🔧 Key Issues to Address
- Missing coverage dependency in pyproject.toml - this could cause test failures
- Security vulnerability in Snyk workflow using
@masterinstead of pinned version - Hardcoded Python path in Dockerfile that will break with version changes
📊 Impact Assessment
- Code coverage: Improved from 83% to 91% with 15 new unit tests
- Developer experience: Significantly enhanced with modern Makefile targets and clear documentation
- Security posture: Strengthened with multiple scanning tools and proper community health files
- Maintainability: Much improved with standardized tooling and clear contribution guidelines
The changes are well-structured and maintain backward compatibility while modernizing the development workflow. Once the identified issues are addressed, this will be an excellent foundation for future development.
Recommendation: Approve after addressing the critical issues mentioned in the review comments.
…g sanitization Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Improves readability of the regex assertion in test_ssl_labs_client_print_msg_failed_and_skipped by splitting it across multiple lines.
Added
setup-init,format-python,lint-python,pre-commitChanged
ssllabsscan/tests/to root-leveltests/directory (Python best practice)build-and-test.ymltoci.ymlfor consistencymockpackage to built-inunittest.mockRemoved
ssllabsscan/tests/directory (moved to root)