mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-13 12:51:49 +00:00
* [Feature] OpenBB V5: Initial `openbb-core` Refactor (#7482)
* initial refactor
* ruff does not dictate style
* unresolved imports in test action
* fix general linting
* resolve pandas imports for actions run
* httpx in test workflow
* pytest-asyncio in test workflow
* pandas.Index(...)
* max version for windows CI is 3.14
* remove temp refactor files that shouldn't have been committed:
* use ruff format instead of black
* formatting and typing
* tab space helper
* test fixtures..
* ty check
* also run integration test in CI
* remove that annoying labeler action
* [V5] `openbb-core`: 100% Test Coverage (#7484)
* increase test coverage to exercise 100% of the testable code path in openbb-core
* model_fields syntax cleanup
* set the environment variable for CI runs
* run codeql on v5 branch
* more CI env setup
* cleanup redundant files
* ruff
* dedupe workflow trigger
* some windows coverage missing
* ubuntu integration test job
* more windows coverage
* test_reference_generator
* test_docstring_generator
* remove line no references from test function docstrings
* clean useless comments from test files
* fix polars type check
* fix test_obbject
* fix test_obbject
* package builder fixes
* charting pyproject version
* fix docstring generator for nested models
* missing coverage
* [V5] `openbb-core`: Add Backwards-Compatible Layered Config System (openbb.toml) (#7492)
* add backwards-compatible layered config system
* fix path reference in windows test
* need python version-aware handling in docstring generator
* update for deprecated pydantic syntax
* ruff UP007
* test_system_settings
* remove v4 platform workflow
* [V5] Refactor `openbb-oecd` for full SDMX 2 API Exposure and V5 Packaging (#7413)
* 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
* merge branch develop
* table builder, integration tests, and more
* linting
* merge branch develop
* bit of cleanup
* some more updates, cleanup, and apps.json
* codespell
* black
* integration test params and linting
* mypy
* pylint
* black
* more pylint
* recapture teest cassettes
* black again
* more linting
* table presentation choices
* black
* fix merge conflict
* split up metadata module and reformat cache to use msgpack
* mypy
* regenerate lock file
* use json and include dependencies to make openbb-oecd a standalone install
* pylint
* more linting
* serve metadata as dependency instead of assign and initialize
* fix integration_tests_testers to not count dependency injections as paramters
* add assets to git ignore
* ruff
* v5 refactor and publish workflow
* test coverage and ty fixes
* codespell
* update lock file
* workflow setup
* ty check
* workflow setup
* Scope PR to OECD changes only
Restore non-OECD files in the diff against v5 to their v5 state. The
branch was originally created off feature/cli-2 and inherited 186 files
of unrelated changes (cli, agent_server, mcp_server, platform_api,
core/, .github/workflows/* not oecd). Those have nothing to do with the
openbb-oecd v5 refactor and were polluting the PR diff.
* scope cleanup: include leaked v5-resident files (general-linting workflow, platform_api test fixtures)
---------
Co-authored-by: deeleeramone <>
Co-authored-by: Copilot <copilot@github.com>
* fix docstring generator and body param unwrapping
* project ty.toml file
* unpack POST parameters from params: Model
* remove comment chatter
* [V5] `openbb-oecd`: Rename `oecd_utils` as `oecd` (#7509)
* rename oecd_utils to oecd and populate all models there when openbb-economy is not installed
* linting
* bump dependencies
* fix test drift
* linter
* FieldInfo import
* [V5] `openbb-imf`: Refactor for V5 (#7508)
* refactor imf extension for V5
* codespell
* fix some python 3.10 items
* return self on copy of metadata object
* [V5] `openbb-news`: Refactor News for V5 and Add Configurable RSS Endpoint (#7507)
* refactor news for v5 and add rss endpoint
* remove poetry.lock
---------
Co-authored-by: deeleeramone <>
* [V5] `openbb-quantitative`: Refactor for V5 (#7506)
* refactor quantitative for v5
* add factors endpoint and add a few charts
---------
Co-authored-by: deeleeramone <>
* [V5] `openbb-technical`: Refactor for V5 & Add More Quick Win Endpoints (#7502)
* refactor openbb-technical for v5
* forward refs
* linting
* no python 3.15 in test matrix
* reame
* ty
* move all params to body
---------
Co-authored-by: deeleeramone <>
* remove stockgrid provider (#7486)
* [V5] remove wsj provider and related code (#7485)
* remove wsj provider and related code
* purge from metadata
* actions
* actions
* openbb-core publish workflow
* delete biztoc (#7523)
* [V5] Remove `openbb-alpha-vantage` (#7522)
* delete alpha vantage
* more files
---------
Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
* [V5] Remove `openbb-benzinga` (#7521)
* delete benzinga
* more references
---------
Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
* [V5] `openbb-bls`: Refactor for V5 + Add Many Endpoints (#7518)
* refactor bls for v5, add 100 widgets
* some CI fixes
* no python 3.15
* fix missing dev group in pyproject.toml
* more pyproject fallout
* action
* refactor econometrics for v5 (#7505)
Co-authored-by: deeleeramone <>
* [V5] `openbb-famafrench`: Refactor for V5 (#7503)
* refactor famafrench for v5
* codespell
* finishing touches
---------
Co-authored-by: deeleeramone <>
* [V5] CLI 2.0 - Pluggable Backends, Non-TTY Default, HTTP Dispatcher, Spec Files + Codegen (#7433)
* 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
* cap test matrix at python 3.14
* no useless comments
* platform controller command description split
* merge URL overloads from path params
* exclude none and unset from model dump
---------
Co-authored-by: deeleeramone <>
Co-authored-by: Copilot <copilot@github.com>
* general-linting
* downgrade aiohttp in devtools for vcrpy
* some ty items and add requests-types stubs for ty in devtools
* markdown linting
* remove integration tests from extensions that were moved into the famafrench provider
* [V5] `openbb-congress-gov`: Refactor for V5 + Convert To Using Bulk Files Instead of `api.congress.gov`. (#7528)
* refactor congress-gov for v5 and use bulk files instead of API with credentials
* integration tests
* apps tab name
* convert caching to sql
* codespell
* [V5] [BugFix] Fix for Breaking Changes in FastAPI 0.137+ (#7537)
* fix route introspection for fastapi 0.137
* recapture oeccd gdp forecast test cassette
---------
Co-authored-by: deeleeramone <>
* [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>
* add full support for AsyncIterator response type for streaming output (#7530)
* [V5] Refactor Shared Pass Through Router Extensions For Hatchling (#7524)
* refactor shared pass-through routers for hatchling and ruff + ty
* add publish workflows
* [V5] `openbb-charting`: Refactor for V5 and Decouple (#7545)
* refactor charting for v5 patterns and decouple entirely
* coveragerc
* lint and tests
* fix tests
* configure dev group with openbb-technical
* ty
* fix cli test
* remove 3.15 from test matrix - dependencies are unstable
---------
Co-authored-by: deeleeramone <>
* fix merge widgets
* workflow cleanup"
* fixes for ty
* fogot that file
* general lint setup
* consolidate lint job
* remove seeking alpha provider (#7570)
* remove tradier provider (#7573)
* remove tiingo provider (#7574)
* remove intrinio provider (#7575)
Remove the openbb-intrinio provider extension from the repository.
Reason: proprietary vendor with no internal access to any endpoint;
cannot build, develop or maintain.
* remove yfinance provider from repo (#7576)
* fix(cli): resolve modular OpenAPI references (#7586)
Fixes #7585
* [V5] `openbb-cli`: Modular OpenAPI Refs (#7589)
* follow up to #7585
* add another codegen test
* unused ty ignore
* Update generated tests to get python parameter names instead of raw API-provider parameter names. (#7597)
* Update the record-vs-envelope heuristic in the payload processing code to not treat a record that happens to have a list datatype as an entire envelope. (#7598)
* Update class generation code to handle empty data that php-style serialization emits as []. (#7599)
* fix ty check failures exposed by newer version
* add drugs.com and brutalist as news rss feeds (#7602)
Co-authored-by: deeleeramone <>
* codespell
* missing test coverage that appeared in famafrench..
* plotly 7 handling for mapbox namespace change
* remove finviz (#7577)
* remove trading economics provider (#7578)
* remove openbb-multpl from repository (#7610)
* add httpx2 to devtools for starlette test client
* restore test coverage to 100% in openbb_core
* remove fmp provider extension from repository (#7665)
* unpin ruff
* fix charting conftest and missing coverage in 3.10
* add charting coverage
* fix new ty issues
* fix tag grouping in swagger docs
* [V5] `openbb-ecb`: Refactor for V5 and Expand Coverage (#7560)
* refactor openbb-ecb for v5 and expand coverage
* some updates
* tests
* workflow
* remove 3.15 from test matrix
* some more table schema updates
* remove some html chrome on embedded articles
---------
Co-authored-by: deeleeramone <>
* [V5] `openbb-federal-reserve`: Refactor for V5 + FFIEC & Regional Fed Routers (#7561)
* refactor for v5
* add workflows
* fix bhcpr schema
* fix pyproject.toml
* fix test
* codespell
* ty
* fix pyproject
* fix ci environment
* fix ci environment
* convert documents endpoints to use fedinprint service
* codeql fix
* fix ny publications and add ny nowcast
* [V5] `openbb-eia`: Refactor for V5 + Add Full API Implementation (#7584)
* eia refactor for v5
* add test and publish workflows
* data browser state
* fix workflows
* more workflow test items
* temp files in tests
* more fixes
* more browsers
* fix codeql issues
* fix mer state and ensure multi-user capability
* uv lock
* table bridge
* fix electricity browser state
* convert HTML widgets to iFrame
* fix recursion error in workspace mcp
* [V5] `openbb-government-us`: Refactor for V5 + Move `uscongress` (#7604)
* v5 government_us provider
* workflow files
* ty and add xlrd to pyproject
* shrink test cassettes
* dev dependencies
* wheel packaging and more tests
* python 3.10 thing..?
* fix test
* default state for multiselect dropdowns
* replace congress html widgets with iframes
* fallback to congress api for congress before 108
* ensure member passage voting count populates
* [V5] Feature: Add JODI World Oil & Gas Database (#7593)
* add the JODI oil and gas database as a provider/router extension
* lint fixes
* add grouping to apps.json
---------
Co-authored-by: deeleeramone <>
* [V5] `openbb-cftc`: Refactor for V5 + Add OIS, Forward Curve, and FX Trade Analysis (#7615)
* refactor openbb-cftc for v5
* add SHIBOR to fixings
---------
Co-authored-by: deeleeramone <>
* fix for plotly 7 breaking change to schemas
* [V5] `openbb-tmx`: Refactor extension for V5 (#7668)
* refactor tmx provider for v5
* fix tests..
* fix tests stack trace exposure
* fix workflow setup
* [V5] `openbb-nasdaq`: Refactor provider for V5. (#7670)
* refactor nasdaq provider for v5
* add workflows
* ty fix
* [V5] `openbb-fred`: Refactor as V5 extension. (#7669)
* refactor fred extension for v5
* fix markdown MD037 lint error in README
* codespell
* [V5] `openbb-cboe`: Refactor for V5 + Add Payoff Diagrams (#7617)
* refactor cboe for v5
* use zoneinfo instead
* fix test
* some fixes related to the cache access
* fix a couple of tests
* fix the test coverage
* [V5] `openbb-deribit`: Refactor provider for V5 (#7674)
* refactor openbb-deribit for v5
* restructure the optimizer around the published combos data and add integration test suites
* fix markdown lint errors
* remove openbb-econdb provider (#7675)
* codespell
* [V5] `openbb-sec`: Refactor for V5 (#7525)
* refactor openbb-sec for v5
* linting
* ty
* normalize compare_company_facts
* add workflows
* python 3.10 fix
* add more thorough url validation and tests
* ty check
* ty for python 3.10
* reconfigure with apps
* temp pyproject overrride
* pyproject
* pyproject
* pyproject
* codespell
* pyproject
* fix uk schema file links in schema_files
* test coverage
* test_cli
* port #7547 into this pr
* no hard coded prefix
* improve filing rendering capabilities
* fix xml text detection
* make codeql happy
* missed a file in the commit
* test coverage
* codespell
* fix flakey test
* some updates
* management_ownership --> management_profiles
* proxy statement markdown
* ruff
* fix test coverage
* more tests
* test coverage
* fix lint errors
* Add SEC adviser search, profile, and universe routes (#7559)
* Add SEC institutional data fetchers
* Add SEC filing index and Form D routes
* Add SEC investment adviser people data
* Expose SEC adviser and institutional routes
* fix(sec): address adviser review feedback
* refactor(sec): narrow adviser support to IAPD search
* feat(sec): add adviser firm and individual searches
* feat(sec): add adviser profile drill-down
* fix: repair pre-commit configuration
* feat(sec): add adviser universe route
* feat(sec): expose complete Form ADV data
---------
Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>
* fix test coverage
---------
Co-authored-by: deeleeramone <>
Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
* [V5] `openbb-finra`: Refactor for V5 (#7676)
* refactor finra provider for v5
* add workflows
* fix tests
* fix lint errors
* [V5] Update Repository License to Apache 2.0 (#7677)
* change license to Apache 2.0 for V5
* codespell
* bump devtools and repoint pyproject.toml
* Enterprise Flask Migration Toolkit (#7264)
* feat: Add Flask-to-OpenBB enterprise migration toolkit
- Implement Router.from_flask() for zero-touch legacy API conversion
- Enable 4-hour migration vs 6-month traditional rewrite (80% cost reduction)
- Generate FastAPI endpoints from Flask routes with automatic type validation
- Support enterprise consulting services and custom integration workflows
Demonstrates OpenBB's competitive advantage for institutional client migrations.
Complements existing Workspace applications like Open Portfolio suite.
* chore: Resolve .gitignore conflict and add common ignores
* refactor: implement Phase 1 Flask integration architecture- Move Flask conversion logic to openbb_core.app.utils.flask- Add Flask detection to extension_loader - Integrate with OpenBB's core extension system- Add Flask dependency validation with sys.modules checkingAddresses @deeleeramone's architectural feedback for native OpenBB integration.
* docs: add Flask direct entry point demos- demo_direct_flask_entry_point.py: shows direct Flask instance reference- example_pyproject_flask_entry.toml: demonstrates pyproject.toml configurationSupports new architecture eliminating wrapper extensions.
* Implement Phase 1 Flask adapter per code review feedback
- Minimal working implementation with Flask detection and router creation
- Removes complex code generation logic for focused Phase 1 delivery
- Establishes foundation for Phase 2 route conversion features
* Fix Flask integration: Replace missing FlaskToOpenBBAdapter with WSGIMiddleware
- Remove FlaskToOpenBBAdapter which was not implemented
- Use FastAPI's WSGIMiddleware to mount Flask apps directly
- Update extension_loader to use returned Router object
- Convert utils.py to utils/__init__.py to support flask submodule
- Addresses PR review comment about unhandled AttributeError
* Address PR review feedback: fix Flask imports and remove unused files
- Revert .gitignore to upstream/develop
- Remove AI-generated demo/example files and flask_adapter extension
- Move Flask/werkzeug imports inside conditional blocks to avoid ImportError
- Use lazy imports via __getattr__ in utils/flask/__init__.py
- Add Flask tests with @pytest.mark.skipif markers
* Force APIRouter.include_router to propagate Mount paths instead of dropping them. (#1)
This change ensures that mounted ASGI applications (such as Flask apps wrapped in WSGIMiddleware) are not dropped when `APIRouter.include_router` is called.
Previously, while the initial load in `ExtensionLoader` worked as expected, the `Mount` objects were ignored by FastAPI's default inclusion logic. This caused the mounted elements to be lost during the final application assembly, resulting in 404 errors for the Flask routes.
This fix overrides the inclusion logic to manually propagate `Mount` objects downstream.
* feat(flask): Add metadata layer for OpenAPI documentation
Enhance Flask-to-OpenBB converter with structured docstring parsing:
- Parse Google-style docstrings (summary, description, params)
- Extract parameter descriptions from Args section
- Pass metadata to Router.command() for rich OpenAPI docs
This addresses PR feedback to provide tangible benefit by generating
comprehensive API documentation for migrated Flask routes.
* feat(flask): Implement manual OpenAPI spec generation and attachment
- Add FlaskParam and FlaskRouteInfo TypedDict for type-safe metadata
- Implement OpenAPISpecGenerator for Flask→OpenAPI conversion
- Extract route metadata via FlaskIntrospector
- Attach generated spec to router.openbb_openapi_spec_ext
- Add unit tests (3/3 passing)
Addresses WSGI/mount boundary issue where Router.command metadata
cannot propagate through WSGIMiddleware. Spec attached to router
instance for downstream OpenAPI assembly.
Resolves maintainer feedback on PR #7264
* feat(flask): Implement FlaskMountRegistry for multiple mount support
- Add FlaskMountRegistry class for centralized OpenAPI spec management
- Replace router.openbb_openapi_spec_ext with registry pattern
- Support multiple Flask apps at different mount prefixes
- Automatic path rewriting in aggregated OpenAPI specs
- Add registry test case (4/4 tests passing)
Addresses @deeleeramone's feedback on PR #7264 regarding router
attribute fragility and multiple mount support. Registry provides
lifecycle-independent state management and enables enterprise
scenarios with multiple Flask apps.
Resolves: OpenBB-finance/OpenBB#7264 (partial)
* feat(core): load Flask apps as openbb_core_extension WSGI sub-apps
A Flask app referenced directly by an openbb_core_extension entry point is
mounted via WSGIMiddleware and its routes are introspected into openapi.json
(operationId/widgetId/mcp_tool, parameters, request bodies, security, widget_config
and HTML widgets) so the widget factory and MCP server can discover them.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* test(core): 100% coverage for flask utils + flask dev dependency
Add branch-coverage tests for the Flask integration package (introspection,
AST analysis, docstrings, OpenAPI generation, registry, loader, detection) and
declare flask as a dev dependency so the suite runs in CI.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(flask): treat f-string returns as HTML responses
* fix(flask): mount via a2wsgi instead of deprecated starlette WSGIMiddleware
- add openbb-core[flask] extra (flask, a2wsgi); a2wsgi resolved through require_optional
- run the WSGI serve test through mount_flask_extensions; drop httpx importorskip
- core CI installs [pandas,flask] and httpx2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(flask): cover failed entry point loads; narrow optional types for ty
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>
Co-authored-by: deeleeramone <>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* perf(core): vectorize the date conversion in `basemodel_to_df` (#7622)
* perf(core): vectorize the date conversion in basemodel_to_df
basemodel_to_df ran three per-element Python passes over the date column of
every payload it converted. Series.apply(to_datetime) calls pandas.to_datetime
once per row, and because each call receives a lone scalar with no format hint,
pandas also re-runs its datetime format guesser on every row.
Parse the column in one call instead, and use vectorized comparisons for the
all-midnight test and the reduction to datetime.date.
The element-wise parse is kept as a fallback for one case that the vectorized
path cannot represent: a column mixing UTC offsets, such as a series crossing a
daylight-savings boundary. Parsing per element lets each value keep its own
offset and yields an object column of tz-aware Timestamps, whereas a single
to_datetime call over that column raises "Mixed timezones detected". That
behaviour is covered by test_to_df_daylight_savings and is preserved exactly.
Measured on a payload built through EquityHistoricalData, median of 9 under an
exclusive CPU lock:
250 daily bars 8.92 ms -> 1.46 ms
1,000 daily bars 32.93 ms -> 3.13 ms
5,000 daily bars 162.25 ms -> 12.23 ms
* fix a broken test - unrelated to this PR...
---------
Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>
Co-authored-by: deeleeramone <>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix lint errors
* fix oecd lint error
* [V5] `openbb-mcp-server`: Refactor for v5 - Spec, Config, Packaging, Test Coverage (#7495)
* 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 mcp server for v5
* test action
* fix tests
* tests
* test fixture name
* revert: drop unrelated provider/README changes from mcp-server refactor
Strip the changes to ``README.md`` and ``openbb_platform/providers/{imf,
tradingeconomics,yfinance}`` that snuck into 4ac3602 (refactor mcp server
for v5). Those files are out of scope for the mcp-server work and were
modified inadvertently — restore them to their pre-4ac3602 state.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* tests and workflows
* fix workflow
* tests and workflows
* tests and workflows
* tests and workflows
* tests and workflows
* beartype shim for 3.15
* muck around with beartype for 3.15
* muck around with beartype for 3.15
* no 3.15 runners for mcp-server
* update skill files
* cap test matrix at python 3.14
* merge branch v5
* no useless comments
* platform controller command description split
* merge URL overloads from path params
* exclude none and unset from model dump
* refactor for fastmcp4
* wrap markdown lines that are too long
---------
Co-authored-by: deeleeramone <>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* update pre-commit, noxfile, and uv locks
* fixes for docstring generation
* test coverage
* fix cli renderer helper with figure object JSON
* fix the figure font when rendered
* refactor cookiecutter
* bump cookiecutter packagge version
* fix sec test by adding fixture
* fix desktop environments test
* fix(cli): inherit path-item-level OpenAPI parameters (#7606)
* fix(cli): inherit path-item-level OpenAPI parameters
OpenAPI 3.x lets a Path Item Object declare `parameters` shared by every
operation under that path, with operation-level entries overriding them by
(name, in). The codegen read only `op.get("parameters")`, so inherited
parameters were dropped silently — the generated command kept the URL
template but had nothing registered to fill it.
Real-world impact: the Xero Accounting API declares its required
`xero-tenant-id` header once per path item across all 138 paths. Before this
change `build_command_spec` produced 78 commands and none carried the
header, so every generated command 403s. Nothing warned.
Adds `operation_parameters()`, which merges the two levels and dereferences
both, and routes the pre-computed spec path (`build_command_spec`) and the
interactive path (`build_command_index` -> `build_parser_from_operation`)
through it. Unresolvable refs, non-dict entries, and nameless parameters are
skipped as before. Specs without path-item parameters are unaffected.
* fix(cli): narrow path-item inheritance to path and query parameters
Per review: headers do not translate into a Python interface function, and
outbound headers are transport configuration
(SystemSettings.PythonSettings.http.headers, the CLI's -H) or a security-scheme
concern — not a per-command argument.
Path-item `in: header` and `in: cookie` entries are now dropped rather than
inherited. Operation-level parameters are untouched, so an operation that
declares its own header keeps today's behavior.
Scope is now only what cannot be supplied any other way: `in: path` and
`in: query` parameters declared on the Path Item Object.
* fix(cli): merge allOf compositions in response schemas
Response-schema $refs were already expanded by deref_schema, but a schema
whose top level is an allOf composition was left unflattened. The properties
live inside the members, so a consumer reading them off the composition finds
none. fetcher_gen._data_schema looks for `properties.results`, gets nothing,
and falls through to _unwrap_schema_envelopes, which handles oneOf and anyOf
but not allOf. The generated Data model ends up with no fields.
Codat's listBills response is `allOf: [{properties: {results}}, {properties:
{_links, pageNumber, pageSize, totalResults}}]`, which produced an empty model.
merge_allof collapses a composition of object subschemas into one object
schema: properties unioned with the first declaration winning on conflict,
required unioned, and sibling keywords on the allOf node outranking members.
A composition that is not a plain intersection of object subschemas (a member
carrying its own oneOf/anyOf, or a non-object type) is returned unchanged
rather than flattened into something the spec does not describe. Nested
compositions are merged too, so a $ref inside a merged member still resolves.
Applied to extract_response_schema and extract_response_schemas.
Measured across five specs that use the pattern, counting operations whose
response schema exposes readable properties: 244 of 588 before, 394 after
(Codat Accounting 36 to 88, Codat Banking 0 to 8, Codat Commerce 1 to 11,
Rebilly 62 to 104, Box 145 to 183).
* fix(cli): merge allOf compositions in request body schemas
Same gap as the response side. request_body_parameters needs `type: object`
or `properties` to flatten a body into parameters, and an allOf composition
carries neither, so a POST or PUT generated from one gets no body parameters
at all.
extract_request_body_schema now runs merge_allof after deref_schema, matching
extract_response_schema.
Across the same five specs, counting request bodies that produce parameters:
138 of 206 before, 177 after (Codat Accounting 1 to 26 of its 30 bodies,
Rebilly 50 to 63, Box 87 to 88).
* fix(cli): stop annotation keywords blocking an allOf merge
_mergeable_allof_members required every member's keys to come from a small
whitelist, so any unrecognized keyword disqualified the whole composition.
Codat's PagingInfo carries `definitions` next to its properties, which meant
the live Codat-Accounting.yaml never merged and its response models stayed
empty. The APIs.guru copy of the same API omits that key, which is why the
earlier measurements looked clean.
The check is now a blocklist. A member blocks the merge when it carries its
own combinator (oneOf/anyOf/allOf/not), an unresolved $ref left by a cycle,
a scalar or array constraint (enum/const/items), or a type other than object.
Annotation keywords that do not affect the intersection (title, description,
examples, definitions, additionalProperties, vendor x- keys) no longer block
it, and are dropped from the merged result along with the members.
On the live Codat spec, operations whose response schema exposes readable
properties go from 36 of 127 to 114. Across the five specs measured earlier:
244 of 588 before, 488 after (was 394 under the whitelist).
Corpus check over 2,816 response and request-body extractions in 6 specs:
567 changed, every one attributable to an allOf in the pre-merge output,
0 unexplained. Twilio declares no allOf compositions and is unchanged.
* fix(cli): emit a name once when it is both a parameter and a body property
_signature_params appended request-body properties and then operation
parameters without deduplicating, so a name declared in both places produced
two function parameters with the same name and the generated module raised
SyntaxError.
Codat's push endpoints hit this: /push/bankAccounts/{accountId}/bankTransactions
declares accountId as a path parameter and repeats it in the request body, so
connections.push.bankAccounts.bankTransactions generated `accountId: str` and
`accountId: str = None` in one signature.
The operation parameter wins, since it carries the path placeholder and its own
required flag. The request payload is unchanged: _render_body_block derives body
fields from request_body_schema rather than from this list, so accountId is
still sent in the body.
This predates the path-item and allOf work in this PR. On origin/v5 the same
spec produces the same duplicate; on this branch the Codat spec generates 91
commands with 0 duplicated signatures, down from 1.
* fix(cli): use the safe identifier for keyword-named body properties
_render_body_block already writes `{'from': from_}`, keying the payload by the
wire name and reading a safe identifier, but _signature_params declared the raw
name. A body property named after a Python keyword therefore emitted
`from: str = None` and the generated module raised SyntaxError.
This did not fire before the allOf work in this PR, because a composed request
body produced no body parameters at all. Codat's Transfer body is such a
composition and has a `from` property, so connections.push.transfers started
generating invalid syntax once the body flattened.
_signature_params now emits safe_field_name(name)[0], the same helper
fetcher_gen and pydantic_gen already use. The body/query split in
_render_body_block compares against the safe names too: it previously matched
signature names against wire names, so `from_` was not recognized as a body
field and leaked into the query string as a `from_` parameter.
End to end on Codat-Accounting.yaml, generating the full extension and byte
compiling every emitted module: 136 files, 0 failures. origin/v5 emits 1 file
that does not compile (duplicate argument 'accountId').
Known gap left alone: an operation parameter named after a keyword would still
break, since the query and path lines use the raw name as a local variable.
None of the five specs checked declares one.
* fix(cli): do not treat instance data as schema, and sanitize POST identifiers
Two defects found by generating extensions from real specs and byte compiling
every emitted module.
merge_allof and deref_schema walked every value in a schema dict, including
keywords that hold instance data rather than subschemas. A `default` of
`{"allOf": [{"a": 1}, {"b": 2}]}` was rewritten to `{"type": "object"}`, and a
`$ref` key inside an example was resolved as if it were a reference. Both now
copy `default`, `example`, `examples`, `enum`, `const` and vendor `x-` values
through untouched.
_signature_params emitted operation parameter names verbatim, so a wire name
that is not a Python identifier produced invalid syntax. Rebilly declares an
`Organization-Id` header and a `REB-APIKEY` security header, which emitted
`REB-APIKEY: str = None`. It now uses safe_field_name, matching fetcher_gen,
and _render_body_block keys the query dict by the wire name while reading the
safe identifier so the request is unchanged.
This surfaced through the allOf work rather than being caused by it: a composed
request body used to yield no properties, so `has_body` was false in
package_gen and the command was generated as a GET fetcher, where identifiers
were already sanitized. With bodies flattening, 14 of Codat's 24 POST endpoints
correctly move to the POST path, which had never been exercised by these specs.
Generating the full extension and compiling every module:
Codat-Accounting.yaml v5: 1 failure branch: 0 (136 files)
Rebilly 2.1 v5: 14 failures branch: 1 (97 files)
The one remaining Rebilly failure is `async def 3dsecure(` in the router, which
fails identically on v5. Sanitizing that is a naming decision about the command
surface, so it is left alone here.
Known gap: a non-credential header parameter is still placed in the query
string on the POST path. Pre-existing, and unchanged by this PR.
* fix(cli): resolve signature collisions on the emitted identifier
The previous dedupe compared wire names, but the failure it prevents depends on
the sanitized identifier. Two wire names can collapse onto one (`from` and
`from_`, `Organization-Id` and `Organization_Id`), and operation_parameters
keeps a name declared twice under different `in` locations by design, so both
cases could still emit a duplicate argument.
_signature_params now tracks the identifiers it has emitted and skips anything
that would repeat one. Emission order is unchanged, so existing signatures are
byte-identical; only genuinely colliding names are dropped, and operation
parameters still win over body properties.
Neither collision occurs in Codat-Accounting.yaml or Rebilly 2.1. This closes
the class rather than the instance, since the instances are what this PR has
been finding.
Generation unchanged: Codat 136 files 0 failures, Rebilly 97 files 1 failure
(`async def 3dsecure(`, identical on v5).
* test(cli): cover the instance-data guard, and drop a redundant branch
Mutation checking the new tests (revert each fix, confirm its test fails)
found two problems with the previous commits.
The guard that stops merge_allof and deref_schema from walking into `default`,
`example`, `enum`, `const` and vendor values shipped with no test at all. It is
now covered from both directions: a default holding an `allOf` key keeps its
value, and a `$ref` inside a default stays a literal while a real reference
beside it still resolves.
The body-property loop also carried a redundant check. It tested the raw wire
name against the operation parameter names before testing the sanitized one,
but `operation_param_names` holds both forms and `safe_field_name` is idempotent
on identifiers, so the first test could never fire alone. Reverting it left
every test passing, which is what surfaced it. Removed, and the sanitized name
is now computed once.
All nine mutations are caught by the suite: both data guards, the allOf
blocklist in each direction, the response merge wiring, body/parameter
precedence, the keyword identifier, the body/query split and the
emitted-identifier dedupe.
cli/tests at 1,954 passed against the same 80 environment failures as the base.
Generation unchanged: Codat 136 files 0 failures, Rebilly 97 files 1 failure.
* fix(cli): route required path-item headers/cookies through credential handling
* fix(cli): narrow Popen.stdin/stdout for ty in run_in_obb fixture
---------
Co-authored-by: deeleeramone <>
* fix warnings raised by federal_reserve on some xlsx workbook parsing
* fix publish workflows
* test publish pipeline with openbb-core-v2.0.0rc0 (#7681)
* fix publish workflows with missing tag job, some tests and bump fastapi
* fix python 3.10 test failure in core
* actually fix python 3.10 test failure in core
* deincrement openbb-core version to allow release pattern
* bump core version (#7682)
* remove uv.sources from pyproject.toml files and point to openbb-core-2.0.0 on PyPI
* remove oecd cache asset that wasn't supposed to be commuitted
* remove poetry.lock, update pyproject.tml and uv.lock for openbb-platform-api-v2.0.0 (#7684)
Co-authored-by: deeleeramone <>
* add the missing publish-openbb-platform-api.yml workflow file
* remove poetry.lock, update pyproject.tml and uv.lock for openbb-platform-api-v2.0.0 (#7685)
Co-authored-by: deeleeramone <>
* fix the tag generation after publish
* [Release] `openbb-charting-v4.0.0` (#7686)
* up openbb-charting to 4.0.0 and fill missing test coverage in chart_style
* test coverage and format markdown files
---------
Co-authored-by: deeleeramone <>
* remove scikit-learn from dependencies, update tests, and format markdown files (#7687)
Co-authored-by: deeleeramone <>
* [Release] `openbb-cli-v2.0.0` (#7692)
* fix missing test coverage in openbb_cli
* fix conftest
---------
Co-authored-by: deeleeramone <>
* add missing publish-openbb-cli.yml workflow
* [Release] `openbb-cli-v2.0.0` (#7693)
* fix missing test coverage in openbb_cli
* fix conftest
---------
Co-authored-by: deeleeramone <>
* test fixes for cli...
* [Release] `openbb-cli-v.2.0.0` (#7694)
* fix missing test coverage in openbb_cli
* fix conftest
---------
Co-authored-by: deeleeramone <>
* fix hanging mcp server test
* [Release] `openbb-mcp-server-v2.0.0` (#7695)
Co-authored-by: deeleeramone <>
* update uv.lock (#7696)
Co-authored-by: deeleeramone <>
* release openbb-commodity-v2.0.0 (#7697)
Co-authored-by: deeleeramone <>
* update uv.lock (#7698)
Co-authored-by: deeleeramone <>
* update uv.lock (#7699)
Co-authored-by: deeleeramone <>
* update uv.lock (#7700)
Co-authored-by: deeleeramone <>
* [Release] `openbb-econometrics-v2.0.0` (#7701)
* update uv.lock
* update pyproject.toml
---------
Co-authored-by: deeleeramone <>
* update uv.lock (#7703)
Co-authored-by: deeleeramone <>
* update uv.lock (#7702)
Co-authored-by: deeleeramone <>
* update uv.lock (#7704)
Co-authored-by: deeleeramone <>
* update uv.lock (#7705)
Co-authored-by: deeleeramone <>
* update uv.lock (#7706)
Co-authored-by: deeleeramone <>
* [V5] Fix a Number of V5 Bugs (#7707)
* fix a number of v5 bugs
* fix lint error
* more lint
* fixes for quantitative, technical, charting, famafrench for version bumps
---------
Co-authored-by: deeleeramone <>
* update uv.lock (#7709)
Co-authored-by: deeleeramone <>
* update uv.lock (#7708)
Co-authored-by: deeleeramone <>
* update uv.lock (#7710)
Co-authored-by: deeleeramone <>
* update uv.lock (#7711)
Co-authored-by: deeleeramone <>
* [Release] `openbb-cboe-v2.0.0` (#7713)
Co-authored-by: deeleeramone <>
* update uv.lock (#7714)
Co-authored-by: deeleeramone <>
* update uv.lock (#7717)
Co-authored-by: deeleeramone <>
* [Release] `openbb-ecb-v2.0.0` (#7715)
* update uv.lock
* update uv.lock
---------
Co-authored-by: deeleeramone <>
* update uv.lock (#7718)
Co-authored-by: deeleeramone <>
* update uv.lock (#7719)
Co-authored-by: deeleeramone <>
* update uv.lock (#7720)
Co-authored-by: deeleeramone <>
* add missing publish-openbb-fred.yml to repo
* update uv.lock (#7723)
Co-authored-by: deeleeramone <>
* update uv.lock (#7722)
Co-authored-by: deeleeramone <>
* update uv.lock (#7716)
Co-authored-by: deeleeramone <>
* update uv.lock (#7724)
Co-authored-by: deeleeramone <>
* update uv.lock (#7726)
Co-authored-by: deeleeramone <>
* [Release] `openbb-fred-v2.0.0` (#7725)
* update uv.lock
* fix tests and dependencies
* fix test_fred_fetchers
---------
Co-authored-by: deeleeramone <>
* [Release] `openbb-imf-v3.0.0` (#7727)
* update uv.lock
* fix tests and dependencies
* fix test_fred_fetchers
* bump openbb-imf version to 3.0.0
---------
Co-authored-by: deeleeramone <>
* update uv.lock (#7729)
Co-authored-by: deeleeramone <>
* update uv.lock (#7728)
Co-authored-by: deeleeramone <>
* update uv.lock (#7730)
Co-authored-by: deeleeramone <>
* update uv.lock (#7731)
Co-authored-by: deeleeramone <>
* update uv.lock (#7732)
Co-authored-by: deeleeramone <>
* update uv.lock (#7733)
Co-authored-by: deeleeramone <>
* cookiecutter pyproject and lock
* update pyproject.toml (#7734)
Co-authored-by: deeleeramone <>
* update pyproject.toml (#7735)
Co-authored-by: deeleeramone <>
* update uv.lock (#7736)
Co-authored-by: deeleeramone <>
* fix some sec issues, allegedly (#7737)
Co-authored-by: deeleeramone <>
* update uv.lock (#7738)
Co-authored-by: deeleeramone <>
* update main pyproject.toml
* lint fixes
* update assets (#7739)
Co-authored-by: deeleeramone <>
* [Release] `openbb-v5.0.0` (#7740)
* update assets
* add missing workflow
---------
Co-authored-by: deeleeramone <>
---------
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: deeleeramone <>
Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
Co-authored-by: Dex <i@dex.moe>
Co-authored-by: Monte Hoover <monte.b.hoover@gmail.com>
Co-authored-by: Boris Li <65254053+BorisQuanLi@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Lucas Zimmermann <lucaszmayer@gmail.com>
3861 lines
126 KiB
Python
3861 lines
126 KiB
Python
"""EIA Fetcher Tests."""
|
|
|
|
import re
|
|
from datetime import date
|
|
|
|
import pytest
|
|
from openbb_core.app.service.user_service import UserService
|
|
from openbb_core.provider.utils.errors import EmptyDataError
|
|
|
|
from openbb_us_eia.models.data_browser import EiaDataBrowserFetcher
|
|
from openbb_us_eia.models.petroleum_status_report import EiaPetroleumStatusReportFetcher
|
|
from openbb_us_eia.models.registry import DATASET_FETCHERS
|
|
from openbb_us_eia.models.short_term_energy_outlook import (
|
|
EiaShortTermEnergyOutlookFetcher,
|
|
)
|
|
|
|
test_credentials = UserService().default_user_settings.credentials.model_dump(
|
|
mode="json"
|
|
)
|
|
|
|
|
|
def scrub_string(key):
|
|
"""Scrub a string from the response."""
|
|
|
|
def before_record_response(response):
|
|
response["headers"][key] = response["headers"].update({key: "MOCK_VALUE"})
|
|
return response
|
|
|
|
return before_record_response
|
|
|
|
|
|
def scrub_api_key(response):
|
|
"""Scrub the API key echoed inside the response body."""
|
|
body = response["body"]["string"]
|
|
is_bytes = isinstance(body, bytes)
|
|
if is_bytes:
|
|
try:
|
|
text = body.decode("utf-8")
|
|
except UnicodeDecodeError:
|
|
return response
|
|
else:
|
|
text = body
|
|
text = re.sub(r'"api_key":\s*"[^"]*"', '"api_key":"MOCK_API_KEY"', text)
|
|
response["body"]["string"] = text.encode("utf-8") if is_bytes else text
|
|
return response
|
|
|
|
|
|
@pytest.fixture(scope="module")
|
|
def vcr_config():
|
|
"""VCR configuration."""
|
|
return {
|
|
"filter_headers": [("User-Agent", None)],
|
|
"filter_query_parameters": [
|
|
("api_key", "MOCK_API_KEY"),
|
|
],
|
|
"decode_compressed_response": True,
|
|
"before_record_response": [
|
|
scrub_api_key,
|
|
scrub_string("X-Amz-Cf-Id"),
|
|
scrub_string("Etag"),
|
|
scrub_string("Via"),
|
|
scrub_string("X-Amz-Cf-Pop"),
|
|
scrub_string("X-Cache"),
|
|
scrub_string("X-Api-Umbrella-Request-Id"),
|
|
scrub_string("X-Vcap-Request-Id"),
|
|
],
|
|
}
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_status_report_fetcher(credentials=None):
|
|
"""Test the EIA petroleum status report fetcher."""
|
|
params = {
|
|
"category": "crude_petroleum_stocks",
|
|
"table": "all",
|
|
"start_date": date(2024, 1, 5),
|
|
"end_date": date(2024, 3, 29),
|
|
}
|
|
|
|
fetcher = EiaPetroleumStatusReportFetcher()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_short_term_energy_outlook_fetcher(credentials=test_credentials):
|
|
"""Test the EIA short term energy outlook fetcher."""
|
|
params = {
|
|
"table": "10b",
|
|
"start_date": date(2024, 1, 1),
|
|
"end_date": date(2024, 4, 1),
|
|
"frequency": "quarter",
|
|
}
|
|
|
|
fetcher = EiaShortTermEnergyOutlookFetcher()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_data_browser_fetcher(credentials=test_credentials):
|
|
"""Test the EIA data browser fetcher."""
|
|
params = {
|
|
"route": "petroleum/pri/spt",
|
|
"frequency": "monthly",
|
|
"facets": "product:EPCBRENT",
|
|
"start_date": date(2025, 1, 1),
|
|
"end_date": date(2025, 3, 1),
|
|
}
|
|
|
|
fetcher = EiaDataBrowserFetcher()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_aeo_fetcher(credentials=test_credentials):
|
|
"""Test the EIA aeo fetcher."""
|
|
params = {
|
|
"release": "2026",
|
|
"history": "projection",
|
|
"region": "united_states",
|
|
"scenario": "alternative_electricity",
|
|
"series": "NA_NA_NA_NA_NA_NA_NA_NA",
|
|
"table": "73",
|
|
"start_date": date(2025, 1, 1),
|
|
"end_date": date(2025, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaAeo"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_coal_aggregate_production_fetcher(credentials=test_credentials):
|
|
"""Test the EIA coal aggregate production fetcher."""
|
|
params = {
|
|
"coal_rank": "subbituminous",
|
|
"mine_type": "all",
|
|
"state_region": "alaska",
|
|
"start_date": date(2001, 1, 1),
|
|
"end_date": date(2001, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaCoalAggregateProduction"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_coal_by_mine_by_plant_fetcher(credentials=test_credentials):
|
|
"""Test the EIA coal by mine by plant fetcher."""
|
|
params = {
|
|
"frequency": "annual",
|
|
"coal_rank": "all",
|
|
"coal_supplier": "TWENTY MILE",
|
|
"mine": "100114",
|
|
"mine_state": "alabama",
|
|
"plant": "genoa",
|
|
"plant_state": "wisconsin",
|
|
"start_date": date(2008, 1, 1),
|
|
"end_date": date(2008, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaCoalByMineByPlant"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_coal_consumption_and_quality_fetcher(credentials=test_credentials):
|
|
"""Test the EIA coal consumption and quality fetcher."""
|
|
params = {
|
|
"frequency": "annual",
|
|
"sector": "other_industrial",
|
|
"state_region": "alaska",
|
|
"start_date": date(2000, 1, 1),
|
|
"end_date": date(2000, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaCoalConsumptionAndQuality"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_coal_exports_imports_quantity_price_fetcher(credentials=test_credentials):
|
|
"""Test the EIA coal exports imports quantity price fetcher."""
|
|
params = {
|
|
"frequency": "annual",
|
|
"coal_rank": "coke",
|
|
"country": "mexico",
|
|
"customs_district": "baltimore_md",
|
|
"export_import_type": "exports",
|
|
"start_date": date(2000, 1, 1),
|
|
"end_date": date(2000, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaCoalExportsImportsQuantityPrice"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_coal_market_sales_price_fetcher(credentials=test_credentials):
|
|
"""Test the EIA coal market sales price fetcher."""
|
|
params = {
|
|
"market_type": "open_market",
|
|
"state_region": "alaska",
|
|
"start_date": date(2001, 1, 1),
|
|
"end_date": date(2001, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaCoalMarketSalesPrice"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_coal_mine_aggregates_fetcher(credentials=test_credentials):
|
|
"""Test the EIA coal mine aggregates fetcher."""
|
|
params = {
|
|
"frequency": "annual",
|
|
"coal_rank": "bituminous",
|
|
"mine": "100114",
|
|
"mine_state": "alabama",
|
|
"start_date": date(2008, 1, 1),
|
|
"end_date": date(2008, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaCoalMineAggregates"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_coal_mine_production_fetcher(credentials=test_credentials):
|
|
"""Test the EIA coal mine production fetcher."""
|
|
params = {
|
|
"census_region": "east_south_central",
|
|
"coal_rank": "preparation_plant",
|
|
"mine": "100329",
|
|
"mine_county": "jefferson",
|
|
"mine_region": "south",
|
|
"mine_status": "active",
|
|
"mine_type": "surface",
|
|
"mississippi_region": "east_of_mississippi_river",
|
|
"state_region": "alabama",
|
|
"supply_region": "appalachia_southern",
|
|
"start_date": date(2001, 1, 1),
|
|
"end_date": date(2001, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaCoalMineProduction"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_coal_mine_state_aggregates_fetcher(credentials=test_credentials):
|
|
"""Test the EIA coal mine state aggregates fetcher."""
|
|
params = {
|
|
"frequency": "annual",
|
|
"coal_rank": "subbituminous",
|
|
"mine_state": "alaska",
|
|
"start_date": date(2008, 1, 1),
|
|
"end_date": date(2008, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaCoalMineStateAggregates"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_coal_plant_aggregates_fetcher(credentials=test_credentials):
|
|
"""Test the EIA coal plant aggregates fetcher."""
|
|
params = {
|
|
"frequency": "annual",
|
|
"coal_rank": "bituminous",
|
|
"plant": "barry",
|
|
"state_region": "overseas",
|
|
"start_date": date(2008, 1, 1),
|
|
"end_date": date(2008, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaCoalPlantAggregates"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_coal_plant_state_aggregates_fetcher(credentials=test_credentials):
|
|
"""Test the EIA coal plant state aggregates fetcher."""
|
|
params = {
|
|
"frequency": "annual",
|
|
"coal_rank": "subbituminous",
|
|
"plant_state": "alaska",
|
|
"start_date": date(2008, 1, 1),
|
|
"end_date": date(2008, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaCoalPlantStateAggregates"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_coal_price_by_rank_fetcher(credentials=test_credentials):
|
|
"""Test the EIA coal price by rank fetcher."""
|
|
params = {
|
|
"coal_rank": "subbituminous",
|
|
"state_region": "alaska",
|
|
"start_date": date(2001, 1, 1),
|
|
"end_date": date(2001, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaCoalPriceByRank"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_coal_receipts_fetcher(credentials=test_credentials):
|
|
"""Test the EIA coal receipts fetcher."""
|
|
params = {
|
|
"frequency": "annual",
|
|
"coal_rank": "bituminous",
|
|
"coal_supplier": "TWENTY MILE",
|
|
"contract_type": "spot_market_purchase",
|
|
"mine": "100114",
|
|
"mine_basin": "appalachia_southern",
|
|
"mine_county": "127",
|
|
"mine_state": "alabama",
|
|
"mine_type": "surface",
|
|
"plant": "genoa",
|
|
"plant_state": "wisconsin",
|
|
"transportation_mode": "rail",
|
|
"start_date": date(2008, 1, 1),
|
|
"end_date": date(2008, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaCoalReceipts"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_coal_reserves_capacity_fetcher(credentials=test_credentials):
|
|
"""Test the EIA coal reserves capacity fetcher."""
|
|
params = {
|
|
"mine_type": "surface",
|
|
"state_region": "alaska",
|
|
"start_date": date(2001, 1, 1),
|
|
"end_date": date(2001, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaCoalReservesCapacity"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_crude_oil_imports_fetcher(credentials=test_credentials):
|
|
"""Test the EIA crude oil imports fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"destination": "padd5",
|
|
"destination_type": "port_padd",
|
|
"grade": "light_sour",
|
|
"origin": "united_arab_emirates",
|
|
"origin_type": "country",
|
|
"start_date": date(2009, 1, 1),
|
|
"end_date": date(2009, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaCrudeOilImports"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_densified_biomass_capacity_by_region_fetcher(credentials=test_credentials):
|
|
"""Test the EIA densified biomass capacity by region fetcher."""
|
|
params = {
|
|
"region": "east",
|
|
"start_date": date(2016, 1, 1),
|
|
"end_date": date(2016, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaDensifiedBiomassCapacityByRegion"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_densified_biomass_characteristics_by_region_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA densified biomass characteristics by region fetcher."""
|
|
params = {
|
|
"fuel_type": "wood_pellets_premium_standard",
|
|
"region": "east",
|
|
"start_date": date(2016, 1, 1),
|
|
"end_date": date(2016, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaDensifiedBiomassCharacteristicsByRegion"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_densified_biomass_export_sales_and_price_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA densified biomass export sales and price fetcher."""
|
|
params = {
|
|
"start_date": date(2016, 1, 1),
|
|
"end_date": date(2016, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaDensifiedBiomassExportSalesAndPrice"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_densified_biomass_feedstocks_and_costs_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA densified biomass feedstocks and costs fetcher."""
|
|
params = {
|
|
"fuel_type": "other_residuals",
|
|
"start_date": date(2016, 1, 1),
|
|
"end_date": date(2016, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaDensifiedBiomassFeedstocksAndCosts"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_densified_biomass_inventories_by_region_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA densified biomass inventories by region fetcher."""
|
|
params = {
|
|
"fuel_type": "compressed_bricks_log",
|
|
"region": "east",
|
|
"start_date": date(2016, 1, 1),
|
|
"end_date": date(2016, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaDensifiedBiomassInventoriesByRegion"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_densified_biomass_production_by_region_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA densified biomass production by region fetcher."""
|
|
params = {
|
|
"fuel_type": "compressed_bricks_log",
|
|
"region": "east",
|
|
"start_date": date(2016, 1, 1),
|
|
"end_date": date(2016, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaDensifiedBiomassProductionByRegion"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_densified_biomass_sales_and_price_by_region_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA densified biomass sales and price by region fetcher."""
|
|
params = {
|
|
"region": "east",
|
|
"start_date": date(2016, 1, 1),
|
|
"end_date": date(2016, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaDensifiedBiomassSalesAndPriceByRegion"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_densified_biomass_wood_pellet_plant_capacity_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA densified biomass wood pellet plant capacity fetcher."""
|
|
params = {
|
|
"region": "east",
|
|
"respondent": "allegheny_pellet_corporation",
|
|
"state": "pennsylvania",
|
|
"status": "currently_operating",
|
|
"start_date": date(2016, 1, 1),
|
|
"end_date": date(2016, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaDensifiedBiomassWoodPelletPlantCapacity"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_electricity_electric_power_operations_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA electricity electric power operations fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"fuel": "all_fuels",
|
|
"sector": "electric_utility",
|
|
"state": "alaska",
|
|
"start_date": date(2001, 1, 1),
|
|
"end_date": date(2001, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaElectricityElectricPowerOperations"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_electricity_electric_power_operations_for_individual_power_plants_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA electricity electric power operations for individual power plants fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"fuel": "total",
|
|
"fuel_type": "total",
|
|
"plant": "2",
|
|
"prime_mover": "all",
|
|
"state": "alabama",
|
|
"start_date": date(2001, 1, 1),
|
|
"end_date": date(2001, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaElectricityElectricPowerOperationsForIndividualPowerPlants"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_electricity_electricity_sales_to_ultimate_customers_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA electricity electricity sales to ultimate customers fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"sector": "all_sectors",
|
|
"state": "alaska",
|
|
"start_date": date(2001, 1, 1),
|
|
"end_date": date(2001, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaElectricityElectricitySalesToUltimateCustomers"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_electricity_grid_demand_fetcher(credentials=test_credentials):
|
|
"""Test the EIA electricity grid demand fetcher."""
|
|
params = {
|
|
"frequency": "hourly",
|
|
"respondent": "powersouth_energy_cooperative",
|
|
"series_type": "demand",
|
|
"start_date": date(2019, 1, 2),
|
|
"end_date": date(2019, 1, 2),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaElectricityGridDemand"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_electricity_grid_demand_by_subregion_fetcher(credentials=test_credentials):
|
|
"""Test the EIA electricity grid demand by subregion fetcher."""
|
|
params = {
|
|
"frequency": "hourly",
|
|
"parent": "california_independent_system_operator",
|
|
"subregion": "pacific_gas_and_electric",
|
|
"start_date": date(2019, 1, 2),
|
|
"end_date": date(2019, 1, 2),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaElectricityGridDemandBySubregion"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_electricity_grid_generation_by_fuel_fetcher(credentials=test_credentials):
|
|
"""Test the EIA electricity grid generation by fuel fetcher."""
|
|
params = {
|
|
"frequency": "hourly",
|
|
"fuel_type": "coal",
|
|
"respondent": "powersouth_energy_cooperative",
|
|
"start_date": date(2019, 1, 2),
|
|
"end_date": date(2019, 1, 2),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaElectricityGridGenerationByFuel"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_electricity_grid_interchange_fetcher(credentials=test_credentials):
|
|
"""Test the EIA electricity grid interchange fetcher."""
|
|
params = {
|
|
"frequency": "hourly",
|
|
"from_ba": "powersouth_energy_cooperative",
|
|
"to_ba": "midcontinent_independent_system_operator",
|
|
"start_date": date(2019, 1, 2),
|
|
"end_date": date(2019, 1, 2),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaElectricityGridInterchange"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_electricity_inventory_of_operable_generators_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA electricity inventory of operable generators fetcher."""
|
|
params = {
|
|
"energy_source": "water",
|
|
"generator": "1",
|
|
"plant": "2",
|
|
"prime_mover": "hy",
|
|
"sector": "electric_utility",
|
|
"state": "alabama",
|
|
"status": "operating",
|
|
"technology": "conventional_hydroelectric",
|
|
"start_date": date(2008, 1, 1),
|
|
"end_date": date(2008, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaElectricityInventoryOfOperableGenerators"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_ieo_fetcher(credentials=test_credentials):
|
|
"""Test the EIA ieo fetcher."""
|
|
params = {
|
|
"release": "2023",
|
|
"history": "historic",
|
|
"region": "middle_east",
|
|
"scenario": "high_economic_growth",
|
|
"series": "cnsm_bl_cm_cl_qbtu",
|
|
"table": "buildings_delivered_energy_consumption_by_end_use_sector",
|
|
"start_date": date(2020, 1, 1),
|
|
"end_date": date(2020, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaIeo"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_international_fetcher(credentials=test_credentials):
|
|
"""Test the EIA international fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"activity": "production",
|
|
"country": "angola",
|
|
"country_type": "country",
|
|
"product": "crude_oil_including_lease_condensate",
|
|
"unit": "thousand_barrels_per_day",
|
|
"start_date": date(1973, 1, 1),
|
|
"end_date": date(1973, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaInternational"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_associated_dissolved_proved_reserves_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas associated dissolved proved reserves fetcher."""
|
|
params = {
|
|
"process": "associated_dissolved_proved_reserves",
|
|
"region": "us",
|
|
"series": "us_associated_dissolved_natural_gas_wet_after_lease_separation_proved_reserves_billion_cubic_feet",
|
|
"start_date": date(1979, 1, 1),
|
|
"end_date": date(1979, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasAssociatedDissolvedProvedReserves"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_average_depth_of_crude_oil_and_natural_gas_wells_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas average depth of crude oil and natural gas wells fetcher."""
|
|
params = {
|
|
"process": "average_depth_of_exploratory_and_developmental_wells_drilled",
|
|
"product": "wells_total",
|
|
"series": "us_average_depth_of_crude_oil_natural_gas_and_dry_exploratory_and_developmental_wells_drilled_feet_per_well",
|
|
"start_date": date(1949, 1, 1),
|
|
"end_date": date(1949, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaNaturalGasAverageDepthOfCrudeOilAndNaturalGasWells"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_coalbed_methane_fetcher(credentials=test_credentials):
|
|
"""Test the EIA natural gas coalbed methane fetcher."""
|
|
params = {
|
|
"process": "coalbed_methane_proved_reserves",
|
|
"region": "us",
|
|
"series": "us_coalbed_methane_proved_reserves",
|
|
"start_date": date(1989, 1, 1),
|
|
"end_date": date(1989, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasCoalbedMethane"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_coalbed_methane_production_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas coalbed methane production fetcher."""
|
|
params = {
|
|
"region": "us",
|
|
"series": "us_coalbed_methane_production",
|
|
"start_date": date(1989, 1, 1),
|
|
"end_date": date(1989, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasCoalbedMethaneProduction"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_costs_of_crude_oil_and_natural_gas_wells_drilled_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas costs of crude oil and natural gas wells drilled fetcher."""
|
|
params = {
|
|
"process": "real_cost_per_foot",
|
|
"product": "wells_total",
|
|
"series": "us_real_cost_per_foot_of_crude_oil_natural_gas_and_dry",
|
|
"start_date": date(1960, 1, 1),
|
|
"end_date": date(1960, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaNaturalGasCostsOfCrudeOilAndNaturalGasWellsDrilled"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_crude_oil_and_natural_gas_drilling_activity_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas crude oil and natural gas drilling activity fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "active_well_service_rigs_in_operation",
|
|
"product": "crude_oil_and_natural_gas",
|
|
"region": "us",
|
|
"series": "us_crude_oil_and_natural_gas_active_well_service_rigs_in",
|
|
"start_date": date(1973, 1, 1),
|
|
"end_date": date(1973, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasCrudeOilAndNaturalGasDrillingActivity"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_crude_oil_and_natural_gas_exploratory_and_development_wells_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas crude oil and natural gas exploratory and development wells fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "exploratory_and_developmental_wells_drilled",
|
|
"product": "wells_total",
|
|
"series": "us_crude_oil_natural_gas_and_dry_exploratory_and",
|
|
"start_date": date(1973, 1, 1),
|
|
"end_date": date(1973, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaNaturalGasCrudeOilAndNaturalGasExploratoryAndDevelopmentWells"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_crude_oil_plus_lease_condensate_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas crude oil plus lease condensate fetcher."""
|
|
params = {
|
|
"process": "proved_reserves",
|
|
"region": "us",
|
|
"series": "us_crude_oil_lease_condensate_proved_reserves",
|
|
"start_date": date(2009, 1, 1),
|
|
"end_date": date(2009, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasCrudeOilPlusLeaseCondensate"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_dry_natural_gas_proved_reserves_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas dry natural gas proved reserves fetcher."""
|
|
params = {
|
|
"process": "dry_expected_future_production",
|
|
"region": "us",
|
|
"series": "us_dry_natural_gas_expected_future_production",
|
|
"start_date": date(1925, 1, 1),
|
|
"end_date": date(1925, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasDryNaturalGasProvedReserves"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_federal_offshore_gulf_of_america_proved_reserves_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas federal offshore gulf of america proved reserves fetcher."""
|
|
params = {
|
|
"process": "proved_reserves",
|
|
"product": "crude_oil",
|
|
"series": "gulf_of_america_federal_offshore_crude_oil_proved_reserves_million_barrels",
|
|
"start_date": date(1992, 1, 1),
|
|
"end_date": date(1992, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaNaturalGasFederalOffshoreGulfOfAmericaProvedReserves"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_footage_drilled_for_crude_oil_and_natural_gas_wells_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas footage drilled for crude oil and natural gas wells fetcher."""
|
|
params = {
|
|
"process": "footage_drilled_for_developmental_wells",
|
|
"product": "wells_total",
|
|
"series": "us_footage_drilled_for_crude_oil_natural_gas_and_dry_developmental_wells_thousand_feet",
|
|
"start_date": date(1949, 1, 1),
|
|
"end_date": date(1949, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaNaturalGasFootageDrilledForCrudeOilAndNaturalGasWells"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_gulf_of_america_federal_offshore_production_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas gulf of america federal offshore production fetcher."""
|
|
params = {
|
|
"process": "production_from_reserves",
|
|
"product": "crude_oil",
|
|
"series": "gulf_of_america_federal_offshore_crude_oil_production",
|
|
"start_date": date(1992, 1, 1),
|
|
"end_date": date(1992, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasGulfOfAmericaFederalOffshoreProduction"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_heat_content_of_natural_gas_consumed_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas heat content of natural gas consumed fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"region": "us",
|
|
"series": "us_heat_content_of_natural_gas_deliveries_to_consumers",
|
|
"start_date": date(2012, 1, 1),
|
|
"end_date": date(2012, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasHeatContentOfNaturalGasConsumed"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_international_interstate_movements_of_natural_gas_by_state_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas international interstate movements of natural gas by state fetcher."""
|
|
params = {
|
|
"process": "exports_intransit",
|
|
"region": "us",
|
|
"series": "NA1280_NUS_2",
|
|
"start_date": date(1930, 1, 1),
|
|
"end_date": date(1930, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaNaturalGasInternationalInterstateMovementsOfNaturalGasByState"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_lease_condensate_fetcher(credentials=test_credentials):
|
|
"""Test the EIA natural gas lease condensate fetcher."""
|
|
params = {
|
|
"process": "lease_condensate_proved_reserves",
|
|
"region": "us",
|
|
"series": "us_natural_gas_liquids_lease_condensate_proved_reserves_million_barrels",
|
|
"start_date": date(1979, 1, 1),
|
|
"end_date": date(1979, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasLeaseCondensate"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_lease_condensate_production_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas lease condensate production fetcher."""
|
|
params = {
|
|
"region": "us",
|
|
"series": "us_natural_gas_liquids_lease_condensate_reserves_based",
|
|
"start_date": date(1979, 1, 1),
|
|
"end_date": date(1979, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasLeaseCondensateProduction"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_lng_storage_additions_and_withdrawals_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas lng storage additions and withdrawals fetcher."""
|
|
params = {
|
|
"process": "lng_storage_net_withdrawals",
|
|
"region": "us",
|
|
"series": "us_natural_gas_lng_storage_net_withdrawals",
|
|
"start_date": date(1969, 1, 1),
|
|
"end_date": date(1969, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasLngStorageAdditionsAndWithdrawals"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_maximum_us_active_seismic_crew_counts_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas maximum us active seismic crew counts fetcher."""
|
|
params = {
|
|
"process": "maximum_number_of_active_crews_engaged_in_sismic_surveying",
|
|
"region": "us",
|
|
"series": "us_maximum_number_of_active_crews_engaged_in_seismic",
|
|
"start_date": date(2000, 1, 1),
|
|
"end_date": date(2000, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasMaximumUsActiveSeismicCrewCounts"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_natural_gas_annual_supply_disposition_by_state_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas natural gas annual supply disposition by state fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "underground_storage_injections",
|
|
"region": "us",
|
|
"series": "us_total_natural_gas_injections_into_underground_storage",
|
|
"start_date": date(1973, 1, 1),
|
|
"end_date": date(1973, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaNaturalGasNaturalGasAnnualSupplyDispositionByState"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_natural_gas_consumption_by_end_use_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas natural gas consumption by end use fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "commercial_consumption",
|
|
"region": "us",
|
|
"series": "natural_gas_deliveries_to_commercial_consumers_in_the_us",
|
|
"start_date": date(1973, 1, 1),
|
|
"end_date": date(1973, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasNaturalGasConsumptionByEndUse"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_natural_gas_delivered_for_the_account_of_others_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas natural gas delivered for the account of others fetcher."""
|
|
params = {
|
|
"process": "delivered_to_industrial_consumers_for_the_account_of_others",
|
|
"region": "us",
|
|
"series": "us_natural_gas_delivered_to_industrial_consumers_for_the",
|
|
"start_date": date(1982, 1, 1),
|
|
"end_date": date(1982, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaNaturalGasNaturalGasDeliveredForTheAccountOfOthers"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_natural_gas_gross_withdrawals_and_production_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas natural gas gross withdrawals and production fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "removed_from_natural_gas",
|
|
"region": "us",
|
|
"series": "us_nonhydrocarbon_gases_removed_from_natural_gas",
|
|
"start_date": date(1973, 1, 1),
|
|
"end_date": date(1973, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasNaturalGasGrossWithdrawalsAndProduction"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_natural_gas_liquids_proved_reserves_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas natural gas liquids proved reserves fetcher."""
|
|
params = {
|
|
"process": "proved_reserves",
|
|
"region": "us",
|
|
"series": "us_natural_gas_plant_liquids_proved_reserves",
|
|
"start_date": date(1979, 1, 1),
|
|
"end_date": date(1979, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasNaturalGasLiquidsProvedReserves"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_natural_gas_plant_liquids_production_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas natural gas plant liquids production fetcher."""
|
|
params = {
|
|
"region": "us",
|
|
"series": "us_natural_gas_plant_liquids_reserves_based_production",
|
|
"start_date": date(1979, 1, 1),
|
|
"end_date": date(1979, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasNaturalGasPlantLiquidsProduction"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_natural_gas_plant_processing_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas natural gas plant processing fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"region": "us",
|
|
"series": "us_natural_gas_plant_liquids_production",
|
|
"start_date": date(1973, 1, 1),
|
|
"end_date": date(1973, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasNaturalGasPlantProcessing"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_natural_gas_prices_fetcher(credentials=test_credentials):
|
|
"""Test the EIA natural gas natural gas prices fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "price_delivered_to_residential_consumers",
|
|
"region": "us",
|
|
"series": "us_price_of_natural_gas_delivered_to_residential_consumers",
|
|
"start_date": date(1973, 1, 1),
|
|
"end_date": date(1973, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasNaturalGasPrices"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_natural_gas_proved_reserves_wet_after_lease_separation_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas natural gas proved reserves wet after lease separation fetcher."""
|
|
params = {
|
|
"process": "wet_after_lease_separation_reserves_revision_increases",
|
|
"region": "us",
|
|
"series": "us_natural_gas_wet_after_lease_separation_reserves_revision_increases_billion_cubic_feet",
|
|
"start_date": date(1979, 1, 1),
|
|
"end_date": date(1979, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaNaturalGasNaturalGasProvedReservesWetAfterLeaseSeparation"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_natural_gas_reserves_summary_as_of_dec31_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas natural gas reserves summary as of dec31 fetcher."""
|
|
params = {
|
|
"process": "dry_expected_future_production",
|
|
"product": "natural_gas",
|
|
"region": "us",
|
|
"series": "us_dry_natural_gas_expected_future_production",
|
|
"start_date": date(1925, 1, 1),
|
|
"end_date": date(1925, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasNaturalGasReservesSummaryAsOfDec31"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_natural_gas_spot_and_futures_prices_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas natural gas spot and futures prices fetcher."""
|
|
params = {
|
|
"frequency": "weekly",
|
|
"process": "future_contract_4",
|
|
"region": "new_york_city",
|
|
"series": "natural_gas_futures_contract_4",
|
|
"start_date": date(1993, 12, 24),
|
|
"end_date": date(1993, 12, 24),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasNaturalGasSpotAndFuturesPrices"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_natural_gas_summary_fetcher(credentials=test_credentials):
|
|
"""Test the EIA natural gas natural gas summary fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "price_delivered_to_residential_consumers",
|
|
"region": "us",
|
|
"series": "N3010US3",
|
|
"start_date": date(1973, 1, 1),
|
|
"end_date": date(1973, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasNaturalGasSummary"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_natural_gas_wellhead_value_and_marketed_production_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas natural gas wellhead value and marketed production fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "marketed_production",
|
|
"region": "us",
|
|
"series": "us_natural_gas_marketed_production",
|
|
"start_date": date(1973, 1, 1),
|
|
"end_date": date(1973, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaNaturalGasNaturalGasWellheadValueAndMarketedProduction"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_nonassociated_proved_reserves_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas nonassociated proved reserves fetcher."""
|
|
params = {
|
|
"process": "nonassociated_proved_reserves",
|
|
"region": "us",
|
|
"series": "us_nonassociated_natural_gas_wet_after_lease_separation_proved_reserves_billion_cubic_feet",
|
|
"start_date": date(1979, 1, 1),
|
|
"end_date": date(1979, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasNonassociatedProvedReserves"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_number_of_gas_producing_oil_wells_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas number of gas producing oil wells fetcher."""
|
|
params = {
|
|
"region": "us",
|
|
"series": "us_natural_gas_number_of_oil_wells",
|
|
"start_date": date(2011, 1, 1),
|
|
"end_date": date(2011, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasNumberOfGasProducingOilWells"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_number_of_natural_gas_consumers_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas number of natural gas consumers fetcher."""
|
|
params = {
|
|
"process": "average_annual_consumption_per_commercial_consumer",
|
|
"region": "us",
|
|
"series": "us_natural_gas_average_annual_consumption_per_commercial",
|
|
"start_date": date(1967, 1, 1),
|
|
"end_date": date(1967, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasNumberOfNaturalGasConsumers"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_number_of_producing_gas_wells_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas number of producing gas wells fetcher."""
|
|
params = {
|
|
"region": "us",
|
|
"series": "us_natural_gas_number_of_gas_and_gas_condensate_wells",
|
|
"start_date": date(1989, 1, 1),
|
|
"end_date": date(1989, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasNumberOfProducingGasWells"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_offshore_gross_withdrawals_of_natural_gas_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas offshore gross withdrawals of natural gas fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "withdrawals_from_gas_wells",
|
|
"series": "federal_offshore_gulf_of_america_natural_gas_gross_withdrawals_from_gas_wells_mmcf",
|
|
"start_date": date(1997, 1, 1),
|
|
"end_date": date(1997, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasOffshoreGrossWithdrawalsOfNaturalGas"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_plant_liquids_in_proved_reserves_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas plant liquids in proved reserves fetcher."""
|
|
params = {
|
|
"region": "us",
|
|
"series": "us_natural_gas_plant_liquids_expected_future_production",
|
|
"start_date": date(1979, 1, 1),
|
|
"end_date": date(1979, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasPlantLiquidsInProvedReserves"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_proved_nonproducing_reserves_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas proved nonproducing reserves fetcher."""
|
|
params = {
|
|
"process": "associated_dissolved_reserves_in_nonproducing_reservoirs",
|
|
"product": "natural_gas",
|
|
"region": "na",
|
|
"series": "gulf_of_america_federal_offshore_western_associated_dissolved_natural_gas_reserves_in_nonproducing_reservoirs_wet_bcf",
|
|
"start_date": date(1996, 1, 1),
|
|
"end_date": date(1996, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasProvedNonproducingReserves"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_residential_and_commercial_prices_selected_states_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas residential and commercial prices selected states fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "price_delivered_to_residential_consumers",
|
|
"region": "usa_dc",
|
|
"series": "district_of_columbia_price_of_natural_gas_delivered_to",
|
|
"start_date": date(1989, 1, 1),
|
|
"end_date": date(1989, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaNaturalGasResidentialAndCommercialPricesSelectedStates"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_shale_gas_fetcher(credentials=test_credentials):
|
|
"""Test the EIA natural gas shale gas fetcher."""
|
|
params = {
|
|
"process": "shale_proved_reserves",
|
|
"region": "us",
|
|
"series": "us_shale_proved_reserves",
|
|
"start_date": date(2007, 1, 1),
|
|
"end_date": date(2007, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasShaleGas"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_shale_gas_production_fetcher(credentials=test_credentials):
|
|
"""Test the EIA natural gas shale gas production fetcher."""
|
|
params = {
|
|
"region": "us",
|
|
"series": "us_shale_production",
|
|
"start_date": date(2007, 1, 1),
|
|
"end_date": date(2007, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasShaleGasProduction"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_share_of_total_us_natural_gas_delivered_to_consumers_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas share of total us natural gas delivered to consumers fetcher."""
|
|
params = {
|
|
"process": "of_total_residential_deliveries",
|
|
"region": "us",
|
|
"series": "us_natural_gas_of_total_residential_deliveries",
|
|
"start_date": date(1993, 1, 1),
|
|
"end_date": date(1993, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaNaturalGasShareOfTotalUsNaturalGasDeliveredToConsumers"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_supplemental_gas_supplies_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas supplemental gas supplies fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"start_date": date(1980, 1, 1),
|
|
"end_date": date(1980, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasSupplementalGasSupplies"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_underground_natural_gas_storage_by_all_operators_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas underground natural gas storage by all operators fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "underground_storage_base_gas",
|
|
"region": "us",
|
|
"series": "us_total_natural_gas_in_underground_storage_base_gas_mmcf",
|
|
"start_date": date(1973, 1, 1),
|
|
"end_date": date(1973, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaNaturalGasUndergroundNaturalGasStorageByAllOperators"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_underground_natural_gas_storage_capacity_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas underground natural gas storage capacity fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "total_underground_storage_capacity",
|
|
"region": "us",
|
|
"series": "us_total_natural_gas_underground_storage_capacity",
|
|
"start_date": date(1989, 1, 1),
|
|
"end_date": date(1989, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasUndergroundNaturalGasStorageCapacity"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_us_natural_gas_exports_and_re_exports_by_country_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas us natural gas exports and re exports by country fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "exports",
|
|
"region": "us",
|
|
"series": "us_natural_gas_exports",
|
|
"start_date": date(1973, 1, 1),
|
|
"end_date": date(1973, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaNaturalGasUsNaturalGasExportsAndReExportsByCountry"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_us_natural_gas_exports_and_re_exports_by_point_of_exit_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas us natural gas exports and re exports by point of exit fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "liquefied_natural_gas_exports_price",
|
|
"region": "jpn",
|
|
"series": "price_of_liquefied_us_natural_gas_exports_to_japan",
|
|
"start_date": date(1973, 1, 1),
|
|
"end_date": date(1973, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaNaturalGasUsNaturalGasExportsAndReExportsByPointOfExit"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_us_natural_gas_imports_by_country_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas us natural gas imports by country fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "imports",
|
|
"region": "us",
|
|
"series": "us_natural_gas_imports",
|
|
"start_date": date(1973, 1, 1),
|
|
"end_date": date(1973, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasUsNaturalGasImportsByCountry"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_us_natural_gas_imports_by_point_of_entry_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas us natural gas imports by point of entry fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "liquefied_natural_gas_imports",
|
|
"region": "dza",
|
|
"series": "us_liquefied_natural_gas_imports_from_algeria",
|
|
"start_date": date(1973, 1, 1),
|
|
"end_date": date(1973, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasUsNaturalGasImportsByPointOfEntry"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_us_natural_gas_imports_exports_by_state_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas us natural gas imports exports by state fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "exports",
|
|
"series": "us_natural_gas_exports",
|
|
"start_date": date(1973, 1, 1),
|
|
"end_date": date(1973, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasUsNaturalGasImportsExportsByState"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_us_natural_gas_monthly_supply_and_disposition_balance_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas us natural gas monthly supply and disposition balance fetcher."""
|
|
params = {
|
|
"process": "net_imports",
|
|
"region": "us",
|
|
"series": "us_natural_gas_net_imports",
|
|
"start_date": date(1973, 1, 1),
|
|
"end_date": date(1973, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaNaturalGasUsNaturalGasMonthlySupplyAndDispositionBalance"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_us_underground_natural_gas_storage_by_storage_type_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas us underground natural gas storage by storage type fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "underground_storage_base_gas",
|
|
"series": "us_total_natural_gas_in_underground_storage_base_gas_mmcf",
|
|
"start_date": date(1973, 1, 1),
|
|
"end_date": date(1973, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaNaturalGasUsUndergroundNaturalGasStorageByStorageType"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_natural_gas_weekly_working_gas_in_underground_storage_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA natural gas weekly working gas in underground storage fetcher."""
|
|
params = {
|
|
"process": "non_salt_underground_storage_working_gas",
|
|
"region": "na",
|
|
"series": "weekly_nonsalt_region_natural_gas_working_underground",
|
|
"start_date": date(2010, 1, 1),
|
|
"end_date": date(2010, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNaturalGasWeeklyWorkingGasInUndergroundStorage"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_nuclear_outages_facility_level_nuclear_outages_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA nuclear outages facility level nuclear outages fetcher."""
|
|
params = {
|
|
"facility": "browns_ferry",
|
|
"start_date": date(2007, 1, 1),
|
|
"end_date": date(2007, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNuclearOutagesFacilityLevelNuclearOutages"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_nuclear_outages_generator_level_nuclear_outages_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA nuclear outages generator level nuclear outages fetcher."""
|
|
params = {
|
|
"facility": "browns_ferry",
|
|
"generator": "1",
|
|
"start_date": date(2007, 1, 1),
|
|
"end_date": date(2007, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNuclearOutagesGeneratorLevelNuclearOutages"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_nuclear_outages_us_nuclear_outages_fetcher(credentials=test_credentials):
|
|
"""Test the EIA nuclear outages us nuclear outages fetcher."""
|
|
params = {
|
|
"start_date": date(2007, 1, 1),
|
|
"end_date": date(2007, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaNuclearOutagesUsNuclearOutages"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_adjusted_distillate_fuel_oil_and_kerosene_sales_by_end_use_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum adjusted distillate fuel oil and kerosene sales by end use fetcher."""
|
|
params = {
|
|
"process": "adj_sales_deliveries_to_farm_consumers",
|
|
"product": "no_2_diesel",
|
|
"region": "us",
|
|
"series": "K2DVAFNUS1",
|
|
"start_date": date(1984, 1, 1),
|
|
"end_date": date(1984, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaPetroleumAdjustedDistillateFuelOilAndKeroseneSalesByEndUse"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_adjusted_sales_of_distillate_fuel_oil_by_end_use_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum adjusted sales of distillate fuel oil by end use fetcher."""
|
|
params = {
|
|
"process": "adj_sales_deliveries_total_to_end_users",
|
|
"product": "distillate_fuel_oil",
|
|
"region": "us",
|
|
"series": "us_total_distillate_adj_sales_deliveries_total_to_end_users",
|
|
"start_date": date(1984, 1, 1),
|
|
"end_date": date(1984, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumAdjustedSalesOfDistillateFuelOilByEndUse"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_adjusted_sales_of_kerosene_by_end_use_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum adjusted sales of kerosene by end use fetcher."""
|
|
params = {
|
|
"process": "adj_sales_deliveries_total_to_end_users",
|
|
"region": "us",
|
|
"series": "us_kerosene_adj_sales_deliveries_total_to_end_users",
|
|
"start_date": date(1984, 1, 1),
|
|
"end_date": date(1984, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumAdjustedSalesOfKeroseneByEndUse"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_adjusted_sales_of_residual_fuel_oil_by_end_use_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum adjusted sales of residual fuel oil by end use fetcher."""
|
|
params = {
|
|
"process": "adj_sales_deliveries_total_to_end_users",
|
|
"region": "us",
|
|
"series": "us_residual_fuel_oil_adj_sales_deliveries_total_to_end_users",
|
|
"start_date": date(1984, 1, 1),
|
|
"end_date": date(1984, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumAdjustedSalesOfResidualFuelOilByEndUse"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_average_depth_of_crude_oil_and_natural_gas_wells_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum average depth of crude oil and natural gas wells fetcher."""
|
|
params = {
|
|
"process": "average_depth_of_exploratory_and_developmental_wells_drilled",
|
|
"product": "wells_total",
|
|
"series": "us_average_depth_of_crude_oil_natural_gas_and_dry_exploratory_and_developmental_wells_drilled_feet_per_well",
|
|
"start_date": date(1949, 1, 1),
|
|
"end_date": date(1949, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumAverageDepthOfCrudeOilAndNaturalGasWells"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_biofuels_operable_production_capacity_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum biofuels operable production capacity fetcher."""
|
|
params = {
|
|
"product": "biodiesel",
|
|
"series": "us_biodiesel_production_capacity",
|
|
"start_date": date(2021, 1, 1),
|
|
"end_date": date(2021, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumBiofuelsOperableProductionCapacity"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_blender_net_input_fetcher(credentials=test_credentials):
|
|
"""Test the EIA petroleum blender net input fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "gasoline_blending_components",
|
|
"region": "us",
|
|
"series": "us_blender_net_input_of_gasoline_blending_components_thousand_barrels",
|
|
"start_date": date(2005, 1, 1),
|
|
"end_date": date(2005, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumBlenderNetInput"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_blender_net_production_fetcher(credentials=test_credentials):
|
|
"""Test the EIA petroleum blender net production fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "reformulated_motor_gasoline_with_alcohol",
|
|
"region": "us",
|
|
"series": "us_blender_net_production_of_reformulated_motor_gasoline_with_fuel_alcohol_thousand_barrels",
|
|
"start_date": date(2005, 1, 1),
|
|
"end_date": date(2005, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumBlenderNetProduction"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_costs_of_crude_oil_and_natural_gas_wells_drilled_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum costs of crude oil and natural gas wells drilled fetcher."""
|
|
params = {
|
|
"process": "real_cost_per_foot",
|
|
"product": "wells_total",
|
|
"series": "us_real_cost_per_foot_of_crude_oil_natural_gas_and_dry",
|
|
"start_date": date(1960, 1, 1),
|
|
"end_date": date(1960, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumCostsOfCrudeOilAndNaturalGasWellsDrilled"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_crude_first_purchase_prices_selected_streams_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum crude first purchase prices selected streams fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "ans_crude_oil",
|
|
"region": "usa_ak",
|
|
"series": "alaska_north_slope_first_purchase_price",
|
|
"start_date": date(1977, 7, 1),
|
|
"end_date": date(1977, 7, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumCrudeFirstPurchasePricesSelectedStreams"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_crude_oil_and_lease_condensate_production_by_api_gravity_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum crude oil and lease condensate production by api gravity fetcher."""
|
|
params = {
|
|
"product": "crude_gravity_of_unkown",
|
|
"region": "na",
|
|
"series": "lower_48_states_crude_oil_and_lease_condensate_production_for_unknown_api_gravity_thousand_barrels_per_day",
|
|
"start_date": date(2015, 1, 1),
|
|
"end_date": date(2015, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaPetroleumCrudeOilAndLeaseCondensateProductionByApiGravity"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_crude_oil_and_natural_gas_drilling_activity_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum crude oil and natural gas drilling activity fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "active_well_service_rigs_in_operation",
|
|
"product": "crude_oil_and_natural_gas",
|
|
"region": "us",
|
|
"series": "us_crude_oil_and_natural_gas_active_well_service_rigs_in",
|
|
"start_date": date(1973, 1, 1),
|
|
"end_date": date(1973, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumCrudeOilAndNaturalGasDrillingActivity"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_crude_oil_and_natural_gas_exploratory_and_development_wells_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum crude oil and natural gas exploratory and development wells fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "exploratory_and_developmental_wells_drilled",
|
|
"product": "wells_total",
|
|
"series": "us_crude_oil_natural_gas_and_dry_exploratory_and",
|
|
"start_date": date(1973, 1, 1),
|
|
"end_date": date(1973, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaPetroleumCrudeOilAndNaturalGasExploratoryAndDevelopmentWells"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_crude_oil_input_qualities_fetcher(credentials=test_credentials):
|
|
"""Test the EIA petroleum crude oil input qualities fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "refinery_inputs_average_api_gravity",
|
|
"region": "na",
|
|
"series": "indiana_illinois_kentucky_refinery_district_api_gravity_of",
|
|
"start_date": date(1985, 1, 1),
|
|
"end_date": date(1985, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumCrudeOilInputQualities"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_crude_oil_production_fetcher(credentials=test_credentials):
|
|
"""Test the EIA petroleum crude oil production fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "crude_oil",
|
|
"region": "us",
|
|
"series": "us_field_production_of_crude_oil_thousand_barrels",
|
|
"start_date": date(1920, 1, 1),
|
|
"end_date": date(1920, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumCrudeOilProduction"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_crude_oil_proved_reserves_reserves_changes_and_production_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum crude oil proved reserves reserves changes and production fetcher."""
|
|
params = {
|
|
"process": "proved_reserves",
|
|
"region": "us",
|
|
"series": "us_crude_oil_proved_reserves",
|
|
"start_date": date(1899, 1, 1),
|
|
"end_date": date(1899, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaPetroleumCrudeOilProvedReservesReservesChangesAndProduction"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_crude_oil_stocks_at_tank_farms_pipelines_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum crude oil stocks at tank farms pipelines fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "stocks_at_tank_farms",
|
|
"region": "padd_1",
|
|
"series": "east_coast_crude_oil_stocks_at_tank_farms_and_pipelines",
|
|
"start_date": date(1981, 1, 1),
|
|
"end_date": date(1981, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumCrudeOilStocksAtTankFarmsPipelines"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_crude_plus_lease_condensate_proved_reserves_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum crude plus lease condensate proved reserves fetcher."""
|
|
params = {
|
|
"process": "proved_reserves",
|
|
"region": "us",
|
|
"series": "us_crude_oil_lease_condensate_proved_reserves",
|
|
"start_date": date(2009, 1, 1),
|
|
"end_date": date(2009, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumCrudePlusLeaseCondensateProvedReserves"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_distillate_fuel_oil_and_kerosene_sales_by_end_use_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum distillate fuel oil and kerosene sales by end use fetcher."""
|
|
params = {
|
|
"process": "commercial_consumption",
|
|
"product": "no_2_fuel_oil_heating_oil",
|
|
"region": "us",
|
|
"series": "K2FVCSNUS1",
|
|
"start_date": date(1984, 1, 1),
|
|
"end_date": date(1984, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaPetroleumDistillateFuelOilAndKeroseneSalesByEndUse"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_domestic_crude_oil_first_purchase_prices_by_api_gravity_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum domestic crude oil first purchase prices by api gravity fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "crude_gravity_20_0_percent_or_less",
|
|
"series": "us_domestic_crude_oil_first_purchase_prices_with_api_gravity_20_0_degrees_or_less_dollars_per_barrel",
|
|
"start_date": date(1993, 10, 1),
|
|
"end_date": date(1993, 10, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaPetroleumDomesticCrudeOilFirstPurchasePricesByApiGravity"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_domestic_crude_oil_first_purchase_prices_by_area_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum domestic crude oil first purchase prices by area fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "crude_oil",
|
|
"region": "us",
|
|
"series": "us_crude_oil_first_purchase_price",
|
|
"start_date": date(1974, 1, 1),
|
|
"end_date": date(1974, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaPetroleumDomesticCrudeOilFirstPurchasePricesByArea"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_downstream_charge_capacity_of_operable_petroleum_refineries_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum downstream charge capacity of operable petroleum refineries fetcher."""
|
|
params = {
|
|
"process": "refinery_catalytic_cracking_fresh_feed_downstream_charge",
|
|
"region": "pri",
|
|
"series": "8_NA_8CCF_NPZ_5",
|
|
"start_date": date(1982, 1, 1),
|
|
"end_date": date(1982, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaPetroleumDownstreamChargeCapacityOfOperablePetroleumRefineries"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_downstream_processing_of_fresh_feed_input_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum downstream processing of fresh feed input fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "downstream_delayed_fluid_coking",
|
|
"region": "na",
|
|
"series": "refining_district_indiana_illinois_kentucky_downstream_processing_of_fresh_feed_input_by_delayed_and_fluid_coking_units_thousand_barrels_per_day",
|
|
"start_date": date(1987, 1, 1),
|
|
"end_date": date(1987, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumDownstreamProcessingOfFreshFeedInput"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_exports_fetcher(credentials=test_credentials):
|
|
"""Test the EIA petroleum exports fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "crude_oil",
|
|
"region": "us",
|
|
"series": "us_exports_of_crude_oil_thousand_barrels",
|
|
"start_date": date(1920, 1, 1),
|
|
"end_date": date(1920, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumExports"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_exports_by_destination_fetcher(credentials=test_credentials):
|
|
"""Test the EIA petroleum exports by destination fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "crude_oil",
|
|
"region": "us",
|
|
"series": "MCREXUS1",
|
|
"start_date": date(1920, 1, 1),
|
|
"end_date": date(1920, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumExportsByDestination"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_feedstocks_consumed_for_production_of_biofuels_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum feedstocks consumed for production of biofuels fetcher."""
|
|
params = {
|
|
"product": "other_animal_fats_inputs_to_biodiesel_production",
|
|
"series": "other_waste_oil_fat_and_grease_inputs_to_biofuels_production",
|
|
"start_date": date(2019, 1, 1),
|
|
"end_date": date(2019, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaPetroleumFeedstocksConsumedForProductionOfBiofuels"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_fob_costs_of_imported_crude_oil_by_api_gravity_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum fob costs of imported crude oil by api gravity fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "crude_gravity_20_0_percent_or_less",
|
|
"series": "us_fob_costs_of_crude_with_api_gravity_20_0_degrees_or_less",
|
|
"start_date": date(1983, 1, 1),
|
|
"end_date": date(1983, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumFobCostsOfImportedCrudeOilByApiGravity"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_fob_costs_of_imported_crude_oil_by_area_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum fob costs of imported crude oil by area fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"region": "na",
|
|
"series": "us_fob_costs_of_crude_oil",
|
|
"start_date": date(1973, 10, 1),
|
|
"end_date": date(1973, 10, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumFobCostsOfImportedCrudeOilByArea"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_fob_costs_of_imported_crude_oil_for_selected_crude_streams_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum fob costs of imported crude oil for selected crude streams fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "angolan_cabinda_crude_oil",
|
|
"region": "ago",
|
|
"series": "us_fob_costs_of_angolan_cabinda_crude_oil",
|
|
"start_date": date(1983, 1, 1),
|
|
"end_date": date(1983, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaPetroleumFobCostsOfImportedCrudeOilForSelectedCrudeStreams"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_footage_drilled_for_crude_oil_and_natural_gas_wells_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum footage drilled for crude oil and natural gas wells fetcher."""
|
|
params = {
|
|
"process": "footage_drilled_for_developmental_wells",
|
|
"product": "wells_total",
|
|
"series": "us_footage_drilled_for_crude_oil_natural_gas_and_dry_developmental_wells_thousand_feet",
|
|
"start_date": date(1949, 1, 1),
|
|
"end_date": date(1949, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaPetroleumFootageDrilledForCrudeOilAndNaturalGasWells"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_fuel_consumed_at_biofuels_plants_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum fuel consumed at biofuels plants fetcher."""
|
|
params = {
|
|
"process": "biogas_consumed_at_biofuels_plants",
|
|
"series": "us_biogas_consumed_at_biofuels_plants",
|
|
"start_date": date(2021, 1, 1),
|
|
"end_date": date(2021, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumFuelConsumedAtBiofuelsPlants"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_fuel_consumed_at_refineries_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum fuel consumed at refineries fetcher."""
|
|
params = {
|
|
"process": "coal_consumed_at_refineries",
|
|
"region": "us",
|
|
"series": "us_coal_consumed_at_refineries",
|
|
"start_date": date(1985, 1, 1),
|
|
"end_date": date(1985, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumFuelConsumedAtRefineries"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_gasoline_prices_by_formulation_grade_sales_type_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum gasoline prices by formulation grade sales type fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "bulk_sales",
|
|
"product": "reformulated_motor_gasoline",
|
|
"region": "us",
|
|
"series": "EMA_EPM0R_PBS_NUS_DPG",
|
|
"start_date": date(1994, 1, 1),
|
|
"end_date": date(1994, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaPetroleumGasolinePricesByFormulationGradeSalesType"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_gulf_of_america_federal_offshore_production_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum gulf of america federal offshore production fetcher."""
|
|
params = {
|
|
"process": "production_from_reserves",
|
|
"product": "crude_oil",
|
|
"series": "gulf_of_america_federal_offshore_crude_oil_production",
|
|
"start_date": date(1992, 1, 1),
|
|
"end_date": date(1992, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumGulfOfAmericaFederalOffshoreProduction"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_imports_by_area_of_entry_fetcher(credentials=test_credentials):
|
|
"""Test the EIA petroleum imports by area of entry fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "crude_oil",
|
|
"region": "us",
|
|
"series": "us_imports_of_crude_oil_thousand_barrels",
|
|
"start_date": date(1920, 1, 1),
|
|
"end_date": date(1920, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumImportsByAreaOfEntry"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_imports_by_processing_area_fetcher(credentials=test_credentials):
|
|
"""Test the EIA petroleum imports by processing area fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "crude_oil",
|
|
"region": "padd_1",
|
|
"series": "east_coast_padd_1_imports_by_padd_of_processing_of_crude_oil_thousand_barrels",
|
|
"start_date": date(1981, 1, 1),
|
|
"end_date": date(1981, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumImportsByProcessingArea"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_imports_of_residual_fuel_fetcher(credentials=test_credentials):
|
|
"""Test the EIA petroleum imports of residual fuel fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "residual_fuel_oil",
|
|
"region": "us",
|
|
"series": "us_imports_of_residual_fuel_oil_thousand_barrels",
|
|
"start_date": date(1936, 1, 1),
|
|
"end_date": date(1936, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumImportsOfResidualFuel"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_landed_costs_of_imported_crude_by_api_gravity_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum landed costs of imported crude by api gravity fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "crude_gravity_20_0_percent_or_less",
|
|
"series": "us_landed_costs_of_crude_with_api_gravity_20_0_degrees_or",
|
|
"start_date": date(1983, 1, 1),
|
|
"end_date": date(1983, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumLandedCostsOfImportedCrudeByApiGravity"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_landed_costs_of_imported_crude_by_area_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum landed costs of imported crude by area fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"region": "na",
|
|
"series": "us_landed_costs_of_non_opec_countries_crude_oil",
|
|
"start_date": date(1973, 1, 1),
|
|
"end_date": date(1973, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumLandedCostsOfImportedCrudeByArea"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_landed_costs_of_imported_crude_for_selected_crude_streams_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum landed costs of imported crude for selected crude streams fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "angolan_cabinda_crude_oil",
|
|
"region": "ago",
|
|
"series": "us_landed_costs_of_angolan_cabinda_crude_oil",
|
|
"start_date": date(1983, 1, 1),
|
|
"end_date": date(1983, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaPetroleumLandedCostsOfImportedCrudeForSelectedCrudeStreams"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_maximum_us_active_seismic_crew_counts_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum maximum us active seismic crew counts fetcher."""
|
|
params = {
|
|
"process": "maximum_number_of_active_crews_engaged_in_sismic_surveying",
|
|
"region": "us",
|
|
"series": "us_maximum_number_of_active_crews_engaged_in_seismic",
|
|
"start_date": date(2000, 1, 1),
|
|
"end_date": date(2000, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumMaximumUsActiveSeismicCrewCounts"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_movements_between_pad_districts_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum movements between pad districts fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "asphalt_and_road_oil",
|
|
"region": "padd_2",
|
|
"series": "east_coast_padd_1_receipts_by_pipeline_tanker_barge_and_rail_from_midwest_padd_2_of_asphalt_and_road_oil_thousand_barrels",
|
|
"start_date": date(1986, 1, 1),
|
|
"end_date": date(1986, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumMovementsBetweenPadDistricts"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_movements_by_pipeline_between_pad_districts_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum movements by pipeline between pad districts fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "gasoline_blending_components",
|
|
"region": "padd_2",
|
|
"series": "east_coast_receipts_by_pipeline_from_midwest_of_gasoline",
|
|
"start_date": date(1986, 1, 1),
|
|
"end_date": date(1986, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumMovementsByPipelineBetweenPadDistricts"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_movements_by_rail_between_pad_districts_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum movements by rail between pad districts fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "crude_oil",
|
|
"region": "padd_2",
|
|
"series": "east_coast_receipts_by_rail_from_midwest_of_crude_oil",
|
|
"start_date": date(2010, 1, 1),
|
|
"end_date": date(2010, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumMovementsByRailBetweenPadDistricts"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_movements_by_tanker_and_barge_between_pad_districts_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum movements by tanker and barge between pad districts fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "asphalt_and_road_oil",
|
|
"region": "padd_1a",
|
|
"series": "new_england_padd_1a_receipts_by_tanker_and_barge_from_gulf_coast_padd_3_of_asphalt_and_road_oil_thousand_barrels",
|
|
"start_date": date(1986, 1, 1),
|
|
"end_date": date(1986, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaPetroleumMovementsByTankerAndBargeBetweenPadDistricts"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_movements_of_crude_oil_and_selected_products_by_rail_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum movements of crude oil and selected products by rail fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "crude_oil",
|
|
"region": "us",
|
|
"series": "us_crude_oil_by_rail",
|
|
"start_date": date(2010, 1, 1),
|
|
"end_date": date(2010, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaPetroleumMovementsOfCrudeOilAndSelectedProductsByRail"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_natural_gas_feedstock_for_hydrogen_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum natural gas feedstock for hydrogen fetcher."""
|
|
params = {
|
|
"region": "us",
|
|
"series": "us_natural_gas_used_as_feedstock_for_hydrogen_production",
|
|
"start_date": date(2008, 1, 1),
|
|
"end_date": date(2008, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumNaturalGasFeedstockForHydrogen"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_natural_gas_plant_field_production_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum natural gas plant field production fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "natural_gas_plant_liquids",
|
|
"region": "us",
|
|
"series": "us_field_production_of_natural_gas_liquids_thousand_barrels_per_day",
|
|
"start_date": date(1973, 1, 1),
|
|
"end_date": date(1973, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumNaturalGasPlantFieldProduction"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_natural_gas_plant_stocks_fetcher(credentials=test_credentials):
|
|
"""Test the EIA petroleum natural gas plant stocks fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "isobutane_isobutylene",
|
|
"region": "na",
|
|
"series": "refining_district_indiana_illinois_kentucky_isobutane",
|
|
"start_date": date(1993, 1, 1),
|
|
"end_date": date(1993, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumNaturalGasPlantStocks"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_net_receipts_between_pad_districts_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum net receipts between pad districts fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "net_receipts_by_pipeline_tanker_barge_and_rail",
|
|
"product": "asphalt_and_road_oil",
|
|
"region": "padd_1",
|
|
"series": "east_coast_padd_1_net_receipts_by_pipeline_tanker_barge_and_rail_from_other_padds_of_asphalt_and_road_oil_thousand_barrels",
|
|
"start_date": date(1981, 1, 1),
|
|
"end_date": date(1981, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumNetReceiptsBetweenPadDistricts"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_no2_distillate_prices_by_sales_type_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum no2 distillate prices by sales type fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "residential_price_by_all_sellers",
|
|
"product": "no_2_distillate",
|
|
"region": "us",
|
|
"series": "us_no_2_distillate_residential_price_by_all_sellers",
|
|
"start_date": date(1983, 1, 1),
|
|
"end_date": date(1983, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumNo2DistillatePricesBySalesType"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_number_and_capacity_of_petroleum_refineries_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum number and capacity of petroleum refineries fetcher."""
|
|
params = {
|
|
"process": "refinery_catalytic_cracking_fresh_feed_downstream_charge",
|
|
"region": "pri",
|
|
"series": "8_NA_8CCF_NPZ_5",
|
|
"start_date": date(1982, 1, 1),
|
|
"end_date": date(1982, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumNumberAndCapacityOfPetroleumRefineries"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_nymex_futures_prices_fetcher(credentials=test_credentials):
|
|
"""Test the EIA petroleum nymex futures prices fetcher."""
|
|
params = {
|
|
"frequency": "weekly",
|
|
"process": "future_contract_1",
|
|
"product": "no_2_fuel_oil_heating_oil",
|
|
"region": "new_york_city",
|
|
"series": "new_york_harbor_no_2_heating_oil_future_contract_1",
|
|
"start_date": date(1980, 1, 4),
|
|
"end_date": date(1980, 1, 4),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumNymexFuturesPrices"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_oxygenate_production_fetcher(credentials=test_credentials):
|
|
"""Test the EIA petroleum oxygenate production fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "oxygenate_plant_production",
|
|
"product": "fuel_ethanol",
|
|
"region": "us",
|
|
"series": "us_oxygenate_plant_production_of_fuel_ethanol_thousand_barrels",
|
|
"start_date": date(1981, 1, 1),
|
|
"end_date": date(1981, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumOxygenateProduction"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_pad_district_exports_by_destination_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum pad district exports by destination fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "asphalt_and_road_oil",
|
|
"region": "padd_1",
|
|
"series": "MAPEXP11",
|
|
"start_date": date(1981, 1, 1),
|
|
"end_date": date(1981, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumPadDistrictExportsByDestination"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_pad_district_imports_by_country_of_origin_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum pad district imports by country of origin fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "imports_by_padd_of_processing",
|
|
"product": "crude_oil",
|
|
"region": "padd_1",
|
|
"series": "MCRIPP11",
|
|
"start_date": date(1981, 1, 1),
|
|
"end_date": date(1981, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumPadDistrictImportsByCountryOfOrigin"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_percentages_of_total_imported_crude_oil_by_api_gravity_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum percentages of total imported crude oil by api gravity fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "crude_gravity_20_0_percent_or_less",
|
|
"series": "us_percent_total_imported_by_api_gravity_of_crude_gravity_20_0_percent_or_less",
|
|
"start_date": date(1983, 1, 1),
|
|
"end_date": date(1983, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaPetroleumPercentagesOfTotalImportedCrudeOilByApiGravity"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_prices_sales_volumes_stocks_by_state_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum prices sales volumes stocks by state fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "retail_sales_by_refiners_and_gas_plants",
|
|
"product": "kerosene_type_jet_fuel",
|
|
"region": "us",
|
|
"series": "EMA_EPJK_PTG_NUS_DPG",
|
|
"start_date": date(1975, 7, 1),
|
|
"end_date": date(1975, 7, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumPricesSalesVolumesStocksByState"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_prime_supplier_sales_volumes_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum prime supplier sales volumes fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "total_gasoline",
|
|
"region": "us",
|
|
"series": "C100000001",
|
|
"start_date": date(1983, 1, 1),
|
|
"end_date": date(1983, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumPrimeSupplierSalesVolumes"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_product_supplied_fetcher(credentials=test_credentials):
|
|
"""Test the EIA petroleum product supplied fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "residual_fuel_oil",
|
|
"region": "us",
|
|
"series": "us_product_supplied_of_residual_fuel_oil_thousand_barrels",
|
|
"start_date": date(1936, 1, 1),
|
|
"end_date": date(1936, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumProductSupplied"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_production_capacity_of_operable_petroleum_refineries_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum production capacity of operable petroleum refineries fetcher."""
|
|
params = {
|
|
"process": "production_capacity_of_alkylates",
|
|
"region": "pri",
|
|
"series": "puerto_rico_refinery_alkylates_production_capacity_as_of",
|
|
"start_date": date(1982, 1, 1),
|
|
"end_date": date(1982, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaPetroleumProductionCapacityOfOperablePetroleumRefineries"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_propane_prices_by_sales_type_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum propane prices by sales type fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "residential_price_by_all_sellers",
|
|
"region": "us",
|
|
"series": "us_propane_residential_price_by_all_sellers",
|
|
"start_date": date(1993, 10, 1),
|
|
"end_date": date(1993, 10, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumPropanePricesBySalesType"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_proved_nonproducing_reserves_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum proved nonproducing reserves fetcher."""
|
|
params = {
|
|
"process": "associated_dissolved_reserves_in_nonproducing_reservoirs",
|
|
"product": "natural_gas",
|
|
"region": "na",
|
|
"series": "gulf_of_america_federal_offshore_western_associated_dissolved_natural_gas_reserves_in_nonproducing_reservoirs_wet_bcf",
|
|
"start_date": date(1996, 1, 1),
|
|
"end_date": date(1996, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumProvedNonproducingReserves"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_refiner_acquisition_cost_of_crude_oil_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum refiner acquisition cost of crude oil fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "imported_acquisition_cost",
|
|
"region": "us",
|
|
"series": "us_crude_oil_imported_acquisition_cost_by_refiners",
|
|
"start_date": date(1974, 1, 1),
|
|
"end_date": date(1974, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumRefinerAcquisitionCostOfCrudeOil"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_refiner_gasoline_prices_by_grade_and_sales_type_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum refiner gasoline prices by grade and sales type fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "retail_sales_by_refiners_and_gas_plants",
|
|
"product": "total_gasoline",
|
|
"region": "us",
|
|
"series": "us_total_gasoline_retail_sales_by_refiners",
|
|
"start_date": date(1983, 1, 1),
|
|
"end_date": date(1983, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumRefinerGasolinePricesByGradeAndSalesType"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_refiner_motor_gasoline_sales_volumes_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum refiner motor gasoline sales volumes fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "through_company_outlets_volume_by_refiners_and_gas_plants",
|
|
"product": "total_gasoline",
|
|
"region": "us",
|
|
"series": "A103400001",
|
|
"start_date": date(1983, 1, 1),
|
|
"end_date": date(1983, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumRefinerMotorGasolineSalesVolumes"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_refiner_petroleum_product_prices_by_sales_type_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum refiner petroleum product prices by sales type fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "retail_sales_by_refiners_and_gas_plants",
|
|
"product": "kerosene_type_jet_fuel",
|
|
"region": "us",
|
|
"series": "us_kerosene_type_jet_fuel_retail_sales_by_refiners",
|
|
"start_date": date(1975, 7, 1),
|
|
"end_date": date(1975, 7, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumRefinerPetroleumProductPricesBySalesType"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_refiner_residual_fuel_oil_and_no4_fuel_sales_volumes_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum refiner residual fuel oil and no4 fuel sales volumes fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "retail_sales_by_refiners_and_gas_plants",
|
|
"product": "residual_fuel_oil",
|
|
"region": "us",
|
|
"series": "us_residual_fuel_oil_retail_sales_by_refiners",
|
|
"start_date": date(1983, 1, 1),
|
|
"end_date": date(1983, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaPetroleumRefinerResidualFuelOilAndNo4FuelSalesVolumes"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_refiner_sales_volumes_of_other_petroleum_products_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum refiner sales volumes of other petroleum products fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "retail_sales_by_refiners_and_gas_plants",
|
|
"product": "no_2_distillate",
|
|
"region": "us",
|
|
"series": "A203600001",
|
|
"start_date": date(1983, 1, 1),
|
|
"end_date": date(1983, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaPetroleumRefinerSalesVolumesOfOtherPetroleumProducts"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_refinery_blender_net_input_fetcher(credentials=test_credentials):
|
|
"""Test the EIA petroleum refinery blender net input fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "crude_oil",
|
|
"region": "us",
|
|
"series": "MCRRIUS2",
|
|
"start_date": date(1961, 1, 1),
|
|
"end_date": date(1961, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumRefineryBlenderNetInput"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_refinery_blender_net_production_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum refinery blender net production fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "residual_fuel_oil",
|
|
"region": "us",
|
|
"series": "MRERPUS1",
|
|
"start_date": date(1936, 1, 1),
|
|
"end_date": date(1936, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumRefineryBlenderNetProduction"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_refinery_bulk_terminal_and_natural_gas_plant_stocks_by_state_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum refinery bulk terminal and natural gas plant stocks by state fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "distillate_fuel_oil_greater_than_15_to_500_ppm_sulfur",
|
|
"region": "us",
|
|
"series": "us_distillate_fuel_oil_greater_than_15_to_500_ppm_sulfur",
|
|
"start_date": date(1993, 1, 1),
|
|
"end_date": date(1993, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaPetroleumRefineryBulkTerminalAndNaturalGasPlantStocksByState"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_refinery_net_input_fetcher(credentials=test_credentials):
|
|
"""Test the EIA petroleum refinery net input fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "refinery_receipts_of_alaskan_oil",
|
|
"product": "crude_oil",
|
|
"region": "na",
|
|
"series": "MACNR2A1",
|
|
"start_date": date(1986, 1, 1),
|
|
"end_date": date(1986, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumRefineryNetInput"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_refinery_net_production_fetcher(credentials=test_credentials):
|
|
"""Test the EIA petroleum refinery net production fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "commercial_kerosene_type_jet_fuel",
|
|
"region": "us",
|
|
"series": "M_EPJKC_YPY_NUS_MBBL",
|
|
"start_date": date(1993, 1, 1),
|
|
"end_date": date(1993, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumRefineryNetProduction"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_refinery_receipts_of_crude_oil_by_method_of_transportation_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum refinery receipts of crude oil by method of transportation fetcher."""
|
|
params = {
|
|
"process": "crude_oil_refinery_receipts_by_barge",
|
|
"region": "us",
|
|
"series": "us_crude_oil_refinery_receipts_by_barge",
|
|
"start_date": date(1981, 1, 1),
|
|
"end_date": date(1981, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaPetroleumRefineryReceiptsOfCrudeOilByMethodOfTransportation"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_refinery_stocks_fetcher(credentials=test_credentials):
|
|
"""Test the EIA petroleum refinery stocks fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "crude_oil",
|
|
"region": "padd_1",
|
|
"series": "MCRRSP11",
|
|
"start_date": date(1981, 1, 1),
|
|
"end_date": date(1981, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumRefineryStocks"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_refinery_utilization_and_capacity_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum refinery utilization and capacity fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "refinery_net_input",
|
|
"region": "na",
|
|
"series": "indiana_illinois_kentucky_refinery_district_gross_inputs_to",
|
|
"start_date": date(1985, 1, 1),
|
|
"end_date": date(1985, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumRefineryUtilizationAndCapacity"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_refinery_yield_fetcher(credentials=test_credentials):
|
|
"""Test the EIA petroleum refinery yield fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "asphalt_and_road_oil",
|
|
"region": "na",
|
|
"series": "refining_district_indiana_illinois_kentucky_refinery_yield_of_asphalt_and_road_oil_percent",
|
|
"start_date": date(1993, 1, 1),
|
|
"end_date": date(1993, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumRefineryYield"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_residual_fuel_oil_prices_by_sales_type_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum residual fuel oil prices by sales type fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "retail_sales_by_all_sellers",
|
|
"product": "residual_fuel_oil_greater_than_1_sulfur",
|
|
"region": "us",
|
|
"series": "us_residual_fuel_oil_sulfur_greater_than_1_retail_sales_by",
|
|
"start_date": date(1983, 1, 1),
|
|
"end_date": date(1983, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumResidualFuelOilPricesBySalesType"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_sales_of_distillate_fuel_oil_by_end_use_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum sales of distillate fuel oil by end use fetcher."""
|
|
params = {
|
|
"process": "commercial_consumption",
|
|
"product": "distillate_fuel_oil",
|
|
"region": "us",
|
|
"series": "us_total_distillate_sales_deliveries_to_commercial_consumers",
|
|
"start_date": date(1984, 1, 1),
|
|
"end_date": date(1984, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumSalesOfDistillateFuelOilByEndUse"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_sales_of_kerosene_by_end_use_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum sales of kerosene by end use fetcher."""
|
|
params = {
|
|
"process": "commercial_consumption",
|
|
"region": "us",
|
|
"series": "us_kerosene_sales_deliveries_to_commercial_consumers",
|
|
"start_date": date(1984, 1, 1),
|
|
"end_date": date(1984, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumSalesOfKeroseneByEndUse"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_sales_of_residual_fuel_oil_by_end_use_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum sales of residual fuel oil by end use fetcher."""
|
|
params = {
|
|
"process": "commercial_consumption",
|
|
"region": "us",
|
|
"series": "us_residual_fuel_oil_sales_deliveries_to_commercial",
|
|
"start_date": date(1984, 1, 1),
|
|
"end_date": date(1984, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumSalesOfResidualFuelOilByEndUse"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_shell_storage_capacity_at_operable_refineries_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum shell storage capacity at operable refineries fetcher."""
|
|
params = {
|
|
"process": "shell_storage_capacity_at_refineries",
|
|
"region": "us",
|
|
"series": "us_refinery_shell_storage_capacity_as_of_january_1",
|
|
"start_date": date(1982, 1, 1),
|
|
"end_date": date(1982, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumShellStorageCapacityAtOperableRefineries"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_spot_prices_fetcher(credentials=test_credentials):
|
|
"""Test the EIA petroleum spot prices fetcher."""
|
|
params = {
|
|
"frequency": "weekly",
|
|
"product": "wti_crude_oil",
|
|
"region": "na",
|
|
"series": "cushing_ok_wti_spot_price_fob",
|
|
"start_date": date(1986, 1, 3),
|
|
"end_date": date(1986, 1, 3),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumSpotPrices"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_stocks_by_type_fetcher(credentials=test_credentials):
|
|
"""Test the EIA petroleum stocks by type fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "ending_stocks",
|
|
"product": "crude_oil",
|
|
"region": "us",
|
|
"series": "MCRSTUS1",
|
|
"start_date": date(1920, 1, 1),
|
|
"end_date": date(1920, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumStocksByType"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_stocks_of_selected_products_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum stocks of selected products fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "residual_fuel_oil",
|
|
"region": "us",
|
|
"series": "us_ending_stocks_of_residual_fuel_oil",
|
|
"start_date": date(1936, 1, 1),
|
|
"end_date": date(1936, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumStocksOfSelectedProducts"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_supply_and_disposition_fetcher(credentials=test_credentials):
|
|
"""Test the EIA petroleum supply and disposition fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "ending_stocks",
|
|
"product": "crude_oil",
|
|
"region": "us",
|
|
"series": "MCRSTUS1",
|
|
"start_date": date(1920, 1, 1),
|
|
"end_date": date(1920, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumSupplyAndDisposition"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_us_biodiesel_production_capacity_sales_and_stocks_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum us biodiesel production capacity sales and stocks fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "ending_stocks",
|
|
"region": "us",
|
|
"series": "us_ending_stocks_of_b100",
|
|
"start_date": date(2009, 1, 1),
|
|
"end_date": date(2009, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaPetroleumUsBiodieselProductionCapacitySalesAndStocks"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_us_crude_oil_supply_disposition_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum us crude oil supply disposition fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "ending_stocks",
|
|
"region": "us",
|
|
"series": "us_ending_stocks_of_crude_oil",
|
|
"start_date": date(1920, 1, 1),
|
|
"end_date": date(1920, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumUsCrudeOilSupplyDisposition"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_us_imports_by_country_of_origin_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum us imports by country of origin fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "crude_oil",
|
|
"region": "us",
|
|
"series": "MCRIMUS1",
|
|
"start_date": date(1920, 1, 1),
|
|
"end_date": date(1920, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumUsImportsByCountryOfOrigin"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_us_net_imports_by_country_fetcher(credentials=test_credentials):
|
|
"""Test the EIA petroleum us net imports by country fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"product": "crude_oil",
|
|
"region": "us",
|
|
"series": "MCRNTUS2",
|
|
"start_date": date(1920, 1, 1),
|
|
"end_date": date(1920, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumUsNetImportsByCountry"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_us_refiner_gasoline_prices_by_formulation_grade_sales_type_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum us refiner gasoline prices by formulation grade sales type fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"process": "retail_sales_by_refiners_and_gas_plants",
|
|
"product": "reformulated_motor_gasoline",
|
|
"series": "us_reformulated_gasoline_retail_sales_by_refiners",
|
|
"start_date": date(1994, 1, 1),
|
|
"end_date": date(1994, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaPetroleumUsRefinerGasolinePricesByFormulationGradeSalesType"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_us_weekly_product_supplied_fetcher(credentials=test_credentials):
|
|
"""Test the EIA petroleum us weekly product supplied fetcher."""
|
|
params = {
|
|
"frequency": "weekly",
|
|
"product": "total_petroleum_products",
|
|
"series": "us_product_supplied_of_petroleum_products",
|
|
"start_date": date(1990, 11, 9),
|
|
"end_date": date(1990, 11, 9),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumUsWeeklyProductSupplied"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_weekly_blender_net_production_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum weekly blender net production fetcher."""
|
|
params = {
|
|
"frequency": "weekly",
|
|
"product": "distillate_fuel_oil_greater_than_500_ppm_sulfur",
|
|
"region": "us",
|
|
"series": "us_blender_net_production_of_distillate_fuel_oil_greater_than_500_ppm_sulfur_thousand_barrels_per_day",
|
|
"start_date": date(2010, 6, 4),
|
|
"end_date": date(2010, 6, 4),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumWeeklyBlenderNetProduction"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_weekly_crude_imports_by_top10_origins_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum weekly crude imports by top10 origins fetcher."""
|
|
params = {
|
|
"frequency": "weekly",
|
|
"region": "dza",
|
|
"series": "us_imports_from_algeria_of_crude_oil",
|
|
"start_date": date(2010, 6, 4),
|
|
"end_date": date(2010, 6, 4),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumWeeklyCrudeImportsByTop10Origins"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_weekly_ethanol_plant_production_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum weekly ethanol plant production fetcher."""
|
|
params = {
|
|
"frequency": "weekly",
|
|
"region": "us",
|
|
"series": "us_oxygenate_plant_production_of_fuel_ethanol",
|
|
"start_date": date(2010, 6, 4),
|
|
"end_date": date(2010, 6, 4),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumWeeklyEthanolPlantProduction"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_weekly_heating_oil_and_propane_prices_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum weekly heating oil and propane prices fetcher."""
|
|
params = {
|
|
"frequency": "weekly",
|
|
"process": "price_delivered_to_residential_consumers",
|
|
"product": "no_2_fuel_oil_heating_oil",
|
|
"region": "us",
|
|
"series": "us_weekly_no_2_heating_oil_residential_price",
|
|
"start_date": date(1990, 10, 1),
|
|
"end_date": date(1990, 10, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumWeeklyHeatingOilAndPropanePrices"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_weekly_imports_exports_fetcher(credentials=test_credentials):
|
|
"""Test the EIA petroleum weekly imports exports fetcher."""
|
|
params = {
|
|
"frequency": "weekly",
|
|
"process": "imports",
|
|
"product": "distillate_fuel_oil",
|
|
"region": "us",
|
|
"series": "us_imports_of_distillate_fuel_oil",
|
|
"start_date": date(1982, 8, 20),
|
|
"end_date": date(1982, 8, 20),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumWeeklyImportsExports"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_weekly_inputs_utilization_fetcher(credentials=test_credentials):
|
|
"""Test the EIA petroleum weekly inputs utilization fetcher."""
|
|
params = {
|
|
"frequency": "weekly",
|
|
"process": "refinery_net_input",
|
|
"product": "crude_oil",
|
|
"region": "us",
|
|
"series": "us_refiner_net_input_of_crude_oil",
|
|
"start_date": date(1982, 8, 20),
|
|
"end_date": date(1982, 8, 20),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumWeeklyInputsUtilization"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_weekly_refiner_blender_net_production_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum weekly refiner blender net production fetcher."""
|
|
params = {
|
|
"frequency": "weekly",
|
|
"process": "refinery_and_blender_net_production",
|
|
"product": "distillate_fuel_oil",
|
|
"region": "us",
|
|
"series": "us_refiner_and_blender_net_production_of_distillate_fuel_oil",
|
|
"start_date": date(1982, 8, 20),
|
|
"end_date": date(1982, 8, 20),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumWeeklyRefinerBlenderNetProduction"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_weekly_refiner_net_production_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum weekly refiner net production fetcher."""
|
|
params = {
|
|
"frequency": "weekly",
|
|
"product": "distillate_fuel_oil_greater_than_500_ppm_sulfur",
|
|
"region": "us",
|
|
"series": "us_refiner_net_production_of_distillate_fuel_oil_greater_than_500_ppm_sulfur_thousand_barrels_per_day",
|
|
"start_date": date(2010, 6, 4),
|
|
"end_date": date(2010, 6, 4),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumWeeklyRefinerNetProduction"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_weekly_retail_gasoline_and_diesel_prices_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum weekly retail gasoline and diesel prices fetcher."""
|
|
params = {
|
|
"frequency": "weekly",
|
|
"product": "conventional_regular_gasoline",
|
|
"region": "us",
|
|
"series": "us_regular_conventional_retail_gasoline_prices",
|
|
"start_date": date(1990, 8, 20),
|
|
"end_date": date(1990, 8, 20),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumWeeklyRetailGasolineAndDieselPrices"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_weekly_stocks_fetcher(credentials=test_credentials):
|
|
"""Test the EIA petroleum weekly stocks fetcher."""
|
|
params = {
|
|
"process": "ending_stocks",
|
|
"product": "crude_oil",
|
|
"region": "us",
|
|
"series": "us_ending_stocks_of_crude_oil",
|
|
"start_date": date(1982, 8, 20),
|
|
"end_date": date(1982, 8, 20),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumWeeklyStocks"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_weekly_supply_estimates_fetcher(credentials=test_credentials):
|
|
"""Test the EIA petroleum weekly supply estimates fetcher."""
|
|
params = {
|
|
"frequency": "weekly",
|
|
"process": "refinery_net_input",
|
|
"product": "crude_oil",
|
|
"region": "us",
|
|
"series": "us_refiner_net_input_of_crude_oil",
|
|
"start_date": date(1982, 8, 20),
|
|
"end_date": date(1982, 8, 20),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaPetroleumWeeklySupplyEstimates"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_petroleum_working_storage_capacity_at_operable_refineries_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA petroleum working storage capacity at operable refineries fetcher."""
|
|
params = {
|
|
"process": "working_storage_capacity",
|
|
"region": "us",
|
|
"series": "us_refinery_working_storage_capacity_as_of_january_1",
|
|
"start_date": date(1982, 1, 1),
|
|
"end_date": date(1982, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaPetroleumWorkingStorageCapacityAtOperableRefineries"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_seds_fetcher(credentials=test_credentials):
|
|
"""Test the EIA seds fetcher."""
|
|
params = {
|
|
"series": "aviation_gasoline_blending_components_consumed_by_the",
|
|
"state": "alaska",
|
|
"start_date": date(1960, 1, 1),
|
|
"end_date": date(1960, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaSeds"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_state_electricity_profiles_advanced_metering_infrastructure_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA state electricity profiles advanced metering infrastructure fetcher."""
|
|
params = {
|
|
"sector": "commercial",
|
|
"state": "alaska",
|
|
"technology": "advanced_metering_infrastructure",
|
|
"start_date": date(2013, 1, 1),
|
|
"end_date": date(2013, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaStateElectricityProfilesAdvancedMeteringInfrastructure"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_state_electricity_profiles_costs_and_savings_from_energy_efficiency_programs_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA state electricity profiles costs and savings from energy efficiency programs fetcher."""
|
|
params = {
|
|
"sector": "commercial",
|
|
"state": "alaska",
|
|
"start_date": date(2013, 1, 1),
|
|
"end_date": date(2013, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaStateElectricityProfilesCostsAndSavingsFromEnergyEfficiencyPrograms"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_state_electricity_profiles_electricity_net_metering_customers_and_capacity_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA state electricity profiles electricity net metering customers and capacity fetcher."""
|
|
params = {
|
|
"start_date": date(2023, 1, 1),
|
|
"end_date": date(2023, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaStateElectricityProfilesElectricityNetMeteringCustomersAndCapacity"
|
|
]()
|
|
with pytest.raises(EmptyDataError):
|
|
fetcher.test(params, credentials)
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_state_electricity_profiles_emissions_by_state_by_fuel_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA state electricity profiles emissions by state by fuel fetcher."""
|
|
params = {
|
|
"fuel": "total",
|
|
"state": "alaska",
|
|
"start_date": date(1990, 1, 1),
|
|
"end_date": date(1990, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaStateElectricityProfilesEmissionsByStateByFuel"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_state_electricity_profiles_generating_capacity_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA state electricity profiles generating capacity fetcher."""
|
|
params = {
|
|
"energy_source": "all",
|
|
"producer_type": "electric_utilities",
|
|
"state": "alaska",
|
|
"start_date": date(1990, 1, 1),
|
|
"end_date": date(1990, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaStateElectricityProfilesGeneratingCapacity"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_state_electricity_profiles_state_rankings_for_key_statistics_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA state electricity profiles state rankings for key statistics fetcher."""
|
|
params = {
|
|
"state": "alaska",
|
|
"start_date": date(2008, 1, 1),
|
|
"end_date": date(2008, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaStateElectricityProfilesStateRankingsForKeyStatistics"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_state_electricity_profiles_supply_and_disposition_of_electricity_fetcher(
|
|
credentials=test_credentials,
|
|
):
|
|
"""Test the EIA state electricity profiles supply and disposition of electricity fetcher."""
|
|
params = {
|
|
"state": "alaska",
|
|
"start_date": date(1990, 1, 1),
|
|
"end_date": date(1990, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS[
|
|
"EiaStateElectricityProfilesSupplyAndDispositionOfElectricity"
|
|
]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|
|
|
|
|
|
@pytest.mark.record_http
|
|
def test_eia_total_energy_fetcher(credentials=test_credentials):
|
|
"""Test the EIA total energy fetcher."""
|
|
params = {
|
|
"frequency": "monthly",
|
|
"msn": "asphalt_and_road_oil_consumed_by_the_industrial_sector_in_trillion_btu",
|
|
"start_date": date(1973, 1, 1),
|
|
"end_date": date(1973, 1, 1),
|
|
}
|
|
|
|
fetcher = DATASET_FETCHERS["EiaTotalEnergy"]()
|
|
result = fetcher.test(params, credentials)
|
|
assert result is None
|