Skip to content

Improve testing workflow to select correct environment and handle pandas / python version for map function#12

Merged
HawkMRS merged 6 commits intoHawkMRS:devfrom
bastigw:dev
Jan 21, 2026
Merged

Improve testing workflow to select correct environment and handle pandas / python version for map function#12
HawkMRS merged 6 commits intoHawkMRS:devfrom
bastigw:dev

Conversation

@bastigw
Copy link
Contributor

@bastigw bastigw commented Jan 5, 2026

Hi Jia,

this pull request introduces improvements to both the testing workflow and the codebase to enhance compatibility across development environments.

Testing workflow updates:

  • Updated the notebook test command in .github/workflows/test-notebooks.yml and pytest.ini to use the --nbval-current-env flag, ensuring that notebook tests run in the current Python environment rather than a potentially isolated one.

Pandas / Python version compatibility:

  • Refactored numeric conversion logic by introducing a backward_compatible_map function to handle differences between pandas versions (map for >=2.1.0, applymap for older versions). This is similar to your commit last week, but should improve maintainability.

Minor bug fix:

  • Simplified the conversion of phase values to radians in unitconverter by removing unnecessary type casting, relying on prior numeric conversion.

@bastigw bastigw changed the title Dev Improve testing workflow to select correct environment and handle pandas / python version for map function Jan 5, 2026
@HawkMRS HawkMRS merged commit 9c18e97 into HawkMRS:dev Jan 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants