mitchute / GLHE

MIT License
2 stars 3 forks source link

Dev Updates 2024 #84

Closed Myoldmopar closed 7 months ago

Myoldmopar commented 7 months ago

Trying to just apply things we've learned over the years and get things going again. Right now I get two failures locally, both appearing related to numpy updates, as well as some deprecation warnings. Otherwise it's close.

Myoldmopar commented 7 months ago

Here's the type of message coming from numpy:

  /home/runner/work/GLHE/GLHE/glhe/profiles/external_base.py:11: FutureWarning: ChainedAssignmentError: behaviour will change in pandas 3.0!
  You are setting values through chained assignment. Currently this works in certain cases, but when using Copy-on-Write (which will become the default behaviour in pandas 3.0) this will never work to update the original DataFrame or Series, because the intermediate object on which we are setting values will behave as a copy.
  A typical example is when you are setting values in a column of a DataFrame, like:

  df["col"][row_indexer] = value

  Use `df.loc[row_indexer, "col"] = values` instead, to perform the assignment in a single step and ensure this keeps updating the original `df`.

  See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy

    df['delta t'].iloc[0] = 0

I don't quite see what is going wrong, or what it wants in this case. I think it's more than likely just me not being well-versed in DataFrames. @mitchute maybe you could look at it sometime and understand what it is complaining about.

This should be super easy to duplicate:

pip install -r requirements.txt
coverage run -m pytest
Myoldmopar commented 7 months ago

I think as a part of this PR, we should:

After these are all done, we can merge this and then be prepared to refactor it for use in E+.

Myoldmopar commented 7 months ago

Here are some things I'd like to do in in the next PR:

Myoldmopar commented 7 months ago

@mitchute this shows merging is blocked until it's approved. CI looks happy, let me know if you want me to do anything else here :)