-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
allignment #363
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
Closed
Closed
allignment #363
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
docs: add Japanese README
## [1.5.6](v1.5.5...v1.5.6) (2024-06-05) ### Bug Fixes * getter ([67d83cf](67d83cf))
support ernie
add the Ernie context window
- Changed the access of model_name from dictionary-style to attribute-style in llm_model to comply with langchain BaseChatModel. - Updated the conditional and split operations accordingly.
## [1.5.7](v1.5.6...v1.5.7) (2024-06-06) ### Bug Fixes * update openai tts class ([10672d6](10672d6))
This commit enhances the test suite for the JSON scraping pipeline by introducing the following improvements: - Separate configuration from the test code by loading it from a JSON file (config.json) - Use a parametrized fixture to run the test with multiple configurations automatically - Read the sample JSON file from a separate inputs directory for better organization - Add explicit assertions to verify the expected output (list of titles) - Improve test organization and separation of concerns using fixtures - Promote better coding practices and make the test suite more extensible These changes aim to improve the testability, maintainability, and flexibility of the test suite. They make it easier to manage configurations, add or modify test cases, and ensure the robustness of the scraping pipeline. The test suite now follows best practices and is better prepared for future changes and requirements.
test: Enhance JSON scraping pipeline test
This commit enhances the test suite for the FetchNode class by introducing mocking for the execute method using the unittest.mock module. Changes: - Imported the patch and MagicMock classes from unittest.mock. - Decorated each test function with @patch('scrapegraphai.nodes.FetchNode.execute') to mock the execute method. - Set the return_value of the mocked execute method to a MagicMock instance. - Added assertions to check if the mocked execute method was called with the expected state dictionary. - Updated the test functions to use the mocked execute method instead of the actual implementation. Benefits: - Improved test reliability by isolating the FetchNode class from external dependencies. - Faster test execution since external resources (e.g., URLs, files) are not required. - Better test coverage by testing the execute method's behavior with various input states. - Increased maintainability by decoupling tests from the implementation details of the execute method. The functionality of the FetchNode class remains unchanged, but the tests now use mocking to ensure the correct behavior of the execute method without relying on external resources or dependencies.
This commit enhances the test suite for the ScriptCreatorGraph class by improving code readability, adding more informative assertions, and printing the prettified execution information. Changes: - Added more descriptive docstrings for better code documentation. - Improved assertion messages to provide better debugging experience in case of failures. - Added a line to print the prettified execution information using the `prettify_exec_info` function. - Included a comment to remind developers to add additional assertions on the result or execution info if needed. - Fixed a minor typo in the configuration dictionary (`beautifulsoup` instead of `beautifoulsoup`). Benefits: - Improved code readability and maintainability with better documentation. - Enhanced debugging experience with more informative assertion messages. - Easier analysis of the ScriptCreatorGraph execution by printing the prettified execution information. - Reminder to add more assertions for comprehensive testing of the ScriptCreatorGraph. - Corrected a minor typo to ensure consistency. The test suite now provides a more user-friendly experience for developers working on the ScriptCreatorGraph class. The printed execution information will aid in debugging and understanding the graph's execution flow, while the improved assertions and documentation will make the test suite more robust and maintainable.
Enhance tests for FetchNode with mocking
- Added pytest fixture to set up the RobotsNode with the initial state. - Implemented test_robots_node to test the execution of RobotsNode. - Used unittest.mock.patch to mock the execute method, ensuring faster and more reliable tests without actual network calls. - Added assertions to verify the correctness of the result and ensure the execute method is called once with the correct arguments.
Test ScriptCreatorGraph and print execution info
feat: Add tests for RobotsNode and update test setup
## [1.6.0](v1.5.7...v1.6.0) (2024-06-09) ### Features * Add tests for RobotsNode and update test setup ([dedfa2e](dedfa2e)) ### Test * Enhance JSON scraping pipeline test ([d845a1b](d845a1b))
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.
No description provided.