fix field definition, remove gropu3 from app and remove skip in fetcher test because source works (#7201)

This commit is contained in:
Danglewood
2025-09-04 20:11:05 -07:00
committed by GitHub
parent 353f7caf1d
commit dae8d32b19
4 changed files with 4 additions and 26 deletions

View File

@@ -966,13 +966,6 @@ def main():
"nasdaq_historical_dividends",
],
},
{
"name": "Group 3",
"type": "endpointParam",
"paramName": "document_url",
"defaultValue": "AAPL",
"widgetIds": ["nasdaq_ipo_calendar", "nasdaq_company_filings"],
},
],
}

View File

@@ -41,10 +41,6 @@ class NasdaqCompanyFilingsQueryParams(CompanyFilingsQueryParams):
"""Nasdaq Company Filings Query Parameters."""
__json_schema_extra__ = {
"form_group": {
"multiple_items_allowed": False,
"choices": list(form_groups),
},
"year": {
"x-widget_config": {
"options": sorted(
@@ -71,10 +67,10 @@ class NasdaqCompanyFilingsQueryParams(CompanyFilingsQueryParams):
year: Optional[int] = Field(
description=(
"Calendar year of the data, default is current year."
" The earliest year available is 1994, for all companies and form types."
+ " The earliest year available is 1994, for all companies and form types."
),
default=None,
gte=1994,
ge=1994,
)
form_group: FormGroups = Field(
default="8k",
@@ -186,7 +182,7 @@ class NasdaqCompanyFilingsFetcher(
if response.status_code != 200:
raise OpenBBError(
f"Error fetching data from Nasdaq: {response.status} - {response.reason}"
f"Error fetching data from Nasdaq: {response.status_code} - {response.reason}"
)
data = response.json().get("data", {})
rows = data.get("rows", [])
@@ -204,7 +200,7 @@ class NasdaqCompanyFilingsFetcher(
response = session.get(url=next_url, headers=headers, timeout=10)
if response.status_code != 200:
raise OpenBBError(
f"Error fetching data from Nasdaq: {response.status} - {response.reason}"
f"Error fetching data from Nasdaq: {response.status_code} - {response.reason}"
)
next_data = response.json().get("data", {})
new_rows = next_data.get("rows", [])

View File

@@ -247,16 +247,6 @@
"nasdaq_dividends_calendar",
"nasdaq_historical_dividends"
]
},
{
"name": "Group 3",
"type": "endpointParam",
"paramName": "document_url",
"defaultValue": "AAPL",
"widgetIds": [
"nasdaq_ipo_calendar",
"nasdaq_company_filings"
]
}
]
}

View File

@@ -45,7 +45,6 @@ def test_nasdaq_equity_search_fetcher(credentials=test_credentials):
assert result is None
@pytest.mark.skip("This function is currently not working at the source.")
@pytest.mark.record_http
def test_nasdaq_economic_calendar_fetcher(credentials=test_credentials):
"""Test the Nasdaq Economic Calendar fetcher."""