Skip to content
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
4 changes: 2 additions & 2 deletions package/PartSeg/state_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import os
import sys

import appdirs
import packaging.version
import platformdirs

from PartSeg import APP_LAB, APP_NAME, __version__, parsed_version

Expand All @@ -28,7 +28,7 @@
save_suffix = ""
#: path to folder where save settings
save_folder = os.path.join(
os.environ.get("PARTSEG_SETTINGS_DIR", appdirs.user_data_dir(APP_NAME, APP_LAB)),
os.environ.get("PARTSEG_SETTINGS_DIR", platformdirs.user_data_dir(APP_NAME, APP_LAB)),
str(packaging.version.parse(__version__).base_version),
)

Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ classifiers = [
"Development Status :: 3 - Alpha",
"Framework :: napari",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3"
,
Comment on lines +20 to +21
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (bug_risk): The comma on a separate line likely makes this TOML array invalid.

In TOML, commas must appear on the same line as the preceding value. Putting the comma on its own line makes the array invalid and can break pyproject.toml parsing. Please keep the comma at the end of the value line instead.

"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down Expand Up @@ -45,7 +46,7 @@ dependencies = [
"QtAwesome!=1.2.0,>=1.0.3",
"QtPy>=1.10.0",
"SimpleITK>=2.1.0",
"appdirs>=1.4.4",
"platformdirs>=4.3.0",
"czifile>=2019.5.22",
"defusedxml>=0.6.0",
"fonticon-fontawesome6>=6.1.1",
Expand Down
2 changes: 1 addition & 1 deletion requirements/constraints_py3.10.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ annotated-types==0.7.0
# via pydantic
app-model==0.4.0
# via napari
appdirs==1.4.4
platformdirs==4.3.6
# via
# partseg (pyproject.toml)
# napari
Expand Down
2 changes: 1 addition & 1 deletion requirements/constraints_py3.10_pydantic_1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ annotated-doc==0.0.4
# via typer
app-model==0.3.2
# via napari
appdirs==1.4.4
platformdirs==4.3.6
# via
# partseg (pyproject.toml)
# napari
Expand Down
2 changes: 1 addition & 1 deletion requirements/constraints_py3.11.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ annotated-types==0.7.0
# via pydantic
app-model==0.4.0
# via napari
appdirs==1.4.4
platformdirs==4.3.6
# via
# partseg (pyproject.toml)
# napari
Expand Down
2 changes: 1 addition & 1 deletion requirements/constraints_py3.11_pydantic_1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ annotated-doc==0.0.4
# via typer
app-model==0.3.2
# via napari
appdirs==1.4.4
platformdirs==4.3.6
# via
# partseg (pyproject.toml)
# napari
Expand Down
2 changes: 1 addition & 1 deletion requirements/constraints_py3.12.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ annotated-types==0.7.0
# via pydantic
app-model==0.4.0
# via napari
appdirs==1.4.4
platformdirs==4.3.6
# via
# partseg (pyproject.toml)
# napari
Comment on lines +13 to 16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check for duplicate platformdirs entries in all constraint files

fd 'constraints.*\.txt$' requirements/ --exec sh -c '
  echo "=== {} ==="
  grep -n "^platformdirs==" "{}" || echo "No platformdirs found"
  echo
'

Repository: 4DNucleome/PartSeg

Length of output: 1131


Critical: Duplicate platformdirs entries with conflicting versions across all constraint files.

All constraint files in requirements/ contain platformdirs twice with different versions (e.g., platformdirs==4.3.6 and platformdirs==4.9.4 in most files), creating unsolvable dependency conflicts. This affects:

  • constraints_py3.9.txt and constraints_py3.9_pydantic_1.txt (versions 4.3.6 and 4.4.0)
  • constraints_py3.10.txt, constraints_py3.11.txt, constraints_py3.12.txt, constraints_py3.12_docs.txt, constraints_py3.12_pydantic_1.txt, constraints_py3.13.txt, and constraints_py3.13_pydantic_1.txt (versions 4.3.6 and 4.9.4)
  • constraints_py3.10_pydantic_1.txt and constraints_py3.11_pydantic_1.txt (versions 4.3.6 and 4.9.4)

All constraint files must be regenerated to resolve to a single version of platformdirs per file.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@requirements/constraints_py3.12.txt` around lines 13 - 16, Multiple
requirements/constraints files contain duplicate platformdirs pins with
conflicting versions; regenerate each constraints file so it contains only a
single resolved platformdirs entry. For each listed constraints file
(constraints_py3.9.txt, constraints_py3.9_pydantic_1.txt,
constraints_py3.10*.txt, constraints_py3.11*.txt, constraints_py3.12*.txt,
constraints_py3.13*.txt) re-run your constraints generation pipeline (the script
or tool that produced these files) ensuring dependency resolution yields one
platformdirs==<version> line per file, remove the older duplicate entry, and
commit the regenerated constraint files so every constraints_* file has a
single, consistent platformdirs pin.

Expand Down
2 changes: 1 addition & 1 deletion requirements/constraints_py3.12_docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ annotated-types==0.7.0
# via pydantic
app-model==0.4.0
# via napari
appdirs==1.4.4
platformdirs==4.3.6
# via
# partseg (pyproject.toml)
# napari
Expand Down
2 changes: 1 addition & 1 deletion requirements/constraints_py3.12_pydantic_1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ annotated-doc==0.0.4
# via typer
app-model==0.3.2
# via napari
appdirs==1.4.4
platformdirs==4.3.6
# via
# partseg (pyproject.toml)
# napari
Expand Down
2 changes: 1 addition & 1 deletion requirements/constraints_py3.13.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ annotated-types==0.7.0
# via pydantic
app-model==0.4.0
# via napari
appdirs==1.4.4
platformdirs==4.3.6
# via
# partseg (pyproject.toml)
# napari
Comment on lines +13 to 16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Duplicate platformdirs entries with conflicting versions.

Same issue as in constraints_py3.9.txt - this file has two platformdirs entries:

  • Line 13: platformdirs==4.3.6
  • Line 246: platformdirs==4.9.4

Consider regenerating the constraints files to ensure consistent pinning.

Also applies to: 246-251

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@requirements/constraints_py3.13.txt` around lines 13 - 16,
constraints_py3.13.txt contains duplicate pins for the same package
"platformdirs" with conflicting versions (e.g., 4.3.6 and 4.9.4); locate all
occurrences of "platformdirs==" in the constraints files and remove or reconcile
the duplicates by choosing the correct pinned version and regenerating the
constraints file(s) so the same version is consistently pinned (apply the same
fix to constraints_py3.9.txt as well).

Expand Down
2 changes: 1 addition & 1 deletion requirements/constraints_py3.13_pydantic_1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ annotated-doc==0.0.4
# via typer
app-model==0.3.2
# via napari
appdirs==1.4.4
platformdirs==4.3.6
# via
# partseg (pyproject.toml)
# napari
Comment on lines +11 to 14
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Duplicate platformdirs entries with conflicting versions.

Same duplicate entry pattern as other constraints files:

  • Line 11: platformdirs==4.3.6
  • Line 244: platformdirs==4.9.4

Also applies to: 244-249

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@requirements/constraints_py3.13_pydantic_1.txt` around lines 11 - 14, The
constraints file contains duplicate platformdirs entries with conflicting
versions (platformdirs==4.3.6 and platformdirs==4.9.4); search for the symbol
"platformdirs==" and consolidate to a single version across the file (pick the
correct version for your environment, e.g., platformdirs==4.9.4), remove the
other duplicate entry, and ensure any related grouped comment blocks (the
surrounding "# via" lines) remain consistent after the change so the file has
only one platformdirs==... line.

Expand Down
2 changes: 1 addition & 1 deletion requirements/constraints_py3.9.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ annotated-types==0.7.0
# via pydantic
app-model==0.3.2
# via napari
appdirs==1.4.4
platformdirs==4.3.6
# via
# partseg (pyproject.toml)
# napari
Comment on lines +13 to 16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check for duplicate platformdirs entries in constraints files

echo "Checking for duplicate platformdirs entries:"
for f in requirements/constraints_*.txt; do
    echo "=== $f ==="
    grep -n "^platformdirs==" "$f" || echo "No platformdirs entry found"
done

Repository: 4DNucleome/PartSeg

Length of output: 1165


Duplicate platformdirs entries with conflicting versions.

This constraints file contains two separate platformdirs pinned versions:

  • Line 13: platformdirs==4.3.6
  • Line 254: platformdirs==4.4.0

Having conflicting versions for the same package in a single constraints file may cause unexpected installation behavior. Since this file is autogenerated by uv pip compile, regenerate it to ensure only one consistent version is pinned.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@requirements/constraints_py3.9.txt` around lines 13 - 16, The constraints
file contains duplicate conflicting pins for platformdirs (platformdirs==4.3.6
and platformdirs==4.4.0); regenerate the autogenerated constraints by re-running
the lock/compile step (uv pip compile) so the file contains a single consistent
platformdirs version and commit the updated constraints file, ensuring
references to platformdirs in the generated output are resolved to one pin.

Expand Down
2 changes: 1 addition & 1 deletion requirements/constraints_py3.9_pydantic_1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ annotated-doc==0.0.4
# via typer
app-model==0.3.2
# via napari
appdirs==1.4.4
platformdirs==4.3.6
# via
# partseg (pyproject.toml)
# napari
Expand Down
Loading