Skip to content

Commit

Permalink
ran ruff to make imports consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
sepro committed May 29, 2024
1 parent cb0b027 commit 10bd606
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 22 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,6 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/
.idea/

.ruff_cache/
9 changes: 4 additions & 5 deletions example.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
from lorepy import loreplot

from sklearn.datasets import load_iris
import matplotlib.pyplot as plt
import pandas as pd
from lorepy import loreplot
from matplotlib.colors import ListedColormap
from sklearn.svm import SVC
from sklearn.datasets import load_iris
from sklearn.ensemble import RandomForestClassifier
import pandas as pd
from sklearn.svm import SVC

# Load iris dataset and convert to dataframe
iris_obj = load_iris()
Expand Down
7 changes: 3 additions & 4 deletions example_uncertainty.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
from lorepy import uncertainty_plot

from sklearn.datasets import load_iris
import matplotlib.pyplot as plt
import pandas as pd
from lorepy import uncertainty_plot
from matplotlib.colors import ListedColormap
from sklearn.datasets import load_iris
from sklearn.svm import SVC
import pandas as pd

# Load iris dataset and convert to dataframe
iris_obj = load_iris()
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from setuptools import setup, find_packages
from setuptools import find_packages, setup

with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
Expand Down
9 changes: 5 additions & 4 deletions src/lorepy/lorepy.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from typing import Optional, Tuple

import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from sklearn.linear_model import LogisticRegression
from pandas import DataFrame
import numpy as np
import matplotlib.pyplot as plt
from typing import Optional, Tuple
from sklearn.linear_model import LogisticRegression


def _prepare_data(data, x, y, confounders):
Expand Down
7 changes: 3 additions & 4 deletions tests/test_plot.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from lorepy.lorepy import _get_area_df, _get_dots_df, loreplot
from pandas import DataFrame
import numpy as np
from sklearn.linear_model import LogisticRegression
from sklearn.svm import SVC
import matplotlib.pyplot as plt

from lorepy.lorepy import loreplot, _get_dots_df, _get_area_df

# Generate a sample dataset for testing
X = np.concatenate([np.random.randint(0, 10, 50), np.random.randint(2, 12, 50)])
Expand Down
5 changes: 2 additions & 3 deletions tests/test_uncertainty.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import numpy as np
import pandas as pd
import pytest
import numpy as np
from lorepy import uncertainty_plot
from matplotlib.colors import ListedColormap
from sklearn.svm import SVC

from lorepy import uncertainty_plot

# Generate a sample dataset for testing
X = np.concatenate([np.random.randint(0, 10, 50), np.random.randint(2, 12, 50)])
y = [0] * 50 + [1] * 50
Expand Down

0 comments on commit 10bd606

Please sign in to comment.