<commit_before>#Test "globals"
user= ""
psswd = ""
try
    user = ENV["UMLS_USER"]
    psswd = ENV["UMLS_PSSWD"]
catch
    println("UMLS tests require the following enviroment variables:")
    println("UMLS_USER")
    println("UMLS_PSSWD")
end

credentials = BioMedQuery.UMLS.Credentials(user, psswd)
println(credentials)
term = "obesity"
query = Dict("string"=>term, "searchType"=>"exact" )


# @testset "Testing UMLS" begin
    @test 1==1
    all_results= BioMedQuery.UMLS.search_umls(credentials, query)
    # @test length(all_results[1]["result"]["results"]) == 2
    # cui = BioMedQuery.UMLS.best_match_cui(all_results, term)
    # @test cui == "C0028754"
    # sm = BioMedQuery.UMLS.get_semantic_type(credentials, cui)
    # println(sm)
# end<commit_msg>Uncommenting tests<commit_after>#Test "globals"
user= ""
psswd = ""
try
    user = ENV["UMLS_USER"]
    psswd = ENV["UMLS_PSSWD"]
catch
    println("UMLS tests require the following enviroment variables:")
    println("UMLS_USER")
    println("UMLS_PSSWD")
end

credentials = BioMedQuery.UMLS.Credentials(user, psswd)
println(credentials)
term = "obesity"
query = Dict("string"=>term, "searchType"=>"exact" )


@testset "Testing UMLS" begin
    all_results= BioMedQuery.UMLS.search_umls(credentials, query)
    @test length(all_results[1]["result"]["results"]) == 2
    cui = BioMedQuery.UMLS.best_match_cui(all_results, term)
    @test cui == "C0028754"
    sm = BioMedQuery.UMLS.get_semantic_type(credentials, cui)
    println(sm)
end
{'fraction_non_alphanumeric': 0.1443850267379679, 'fraction_numerical': 0.013368983957219251, 'mean_word_length': 5.0120481927710845, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3457913', 'n_tokens_mistral': 597, 'n_tokens_neox': 577, 'n_words': 102}