-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'test_audit' into 'master'
Improvement of CoreMS tests See merge request mass-spectrometry/corems!126
- Loading branch information
Showing
29 changed files
with
893 additions
and
2,177 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import pytest | ||
from pathlib import Path | ||
|
||
from corems.transient.input.brukerSolarix import ReadBrukerSolarix | ||
from corems.encapsulation.factory.parameters import MSParameters | ||
|
||
@pytest.fixture | ||
def mass_spectrum_ftms(bruker_transient): | ||
"""Creates a mass spectrum object to be used in the tests""" | ||
# Instantiate the mass spectrum object | ||
mass_spectrum = bruker_transient.get_mass_spectrum( | ||
plot_result=False, auto_process=False, keep_profile=True | ||
) | ||
mass_spectrum.parameters = MSParameters(use_defaults=True) | ||
# Process the mass spectrum | ||
mass_spectrum.process_mass_spec() | ||
|
||
return mass_spectrum | ||
|
||
@pytest.fixture | ||
def ref_file_location(): | ||
"""Returns the location of the reference file for calibration for the tests""" | ||
return Path.cwd() / "tests/tests_data/ftms/SRFA.ref" | ||
|
||
@pytest.fixture | ||
def ftms_file_location(): | ||
"""Returns the location of the FTMS file for the tests""" | ||
return Path.cwd() / "tests/tests_data/ftms/ESI_NEG_SRFA.d/" | ||
|
||
@pytest.fixture | ||
def bruker_transient(ftms_file_location): | ||
"""Returns the transient object for the FTMS file""" | ||
bruker_reader = ReadBrukerSolarix(ftms_file_location) | ||
bruker_transient = bruker_reader.get_transient() | ||
|
||
return bruker_transient |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
pylint | ||
pytest~=7.2.1 | ||
pytest-cov | ||
pytest~=8.3.2 | ||
pytest-cov~=5.0.0 | ||
pyprof2calltree | ||
memory_profiler | ||
twine | ||
|
File renamed without changes.
This file contains 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.