Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 📦 publish openbb-congress-gov
name: 📦 publish openbb-government-us

on:
pull_request:
Expand All @@ -12,14 +12,14 @@ permissions:
jobs:
version-check:
name: Verify version bump
if: ${{ (github.event_name == 'pull_request' && github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/openbb-congress-gov-v')) || github.event_name == 'workflow_dispatch' }}
if: ${{ (github.event_name == 'pull_request' && github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/openbb-government-us-v')) || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
outputs:
version: ${{ steps.parse.outputs.version }}
defaults:
run:
shell: bash
working-directory: openbb_platform/providers/congress_gov
working-directory: openbb_platform/providers/government_us
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -40,15 +40,15 @@ jobs:
env:
VERSION: ${{ steps.parse.outputs.version }}
run: |
STATUS=$(curl -sS -o /dev/null -w "%{http_code}" "https://pypi.org/pypi/openbb-congress-gov/${VERSION}/json")
STATUS=$(curl -sS -o /dev/null -w "%{http_code}" "https://pypi.org/pypi/openbb-government-us/${VERSION}/json")
case "$STATUS" in
200)
echo "::error::openbb-congress-gov ${VERSION} is already published on PyPI."
echo "Bump openbb_platform/providers/congress_gov/pyproject.toml [project].version and re-merge a fresh release branch."
echo "::error::openbb-government-us ${VERSION} is already published on PyPI."
echo "Bump openbb_platform/providers/government_us/pyproject.toml [project].version and re-merge a fresh release branch."
exit 1
;;
404)
echo "openbb-congress-gov ${VERSION} is not yet on PyPI — proceeding."
echo "openbb-government-us ${VERSION} is not yet on PyPI — proceeding."
;;
*)
echo "::error::Unexpected status $STATUS from PyPI JSON API. Aborting to avoid a silent skip."
Expand All @@ -62,7 +62,7 @@ jobs:
VERSION: ${{ steps.parse.outputs.version }}
BRANCH: ${{ github.event.pull_request.head.ref }}
run: |
EXPECTED="release/openbb-congress-gov-v${VERSION}"
EXPECTED="release/openbb-government-us-v${VERSION}"
if [ "$BRANCH" != "$EXPECTED" ]; then
echo "::error::Release branch '${BRANCH}' does not match pyproject version '${VERSION}'."
echo "Expected branch name: '${EXPECTED}'."
Expand All @@ -78,7 +78,7 @@ jobs:
defaults:
run:
shell: bash
working-directory: openbb_platform/providers/congress_gov
working-directory: openbb_platform/providers/government_us
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -95,8 +95,8 @@ jobs:

- uses: actions/upload-artifact@v4
with:
name: openbb-congress-gov-dist
path: openbb_platform/providers/congress_gov/dist/
name: openbb-government-us-dist
path: openbb_platform/providers/government_us/dist/
if-no-files-found: error
retention-days: 7

Expand All @@ -120,7 +120,7 @@ jobs:
defaults:
run:
shell: bash
working-directory: openbb_platform/providers/congress_gov
working-directory: openbb_platform/providers/government_us
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -133,21 +133,21 @@ jobs:

- uses: actions/download-artifact@v4
with:
name: openbb-congress-gov-dist
path: openbb_platform/providers/congress_gov/dist
name: openbb-government-us-dist
path: openbb_platform/providers/government_us/dist

- run: python -m pip install --upgrade pip uv

- name: Install openbb-core (sibling) + dev tooling + the built wheel
run: |
uv pip install --system ../../core
uv pip install --system --group dev
uv pip install --system dist/openbb_congress_gov-*.whl
uv pip install --system dist/openbb_government_us-*.whl

- name: Test the installed wheel
run: |
rm -rf openbb_congress_gov
pytest tests --cov=openbb_congress_gov --cov-report=term-missing
rm -rf openbb_government_us
pytest tests --cov=openbb_government_us --cov-report=term-missing

publish:
name: Publish to PyPI
Expand All @@ -158,7 +158,7 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
name: openbb-congress-gov-dist
name: openbb-government-us-dist
path: dist

- uses: pypa/gh-action-pypi-publish@release/v1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: 🧪 test openbb-congress-gov
name: 🧪 test openbb-government-us

on:
pull_request:
branches: [develop, main, v5]
paths:
- "openbb_platform/providers/congress_gov/**"
- ".github/workflows/test-unit-openbb-congress-gov.yml"
- "openbb_platform/providers/government_us/**"
- ".github/workflows/test-unit-openbb-government-us.yml"
workflow_dispatch:

permissions:
contents: read

concurrency:
group: test-openbb-congress-gov-${{ github.event.pull_request.number || github.ref }}
group: test-openbb-government-us-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
Expand All @@ -22,7 +22,7 @@ jobs:
defaults:
run:
shell: bash
working-directory: openbb_platform/providers/congress_gov
working-directory: openbb_platform/providers/government_us
steps:
- uses: actions/checkout@v6

Expand All @@ -37,8 +37,8 @@ jobs:

- uses: actions/upload-artifact@v4
with:
name: openbb-congress-gov-dist
path: openbb_platform/providers/congress_gov/dist/
name: openbb-government-us-dist
path: openbb_platform/providers/government_us/dist/
if-no-files-found: error
retention-days: 7

Expand All @@ -49,7 +49,7 @@ jobs:
defaults:
run:
shell: bash
working-directory: openbb_platform/providers/congress_gov
working-directory: openbb_platform/providers/government_us
steps:
- uses: actions/checkout@v6

Expand All @@ -66,13 +66,13 @@ jobs:
uv pip install --system --group dev

- name: ruff check
run: ruff check openbb_congress_gov tests integration
run: ruff check openbb_government_us tests integration

- name: ruff format --check
run: ruff format --check openbb_congress_gov tests integration
run: ruff format --check openbb_government_us tests integration

- name: ty check
run: ty check openbb_congress_gov
run: ty check openbb_government_us

test:
name: Test (${{ matrix.os }} / Python ${{ matrix.python_version }})
Expand All @@ -94,7 +94,7 @@ jobs:
defaults:
run:
shell: bash
working-directory: openbb_platform/providers/congress_gov
working-directory: openbb_platform/providers/government_us
steps:
- uses: actions/checkout@v6

Expand All @@ -105,18 +105,18 @@ jobs:

- uses: actions/download-artifact@v4
with:
name: openbb-congress-gov-dist
path: openbb_platform/providers/congress_gov/dist
name: openbb-government-us-dist
path: openbb_platform/providers/government_us/dist

- run: python -m pip install --upgrade pip uv

- name: Install openbb-core (sibling) + dev tooling + the built wheel
run: |
uv pip install --system ../../core
uv pip install --system --group dev
uv pip install --system dist/openbb_congress_gov-*.whl
uv pip install --system dist/openbb_government_us-*.whl

- name: Run unit tests against the built wheel
run: |
rm -rf openbb_congress_gov
pytest tests --cov=openbb_congress_gov --cov-report=term-missing --cov-fail-under=100
rm -rf openbb_government_us
pytest tests --cov=openbb_government_us --cov-report=term-missing --cov-fail-under=100
139 changes: 0 additions & 139 deletions openbb_platform/providers/congress_gov/README.md

This file was deleted.

1 change: 0 additions & 1 deletion openbb_platform/providers/congress_gov/__init__.py

This file was deleted.

This file was deleted.

Loading
Loading