Skip to content

feat(components): add Adanos market sentiment bundle - #14155

Open
alexander-schneider wants to merge 3 commits into
langflow-ai:release-1.11.0from
adanos-software:feat/adanos-market-sentiment-bundle
Open

feat(components): add Adanos market sentiment bundle#14155
alexander-schneider wants to merge 3 commits into
langflow-ai:release-1.11.0from
adanos-software:feat/adanos-market-sentiment-bundle

Conversation

@alexander-schneider

@alexander-schneider alexander-schneider commented Jul 20, 2026

Copy link
Copy Markdown

Summary

  • adds lfx-adanos as a standalone Langflow Extension Bundle
  • provides one read-only Data component for stock and crypto asset sentiment, trending assets, and aggregate market sentiment
  • supports Reddit, X / FinTwit, News, and Polymarket for stocks; crypto sentiment uses Reddit
  • keeps the API host fixed, stores the API key as a secret input, validates symbols/date windows/limits, and sanitizes upstream errors
  • registers the bundle in the Langflow workspace and sidebar, with installation and component documentation

Why a bundle

Adanos is a self-contained external data provider, so the integration follows Langflow 1.11's standalone extension-bundle architecture. It is additive and does not alter agents, prompts, trading logic, or existing components. Because this is a new component, no legacy-flow migration entries are required.

Validation

  • uv run --package lfx-adanos --with pytest pytest src/bundles/adanos/tests -q - 21 passed
  • uvx ruff format --check src/bundles/adanos
  • uvx ruff check src/bundles/adanos
  • uv run --package lfx-adanos lfx extension validate src/bundles/adanos/src/lfx_adanos
  • uv build --package lfx-adanos
  • git diff --check
  • structured autoreview: clean, no accepted/actionable findings

All HTTP behavior is covered with mocked responses; no Adanos API key or live network request is required by the test suite.

API keys can be created at https://adanos.org/register and the API reference is at https://api.adanos.org/docs.

Summary by CodeRabbit

  • New Features

    • Added the Adanos bundle with a Market Sentiment component for stock and cryptocurrency sentiment data.
    • Supports asset sentiment, trending results, market sentiment, date ranges, and result limits.
    • Added Adanos to the bundle list and installation workflow.
  • Documentation

    • Added setup, usage, input reference, API key, and registration documentation for Adanos.
    • Added the bundle to the documentation sidebar.
  • Tests

    • Added coverage for requests, validation, authentication, and error handling.

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: acea2c31-f342-4b08-8109-32f72c886363

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

Adds the lfx-adanos extension bundle with an Adanos market sentiment component, API validation and error handling, automated tests, workspace registration, frontend discovery, and documentation.

Changes

Adanos bundle

Layer / File(s) Summary
Bundle packaging and extension registration
pyproject.toml, src/bundles/adanos/...
Defines the package metadata, workspace membership, extension registration, public exports, and bundle README.
Market sentiment request component
src/bundles/adanos/src/lfx_adanos/components/adanos/...
Adds stock and crypto sentiment operations, request construction, input validation, API calls, Data responses, status updates, and sanitized errors.
Component behavior tests
src/bundles/adanos/tests/test_adanos_market_sentiment.py
Tests metadata, schema behavior, endpoint and parameter construction, validation, API key requirements, and error sanitization.
Bundle discovery and documentation
docs/docs/Components/bundles-adanos.mdx, docs/docs/_partial-bundle-graduated-install.mdx, docs/sidebars.js, src/frontend/src/utils/styleUtils.ts
Adds the Adanos installation page, sidebar entry, provider metadata, and frontend bundle icon configuration.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Langflow
  participant AdanosMarketSentimentComponent
  participant AdanosAPI
  Langflow->>AdanosMarketSentimentComponent: provide operation and request inputs
  AdanosMarketSentimentComponent->>AdanosAPI: GET sentiment endpoint with headers and parameters
  AdanosAPI-->>AdanosMarketSentimentComponent: return JSON response
  AdanosMarketSentimentComponent-->>Langflow: return Data and update status
Loading

Possibly related PRs

Suggested labels: documentation

