-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
Update PUDL to use Python 3.12 #3413
Conversation
pyproject.toml
Outdated
@@ -45,7 +45,7 @@ dependencies = [ | |||
"nbconvert>=7", | |||
"nbformat>=5.9", | |||
"networkx>=3.2", | |||
"numba>=0.58", # pandas[performance] | |||
"numba>=0.59", # pandas[performance] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0.59 is the first numba version that works with Python 3.12
pyproject.toml
Outdated
"dagster>=1.6.5", | ||
"dagster-postgres>=0.22.5,<1", # Update when dagster-postgres graduates to 1.x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think 1.6.5 (0.22.5) is the first Dagster version that works with Python 3.12
pyproject.toml
Outdated
@@ -327,12 +327,12 @@ channel-priority = "strict" | |||
name = "pudl-dev" | |||
|
|||
[tool.conda-lock.dependencies] | |||
google-cloud-sdk = ">=452" | |||
google-cloud-sdk = ">=464" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
464 is the first version of the google-cloud-sdk that works with Python 3.12 (thanks to my prodding...)
13cfad3
to
21b7cb9
Compare
5508508
to
5bf296e
Compare
@katie-lamb & @zschira I did a full ETL using Python 3.12 locally and it almost completed. The only error that came up was in
|
@zaneselvans See moj-analytical-services/splink#2072 , the issue seems to be from incompatibility of |
Ah great, thanks for looking into it! I'll pin the version and see if all is well. |
Woo! This fixed it. Will do a full build on the branch and merge into |
* Update pudl-dev environment to use Python 3.12 * Use 4 CPUs in pytest Makefile targets. Update release notes. * Pin sqlglot<23 to avoid splink incompatibility
…n-service table name (#3450) * add total to subtotal correction record and fix hard coded table name * redo migrations * enable plant_in_service table to have subtotal corrections - WIP: metric checks fail rn. * update metric checks with new null records in diff values * add reported value -> null calculation compoents corrections * add the correction records more explicitly at end of calc comp process and add unit tests * redo migrations... again * link main migrations to my reset migration * small tag change to reduce conflicting tags * defensive checks, break out unit tests and add pruned unit test * minor unit test fix * Update test/unit/transform/ferc1_test.py Co-authored-by: E. Belfer <[email protected]> * Update src/pudl/transform/ferc1.py Co-authored-by: E. Belfer <[email protected]> * Add PUDL citation for Grid Strategies load growth report. (#3483) * Clean EIA 860 and 923 FGD operation and maintenance data (#3403) * Stash changes * Stash changes to 923 FGD table * Fix drop NA behavior * Fix docstrings * Add fields to PUDL metadata * Fix drop nas, encode columns, fix booleans and combine raw maintenance columns * Add alembic migration for harvested FGD table * Add FGD operational status to encoding FKs * Update alembic * Add table to core and address PR comments * Stash changes * Change EIA 923 FGD table to _core, write asset checks, fix for fast ETL * Add WIP 860 transform * Stash changes * Add fields, rename raw vars to conform to existing fields better * Add 923 and 860 to pudl.sqlite, encode all tables, fix PK and dtype issues * Update 860 docstrings * Restore environments, update release notes, update schedule in 860 description * Add sorbent type coding table to PUDL * Fix FK for fgd operational status * Fix docs build indentation failure * [pre-commit.ci] auto fixes from pre-commit.com hooks For more information, see https://pre-commit.ci * Clean up migrations, remove crufty resource def * Fix encoding, fix typos, spell out FGD * Fix docs build ref failure * Add year range to ratio helper, add unit tests for helper functions, trim returns * No cover for asset checks --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Add FK exclusion for eia plants table (#3491) * Add manual GridPath RA Toolkit renewable profile data source. (#3489) * Add manual GridPath RA Toolkit renewable profile data source. * Update Zenodo sandbox DOI to point at working archive * Update to production gridpathratk Zenodo DOI. * Update release notes * Bump version of mamba Docker image to 1.5.7 * Add some more keywords to the GridPath RA TK source. * Add logline that tells us more about BadZipFile. (#3493) * eia860 solar: extract (#3482) * eia860 solar: extract step wahoo * tweak column names * first pass of extracting 860 wind * fix column name and page map * rename retired turbine model ID * rename the renamed model column * Update PUDL to use Python 3.12 (#3413) * Update pudl-dev environment to use Python 3.12 * Use 4 CPUs in pytest Makefile targets. Update release notes. * Pin sqlglot<23 to avoid splink incompatibility * Update conda-lock.yml and rendered conda environment files. (#3496) Co-authored-by: zaneselvans <[email protected]> * [pre-commit.ci] pre-commit autoupdate (#3500) * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.3.3 → v0.3.4](astral-sh/ruff-pre-commit@v0.3.3...v0.3.4) - [github.com/pre-commit/mirrors-prettier: v3.1.0 → v4.0.0-alpha.8](pre-commit/mirrors-prettier@v3.1.0...v4.0.0-alpha.8) * Update .pre-commit-config.yaml --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Zane Selvans <[email protected]> * udpate transform docs and fix enum * udpate test docs * adjust calculation metric tolerances for fast etl * convert leafy data merge to an inner merge so we don't get nulls --------- Co-authored-by: E. Belfer <[email protected]> Co-authored-by: Zane Selvans <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Dazhong Xia <[email protected]> Co-authored-by: PUDL Bot <[email protected]> Co-authored-by: zaneselvans <[email protected]>
Overview
Switch PUDL over to using Python 3.12, which has been out since October 2nd, 2023. All of our current dependencies now support Python 3.12.
However, I note that the
conda-forge
packagepython-duckdb
has a Python 3.12 build issue. I think the issue has been resolved for Linux and MacOS so I've poked the maintainer. Whileduckdb
isn't a current PUDL dependency, it will become one as soon as @katie-lamb's Splink PR #3302 is merged, so we should probably hold off on merging this PR until thepython-duckdb
package is updated onconda-forge
.Closes #3327
Testing
To-do list