Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a new ChartLibrary provider extension to support a “chart pattern similarity” endpoint and exposes it through the Technical router.
Changes:
- Introduces a new
ChartPatternSimilaritystandard model and a ChartLibrary provider fetcher/transformer. - Registers a new
pattern_similaritycommand in the Technical extension router. - Adds provider packaging metadata plus a minimal test scaffold for the new fetcher.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| openbb_platform/providers/chartlibrary/tests/test_chartlibrary_fetchers.py | Adds a basic test for the new fetcher (currently not validating output). |
| openbb_platform/providers/chartlibrary/tests/init.py | Initializes the ChartLibrary provider test package. |
| openbb_platform/providers/chartlibrary/pyproject.toml | Defines the new provider package and OpenBB extension plugin entry point. |
| openbb_platform/providers/chartlibrary/openbb_chartlibrary/models/pattern_similarity.py | Implements ChartLibrary pattern similarity query/transform logic and API call. |
| openbb_platform/providers/chartlibrary/openbb_chartlibrary/models/init.py | Initializes the models package. |
| openbb_platform/providers/chartlibrary/openbb_chartlibrary/init.py | Registers the ChartLibrary provider with OpenBB and maps the standard model to the fetcher. |
| openbb_platform/providers/chartlibrary/init.py | Initializes the provider package. |
| openbb_platform/providers/chartlibrary/README.md | Adds basic installation docs for the provider. |
| openbb_platform/extensions/technical/openbb_technical/technical_router.py | Adds a new pattern_similarity router command mapped to ChartPatternSimilarity. |
| openbb_platform/core/openbb_core/provider/standard_models/chart_pattern_similarity.py | Adds the new standard query params + data model for chart pattern similarity. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+8
to
+18
| chartlibrary_provider = Provider( | ||
| name="chartlibrary", | ||
| website="https://chartlibrary.io", | ||
| description="""ChartLibrary provides historical chart pattern similarity search | ||
| using embedding-based matches across US equities.""", | ||
| credentials=["api_key"], | ||
| fetcher_dict={ | ||
| "ChartPatternSimilarity": ChartLibraryPatternSimilarityFetcher, | ||
| }, | ||
| repr_name="ChartLibrary", | ||
| ) |
Comment on lines
+27
to
+31
| monkeypatch.setattr( | ||
| ChartLibraryPatternSimilarityFetcher, | ||
| "extract_data", | ||
| mock_extract_data, | ||
| ) |
Comment on lines
+40
to
+43
| result = ChartLibraryPatternSimilarityFetcher().test( | ||
| params, | ||
| {"chartlibrary_api_key": "MOCK_API_KEY"}, | ||
| ) |
Comment on lines
+118
to
+123
| record["rank"] = _first_available( | ||
| record, | ||
| "rank", | ||
| "similarity_rank", | ||
| "match_rank", | ||
| ) or index |
| {"chartlibrary_api_key": "MOCK_API_KEY"}, | ||
| ) | ||
|
|
||
| assert result is None |
c31c4bb to
6b155f5
Compare
6b155f5 to
6667155
Compare
Contributor
|
This is not an extension or service that is appropriate for this repository. You can build and publish any extension you like from a repository you own. |
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
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.
Withdrawn by author.