Commit Graph

1066 Commits

Author SHA1 Message Date
shubihu
d8d5cd267a
Update abstract_graph.py
fix: Incorrect API Key Error with OpenAI Proxy
2024-06-17 16:26:33 +08:00
semantic-release-bot
44fbd71742 ci(release): 1.6.1 [skip ci]
## [1.6.1](https://github.com/VinciGit00/Scrapegraph-ai/compare/v1.6.0...v1.6.1) (2024-06-15)

### Bug Fixes

* removed duplicate from ollama dictionary ([dcd216e](dcd216e345))
2024-06-15 17:52:28 +00:00
Marco Vinciguerra
dcd216e345 fix: removed duplicate from ollama dictionary
Co-Authored-By: Matteo Vedovati <68272450+vedovati-matteo@users.noreply.github.com>
2024-06-15 19:51:20 +02:00
Marco Vinciguerra
c44b701d2d add new readmes
Some checks failed
CodeQL / Analyze (python) (push) Has been cancelled
/ build (3.10) (push) Has been cancelled
Release / Build (push) Has been cancelled
Release / Release (push) Has been cancelled
2024-06-13 11:39:57 +02:00
Marco Vinciguerra
81f89d88be
Update search_link_node.py 2024-06-10 16:14:24 +02:00
semantic-release-bot
58086eef47 ci(release): 1.6.0 [skip ci]
## [1.6.0](https://github.com/VinciGit00/Scrapegraph-ai/compare/v1.5.7...v1.6.0) (2024-06-09)

### Features

* Add tests for RobotsNode and update test setup ([dedfa2e](dedfa2eaf0))

### Test

* Enhance JSON scraping pipeline test ([d845a1b](d845a1ba7d))
2024-06-09 15:00:59 +00:00
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
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
Marco Vinciguerra
14d10117b7
Merge pull request #354 from tejhande/patch-2
Enhance tests for FetchNode with mocking
2024-06-09 15:50:27 +02:00
Marco Vinciguerra
5dc6165881 add example
Some checks failed
CodeQL / Analyze (python) (push) Has been cancelled
/ build (3.10) (push) Has been cancelled
Release / Build (push) Has been cancelled
Release / Release (push) Has been cancelled
2024-06-09 09:25:37 +02:00
Marco Vinciguerra
c78aa439af beautofy readmes
Some checks are pending
CodeQL / Analyze (python) (push) Waiting to run
/ build (3.10) (push) Waiting to run
Release / Build (push) Waiting to run
Release / Release (push) Blocked by required conditions
2024-06-08 11:20:06 +02:00
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
Marco Vinciguerra
261c4fcdf5
Merge pull request #352 from tejhande/patch-1
Some checks are pending
CodeQL / Analyze (python) (push) Waiting to run
/ build (3.10) (push) Waiting to run
Release / Build (push) Waiting to run
Release / Release (push) Blocked by required conditions
test: Enhance JSON scraping pipeline test
2024-06-07 09:55:14 +02:00
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
semantic-release-bot
c17daca409 ci(release): 1.5.7 [skip ci]
## [1.5.7](https://github.com/VinciGit00/Scrapegraph-ai/compare/v1.5.6...v1.5.7) (2024-06-06)

### Bug Fixes

* update openai tts class ([10672d6](10672d6ebb))
2024-06-06 08:02:58 +00:00
Marco Vinciguerra
10672d6ebb fix: update openai tts class 2024-06-06 10:00:58 +02:00
Marco Vinciguerra
e7af5ead59
Merge pull request #348 from tindo2003/fix_robots_node
Some checks failed
CodeQL / Analyze (python) (push) Has been cancelled
/ build (3.10) (push) Has been cancelled
Release / Build (push) Has been cancelled
Release / Release (push) Has been cancelled
2024-06-05 17:11:04 +02:00
Tin Do
d772453220 Refactor model_name attribute access in llm_model in robots_node.py
- 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.
2024-06-05 11:00:33 -04:00
Marco Vinciguerra
9ef73d7363
Merge pull request #347 from duke147/ernie
Some checks are pending
CodeQL / Analyze (python) (push) Waiting to run
/ build (3.10) (push) Waiting to run
Release / Build (push) Waiting to run
Release / Release (push) Blocked by required conditions
add the Ernie context window
2024-06-05 13:22:26 +02:00
Marco Vinciguerra
95725789ff add earnie example 2024-06-05 13:21:32 +02:00
duke147
1a404e358d Merge remote-tracking branch 'upstream/main' into ernie 2024-06-05 19:14:44 +08:00
duke147
2b2b910a37 support ernie 2024-06-05 19:02:34 +08:00
Marco Vinciguerra
2ef6d67a9e
Merge pull request #346 from duke147/ernie
support ernie
2024-06-05 12:28:43 +02:00
semantic-release-bot
49cdadf117 ci(release): 1.5.6 [skip ci]
## [1.5.6](https://github.com/VinciGit00/Scrapegraph-ai/compare/v1.5.5...v1.5.6) (2024-06-05)

### Bug Fixes

* getter ([67d83cf](67d83cff46))
2024-06-05 10:03:20 +00:00
Marco Vinciguerra
67d83cff46 fix: getter 2024-06-05 12:02:00 +02:00
duke147
4e16c9a81d support ernie 2024-06-05 17:37:35 +08:00
semantic-release-bot
36292150da ci(release): 1.5.5 [skip ci]
## [1.5.5](https://github.com/VinciGit00/Scrapegraph-ai/compare/v1.5.4...v1.5.5) (2024-06-05)

### Bug Fixes

* bug on generate_answer_node ([1d38ed1](1d38ed146a))

### Docs

* add Japanese README ([4559ab6](4559ab6db8))
* update japanese.md ([f0042a8](f0042a8e33))
* update README.md ([871e398](871e398a26))
2024-06-05 07:18:31 +00:00
Marco Vinciguerra
1d38ed146a fix: bug on generate_answer_node 2024-06-05 09:17:29 +02:00
Marco Vinciguerra
04b0352b79
Merge pull request #345 from eltociear/add-japanese-readme
docs: add Japanese README
2024-06-05 09:11:34 +02:00
Ikko Eltociear Ashimine
f0042a8e33
docs: update japanese.md 2024-06-05 16:07:18 +09:00
Ikko Eltociear Ashimine
871e398a26
docs: update README.md 2024-06-05 16:05:26 +09:00
Ikko Eltociear Ashimine
4559ab6db8 docs: add Japanese README 2024-06-05 16:04:37 +09:00
Marco Vinciguerra
28d874e4e1
Merge pull request #335 from jiangyuan-li/main
Some checks failed
CodeQL / Analyze (python) (push) Has been cancelled
/ build (3.10) (push) Has been cancelled
Release / Build (push) Has been cancelled
Release / Release (push) Has been cancelled
2024-06-04 08:56:13 +02:00
Marco Vinciguerra
3141ac8687
Merge pull request #336 from SchneeHertz/main 2024-06-04 08:54:52 +02:00
SchneeHertz
12ecc99a6c
Update chinese.md 2024-06-04 14:46:22 +08:00
SchneeHertz
89f40f12bc Update chinese.md 2024-06-04 14:38:33 +08:00
SchneeHertz
c4bf325728 Improve the Chinese Readme to synchronize with the English Readme. 2024-06-04 14:36:17 +08:00
Jiangyuan Li
8a52e138ec
Update README.md
Fix typos in translating "Chinese"
2024-06-03 17:19:47 -07:00
Marco Vinciguerra
08499c2cfb Update README.md
Some checks are pending
CodeQL / Analyze (python) (push) Waiting to run
/ build (3.10) (push) Waiting to run
Release / Build (push) Waiting to run
Release / Release (push) Blocked by required conditions
2024-06-03 15:30:15 +02:00
Marco Vinciguerra
9992f8cef2
Merge pull request #325 from seyf97/patch-2
Update requirements.txt
2024-06-02 16:16:51 +02:00
seyf97
40bc77daca
Update requirements.txt
Remove duplicate requirement "langchain-anthropic"
2024-06-02 16:49:27 +03:00
semantic-release-bot
29b79cbdf1 ci(release): 1.5.4 [skip ci]
## [1.5.4](https://github.com/VinciGit00/Scrapegraph-ai/compare/v1.5.3...v1.5.4) (2024-05-31)

### Bug Fixes

* **3.9:** python 3.9 logging fix ([8be27ba](8be27bad80))
2024-05-31 20:33:32 +00:00
Marco Perini
8be27bad80 fix(3.9): python 3.9 logging fix 2024-05-31 22:32:20 +02:00
semantic-release-bot
5619bca78e ci(release): 1.5.3 [skip ci]
## [1.5.3](https://github.com/VinciGit00/Scrapegraph-ai/compare/v1.5.2...v1.5.3) (2024-05-30)

### Bug Fixes

* typo in generate_screper_node ([c4ce361](c4ce36111f))
2024-05-30 16:51:20 +00:00
Marco Vinciguerra
c4ce36111f fix: typo in generate_screper_node 2024-05-30 18:50:04 +02:00
Marco Vinciguerra
1adcab4c95 add chinese file 2024-05-30 18:44:46 +02:00
Marco Vinciguerra
287e17afd3 Update README.md 2024-05-29 10:58:29 +02:00
Marco Vinciguerra
3b90ebd9a8 add new examples 2024-05-29 10:41:37 +02:00