Skip to content
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
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
Copy Markdown
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
Copy link
Copy Markdown
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 thread
Czaki marked this conversation as resolved.
Outdated
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
Copy link
Copy Markdown
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 thread
Czaki marked this conversation as resolved.
Outdated
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