From 9bbc49675d4b0c2dd9c476e70bcf582fea261691 Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Sun, 5 Jul 2026 15:21:16 -0700 Subject: [PATCH] consolidate lint job --- .github/workflows/lint-openbb-platform.yml | 32 ++++--------------- .../openbb_technical/technical_views.py | 13 +++++--- 2 files changed, 15 insertions(+), 30 deletions(-) diff --git a/.github/workflows/lint-openbb-platform.yml b/.github/workflows/lint-openbb-platform.yml index 779c5b6888e..7ee93772ad1 100644 --- a/.github/workflows/lint-openbb-platform.yml +++ b/.github/workflows/lint-openbb-platform.yml @@ -8,6 +8,10 @@ on: types: [opened, synchronize, edited] paths: - 'openbb_platform/**' + - '!openbb_platform/api/**' + - '!openbb_platform/extensions/**' + - '!openbb_platform/providers/**' + - '!openbb_platform/obbject_extensions/**' - '.github/workflows/lint-openbb-platform.yml' merge_group: types: [checks_requested] @@ -45,8 +49,9 @@ jobs: - name: Get changed files in openbb_platform for PR if: github.event_name == 'pull_request' run: | - # "Checking PR diff" - echo "diff_files=$(git diff --diff-filter=d --name-only origin/${{ github.base_ref }}...${HEAD_REF} | grep -E '^openbb_platform/.*\.py$' | grep -v 'openbb_platform/core/openbb/package' | grep -v 'integration' | grep -v 'tests' | xargs)" >> $GITHUB_ENV + # Limit this workflow to shared platform surfaces; extension/provider + # modules have dedicated unit+lint workflows. + echo "diff_files=$(git diff --diff-filter=d --name-only origin/${{ github.base_ref }}...${HEAD_REF} | grep -E '^openbb_platform/.*\.py$' | grep -v '^openbb_platform/api/' | grep -v '^openbb_platform/extensions/' | grep -v '^openbb_platform/providers/' | grep -v '^openbb_platform/obbject_extensions/' | grep -v 'openbb_platform/core/openbb/package' | grep -v 'integration' | grep -v 'tests' | xargs)" >> $GITHUB_ENV echo $diff_files env: @@ -64,29 +69,6 @@ jobs: python -m pip install --upgrade pip uv uv pip install --system -e ./openbb_platform/extensions/devtools - - name: Install changed packages (so ty resolves their declared deps) - if: env.diff_files != '' - run: | - # Install each touched package so ty has the package's declared - # third-party deps (pandas-ta, scipy, statsmodels, etc.) available - # for type resolution. Optional cross-package peers (e.g. - # openbb_charting) that aren't installed surface as `warn`-level - # diagnostics under the package ty.toml rather than build errors. - touched=$(echo "${{ env.diff_files }}" | tr ' ' '\n' \ - | grep -oE '^(openbb_platform/(extensions|providers|obbject_extensions)|cli)/[^/]+' \ - | sort -u) - for pkg in $touched; do - if [ -f "$pkg/pyproject.toml" ]; then - echo "Installing $pkg" - if [ "$pkg" = "cli" ]; then - uv pip install --system -e "./$pkg[charting]" - continue - fi - - uv pip install --system -e "./$pkg" - fi - done - - name: Install openbb-core editable (resident, single identity for ty) run: | # Install core last and editable so the in-tree source is the resident diff --git a/openbb_platform/extensions/technical/openbb_technical/technical_views.py b/openbb_platform/extensions/technical/openbb_technical/technical_views.py index a37138469e4..2047f0579ee 100644 --- a/openbb_platform/extensions/technical/openbb_technical/technical_views.py +++ b/openbb_platform/extensions/technical/openbb_technical/technical_views.py @@ -349,11 +349,14 @@ class TechnicalViews: show_tails = kwargs.get("show_tails") show_tails = True if show_tails is None else show_tails tail_periods = int(kwargs["tail_periods"]) if "tail_periods" in kwargs else 16 - tail_interval_input = kwargs.get("tail_interval", "week") - if tail_interval_input not in ("day", "week", "month"): - tail_interval: Literal["day", "week", "month"] = "week" - else: - tail_interval = cast(Literal["day", "week", "month"], tail_interval_input) + tail_interval = cast( + Literal["day", "week", "month"], + { + "day": "day", + "week": "week", + "month": "month", + }.get(str(kwargs.get("tail_interval", "week")), "week"), + ) date = kwargs.get("date") if "date" in kwargs else None show_tails = False if date is not None else show_tails if ratios_df.empty or momentum_df.empty: