Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test/add tests #114

Merged
merged 63 commits into from
Mar 15, 2024
Merged

Test/add tests #114

merged 63 commits into from
Mar 15, 2024

Conversation

jcharkow
Copy link
Collaborator

@jcharkow jcharkow commented Feb 29, 2024

Description

Add/Update Tests

Fixes # (issue)
#112

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Pytest has been run locally on ubuntu.

Checklist:

  • [ X] My code follows the style guidelines of this project
  • [ X] I have performed a self-review of my code
  • [X ] I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • [ X] My changes generate no new warnings
  • [ X] I have added tests that prove my fix is effective or that my feature works
  • [X ] New and existing unit tests pass locally with my changes
  • [X ] Any dependent changes have been merged and published in downstream modules

Contents (#114)

Other

  • Roestlab/massseer into test/add_tests
  • fix gh actions
  • replace filename with runName
  • more changes from filename -> runname
  • update tests to work on windows
  • test: remove failing tests
  • resolve tests?
  • make ionMobilityTest os specific
  • revert ionMobilityTest.mzML to linux format
  • gui bugs
  • fix docs for this PR
  • update snapshots
  • fix readthedocs build?
  • Add testing module for auto docs
  • fix imports fix typo
  • hopefully fix bug
  • try to fix build
  • update docs hopefully build
  • revert to old setup

Uncategorised!

  • [TEST] add test for feature maps
  • [TEST][FIX] add tests for Spectrum and Mobilogram
  • [TEST] add targetedDIAConfig test
  • [TEST] add generic feature tests
  • Move tests to access folder
  • [TEST] add test for results tsv access
  • [TEST] transition TSV access
  • [TEST] add TransitionPQPDataAccess
  • version control snapshots
  • [TEST] add Pandas Snapshot exdtension
  • add new requirements for test
  • [TEST] update transitionPQP for syrupy
  • [TEST] update OSWDataAccess to use syrupy
  • [TEST] mzMLDataAccess
  • [TEST] update ResultsTSV access for new pytest format
  • [TEST] TransitionTSVDataAccess with pytest+pandas
  • [TEST] sqMassDataAccess update to snapshots/pytest
  • [TEST] add snapshots to access tests
  • [TEST] fix bug in TSVDataAccess test
  • [TEST] Abstract Loaders tests
  • Merge branch 'patch/refactor_plot_peak_picking' into test/add_tests
  • [TEST] update sqmassloader for pytest/syrupy
  • [TEST] update filepaths for test
  • [TEST] update snapshots
  • [TEST] create toPandasDf methods for testing
  • [TEST] add MzMLDataLoader test
  • [TEST] add test for SpectralLibraryLoader
  • [TEST][FIX] update peakPicker tests
  • [TEST] add test to ConformerPeakPicker
  • [TEST] add tests for missing structs
  • [TEST] Add/update file header to test files
  • Add check_function() which checks/loads function in module
  • [TEST] update snapshots
  • [TEST][FIX] make TEST_PATH dynamic
  • Remove old print statements
  • update requirements for ci/cd testing
  • update README.md python compatibility version badge
  • update acceptable python version range [3.9 - 3.11]
  • update dtype casting of mock DF
  • update dtype casting of mock DF to int64
  • don't check dtype when comparing DFs
  • Switch to pytest from unittest
  • remove snapshottest from requirements-dev
  • update ionMobility.mzML to windows file

note: test does not include spectra methods will have to add those/fix
those later.
note: add template tests for dreamDIA but currently only DIA-NN output
is tested
also minor fixes and include method for closing sqlite connection
update snapshottesting for better support with pandas for OSWDataAccess
add custom numpy snapshot extension. Add tests for MzML data access
SpectrumLoader and ChromatogramLoader are blank. GenericLoader tests the
get feature methods
change filepath to relative filepath based on base .git directory so work no matter where run test
from
for testing create toPandasDf() methods for TransitionGroup and
TransitionGroupCollection
Also fix bugs associated with tests

Note: possibly better peptide example to be chosen seems that no
chromatograms selected for one of the runs
MRMPeakPicker minor updates (just to imports) since no snapshots used

pyMRMPeakPicker major updates, use pandas df snapshots.

Fix bugs that arose when creating tests
bug fixes,
remove function _find_threshold since not used
@irahorecka
Copy link
Collaborator

I believe unit test is still useful for some tests?

@jcharkow
Copy link
Collaborator Author

I believe unit test is still useful for some tests?

I thought that pytest could also test for uniittests and it looks like it has prettier syntax?

@irahorecka
Copy link
Collaborator

Hmm - not sure!

@irahorecka
Copy link
Collaborator

Hey @jcharkow, here's the issue I raised with Syrupy developers: tophat/syrupy#861

I will leave the merging of this branch up to you

@jcharkow
Copy link
Collaborator Author

Hey @jcharkow, here's the issue I raised with Syrupy developers: tophat/syrupy#861

I will leave the merging of this branch up to you

Thank you!

jcharkow and others added 8 commits March 13, 2024 11:53
runName is the same on all systems while filename path is specific to
machine meaning snapshots are not reproducible.
update ionMobility.mzML file and a pandas df file
workaround: reopen and save ionMobilityTest on the fly to make it os specific
revert ionMobilityTest.mzML to linux format so readable on ubuntu and
mac.

For windows use the trick previously done where re-write
@jcharkow
Copy link
Collaborator Author

Note: there was some difficulty with tests on windows (test_MzMLDataAccess.py) because of the ionMobilityTest.mzML file not being windows compatible for OnDiscMSExperiment(). As a workaround, the file is opened as an MSExperiment() and resaved and the tests are done on the test file.

See the error ran into here:
image

fix gui bugs that were introduced in this PR

fix test where snapshot was faulty
@jcharkow
Copy link
Collaborator Author

@singjc is this good to merge or would you like to review this before merging? @irahorecka reviewed this and said it was good to go.

@jcharkow
Copy link
Collaborator Author

Some Docs still have to be updated for this since syntax has changed however the GUI looks fine

@singjc
Copy link
Collaborator

singjc commented Mar 14, 2024

@singjc is this good to merge or would you like to review this before merging? @irahorecka reviewed this and said it was good to go.

Yes, feel free to merge when ready.

minor updates to codebase as well with updated __repr__ for collection
structs.
update snapshots - minor adjustments
fix imports so hopefully docs can build correctly. Fix typo with
Pandas/Numpy SnapShotExtension classes
revert notebook to old setup because old setup works
@jcharkow jcharkow merged commit 657a9b9 into dev Mar 15, 2024
11 checks passed
@jcharkow jcharkow deleted the test/add_tests branch March 15, 2024 17:56
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.

None yet

3 participants