Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ScrapeGraphAI/Scrapegraph-ai
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.5.7
Choose a base ref
...
head repository: ScrapeGraphAI/Scrapegraph-ai
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.6.0
Choose a head ref
  • 11 commits
  • 10 files changed
  • 4 contributors

Commits on Jun 7, 2024

  1. test: Enhance JSON scraping pipeline test

    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.
    tejhande authored Jun 7, 2024
    Configuration menu
    Copy the full SHA
    d845a1b View commit details
    Browse the repository at this point in the history
  2. Merge pull request #352 from tejhande/patch-1

    test: Enhance JSON scraping pipeline test
    VinciGit00 authored Jun 7, 2024
    Configuration menu
    Copy the full SHA
    261c4fc View commit details
    Browse the repository at this point in the history
  3. Enhance tests for FetchNode with mocking

    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.
    tejhande authored Jun 7, 2024
    Configuration menu
    Copy the full SHA
    320f13f View commit details
    Browse the repository at this point in the history
  4. Test ScriptCreatorGraph and print execution info

    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.
    tejhande authored Jun 7, 2024
    Configuration menu
    Copy the full SHA
    ff9df81 View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2024

  1. beautofy readmes

    VinciGit00 committed Jun 8, 2024
    Configuration menu
    Copy the full SHA
    c78aa43 View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2024

  1. add example

    VinciGit00 committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    5dc6165 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #354 from tejhande/patch-2

    Enhance tests for FetchNode with mocking
    VinciGit00 authored Jun 9, 2024
    Configuration menu
    Copy the full SHA
    14d1011 View commit details
    Browse the repository at this point in the history
  3. feat: Add tests for RobotsNode and update test setup

    - 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.
    tejhande authored Jun 9, 2024
    Configuration menu
    Copy the full SHA
    dedfa2e View commit details
    Browse the repository at this point in the history
  4. Merge pull request #355 from tejhande/patch-3

    Test ScriptCreatorGraph and print execution info
    VinciGit00 authored Jun 9, 2024
    Configuration menu
    Copy the full SHA
    2781c3c View commit details
    Browse the repository at this point in the history
  5. Merge pull request #362 from tejhande/patch-4

    feat: Add tests for RobotsNode and update test setup
    VinciGit00 authored Jun 9, 2024
    Configuration menu
    Copy the full SHA
    e688480 View commit details
    Browse the repository at this point in the history
  6. ci(release): 1.6.0 [skip ci]

    ## [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))
    semantic-release-bot committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    58086ee View commit details
    Browse the repository at this point in the history
Loading