Commit Graph

88 Commits

Author SHA1 Message Date
Marco Vinciguerra
c382b9d126
Merge pull request #630 from ScrapeGraphAI/595-rate-limit-error
feat(AbstractGraph): add adjustable rate limit
2024-09-06 15:03:10 +02:00
Federico Aguzzi
2859fb72d6 feat(AbstractGraph): add adjustable rate limit 2024-09-05 16:31:33 +02:00
Federico Aguzzi
63a5d18486 fix(AbstractGraph): Bedrock init issues
Closes #633
2024-09-05 10:20:20 +02:00
Marco Vinciguerra
81af62d35f
Merge pull request #622 from LorenzoPaleari/pre/beta
ScrapeGraphAI/580-OmniScraperGraph-fix
2024-09-02 15:13:07 +02:00
Lorenzo Paleari
57337a0a8c
fix: Removed link_urls and img_ulrs from FetchNode output 2024-09-02 12:53:40 +02:00
Federico Aguzzi
398b2c556f fix(Ollama): instance model from correct package 2024-09-02 12:28:36 +02:00
smith peng
553527a269 fix: fix pydantic object copy 2024-09-01 16:42:48 +08:00
smith peng
71b22d4880 feat: add deepcopy error 2024-08-31 17:55:14 +08:00
smith peng
36818b1fb3 feat:adjust uncopiable obj raise error and remove memo 2024-08-31 17:39:33 +08:00
smith peng
4f4d091b82 feat:add deepcopy tool 2024-08-31 11:30:20 +08:00
Federico Aguzzi
f7a85c266a fix(models): better DeepSeek and OneApi integration 2024-08-28 12:51:50 +02:00
Federico Aguzzi
4f120e29c5 fix(AbstractGraph): model selection bug 2024-08-28 12:36:03 +02:00
Marco Vinciguerra
cf73883451 fix: bug for abstract graph 2024-08-27 18:05:34 +02:00
Federico Aguzzi
229d74d4bd test(AbstractGraph): add AbstractGraph tests 2024-08-27 13:46:42 +02:00
Marco Vinciguerra
5eb3cff64f feat: refactoring of the code 2024-08-18 20:53:35 +02:00
Marco Vinciguerra
9098725adf Delete scrape_plain_text_llama3.1_test.py 2024-08-17 14:17:32 +02:00
Marco Vinciguerra
cec5537f2a add new tests
Some checks are pending
/ build (push) Waiting to run
Release / Build (push) Waiting to run
Release / Release (push) Blocked by required conditions
Co-Authored-By: Matteo Vedovati <68272450+vedovati-matteo@users.noreply.github.com>
2024-08-11 17:10:55 +02:00
Marco Vinciguerra
1db164e9e6 feat: fix tests 2024-07-30 16:12:31 +02:00
Marco Vinciguerra
602dd00209 feat: refactoring_to_md function 2024-07-16 12:39:48 +02:00
Marco Vinciguerra
da0b744443 add test 2024-07-15 20:46:22 +02:00
Marco Vinciguerra
ba782a6af9 add compatibility for versions 2024-07-04 21:04:47 +02:00
Federico Aguzzi
104d8692d6
Merge branch 'pre/beta' into support
Some checks failed
/ build (push) Has been cancelled
2024-07-04 18:36:34 +02:00
Federico Aguzzi
720f18729b Merge branch 'fireworks_integration' into support 2024-07-04 18:17:38 +02:00
Marco Vinciguerra
4b56604413 add examples + test
Some checks failed
/ build (3.10) (push) Has been cancelled
2024-06-25 10:32:29 +02:00
Marco Vinciguerra
3a537eec6f fix: add test 2024-06-23 17:54:09 +02:00
Marco Vinciguerra
cf9a3d1a2f add test 2024-06-21 14:42:54 +02:00
Marco Vinciguerra
aa2160c108 feat: add research with bing + test function
Some checks failed
/ build (3.10) (push) Has been cancelled
2024-06-18 21:28:29 +02:00
Marco Vinciguerra
073d226723 feat: add new search engine avaiability and new tests 2024-06-18 14:35:13 +02:00
Marco Vinciguerra
6a753f2803 add smart_scraper_openai_test 2024-06-17 11:17:08 +02:00
Marco Vinciguerra
2419003999 fix: fix robot node
Some checks are pending
/ build (3.10) (push) Waiting to run
Release / Build (push) Waiting to run
Release / Release (push) Blocked by required conditions
2024-06-16 14:04:36 +02:00
Marco Vinciguerra
c31706fdae fixed tests
Some checks are pending
/ build (3.10) (push) Waiting to run
Release / Build (push) Waiting to run
Release / Release (push) Blocked by required conditions
Co-Authored-By: Matteo Vedovati <68272450+vedovati-matteo@users.noreply.github.com>
2024-06-15 20:41:26 +02:00
Marco Vinciguerra
7a34562d50 refactoring of merging answers nodes 2024-06-13 21:41:54 +02:00
Marco Vinciguerra
49c7e0eaab fix: test for fetch node 2024-06-13 11:04:59 +02:00
iamgodot
17dd936af7 test: fix tests for fetch node with proper mock&refactor 2024-06-12 22:45:43 -07:00
Tejas Amol Hande
40747c3e01
Merge branch 'main' into main 2024-06-10 13:36:44 +05:30
Tejas Amol Hande
c927145bd0
feat: Add tests for SmartScraperGraph using sample text and configuration fixtures (@tejhande)
- Added pytest fixture to provide sample text from a file.
- Added pytest fixture to provide graph configuration.
- Implemented test_scraping_pipeline to test the execution of SmartScraperGraph.
- Added assertions to verify the result is not None and to check the expected structure of the result.

Contributed by @tejhande
2024-06-10 13:33:05 +05:30
Tejas Amol Hande
c286b1649e
feat: Add tests for SmartScraperGraph using sample text and configuration fixtures (@tejhande)
- Added pytest fixture to provide sample text from a file.
- Added pytest fixture to provide graph configuration.
- Implemented test_scraping_pipeline to test the execution of SmartScraperGraph.
- Added assertions to verify the result is not None and to check the expected structure of the result.

Contributed by @tejhande
2024-06-10 13:27:31 +05:30
Tejas Amol Hande
08f1be682b
feat: Add tests for SmartScraperGraph using sample text and configuration fixtures (@tejhande)
- Added pytest fixture to provide sample text from a file.
- Added pytest fixture to provide graph configuration.
- Implemented test_scraping_pipeline to test the execution of SmartScraperGraph.
- Added assertions to verify the result is not None and to check the expected structure of the result.

Contributed by @your-github-username
2024-06-10 13:25:10 +05:30
Tejas Amol Hande
b0511aeaaa
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.
2024-06-10 13:21:56 +05:30
Marco Vinciguerra
e688480771
Merge pull request #362 from tejhande/patch-4
feat: Add tests for RobotsNode and update test setup
2024-06-09 16:59:50 +02:00
Marco Vinciguerra
2781c3c46b
Merge pull request #355 from tejhande/patch-3
Test ScriptCreatorGraph and print execution info
2024-06-09 16:57:36 +02:00
tejhande
13f8ca56b2 "Refactor SearchLinkNode test: simplify setup, add patching for execute method, and enhance assertions" 2024-06-09 19:48:33 +05:30
Tejas Amol Hande
dedfa2eaf0
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.
2024-06-09 19:39:11 +05:30
Tejas Amol Hande
ff9df81e60
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.
2024-06-07 23:17:58 +05:30
Tejas Amol Hande
320f13fa89
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.
2024-06-07 23:11:32 +05:30
Tejas Amol Hande
d845a1ba7d
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.
2024-06-07 13:00:54 +05:30
duke147
4e16c9a81d support ernie 2024-06-05 17:37:35 +08:00
Marco Vinciguerra
b913b51cca Merge branch 'logger-integration' into pre/beta 2024-05-24 12:39:14 +02:00
Marco Vinciguerra
3453f72397 add graph 2024-05-17 18:23:50 +02:00
VinciGit00
a4700bfc75 add robot node 2024-05-15 12:00:32 +02:00