-
Notifications
You must be signed in to change notification settings - Fork 0
Feature: Modernize Project, Add Dynamic Ruleset Injection & README Tests #1
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
Merged
Conversation
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
- Created .coveragerc for coverage reporting configuration - Added .editorconfig for consistent coding styles - Introduced .flake8 for linting configuration - Set up CI workflow in .github/workflows/ci.yml - Updated .gitignore to exclude additional files - Configured pre-commit hooks in .pre-commit-config.yaml - Added Sphinx documentation configuration in docs/conf.py and docs/index.rst - Created example scripts in examples/ directory - Implemented unit tests for core functionality and examples - Defined development and core dependencies in requirements files
…arity and consistency
- Introduced dynamic ruleset injection in StatefulEntity for flexible behavior. - Added example demonstrating configurable bot behavior with different rulesets. - Updated run.py to include the new dynamic behavior example. - Enhanced unit tests to cover dynamic ruleset features and ensure proper functionality.
…ints to __init_subclass__ methods
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
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.
This pull request merges a comprehensive set of enhancements into
master, significantly modernizing thepureshellproject's development environment, improving code quality, and introducing key new features.Key Highlights:
Dynamic Ruleset Injection:
StatefulEntitynow supports the injection of aRulesetinstance at instantiation time. This allows for more flexible and dynamic behaviors, such as implementing the Strategy pattern or using mock rulesets for testing.PureShellMethodhas been updated to prioritize instance-level rulesets if provided.examples/dynamic_behavior_example.py, demonstrates this new capability.Development Environment & Tooling Overhaul:
pytestfor testing,flake8for linting,blackfor code formatting,isortfor import sorting,mypyfor static type checking, andcoverage.pyfor test coverage analysis.pre-commithooks to automate code quality checks (linting, formatting, type checking) before each commit, ensuring consistency and catching issues early.requirements.txtandrequirements-dev.txt..vscode/extensions.json) and settings (.vscode/settings.json) for an improved development experience.Enhanced Testing Framework:
tests/test_readme_examples.py) that usesmarkdown-it-pyto parse theREADME.md. This test extracts all Python code blocks under their respective headings and executes them, ensuring that all documented examples are correct and functional.Continuous Integration (CI):
.github/workflows/ci.yml) that automatically runs linters, formatters, type checkers, and executes the full test suite (including coverage reporting) on every push and pull request tomaster.Code Quality & Organization:
blackandisort. Allflake8andmypyissues have been resolved.examplespackage and are now run viaexamples/run.py.README.mdhas been significantly updated to reflect the new features, improve installation instructions, and enhance clarity.Verification:
pytestunit tests, including the new README example validation, pass.This series of changes aims to make the
pureshellproject more robust, maintainable, developer-friendly, and feature-rich.