🧪 testing improvement: Add tests for FieldVector.to_dataframe - #49
Conversation
Added unit tests `test_fieldvector_to_dataframe_numerical` and `test_fieldvector_to_dataframe_mtf` to `tests/test_vectors_and_fields.py` to ensure the `to_dataframe` method on `FieldVector` handles both numeric and Multivariate Taylor Function (MTF) components correctly. Includes checks for dataframe shape, column names, coefficient correctness, and zeros padding according to `MAX_DIMENSION`. Co-authored-by: shashi-manikonda <199693178+shashi-manikonda@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
🎯 What:
FieldVector.to_dataframe()lacked test coverage. This PR adds tests to ensure it correctly constructs a DataFrame representation of the vector using both strictly numeric and MTF variables fromsandalwood.📊 Coverage: Tests handle the basic numerical case with a single-row DataFrame, as well as the multi-row MTF case. The MTF tests verify the order, exponents, and specific coefficients to confirm correct functionality. Exponents logic is robustly parameterized based on
mtf._MAX_DIMENSION.✨ Result: Enhanced test coverage provides confidence that tabular/dataframe representations of field vectors are generated correctly.
PR created automatically by Jules for task 83693794783900043 started by @shashi-manikonda