diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml new file mode 100644 index 0000000..6fb9bc2 --- /dev/null +++ b/.github/workflows/packaging.yml @@ -0,0 +1,37 @@ +name: Packaging + +on: + - push + +jobs: + format: + name: Check formatting + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-python@v4.0.0 + with: + python-version: "3.10" + + - name: Install tox + run: python -m pip install tox + + - name: Run yapf + run: tox -e format + + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-python@v4.0.0 + with: + python-version: "3.10" + + - name: Install tox + run: python -m pip install tox + + - name: Run flake8 + run: tox -e lint diff --git a/src/njab/__init__.py b/src/njab/__init__.py index dc60a40..a77795e 100644 --- a/src/njab/__init__.py +++ b/src/njab/__init__.py @@ -1,5 +1,3 @@ - - from importlib.metadata import version from . import stats, sklearn, plotting diff --git a/src/njab/plotting/metrics.py b/src/njab/plotting/metrics.py index 6c510b1..8831fce 100644 --- a/src/njab/plotting/metrics.py +++ b/src/njab/plotting/metrics.py @@ -6,6 +6,7 @@ LIMITS = (-0.05, 1.05) + def plot_split_auc(result: ResultsSplit, name: str, ax: matplotlib.axes.Axes) -> matplotlib.axes.Axes: col_name = f"{name} (auc: {result.auc:.3f})" diff --git a/src/njab/stats/ancova.py b/src/njab/stats/ancova.py index 09bdaf7..fb43558 100644 --- a/src/njab/stats/ancova.py +++ b/src/njab/stats/ancova.py @@ -67,9 +67,8 @@ def add_fdr_scores(scores: pd.DataFrame, p_val_column='p-unc') -> pd.DataFrame: if random_seed is not None: np.random.seed(random_seed) - reject, qvalue = statsmodels.stats.multitest.fdrcorrection(scores[p_val_column], - alpha=alpha, - method=method) + reject, qvalue = statsmodels.stats.multitest.fdrcorrection( + scores[p_val_column], alpha=alpha, method=method) scores['qvalue'] = qvalue scores['rejected'] = reject return scores