88
99ConverterBuilder .register ([CTS , CIR , IDSM , PubChem , BridgeDb , RDKit ])
1010
11+
1112def test_integration (tmp_path ):
1213 app = Application ()
1314
1415 # import your .msp file
15- app .load_data (' tests/test_data/sample.msp' , file_format = ' msp' )
16+ app .load_data (" tests/test_data/sample.msp" , file_format = " msp" )
1617
1718 # curate given metadata (e.g. fix CAS numbers)
1819 app .curate_metadata ()
1920
2021 # specify requested services (these are supported)
21- services = [' CTS' , ' CIR' , ' IDSM' , ' PubChem' , ' BridgeDb' , ' RDKit' ]
22+ services = [" CTS" , " CIR" , " IDSM" , " PubChem" , " BridgeDb" , " RDKit" ]
2223
2324 # specify requested jobs
24- jobs = [('name' , 'inchi' , 'IDSM' ), ('inchi' , 'formula' , 'IDSM' ), ('inchi' , 'inchikey' , 'IDSM' ),
25- ('inchi' , 'iupac_name' , 'IDSM' ), ('inchi' , 'canonical_smiles' , 'IDSM' )]
25+ jobs = [
26+ ("compound_name" , "inchi" , "IDSM" ),
27+ ("inchi" , "formula" , "IDSM" ),
28+ ("inchi" , "inchikey" , "IDSM" ),
29+ ("inchi" , "iupac_name" , "IDSM" ),
30+ ("inchi" , "canonical_smiles" , "IDSM" ),
31+ ]
2632
2733 # run asynchronous annotations of spectra data
2834 asyncio .run (app .annotate_spectra (services , jobs ))
2935
3036 # export .msp file
31- outpath = os .path .join (tmp_path , ' sample_out.msp' )
32- app .save_data (outpath , file_format = ' msp' )
37+ outpath = os .path .join (tmp_path , " sample_out.msp" )
38+ app .save_data (outpath , file_format = " msp" )
3339 assert os .path .isfile (outpath )
3440
35- os .remove (outpath )
41+ os .remove (outpath )
0 commit comments