Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sig brackets function if feature is given as a string #52

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 90 additions & 31 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ skip_gitignore = true

[tool.poe.tasks]
_format_black = "black ."
_format_ruff = "ruff . --fix-only"
_format_ruff = "ruff check . --fix-only"
format = { sequence = ["_format_black", "_format_ruff"], help = "Format all files." }
lint = { cmd = "ruff src --fix", help = "Lint all files with ruff." }
_lint_ci = "ruff src --format=github"
_lint_ci = "ruff check src --output-format=github"
_check_black = "black . --check"
ci_check = { sequence = ["_check_black", "_lint_ci"], help = "Check all potential format and linting issues." }
test = {cmd = "pytest --cov=biopsykit -cov-report=term-missing --cov-report=xml", help = "Run Pytest with coverage." }
Expand Down
7 changes: 4 additions & 3 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
line-length = 120
target-version = "py38"

[lint]
select = [
# pyflakes
"F",
Expand Down Expand Up @@ -104,12 +105,12 @@ exclude = [
"examples"
]

[pylint]
[lint.pylint]
max-args = 15

[pydocstyle]
[lint.pydocstyle]
convention = "numpy"

[pyupgrade]
[lint.pyupgrade]
# Preserve types, even if a file imports `from __future__ import annotations`.
keep-runtime-typing = true
2 changes: 2 additions & 0 deletions src/biopsykit/stats/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,8 @@ def _get_stats_data_box_pairs(
features = list(features.values())
features = [item for sublist in features for item in sublist]
if all(isinstance(feature, str) for feature in features):
if isinstance(features, str):
features = [features]
stats_data = pd.concat(stats_data.filter(like=f, axis=0) for f in features)
else:
stats_data = stats_data.unstack().loc[features].stack()
Expand Down
Loading