Skip to content

Commit

Permalink
apply linting agian on merged code
Browse files Browse the repository at this point in the history
  • Loading branch information
mschwoer committed Sep 20, 2024
1 parent a300e86 commit 7f9d794
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 33 deletions.
13 changes: 7 additions & 6 deletions alphastats/gui/pages/05_LLM.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
import os
import streamlit as st

import pandas as pd
import streamlit as st
from openai import AuthenticationError

from alphastats.gui.utils.analysis_helper import (
check_if_options_are_loaded,
display_figure,
save_plot_to_session_state,
gui_volcano_plot_differential_expression_analysis,
helper_compare_two_groups,
save_plot_to_session_state,
)
from alphastats.gui.utils.gpt_helper import (
get_assistant_functions,
display_proteins,
get_subgroups_for_each_group,
get_assistant_functions,
get_general_assistant_functions,
get_subgroups_for_each_group,
)
from alphastats.gui.utils.ollama_utils import LLMIntegration
from alphastats.gui.utils.openai_utils import (
set_api_key,
)
from alphastats.gui.utils.ollama_utils import LLMIntegration
from alphastats.gui.utils.options import interpretation_options
from alphastats.gui.utils.ui_helper import sidebar_info, init_session_state, StateKeys
from alphastats.gui.utils.ui_helper import StateKeys, init_session_state, sidebar_info

init_session_state()
sidebar_info()
Expand Down
6 changes: 2 additions & 4 deletions alphastats/gui/utils/enrichment_analysis.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
from typing import List
import requests


from gprofiler import GProfiler

import pandas as pd
import requests
from gprofiler import GProfiler


def _get_functional_annotation_string(identifier, species_id="9606") -> pd.DataFrame:
Expand Down
18 changes: 9 additions & 9 deletions alphastats/gui/utils/ollama_utils.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import json
import logging
from typing import Any, Dict, List, Optional, Tuple

from openai import OpenAI
from typing import List, Dict, Any, Optional, Tuple
import json
import streamlit as st
import pandas as pd
from IPython.display import display, Markdown, HTML
import plotly.io as pio
import streamlit as st
from IPython.display import HTML, Markdown, display
from openai import OpenAI

from alphastats.gui.utils.enrichment_analysis import get_enrichment_data
from alphastats.gui.utils.gpt_helper import (
perform_dimensionality_reduction,
get_general_assistant_functions,
perform_dimensionality_reduction,
)
from alphastats.gui.utils.ui_helper import StateKeys

# from alphastats.gui.utils.artefacts import ArtifactManager
from alphastats.gui.utils.uniprot_utils import get_gene_function
from alphastats.gui.utils.enrichment_analysis import get_enrichment_data
from alphastats.gui.utils.ui_helper import StateKeys


logger = logging.getLogger(__name__)

Expand Down
14 changes: 6 additions & 8 deletions alphastats/gui/utils/openai_utils.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
from typing import Optional, List
from pathlib import Path

import time
import json

import time
from pathlib import Path
from typing import List, Optional

import openai
import streamlit as st
Expand All @@ -22,12 +20,12 @@
from utils.gpt_helper import (
turn_args_to_float,
)
from utils.uniprot_utils import (
get_gene_function,
)
from utils.openai_utils import (
wait_for_run_completion,
)
from utils.uniprot_utils import (
get_gene_function,
)


def wait_for_run_completion(
Expand Down
5 changes: 2 additions & 3 deletions alphastats/gui/utils/uniprot_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from typing import Union, List, Dict
import requests

from typing import Dict, List, Union

import requests
import streamlit as st

from alphastats.gui.utils.ui_helper import StateKeys
Expand Down
8 changes: 5 additions & 3 deletions tests/gui/conftest.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from streamlit.testing.v1 import AppTest
from alphastats.load_data import load_data
from io import BytesIO
from pathlib import Path

from streamlit.testing.v1 import AppTest

from alphastats.DataSet import DataSet
from io import BytesIO
from alphastats.load_data import load_data

# TODO: Turn the helpers into fixtures

Expand Down

0 comments on commit 7f9d794

Please sign in to comment.