Skip to content

Conversation

@EvenSol
Copy link
Owner

@EvenSol EvenSol commented Nov 27, 2025

Summary

  • ensure the water dew point pressure editor preserves the pressure column so validation works
  • reuse the edited pressure values safely when validating and running calculations

Testing

  • not run (not requested)

Codex Task

@chatgpt-codex-connector
Copy link

💡 Codex Review

if (st.edited_dfTP['Pressure (bara)'] <= 0).any():
st.error('Pressure must be greater than 0 bara. Please update the pressure inputs before running calculations.')

P1 Badge Pressure validation indexes Series as DataFrame

The new validation uses st.edited_dfTP['Pressure (bara)'], but st.edited_dfTP is produced by st.data_editor(st.session_state.tp_data['Pressure (bara)'].dropna()...) and remains a Series without a Pressure (bara) column. Accessing it with a column label raises a KeyError before the Run handler executes, so the hydrate calculation now crashes on every run even with valid pressures. Pass a DataFrame into data_editor or validate the Series directly.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants