Commit Graph

6 Commits

Author SHA1 Message Date
Danglewood
6ca062bf86 [V5] openbb-platform-api: Refactor for V5 Spec, Config, Packaging, Test Coverage (#7494)
* stash some changes

* add more robust testing

* mypy

* point PR at V5

* introduce spec file

* codespell

* test fix

* fix workflow environment setup

* fix workflow environment setup

* fix workflow environment setup

* add pyyaml to dependencies

* split lint jobs

* fix workflow environment setup

* fix workflow environment setup

* workflow env setup

* workflow env setup

* clean up code comments

* add auth hook entrypoints

* codespell

* add codegen feature

* codespell

* move _unpack into dispatchers for consistency with codegen packages

* surface nested models in the response

* fix missing coverage in CI

* socrata updates

* test fix

* detect plotly output

* add --include and --exclude flags from generate-extension command

* refactor openbb-platform-api for V5 operations and spec file handling

* delete poetry.lock

* add test workflow

* add temp branch id for test workflow

* add httpx to dev dependencies

* add a conftest.py

* tweak conftest

* tweak conftest

* python 3.10 issues

* more python 3.10

* more python 3.10

* more python 3.10

* more python 3.10

* fix url template resolution

* multi-spec support

* fix a windows path issue

* cap test matrix at python 3.14

* no 3.15 runners for platform-api

* no useless comments

* platform controller command description split

* merge URL overloads from path params

* exclude none and unset from model dump

* markdown lint

* ignore get/post endpoints that are return SSE

* fix remaining fastapi 0.137 fallout

---------

Co-authored-by: deeleeramone <>
Co-authored-by: Copilot <copilot@github.com>
2026-06-20 20:23:23 -07:00
John Seong
e6a3879e98 feat(platform): add membership groups to Country type (#7352)
* feat(platform): add membership groups to Country type

Add membership groups (G7, G20, EU, NATO, OECD, OPEC, BRICS) to the Country
type, as suggested by maintainer in PR #7333.

Changes:
- Updated country_data.json with 'groups' field for each country
- Added Country.groups property returning list of group memberships
- Added Country.is_member_of(group) method for membership checks
- Added comprehensive tests for group functionality

This enables filtering and analysis by economic/political groupings:
  c = Country('Germany')
  c.groups        # ['G7', 'G20', 'EU', 'NATO', 'OECD']
  c.is_member_of('EU')  # True

Follow-up to #7333

* fix(platform): add Indonesia to BRICS (joined Jan 2025)

* refactor(platform): use TypedDict for country data typing

- Replace dict[str, Any] with CountryData TypedDict for proper type inference
- Add official data sources to module docstring
- Add _sources metadata section to country_data.json with references

Sources:
- G7: g7italy.it
- G20: g20.org
- EU: european-union.europa.eu
- NATO: nato.int
- OECD: oecd.org
- OPEC: opec.org
- BRICS: brics-russia2024.ru

* fix(platform): update group membership reference URLs

Replace broken/inaccessible URLs with stable Wikipedia references:
- G7, G20, OECD, OPEC, BRICS → Wikipedia (stable, well-maintained)
- EU, NATO → Updated to current official URLs

* feat: add developer script to regenerate country_data.json from sources

* fix: resolve codespell lint errors in update_country_data.py

* fix: resolve black/ruff lint issues in update_country_data.py

* feat(core): normalize unicode country names for ASCII input matching

* fix(core): remove Angola from OPEC and Bangladesh from NATO

Angola withdrew from OPEC effective Jan 2024. The OPEC scraper falls
back to a hardcoded list which still included AO — removed it.

Bangladesh was incorrectly scraped as a NATO member due to the scraper
iterating all wikitables on the page. Now filters tables by their
nearest h2 section header to only process member state tables.

* fix(core): normalize country names to ASCII in update script

Strip diacritical marks at generation time so country_data.json
uses ASCII-only names (e.g., Turkiye, Curacao, Cote d'Ivoire).

* Update openbb_platform/core/openbb_core/provider/utils/update_country_data.py

Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>

* fix imports

* fix: resolve mypy type narrowing for expected counts

* restore reference.json

---------

Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>
2026-02-25 19:16:36 +00:00
Danglewood
d3537dd155 [Feature] Add Support For Python 3.14 (#7349)
* add support for Python 3.14

* escape % in argparse_translator in help strings

* black

* cli python version string

* fix test param placeholder

* fix integration_tests_testers

* add 3.14 to ODP Desktop environment creation choices

* partial lock update

* update lock files

* and the rest of the locks

---------

Co-authored-by: deeleeramone <>
2026-02-18 00:40:18 +00:00
Danglewood
92fa4c85f6 [[BugFix] Fix Depends Type Change in Lastest FastAPI Version (#7258)
* fix for Depends type change in lastest FastAPI version

* lint

* fix differences in docstrings between methods

* use {'arbitrary_types_allowed': True} instead of dict

* fix missing new line before examples section in model endpoints
2025-11-01 18:48:44 +00:00
Danglewood
327d9f222b [Feature] Remove Static Assets For Distribution (#7212)
* remove static assets for distribution

* don't need that conftest file

* comment cleanup

* fix yaml
2025-09-09 17:05:33 +00:00
Danglewood
a6e9128128 [Feature] Support Python 3.13 (#7193)
* stash pyproject.toml

* update pyproject.toml files

* update devtools pyproject

* don't pass None to pytest.warns()

* moves openbb into the core folder and change reference links

* more directory references

* static assets built with 3-9

* fix test

* need 'assets' in reference loader path

* fix reference path

* congress gov lock
2025-09-08 17:46:38 +00:00