Skip to content

Commit

Permalink
isort
Browse files Browse the repository at this point in the history
  • Loading branch information
niekdejonge committed Nov 26, 2023
1 parent 0cead59 commit 47ce4f5
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
10 changes: 6 additions & 4 deletions ms2query/create_new_library/library_files_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import os
from pathlib import Path
from typing import List, Union, Dict
from typing import Dict, List, Union
import matchms.filtering as msfilters
import numpy as np
import pandas as pd
Expand All @@ -17,9 +17,11 @@
from spec2vec.vector_operations import calc_vector
from tqdm import tqdm
from ms2query.clean_and_filter_spectra import create_spectrum_documents
from ms2query.create_new_library.add_classifire_classifications import select_compound_classes
from ms2query.create_new_library.create_sqlite_database import initialize_tables, fill_spectrum_data_table, \
fill_inchikeys_table, add_dataframe_to_sqlite
from ms2query.create_new_library.add_classifire_classifications import \
select_compound_classes
from ms2query.create_new_library.create_sqlite_database import (
add_dataframe_to_sqlite, fill_inchikeys_table, fill_spectrum_data_table,
initialize_tables)
from ms2query.utils import return_non_existing_file_name


Expand Down
12 changes: 6 additions & 6 deletions tests/test_library_files_creator.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import os
import sqlite3

import numpy as np
import pandas as pd
import pytest
from gensim.models import Word2Vec
from ms2deepscore.models import load_model as load_ms2ds_model

from ms2query.clean_and_filter_spectra import normalize_and_filter_peaks_multiple_spectra, normalize_and_filter_peaks
from ms2query.create_new_library.add_classifire_classifications import _convert_to_dataframe
from ms2query.create_new_library.library_files_creator import LibraryFilesCreator, create_ms2ds_embeddings, \
create_s2v_embeddings
from ms2query.clean_and_filter_spectra import (
normalize_and_filter_peaks, normalize_and_filter_peaks_multiple_spectra)
from ms2query.create_new_library.add_classifire_classifications import \
_convert_to_dataframe
from ms2query.create_new_library.library_files_creator import (
LibraryFilesCreator, create_ms2ds_embeddings, create_s2v_embeddings)


def test_give_already_used_file_name(tmp_path, path_to_general_test_files, hundred_test_spectra):
Expand Down
3 changes: 2 additions & 1 deletion tests/test_ms2library.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import pandas as pd
from ms2query.ms2library import MS2Library, create_library_object_from_one_dir
from ms2query.utils import SettingsRunMS2Query, column_names_for_output
from tests.test_utils import check_correct_results_csv_file, check_expected_headers
from tests.test_utils import (check_correct_results_csv_file,
check_expected_headers)


def test_get_all_ms2ds_scores(ms2library, test_spectra):
Expand Down
3 changes: 2 additions & 1 deletion tests/test_run_ms2query.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
zenodo_dois)
from ms2query.utils import SettingsRunMS2Query
from tests.test_ms2library import MS2Library
from tests.test_utils import check_correct_results_csv_file, check_expected_headers
from tests.test_utils import (check_correct_results_csv_file,
check_expected_headers)


if sys.version_info < (3, 8):
Expand Down

0 comments on commit 47ce4f5

Please sign in to comment.