Releases: atellaluca/ImportSpy
ImportSpy 0.1.11: Enhanced Validation and Error Clarity
Release Notes for ImportSpy 0.1.11
What's New in Version 0.1.11
Enhancements
-
Improved Error Messages for Validation:
- Enhanced error messages for class methods, attributes, and superclass mismatches to provide clearer, more actionable feedback during validation.
- Added specific error messages for missing and mismatched functions, classes, attributes, and environment variables.
-
Modular Validation Refactoring:
- Refactored the
is_subset
function for better modularity:- Introduced helper functions
list_compare
anddict_compare
to simplify validation logic and improve code readability.
- Introduced helper functions
- Refactored the
How to Upgrade
Update to the latest version using pip:
pip install --upgrade importspy
ImportSpy 0.1.10 - Feature Enhancements and Improvements 🚀
What's New in Version 0.1.10
🔥 New Features:
- Environment Variable Support:
- You can now define
env_vars
as a dictionary inSpyModel
, enabling validation of required environment variables and their values. - Example:
env_vars: dict = { "CI": "true", "DATA_PATH": "/data/" }
- You can now define
🔧 Improvements:
- Enhanced Variables Validation:
- Variables are now represented as a dictionary in
SpyModel
(variables: dict
), allowing developers to validate both the names and the expected values of module-level variables. - Example:
variables: dict = { "default_timeout": "30", "max_connections": "100" }
- Variables are now represented as a dictionary in
name
Field in Classes Now Mandatory:- The
name
field inClassModel
is now required, ensuring clarity and consistency in class validation.
- The
How to Update:
- Update your package:
pip install --upgrade importspy
Proactive Validation Enhancements and CI Integration
What's New in Version 0.1.9
- Proactive Validation Enhancements: Enhanced the
is_subset
function to raise descriptiveValueErrors
for each validation failure, improving the clarity and maintainability of error handling. - Documentation Updates: Updated all documentation to reflect changes in code and added examples on how to handle new validation exceptions.
Continuous Integration Improvements
- Python Package Testing Workflow: Introduced a new GitHub Actions workflow to automate the testing process, ensuring that each push or pull request to the 'main' branch triggers a series of actions that validate the codebase across different environments and Python versions.
- Setup steps for Python environment and dependencies using Poetry.
- Code linting with flake8 to enforce coding standards and identify issues early.
- Automated tests with pytest to verify that new changes do not break existing functionalities.
- Documentation build using Sphinx to keep the project documentation up to date.
Documentation and README Updates
- Enhanced Documentation: Updated the documentation and README files to better reflect the current functionalities and how to implement the module within other projects.
- Workflow Integration: Detailed the inclusion of a new GitHub Actions workflow that automates testing across multiple Python versions (3.9, 3.10, 3.11, 3.12) to ensure compatibility and reliability.
- Example Code Added: New example codes and usage scenarios have been added to the documentation to assist users in understanding how to use the validation features effectively.
Other Improvements
- Simplified File Path Extraction: Refactored string handling to ensure compatibility with Python versions 3.9 to 3.11, making the codebase more future-proof.
Improvements
- Improved error message clarity in the validation process.
We encourage all users to update to this latest version to benefit from these improvements.
v0.1.8
This release introduces the following changes:
Features:
- Added support for class and instance attributes in SpyModel and ClassModel.
- Implemented
extract_variables
to retrieve variables from modules. - Enhanced
extract_classes
to extract class attributes, instance attributes, methods, and superclasses.
Documentation:
- Updated
README.rst
to reflect the new validation capabilities, including examples of variable, class, and instance attribute validation.
Version:
- Version bump to
0.1.8
.
Code Refactoring and Documentation Enhancements
ersion v0.1.7 brings significant improvements and optimizations to ImportSpy, including code restructuring, documentation enhancements, and new usage examples to streamline the adoption of the package.
Key Highlights
-
Documentation Improvements:
- The README has been converted to
.rst
format for better compatibility with Sphinx. - New usage examples have been added to demonstrate how to use ImportSpy in modular systems and plugin-based architectures.
- Documentation has been updated to version 0.1.7, including enhanced API references for better understanding.
- The README has been converted to
-
Code Refactoring:
- Code has been reorganized to improve readability and maintainability.
- Docstrings have been enhanced to adhere to Python and Sphinx standards, making it easier to automatically generate documentation.
- Removed outdated examples and migrated the README to
.rst
format.
-
New Import Validation Example:
- A complete new example demonstrates how ImportSpy can enforce rules on modules importing your code.
- This example includes both rule definitions in
developer_code.py
and the implementation of those rules inimporting_module.py
.
How to Upgrade
To upgrade to the latest version of ImportSpy, run the following command:
pip install --upgrade importspy
ImportSpy v0.1.6: Pydantic-Powered Validation
ImportSpy v0.1.6
This release introduces significant improvements to ImportSpy:
- SpyModel with Pydantic: Enhanced validation using Pydantic for structured module metadata (filenames, versions, functions, classes).
- Refactored Module Utilities: Improved clarity and reorganization of utilities for module inspection and validation.
- PluginSpy Enhancements: Added functionality for better plugin and extension management.
- Comprehensive Tests: Expanded test coverage, including new validations and logging improvements.
- Documentation Updates: Improved examples, docstrings, and integration documentation.
This update focuses on better validation, clearer utilities, and enhanced testing.
ImportSpy v0.1.5: Documentation Improvement Release
ImportSpy v0.1.5
This release focuses on improving the documentation for ImportSpy:
- Enhanced the initial description in README to provide a more comprehensive overview of ImportSpy's core features, including dynamic imports, plugin isolation, validation, and proactive integration.
- Updated the example.rst documentation to better reflect ImportSpy's capabilities in managing plugin-based architectures and ensuring modularity and security.
- These changes improve overall clarity and better communicate ImportSpy's strengths to developers.
No major code changes in this release, primarily focused on documentation updates.
Version 0.1.4 - First English Release
We are excited to announce the release of ImportSpy version 0.1.4, marking the first official English release of the tool. ImportSpy is designed to help developers easily track and analyze Python imports in their projects, providing detailed insights into module dependencies and performance impact.
Key Features in v0.1.4:
- Enhanced Import Analysis: Provides deeper insights into your Python module imports, with improved accuracy and reporting.
- Performance Improvements: Optimized tracking mechanisms for faster and more efficient module inspection.
- Bug Fixes: Resolved various minor bugs to ensure a smoother experience.
- Extended Compatibility: Improved compatibility with different Python environments and module structures.
This release is a major step towards making ImportSpy more accessible to an international audience, and we are continuously working to improve its features and capabilities. We welcome feedback from the community to help make the tool even better.
Feel free to explore, contribute, or open issues if you encounter any problems.