Repository navigation
Remove unused setUp method from test_MSSpectrum.py - #8426
Merged
timosachsenberg merged 2 commits intoDec 4, 2025
Merged
Conversation
5 tasks
Contributor
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
Co-authored-by: timosachsenberg <[email protected]>
Copilot
AI
changed the title
[WIP] WIP address feedback on removing method from accessors
Remove unused setUp method from test_MSSpectrum.py
Dec 4, 2025
timosachsenberg
marked this pull request as ready for review
December 4, 2025 13:16
timosachsenberg
added a commit
that referenced
this pull request
Dec 6, 2025
…8423) * [FEATURE] also allow access to drift time * [FEATURE] allow memory-view access to arrays * [FEATURE] allow access to all data arrays * [FEATURE] allow access to all data arrays * [FEATURE] faster access to all data arrays * [FEATURE] fast access to data in DataArrays * [FIX] bugfix, actually copy the numpy data * [FIX] get data arrays without copy * [FEATURE] add setDataArrays() function * [FEATURE] update pxd file * [TEST] add tests * [DOC] add performance tests * add doc * Address code review feedback for PR #6352 - Remove unnecessary semicolons from test file (lines 50, 63, 134) - Add documentation for setDataArrays() methods in DataStructures.h - Add docstrings for getData() and getData_mv() in OSBinaryDataArray.pyx 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Fix empty array handling in OSSpectrum/OSChromatogram Handle the case where arrays are empty when creating memory views. When data.size() is 0, data.data() returns NULL, and trying to create a Cython memory view from NULL causes ValueError. This fix: - Returns np.empty(0) for copy methods (getMZArray, getIntensityArray, etc.) - Returns None for memory view methods (*_mv) when array is empty - Adds size check before creating memory view Fixes test failure in test_ChromatogramExtractorAlgorithm.py 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Add MSSpectrum array accessors and improve pyOpenMS data array methods - Add get_mz_array(), get_intensity_array(), get_drift_time_array() to MSSpectrum - Add get_drift_time_array_mv() and get_drift_time_unit() for ion mobility data - Optimize get_peaks() with direct indexing instead of iterator - Standardize FloatDataArray: get_data() returns copy, get_data_mv() returns view - Add docstrings to OSSpectrum, OSChromatogram, OSBinaryDataArray addon methods - Use snake_case naming convention consistent with existing pyOpenMS style - Fix empty array handling (copy methods return empty array, view methods return None) - Update unit tests for new method signatures and semantics 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Rename test_MSSpectrumAndRichSpectrum to test_MSSpectrum RichSpectrum class no longer exists in OpenMS - update test file name to reflect that it only tests MSSpectrum. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * [WIP] Update benchmark snippets to use snake_case Python method names (#8424) * Initial plan * Update benchmark snippets to use snake_case Python method names Co-authored-by: timosachsenberg <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: timosachsenberg <[email protected]> * Fix docstring example to demonstrate get_drift_time_array_mv() method (#8425) * Initial plan * Update docstring example to use get_drift_time_array_mv() method Co-authored-by: timosachsenberg <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: timosachsenberg <[email protected]> * Remove unused setUp method from test_MSSpectrum.py (#8426) * Initial plan * Remove unused setUp method and os import from test_MSSpectrum.py Co-authored-by: timosachsenberg <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: timosachsenberg <[email protected]> * Fix Cython nogil syntax and update tests to use snake_case API - Fix Cython `nogil` position in OpenSwathDataStructures.pxd (use `except + nogil` not `nogil except +`) - Update pyOpenMS tests to use new snake_case method names: - getMZArray() → get_mz_array() - getIntensityArray() → get_intensity_array() - setMZArray() → set_mz_array() - setIntensityArray() → set_intensity_array() - getTimeArray() → get_time_array() 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Hannes Roest <[email protected]> Co-authored-by: Samuel Wein <[email protected]> Co-authored-by: Claude <[email protected]> Co-authored-by: Copilot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses review feedback on #8423 to clean up test file by removing dead code.
Changes
setUpmethod that only defined an unuseddirnamevariableimport oswhich was only used by the removed method💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.