🚥 Pre-merge checks | ✅ 8 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (8 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding the Adanos market sentiment bundle.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Test Coverage For New Implementations ✅ Passed A named pytest module was added for the new Adanos component, and it exercises metadata, request building, validation, and error handling with mocked HTTP calls.
Test Quality And Coverage ✅ Passed PASS: Pytest tests cover success paths, validation, and sanitized error cases with fixtures/patches; no async code here needs special handling.
Test File Naming And Structure ✅ Passed New backend test file uses pytest conventions, descriptive names, fixtures, parametrization, and covers positive/negative cases; no frontend or integration test naming issues found.
Excessive Mock Usage Warning ✅ Passed Mocks are limited to external HTTP calls; core validation tests use the real component, so the suite isn’t over-mocked.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 20, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (3)
docs/docs/Components/bundles-adanos.mdx (1)

17-17: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Capitalize "Component" and "Flows".

As per coding guidelines and learnings, capitalize the word "Component" when referring to a specific Langflow Component entity (in this case, the Adanos Market Sentiment Component) and capitalize "Flows" when referring to Langflow flows.

📝 Proposed fix
-The Adanos Market Sentiment component retrieves read-only market sentiment data for use in agents, prompts, and data-processing flows. It supports individual assets, trending assets, and aggregate market sentiment.
+The Adanos Market Sentiment Component retrieves read-only market sentiment data for use in agents, prompts, and data-processing Flows. It supports individual assets, trending assets, and aggregate market sentiment.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/docs/Components/bundles-adanos.mdx` at line 17, Update the description
for the Adanos Market Sentiment component to capitalize “Component” when
referring to the Langflow entity and “Flows” when referring to Langflow flows,
without changing the surrounding meaning.

Sources: Coding guidelines, Learnings

src/bundles/adanos/tests/test_adanos_market_sentiment.py (1)

13-24: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Test coverage gap: SecretStrInput/get_secret_value() path is untested.

_secret_value (component file, Lines 101-104) branches on hasattr(value, "get_secret_value"), but every test assigns component.api_key as a plain string, so that branch — the realistic path when Langflow passes an actual SecretStr-like object — is never exercised.

✅ Suggested additional test
+def test_secret_value_unwraps_secret_str_like_object() -> None:
+    class _FakeSecret:
+        def get_secret_value(self) -> str:
+            return "unwrapped-key"
+
+    assert AdanosMarketSentimentComponent._secret_value(_FakeSecret()) == "unwrapped-key"

Based on path instructions, "verify the tests actually cover the new or changed behavior rather than acting as placeholders."

Also applies to: 148-152

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/bundles/adanos/tests/test_adanos_market_sentiment.py` around lines 13 -
24, Add coverage in the AdanosMarketSentimentComponent tests for the api_key
path where the value exposes get_secret_value(), using a SecretStr-like test
value and asserting the component uses the extracted secret. Update the shared
component fixture or add a focused test without removing existing plain-string
coverage, and ensure the related tests around _secret_value exercise both
branches.

Source: Path instructions

src/bundles/adanos/src/lfx_adanos/components/adanos/adanos_market_sentiment.py (1)

55-67: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Hide source for Crypto. source is ignored when asset_type == "Crypto" because the request path always uses /reddit/crypto/v1, so the dropdown lets users pick values that have no effect. Hide or disable the field in Crypto mode.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/bundles/adanos/src/lfx_adanos/components/adanos/adanos_market_sentiment.py`
around lines 55 - 67, The asset_type and source inputs currently allow
irrelevant source selection for Crypto. Update the component containing these
DropdownInput definitions so the source field is hidden or disabled whenever
asset_type is "Crypto", while keeping it available for Stocks and preserving the
existing stock-source options and default.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@docs/docs/Components/bundles-adanos.mdx`:
- Line 17: Update the description for the Adanos Market Sentiment component to
capitalize “Component” when referring to the Langflow entity and “Flows” when
referring to Langflow flows, without changing the surrounding meaning.

In
`@src/bundles/adanos/src/lfx_adanos/components/adanos/adanos_market_sentiment.py`:
- Around line 55-67: The asset_type and source inputs currently allow irrelevant
source selection for Crypto. Update the component containing these DropdownInput
definitions so the source field is hidden or disabled whenever asset_type is
"Crypto", while keeping it available for Stocks and preserving the existing
stock-source options and default.

In `@src/bundles/adanos/tests/test_adanos_market_sentiment.py`:
- Around line 13-24: Add coverage in the AdanosMarketSentimentComponent tests
for the api_key path where the value exposes get_secret_value(), using a
SecretStr-like test value and asserting the component uses the extracted secret.
Update the shared component fixture or add a focused test without removing
existing plain-string coverage, and ensure the related tests around
_secret_value exercise both branches.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 594df418-88cc-44a8-a191-97e506a78048

📥 Commits

Reviewing files that changed from the base of the PR and between bf7190f and f918a82.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (12)
  • docs/docs/Components/bundles-adanos.mdx
  • docs/docs/_partial-bundle-graduated-install.mdx
  • docs/sidebars.js
  • pyproject.toml
  • src/bundles/adanos/README.md
  • src/bundles/adanos/pyproject.toml
  • src/bundles/adanos/src/lfx_adanos/__init__.py
  • src/bundles/adanos/src/lfx_adanos/components/adanos/__init__.py
  • src/bundles/adanos/src/lfx_adanos/components/adanos/adanos_market_sentiment.py
  • src/bundles/adanos/src/lfx_adanos/extension.json
  • src/bundles/adanos/tests/test_adanos_market_sentiment.py
  • src/frontend/src/utils/styleUtils.ts

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 22, 2026
@alexander-schneider

Copy link
Copy Markdown
Author

Addressed the current review feedback in 5372d55059:

  • hide the stock source selector when Crypto is selected
  • add coverage for secret-value unwrapping and dynamic source visibility
  • add concise method docstrings and align Langflow terminology in the docs

Local verification: 24 passed, Ruff check passed, Ruff format check passed, and git diff --check passed. The refreshed CI is currently progressing with no failures.

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant