Skip to content

Update conda environment#103

Open
patrickbrown4 wants to merge 64 commits into
mainfrom
pb/environment_all
Open

Update conda environment#103
patrickbrown4 wants to merge 64 commits into
mainfrom
pb/environment_all

Conversation

@patrickbrown4

@patrickbrown4 patrickbrown4 commented May 20, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR updates the conda environment to use new features in gdxpds and geopandas. The main changes are:

Thanks a lot to @mmowers for taking care of the bokeh update!

Technical details

Implementation notes

Almost all of the code changes are related to pandas 3. The main things to look out for in new code are:

  • .groupby() no longer accepts an axis argument, so all the uses of df.groupby(axis=1).something() are now df.T.groupby().something().T
  • .fillna(method='ffill') (and analogous) is now just .ffill()
  • Type checking in series and dataframes is generally more strict

Additional changes

While working on debugging calc_financial_inputs.py, I simplified the inputs/financials/financials_tech_*.csv files by removing the country column and non-USA entries. They weren't complete anyway, and Canada/Mexico haven't worked since I've been here, so since it simplifies the process for adding new techs, I've kept the change even though it might not actually be required.

Validation, testing, and comparison report(s)

Changes for USA_default are nonzero but quite small: results-v20260708_mainK0_USA_defaults,v20260708_envK0_USA_defaults.pptx

I'll go through the rest of these before merging:

  • bokehpivot
  • helper scripts
  • postprocessing scripts
    • compare_cases.py
    • input_plots.py
    • run_reeds2pras.py
    • single_case_plots.py
    • (I didn't test the ones that are less commonly used)
  • hourlize
  • reeds_to_rev.py (currently broken; will be addressed by Updates to reeds_to_rev and land_use_analysis #6)
  • preprocessing scripts
    • casemaker.py
    • get_case_periods.py
  • cases_test.csv
    • Mid_Case
    • USA_decarb
    • USA_defaults
    • Interday_storage
    • MonteCarlo_LHS_MC0001
    • MonteCarlo_LHS_MC0002
    • MonteCarlo_Random_MC0001
    • MonteCarlo_Random_MC0002
    • OR_water
    • Pacific
    • Pacific_2020
    • Pacific_CC
    • Pacific_DR
    • Pacific_LoadSite95
    • Pacific_MGA
    • Pacific_rep15
    • Pacific_weks
    • R2P
    • USA_faster
    • NYVT_mixed
    • PJM_county_CC
    • Pacific_full_year
    • USA_fast
    • Everything
    • MARICTNYNJPAOH_Offshore
    • Simple
    • WECC_county: Fails on both
    • WY_county
  • github runner

Checklist for author

Details to double-check

  • Charge code provided to reviewers
  • Included comparison reports for appropriate test cases
  • Code formatting standardized
  • Reusable functions used where possible instead of copy/pasted code

General information to guide review

  • Zero impact on results of default case
  • No large data file(s) added/modified
  • No substantive impact on runtime for full-US reference case
  • No substantive impact on folder size for full-US reference case
  • No change to process flow (runreeds.py, reeds/core/solve/solve.py)
  • No change to code organization
  • No change to package requirements (environment.yml or Project.toml)

Did you use LLM tools (chatbot or copilot) in the preparation of this PR? If so, describe how

No

…estamps() -> parse_h5_timestamps() and allow for either strings or bytes
@patrickbrown4 patrickbrown4 requested a review from kodiobika July 10, 2026 21:30

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the end these changes probably weren't necessary, but they were helpful for debugging (and make future updates very slightly easier), so I left them - let me know if you think they should be reverted

Comment thread cases_test.csv
endyear,2032,,2050,2050,2050,2029,2060,2026,,,,,,,,,,,2035,2030,2030,2060,2035,2050,2050,,,,,
yearset,,,,,,,2010..2060..10,,,,,,,,,,,,,2010..2050..5,2010..2050..5,2010..2060..10,,,2010_2025_2050,,,,,
GSw_ZoneSet,,,,,,,z54,z3109,,,,,,,z3109,z3109,z3109,PJMcounty,,,,z54,,z54,z48,,,,,
GSw_ZoneSet,,,,,,,z54,z3109,,,,,,,z3109,z3109,z3109,PJMcounty,,,,z54,z134,z54,z48,,,,,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most minimal way to keep Simple working and maintain the original intent (since ReEDS2PRAS doesn't work for single-zone systems)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant