Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transform eia861 short form #3565

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
e37f59e
updated short_form_eia861.csv
Nancy9ice Apr 13, 2024
2ac0190
updated eia861.py
Nancy9ice Apr 13, 2024
6ce3705
updated pudltabl.py
Nancy9ice Apr 13, 2024
9f84516
updated eia861.py
Nancy9ice Apr 13, 2024
574dbbc
Migration: added core_eia861_short_form
Nancy9ice Apr 14, 2024
a33045a
Revert "Migration: added core_eia861_short_form"
Nancy9ice Apr 16, 2024
dde8ccd
updated fields
Nancy9ice Apr 16, 2024
40831bc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 16, 2024
6a2e5fc
Merge branch 'main' into transform-eia861-short-form
Nancy9ice Apr 16, 2024
ebda8ca
updated fields
Nancy9ice Apr 18, 2024
8fa1ac9
Merge branch 'catalyst-cooperative:main' into transform-eia861-short-…
Nancy9ice Apr 18, 2024
f9011bd
update boolean columns associated with short-form table
Nancy9ice Apr 25, 2024
6992a23
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 25, 2024
da5606c
updated
Nancy9ice Apr 26, 2024
4a8ab46
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 26, 2024
0123d39
updated short_form transformations
Nancy9ice Apr 26, 2024
9c07b29
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 26, 2024
6ec2e2e
updated boolean column associated with short_form table
Nancy9ice Apr 26, 2024
1e2427c
updated boolean columns associated with short_form table
Nancy9ice Apr 26, 2024
fe20029
Merge branch 'catalyst-cooperative:main' into transform-eia861-short-…
Nancy9ice Apr 26, 2024
ec145d1
Migration: added short_form table
Nancy9ice Apr 26, 2024
39428e9
Updated exclusions in core_eia860__scd_utilities
Nancy9ice Apr 26, 2024
d555a80
Updated release_notes.rst
Nancy9ice Apr 26, 2024
55acf8e
Update eia861.py
Nancy9ice May 4, 2024
3972cd4
Made suggested changes
Nancy9ice May 19, 2024
cf51b0e
Merge with main
aesharpe May 22, 2024
1f00d77
Merge branch 'main' into transform-eia861-short-form
aesharpe May 23, 2024
289aaae
Fix alembic
aesharpe May 23, 2024
e444626
fix alembic again
aesharpe May 23, 2024
91a3571
Move changes to EIA860 schema to the newest migration instead of the …
aesharpe May 23, 2024
db8b823
Merge branch 'main' into transform-eia861-short-form
aesharpe May 23, 2024
3aefd2e
Merge branch 'main' into transform-eia861-short-form
zaneselvans May 23, 2024
5a522ca
Fix docstring formatting.
zaneselvans May 23, 2024
c1f79be
Merge branch 'main' into transform-eia861-short-form
zaneselvans May 23, 2024
11dea5d
Merge branch 'main' into transform-eia861-short-form
aesharpe May 27, 2024
8068520
Merge branch 'transform-eia861-short-form' of https://github.com/Nanc…
aesharpe May 27, 2024
6153600
Update pre-commit and dependencies to push as Zane
zaneselvans Jun 2, 2024
c89149d
Add default request timeout.
zaneselvans Jun 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ repos:
# Formatters: hooks that re-write Python & documentation files
####################################################################################
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.5
rev: v0.4.7
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
8 changes: 5 additions & 3 deletions devtools/zenodo/zenodo_data_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,22 +87,24 @@ def __init__(self, env: str):

logger.info(f"Using Zenodo token: {token[:4]}...{token[-4:]}")

def retry_request(self, *, method, url, max_tries=5, **kwargs):
def retry_request(self, *, method, url, max_tries=5, timeout=5, **kwargs):
"""Wrap requests.request in retry logic.

Passes method, url, and **kwargs to requests.request.
"""
base_timeout = 2
for try_num in range(1, max_tries):
try:
return requests.request(method=method, url=url, **kwargs)
return requests.request(
method=method, url=url, timeout=timeout, **kwargs
)
except requests.RequestException as e:
timeout = base_timeout**try_num
logger.warning(f"Attempt #{try_num} Got {e}, retrying in {timeout} s")
time.sleep(timeout)

# don't catch errors on the last try.
return requests.request(method=method, url=url, **kwargs)
return requests.request(method=method, url=url, timeout=timeout, **kwargs)

def get_deposition(self, deposition_id: int) -> _LegacyDeposition:
"""LEGACY API: Get JSON describing a deposition.
Expand Down
2 changes: 2 additions & 0 deletions docs/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ EIA AEO
<https://www.eia.gov/outlooks/aeo/tables_ref.php>`__, which include future
projections related to electric power and renewable energy through the year
2050, across a variety of scenarios. See :issue:`3368` and :pr:`3538`.
* Added new :ref:`core_eia861__yearly_short_form` table from EIA861 which contains
the shorter version of EIA861. See issues :issue:`3540` and PR :pr:`3565`.
* Added new tables from EIA AEO table 54:

* :ref:`core_eiaaeo__yearly_projected_generation_in_electric_sector_by_technology`
Expand Down
74 changes: 37 additions & 37 deletions environments/conda-linux-64.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading