Skip to content

Commit bf18828

Browse files
timtreisclaude
andcommitted
Remove .vscode config, fix test deprecation warnings
- Remove .vscode/ from tracking and set ide_integration: false in cruft.json - Add .vscode/ back to .gitignore - Fix set_constrained_layout deprecation (use set_layout_engine) - Fix SettingWithCopyWarning in test_render_labels.py Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 38ac2d9 commit bf18828

7 files changed

Lines changed: 6 additions & 74 deletions

File tree

.cruft.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"github_user": "scverse",
1313
"github_repo": "spatialdata-plot",
1414
"license": "BSD 3-Clause License",
15-
"ide_integration": true,
15+
"ide_integration": false,
1616
"_copy_without_render": [
1717
".github/workflows/build.yaml",
1818
".github/workflows/test.yaml",

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ __pycache__/
2525

2626
# IDEs
2727
/.idea/
28+
/.vscode/
2829

2930
format.sh
3031

.vscode/extensions.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

.vscode/launch.json

Lines changed: 0 additions & 33 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ def compare(cls, basename: str, tolerance: float | None = None):
441441
# Try to get a reasonable layout first (helps with axes/labels)
442442
if not fig.get_constrained_layout():
443443
try:
444-
fig.set_constrained_layout(True)
444+
fig.set_layout_engine("constrained")
445445
except (ValueError, RuntimeError):
446446
try:
447447
fig.tight_layout(pad=2.0, rect=[0.02, 0.02, 0.98, 0.98])

tests/pl/test_render_labels.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def _make_tablemodel_with_categorical_labels(self, sdata_blobs, labels_name: str
244244
)
245245
adata.obs["instance_id"] = instances.values
246246
adata.obs["category"] = get_standard_RNG().choice(["a", "b", "c"], size=adata.n_obs)
247-
adata.obs["category"][:3] = ["a", "b", "c"]
247+
adata.obs.loc[adata.obs.index[:3], "category"] = ["a", "b", "c"]
248248
adata.obs["region"] = labels_name
249249
table = TableModel.parse(
250250
adata=adata,
@@ -320,7 +320,7 @@ def test_plot_respects_custom_colors_from_uns(self, sdata_blobs: SpatialData):
320320
)
321321
adata.obs["instance_id"] = instances.values
322322
adata.obs["category"] = get_standard_RNG().choice(["a", "b", "c"], size=adata.n_obs)
323-
adata.obs["category"][:3] = ["a", "b", "c"]
323+
adata.obs.loc[adata.obs.index[:3], "category"] = ["a", "b", "c"]
324324
adata.obs["region"] = labels_name
325325
table = TableModel.parse(
326326
adata=adata,
@@ -347,7 +347,7 @@ def test_plot_respects_custom_colors_from_uns_with_groups_and_palette(
347347
)
348348
adata.obs["instance_id"] = instances.values
349349
adata.obs["category"] = get_standard_RNG().choice(["a", "b", "c"], size=adata.n_obs)
350-
adata.obs["category"][:3] = ["a", "b", "c"]
350+
adata.obs.loc[adata.obs.index[:3], "category"] = ["a", "b", "c"]
351351
adata.obs["region"] = labels_name
352352
table = TableModel.parse(
353353
adata=adata,

0 commit comments

Comments
 (0)