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

refactor(collate): deprecationwarning for collate #462

Merged
merged 3 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
11 changes: 11 additions & 0 deletions pycytominer/cyto_utils/collate.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import subprocess
import sys
import sqlite3
import warnings


def run_check_errors(cmd):
Expand Down Expand Up @@ -81,6 +82,16 @@ def collate(
"""
)

# show a warning about collate deprecation
warnings.warn(
(
"pycytominer.cyto_utils.collate is deprecated and will be removed in future versions of Pycytominer. "
"Please consider using CellProfiler's ExportToDatabase module to create single-cell "
"profile SQLite files or CytoTable to create similar Parquet file output."
d33bs marked this conversation as resolved.
Show resolved Hide resolved
),
DeprecationWarning,
)

# Set up directories (these need to be abspaths to keep from confusing makedirs later)
input_dir = pathlib.Path(f"{base_directory}/analysis/{batch}/{plate}/{csv_dir}")
backend_dir = pathlib.Path(f"{base_directory}/backend/{batch}/{plate}")
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ lint.per-file-ignores."tests/*" = [ "S101" ]

[tool.pytest.ini_options]
testpaths = "tests"
filterwarnings = [
"ignore::DeprecationWarning:pycytominer.*",
]

[tool.mypy]
exclude = [
Expand Down