Skip to content

Commit

Permalink
👷 check formatting and linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry committed Oct 16, 2023
1 parent 4b73dc5 commit 204b17e
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 5 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Packaging

on:
- push

jobs:
format:
name: Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/[email protected]
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/[email protected]
with:
python-version: "3.10"

- name: Install tox
run: python -m pip install tox

- name: Run flake8
run: tox -e lint
2 changes: 0 additions & 2 deletions src/njab/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


from importlib.metadata import version

from . import stats, sklearn, plotting
Expand Down
1 change: 1 addition & 0 deletions src/njab/plotting/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})"
Expand Down
5 changes: 2 additions & 3 deletions src/njab/stats/ancova.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 204b17e

Please sign in to comment.