diff --git a/pycytominer/__about__.py b/pycytominer/__about__.py index 38fe0f08..09503019 100644 --- a/pycytominer/__about__.py +++ b/pycytominer/__about__.py @@ -1,4 +1,5 @@ """Pycytominer package metadata.""" + __project__ = "pycytominer" # These version placeholders are updated during build by poetry-dynamic-versioning __version__ = "0.0.0" diff --git a/pycytominer/__init__.py b/pycytominer/__init__.py index 3665cede..bc43d46c 100644 --- a/pycytominer/__init__.py +++ b/pycytominer/__init__.py @@ -1,4 +1,5 @@ """Pycytominer is a suite of common functions used to process high dimensional readouts from high-throughput cell experiments.""" + from pycytominer import __about__ from .aggregate import aggregate diff --git a/pycytominer/cyto_utils/cells.py b/pycytominer/cyto_utils/cells.py index 972abfa1..ddd9d19a 100644 --- a/pycytominer/cyto_utils/cells.py +++ b/pycytominer/cyto_utils/cells.py @@ -914,13 +914,17 @@ def _sqlite_strata_conditions(df, dtypes, n=1): [3] | [1, 2] [4] | [1] - >>> _sqlite_strata_conditions(df, dtypes={'TableNumber': 'integer', 'ImageNumber': 'integer'}, n=1) + >>> _sqlite_strata_conditions( + ... df, dtypes={"TableNumber": "integer", "ImageNumber": "integer"}, n=1 + ... ) ["(TableNumber in (1) and ImageNumber in (1))", "(TableNumber in (2) and ImageNumber in (1, 2, 3))", "(TableNumber in (3) and ImageNumber in (1, 2))", "(TableNumber in (4) and ImageNumber in (1))"] - >>> _sqlite_strata_conditions(df, dtypes={'TableNumber': 'text', 'ImageNumber': 'integer'}, n=2) + >>> _sqlite_strata_conditions( + ... df, dtypes={"TableNumber": "text", "ImageNumber": "integer"}, n=2 + ... ) ["(TableNumber in ('1') and ImageNumber in (1)) or (TableNumber in ('2') and ImageNumber in (1, 2, 3))", "(TableNumber in ('3') and ImageNumber in (1, 2)) diff --git a/pyproject.toml b/pyproject.toml index f67c1159..ef7c977b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -117,6 +117,7 @@ version_files = [ target-version = "py38" line-length = 88 fix = true +extend-include = ["*.ipynb"] [tool.ruff.lint] select = [ @@ -160,6 +161,7 @@ ignore = [ # DoNotAssignLambda "E731", ] +exclude = ["*.ipynb"] [tool.ruff.lint.pydocstyle] # Use Google-style docstrings. diff --git a/walkthroughs/single_cell_usage.ipynb b/walkthroughs/single_cell_usage.ipynb index 440f4259..0f1c943e 100644 --- a/walkthroughs/single_cell_usage.ipynb +++ b/walkthroughs/single_cell_usage.ipynb @@ -35,7 +35,7 @@ "# ignore mix type warnings from pandas\n", "import warnings\n", "\n", - "warnings.filterwarnings(\"ignore\")\n" + "warnings.filterwarnings(\"ignore\")" ] }, { @@ -86,7 +86,7 @@ "sc_profiles_path = out_dir / \"nf1_single_cell_profile.csv.gz\"\n", "anno_profiles_path = out_dir / \"nf1_annotated_profile.csv.gz\"\n", "norm_profiles_path = out_dir / \"nf1_normalized_profile.csv.gz\"\n", - "feat_profiles_path = out_dir / \"nf1_features_profile.csv.gz\"\n" + "feat_profiles_path = out_dir / \"nf1_features_profile.csv.gz\"" ] }, { @@ -128,7 +128,7 @@ " },\n", " \"Per_Cells\": {\"Per_Cytoplasm\": \"Cells_Number_Object_Number\"},\n", " \"Per_Nuclei\": {\"Per_Cytoplasm\": \"Nuclei_Number_Object_Number\"},\n", - "}\n" + "}" ] }, { @@ -177,7 +177,7 @@ "# compressed csv file\n", "single_cell_profile.merge_single_cells(\n", " sc_output_file=sc_profiles_path, compression_options=\"gzip\"\n", - ")\n" + ")" ] }, { @@ -208,7 +208,7 @@ "platemap_df = pd.read_csv(plate_map)\n", "\n", "# displaying platemap\n", - "print(platemap_df.columns.tolist())\n" + "print(platemap_df.columns.tolist())" ] }, { @@ -249,7 +249,7 @@ ")\n", "\n", "# save message display\n", - "print(f\"Annotated profile saved in: {anno_profiles_path}\")\n" + "print(f\"Annotated profile saved in: {anno_profiles_path}\")" ] }, { @@ -296,7 +296,7 @@ ")\n", "\n", "# save message display\n", - "print(f\"Normalized profile saved in: {norm_profiles_path}\")\n" + "print(f\"Normalized profile saved in: {norm_profiles_path}\")" ] }, { @@ -341,7 +341,7 @@ ")\n", "\n", "# save message display\n", - "print(f\"Selected features profile saved in: {feat_profiles_path}\")\n" + "print(f\"Selected features profile saved in: {feat_profiles_path}\")" ] }, {