PartSegCore-compiled-backend 0.15.7__tar.gz → 0.15.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/.gitignore +1 -0
  2. partsegcore_compiled_backend-0.15.9/.pre-commit-config.yaml +43 -0
  3. partsegcore_compiled_backend-0.15.9/CMakeLists.txt +131 -0
  4. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/PKG-INFO +10 -14
  5. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/pyproject.toml +76 -5
  6. partsegcore_compiled_backend-0.15.9/src/PartSegCore_compiled_backend/calc_bounds.pyi +3 -0
  7. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/PartSegCore_compiled_backend/calc_bounds.pyx +4 -4
  8. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/PartSegCore_compiled_backend/fast_unique.py +1 -1
  9. partsegcore_compiled_backend-0.15.9/src/PartSegCore_compiled_backend/multiscale_opening/__init__.py +3 -0
  10. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/PartSegCore_compiled_backend/multiscale_opening/mso.h +79 -73
  11. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/PartSegCore_compiled_backend/multiscale_opening/mso_bind.pyi +3 -4
  12. partsegcore_compiled_backend-0.15.9/src/PartSegCore_compiled_backend/multiscale_opening/my_queue.h +63 -0
  13. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/PartSegCore_compiled_backend/napari_mapping.py +12 -8
  14. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/PartSegCore_compiled_backend/sprawl_utils/euclidean_cython.pyi +1 -2
  15. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/PartSegCore_compiled_backend/sprawl_utils/euclidean_cython.pyx +1 -1
  16. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/PartSegCore_compiled_backend/sprawl_utils/find_split.py +21 -15
  17. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/PartSegCore_compiled_backend/sprawl_utils/find_split.pyi +16 -13
  18. partsegcore_compiled_backend-0.15.9/src/PartSegCore_compiled_backend/sprawl_utils/global_consts.h +33 -0
  19. partsegcore_compiled_backend-0.15.9/src/PartSegCore_compiled_backend/sprawl_utils/my_queue.h +63 -0
  20. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/PartSegCore_compiled_backend/sprawl_utils/path_sprawl_cython.pyi +2 -3
  21. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/PartSegCore_compiled_backend/sprawl_utils/sprawl_utils.pyi +3 -4
  22. partsegcore_compiled_backend-0.15.9/src/PartSegCore_compiled_backend/triangulate.pyx +513 -0
  23. partsegcore_compiled_backend-0.15.9/src/PartSegCore_compiled_backend/triangulation/debug_util.hpp +60 -0
  24. partsegcore_compiled_backend-0.15.9/src/PartSegCore_compiled_backend/triangulation/intersection.hpp +364 -0
  25. partsegcore_compiled_backend-0.15.9/src/PartSegCore_compiled_backend/triangulation/point.hpp +232 -0
  26. partsegcore_compiled_backend-0.15.9/src/PartSegCore_compiled_backend/triangulation/triangulate.hpp +1293 -0
  27. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/PartSegCore_compiled_backend/version.py +2 -2
  28. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/tests/test_coloring.py +1 -1
  29. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/tests/test_napari_mapping.py +4 -3
  30. partsegcore_compiled_backend-0.15.9/src/tests/test_triangulate.py +663 -0
  31. partsegcore_compiled_backend-0.15.7/.github/dependabot.yml +0 -10
  32. partsegcore_compiled_backend-0.15.7/.github/workflows/wheels.yml +0 -103
  33. partsegcore_compiled_backend-0.15.7/.readthedocs.yaml +0 -35
  34. partsegcore_compiled_backend-0.15.7/build_utils/build_libomp.sh +0 -16
  35. partsegcore_compiled_backend-0.15.7/notebooks/data_util.py +0 -153
  36. partsegcore_compiled_backend-0.15.7/notebooks/performance_label_unique.ipynb +0 -262
  37. partsegcore_compiled_backend-0.15.7/notebooks/performance_napari.ipynb +0 -408
  38. partsegcore_compiled_backend-0.15.7/setup.cfg +0 -4
  39. partsegcore_compiled_backend-0.15.7/setup.py +0 -101
  40. partsegcore_compiled_backend-0.15.7/src/PartSegCore_compiled_backend/calc_bounds.pyi +0 -4
  41. partsegcore_compiled_backend-0.15.7/src/PartSegCore_compiled_backend/multiscale_opening/__init__.py +0 -3
  42. partsegcore_compiled_backend-0.15.7/src/PartSegCore_compiled_backend/multiscale_opening/mso.cpp +0 -5
  43. partsegcore_compiled_backend-0.15.7/src/PartSegCore_compiled_backend/multiscale_opening/my_queue.h +0 -69
  44. partsegcore_compiled_backend-0.15.7/src/PartSegCore_compiled_backend/sprawl_utils/global_consts.h +0 -42
  45. partsegcore_compiled_backend-0.15.7/src/PartSegCore_compiled_backend/sprawl_utils/my_queue.h +0 -69
  46. partsegcore_compiled_backend-0.15.7/src/PartSegCore_compiled_backend.egg-info/PKG-INFO +0 -72
  47. partsegcore_compiled_backend-0.15.7/src/PartSegCore_compiled_backend.egg-info/SOURCES.txt +0 -64
  48. partsegcore_compiled_backend-0.15.7/src/PartSegCore_compiled_backend.egg-info/dependency_links.txt +0 -1
  49. partsegcore_compiled_backend-0.15.7/src/PartSegCore_compiled_backend.egg-info/requires.txt +0 -7
  50. partsegcore_compiled_backend-0.15.7/src/PartSegCore_compiled_backend.egg-info/top_level.txt +0 -1
  51. /partsegcore_compiled_backend-0.15.7/License.txt → /partsegcore_compiled_backend-0.15.9/LICENSE.txt +0 -0
  52. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/MANIFEST.in +0 -0
  53. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/Readme.md +0 -0
  54. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/docs/Makefile +0 -0
  55. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/docs/calc_bounds.rst +0 -0
  56. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/docs/conf.py +0 -0
  57. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/docs/fast_unique.rst +0 -0
  58. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/docs/index.rst +0 -0
  59. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/docs/make.bat +0 -0
  60. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/docs/napari_mapping.rst +0 -0
  61. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/docs/sprawl_utils.rst +0 -0
  62. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/PartSegCore_compiled_backend/__init__.py +0 -0
  63. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/PartSegCore_compiled_backend/_fast_unique.pyi +0 -0
  64. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/PartSegCore_compiled_backend/_fast_unique.pyx +0 -0
  65. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/PartSegCore_compiled_backend/_napari_mapping.pyx +0 -0
  66. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/PartSegCore_compiled_backend/color_image_cython.pyi +0 -0
  67. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/PartSegCore_compiled_backend/color_image_cython.pyx +0 -0
  68. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/PartSegCore_compiled_backend/multiscale_opening/mso_bind.pyx +0 -0
  69. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/PartSegCore_compiled_backend/sprawl_utils/__init__.py +0 -0
  70. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/PartSegCore_compiled_backend/sprawl_utils/distance_utils.pxd +0 -0
  71. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/PartSegCore_compiled_backend/sprawl_utils/fuzzy_distance.pyx +0 -0
  72. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/PartSegCore_compiled_backend/sprawl_utils/path_sprawl_cython.pyx +0 -0
  73. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/PartSegCore_compiled_backend/sprawl_utils/put_borders_in_queue.pyx +0 -0
  74. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/PartSegCore_compiled_backend/sprawl_utils/sprawl_utils.pyx +0 -0
  75. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/PartSegCore_compiled_backend/utils.py +0 -0
  76. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/tests/test_calc_bounds.py +0 -0
  77. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/tests/test_fast_unique.py +0 -0
  78. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/tests/test_sprawl_utils/__init__.py +0 -0
  79. {partsegcore_compiled_backend-0.15.7 → partsegcore_compiled_backend-0.15.9}/src/tests/test_sprawl_utils/test_euclidean.py +0 -0
@@ -1,3 +1,4 @@
1
+ cmake
1
2
  *.cpp
2
3
  src/PartSegCore_compiled_backend/version.py
3
4
  src/**.html
@@ -0,0 +1,43 @@
1
+ default_language_version:
2
+ python: python3.9
3
+
4
+ repos:
5
+ - repo: https://github.com/astral-sh/ruff-pre-commit
6
+ # Ruff version.
7
+ rev: v0.8.6
8
+ hooks:
9
+ # Run the linter.
10
+ - id: ruff
11
+ # Run the formatter.
12
+ - id: ruff-format
13
+ - repo: https://github.com/pre-commit/pre-commit-hooks
14
+ rev: v5.0.0
15
+ hooks:
16
+ - id: check-json
17
+ - id: check-yaml
18
+ - id: check-merge-conflict
19
+ - id: end-of-file-fixer
20
+ - id: trailing-whitespace
21
+ exclude: .*\.md
22
+ - id: debug-statements
23
+ - id: mixed-line-ending
24
+ - repo: https://github.com/pre-commit/pygrep-hooks
25
+ rev: v1.10.0
26
+ hooks:
27
+ - id: rst-backticks
28
+ - repo: https://github.com/markdownlint/markdownlint
29
+ rev: v0.12.0 # Use the ref you want to point at
30
+ hooks:
31
+ - id: markdownlint
32
+ - repo: https://github.com/codespell-project/codespell
33
+ rev: v2.3.0
34
+ hooks:
35
+ - id: codespell
36
+ additional_dependencies:
37
+ - tomli
38
+ - repo: https://github.com/pre-commit/mirrors-clang-format
39
+ rev: v19.1.6 # Use the sha / tag you want to point at
40
+ hooks:
41
+ - id: clang-format
42
+ args: ["-style=Google"]
43
+ exclude: ^notebooks/
@@ -0,0 +1,131 @@
1
+ cmake_minimum_required(VERSION 3.21)
2
+ project(${SKBUILD_PROJECT_NAME} LANGUAGES CXX)
3
+
4
+ set(CMAKE_CXX_STANDARD 17)
5
+ set(CMAKE_CXX_FLAGS_DEBUG_INIT "-DDEBUG -g")
6
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -DDEBUG")
7
+
8
+
9
+ # Define compiler directive
10
+ add_definitions(-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION)
11
+
12
+ if(DEFINED ENV{CUSTOM_MODULE_PATH})
13
+ list(APPEND CMAKE_MODULE_PATH $ENV{CUSTOM_MODULE_PATH})
14
+ message("Custom module path: ${CMAKE_MODULE_PATH}")
15
+ endif()
16
+
17
+
18
+ find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)
19
+ find_package(Cython MODULE REQUIRED VERSION 3.0)
20
+ include(UseCython)
21
+
22
+ if(DEFINED ENV{OMP})
23
+ list(APPEND CMAKE_PREFIX_PATH $ENV{OMP})
24
+ endif()
25
+
26
+ # find OpenMP
27
+ find_package(OpenMP REQUIRED)
28
+
29
+
30
+ execute_process(
31
+ COMMAND "${Python_EXECUTABLE}"
32
+ -c "import numpy; print(numpy.get_include())"
33
+ OUTPUT_VARIABLE NUMPY_INCLUDE_DIR
34
+ OUTPUT_STRIP_TRAILING_WHITESPACE
35
+ )
36
+
37
+
38
+ cython_transpile(src/PartSegCore_compiled_backend/sprawl_utils/euclidean_cython.pyx LANGUAGE CXX OUTPUT_VARIABLE euclidean_cython_cxx)
39
+ python_add_library(euclidean_cython MODULE
40
+ "${euclidean_cython_cxx}"
41
+ src/PartSegCore_compiled_backend/sprawl_utils/my_queue.h
42
+ src/PartSegCore_compiled_backend/sprawl_utils/global_consts.h
43
+ WITH_SOABI)
44
+ target_include_directories(euclidean_cython PRIVATE "${NUMPY_INCLUDE_DIR}")
45
+ target_include_directories(euclidean_cython PRIVATE src/PartSegCore_compiled_backend/sprawl_utils/)
46
+
47
+ cython_transpile(src/PartSegCore_compiled_backend/sprawl_utils/path_sprawl_cython.pyx LANGUAGE CXX OUTPUT_VARIABLE path_sprawl_cython_cxx)
48
+ python_add_library(path_sprawl_cython MODULE
49
+ "${path_sprawl_cython_cxx}"
50
+ src/PartSegCore_compiled_backend/sprawl_utils/my_queue.h
51
+ src/PartSegCore_compiled_backend/sprawl_utils/global_consts.h
52
+ WITH_SOABI)
53
+ target_include_directories(path_sprawl_cython PRIVATE "${NUMPY_INCLUDE_DIR}")
54
+ target_include_directories(path_sprawl_cython PRIVATE src/PartSegCore_compiled_backend/sprawl_utils/)
55
+
56
+ cython_transpile(src/PartSegCore_compiled_backend/sprawl_utils/sprawl_utils.pyx LANGUAGE CXX OUTPUT_VARIABLE sprawl_utils_cython_cxx)
57
+ python_add_library(sprawl_utils MODULE
58
+ "${sprawl_utils_cython_cxx}"
59
+ src/PartSegCore_compiled_backend/sprawl_utils/my_queue.h
60
+ src/PartSegCore_compiled_backend/sprawl_utils/global_consts.h
61
+ WITH_SOABI)
62
+ target_include_directories(sprawl_utils PRIVATE "${NUMPY_INCLUDE_DIR}")
63
+ target_include_directories(sprawl_utils PRIVATE src/PartSegCore_compiled_backend/sprawl_utils/)
64
+
65
+
66
+ cython_transpile(src/PartSegCore_compiled_backend/sprawl_utils/fuzzy_distance.pyx LANGUAGE CXX OUTPUT_VARIABLE fuzzy_distance_cython_cxx)
67
+ python_add_library(fuzzy_distance MODULE
68
+ "${fuzzy_distance_cython_cxx}"
69
+ src/PartSegCore_compiled_backend/sprawl_utils/my_queue.h
70
+ src/PartSegCore_compiled_backend/sprawl_utils/global_consts.h
71
+ WITH_SOABI)
72
+ target_include_directories(fuzzy_distance PRIVATE "${NUMPY_INCLUDE_DIR}")
73
+ target_include_directories(fuzzy_distance PRIVATE src/PartSegCore_compiled_backend/sprawl_utils/)
74
+
75
+
76
+ cython_transpile(src/PartSegCore_compiled_backend/color_image_cython.pyx LANGUAGE CXX OUTPUT_VARIABLE color_image_cython_cxx)
77
+ python_add_library(color_image_cython MODULE "${color_image_cython_cxx}" WITH_SOABI)
78
+ target_include_directories(color_image_cython PRIVATE "${NUMPY_INCLUDE_DIR}")
79
+
80
+
81
+ cython_transpile(src/PartSegCore_compiled_backend/calc_bounds.pyx LANGUAGE CXX OUTPUT_VARIABLE calc_bounds_cython_cxx)
82
+ python_add_library(calc_bounds MODULE "${calc_bounds_cython_cxx}" WITH_SOABI)
83
+ target_include_directories(calc_bounds PRIVATE "${NUMPY_INCLUDE_DIR}")
84
+
85
+
86
+ cython_transpile(src/PartSegCore_compiled_backend/multiscale_opening/mso_bind.pyx LANGUAGE CXX OUTPUT_VARIABLE mso_bind_cython_cxx)
87
+ python_add_library(
88
+ mso_bind MODULE
89
+ "${mso_bind_cython_cxx}"
90
+ # src/PartSegCore_compiled_backend/multiscale_opening/mso.cpp
91
+ src/PartSegCore_compiled_backend/multiscale_opening/mso.h
92
+ src/PartSegCore_compiled_backend/multiscale_opening/my_queue.h
93
+ WITH_SOABI)
94
+ target_include_directories(mso_bind PRIVATE src/PartSegCore_compiled_backend/multiscale_opening/)
95
+ target_include_directories(mso_bind PRIVATE "${NUMPY_INCLUDE_DIR}")
96
+
97
+
98
+ cython_transpile(src/PartSegCore_compiled_backend/_fast_unique.pyx LANGUAGE CXX OUTPUT_VARIABLE fast_unique_cython_cxx)
99
+ python_add_library(_fast_unique MODULE "${fast_unique_cython_cxx}" WITH_SOABI)
100
+ target_include_directories(_fast_unique PRIVATE "${NUMPY_INCLUDE_DIR}")
101
+ target_link_libraries(_fast_unique PRIVATE OpenMP::OpenMP_CXX)
102
+
103
+
104
+ cython_transpile(src/PartSegCore_compiled_backend/_napari_mapping.pyx LANGUAGE CXX OUTPUT_VARIABLE napari_mapping_cython_cxx)
105
+ python_add_library(_napari_mapping MODULE "${napari_mapping_cython_cxx}" WITH_SOABI)
106
+ target_include_directories(_napari_mapping PRIVATE "${NUMPY_INCLUDE_DIR}")
107
+ target_link_libraries(_napari_mapping PRIVATE OpenMP::OpenMP_CXX)
108
+
109
+ cython_transpile(src/PartSegCore_compiled_backend/triangulate.pyx LANGUAGE CXX OUTPUT_VARIABLE triangulate_cython_cxx)
110
+ python_add_library(
111
+ triangulate MODULE
112
+ "${triangulate_cython_cxx}"
113
+ src/PartSegCore_compiled_backend/triangulation/triangulate.hpp
114
+ src/PartSegCore_compiled_backend/triangulation/intersection.hpp
115
+ src/PartSegCore_compiled_backend/triangulation/point.hpp
116
+ src/PartSegCore_compiled_backend/triangulation/debug_util.hpp
117
+ WITH_SOABI)
118
+ target_include_directories(triangulate PRIVATE "${NUMPY_INCLUDE_DIR}")
119
+ target_include_directories(triangulate PRIVATE src/PartSegCore_compiled_backend/)
120
+
121
+
122
+ install(TARGETS euclidean_cython DESTINATION PartSegCore_compiled_backend/sprawl_utils)
123
+ install(TARGETS path_sprawl_cython DESTINATION PartSegCore_compiled_backend/sprawl_utils)
124
+ install(TARGETS sprawl_utils DESTINATION PartSegCore_compiled_backend/sprawl_utils)
125
+ install(TARGETS fuzzy_distance DESTINATION PartSegCore_compiled_backend/sprawl_utils)
126
+ install(TARGETS color_image_cython DESTINATION PartSegCore_compiled_backend)
127
+ install(TARGETS calc_bounds DESTINATION PartSegCore_compiled_backend)
128
+ install(TARGETS mso_bind DESTINATION PartSegCore_compiled_backend/multiscale_opening)
129
+ install(TARGETS _fast_unique DESTINATION PartSegCore_compiled_backend)
130
+ install(TARGETS _napari_mapping DESTINATION PartSegCore_compiled_backend)
131
+ install(TARGETS triangulate DESTINATION PartSegCore_compiled_backend)
@@ -1,16 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PartSegCore_compiled_backend
3
- Version: 0.15.7
3
+ Version: 0.15.9
4
4
  Summary: PartSegCore compiled backend,
5
- Author-email: Grzegorz Bokota <g.bokota@cent.uw.edu.pl>
6
- License: BSD-3-Clause
7
- Project-URL: Homepage, https://4dnucleome.cent.uw.edu.pl/PartSeg/
8
- Project-URL: Documentation, https://partsegcore-compiled-backend.readthedocs.io/en/stable/
9
- Project-URL: Source Code, https://github.com/4DNucleome/PartSegCore-compiled-backend
10
5
  Keywords: bioimaging
11
- Platform: Linux
12
- Platform: Windows
13
- Platform: MacOs
6
+ Author-Email: Grzegorz Bokota <g.bokota@cent.uw.edu.pl>
7
+ License: BSD-3-Clause
14
8
  Classifier: Development Status :: 3 - Alpha
15
9
  Classifier: License :: OSI Approved :: BSD License
16
10
  Classifier: Operating System :: OS Independent
@@ -22,14 +16,16 @@ Classifier: Programming Language :: Python :: 3.11
22
16
  Classifier: Programming Language :: Python :: 3.12
23
17
  Classifier: Programming Language :: Python :: Implementation :: CPython
24
18
  Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
19
+ Project-URL: Homepage, https://4dnucleome.cent.uw.edu.pl/PartSeg/
20
+ Project-URL: Documentation, https://partsegcore-compiled-backend.readthedocs.io/en/stable/
21
+ Project-URL: Source code, https://github.com/4DNucleome/PartSegCore-compiled-backend
25
22
  Requires-Python: >=3.9
26
- Description-Content-Type: text/markdown
27
- License-File: License.txt
28
- Requires-Dist: numpy>=1.25.0
29
- Provides-Extra: test
23
+ Requires-Dist: numpy>=1.23.5
30
24
  Requires-Dist: pytest>=7.0.0; extra == "test"
31
- Provides-Extra: docs
32
25
  Requires-Dist: sphinx>=5.0.0; extra == "docs"
26
+ Provides-Extra: test
27
+ Provides-Extra: docs
28
+ Description-Content-Type: text/markdown
33
29
 
34
30
  # PartSegCore_compiled_backend
35
31
 
@@ -1,7 +1,16 @@
1
1
  [build-system]
2
2
  # Minimum requirements for the build system to execute.
3
- requires = ["setuptools>=70.0.0", "Cython", "numpy>=2", "setuptools_scm[toml]>=8.1"] # PEP 508 specifications.
4
- build-backend = "setuptools.build_meta"
3
+ requires = ["scikit-build-core", "Cython", "cython-cmake", "numpy>=2", "setuptools_scm[toml]>=8.1"] # PEP 508 specifications.
4
+ build-backend = "scikit_build_core.build"
5
+
6
+ [tool.scikit-build]
7
+ metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
8
+ sdist.include = ["src/PartSegCore_compiled_backend/version.py"]
9
+ cmake.version = ">=3.21"
10
+ sdist.exclude = [".github", "tox.ini", "build_utils", "notebooks", ".readthedocs.yaml"]
11
+ wheel.exclude = ["**.pyx"]
12
+ #cmake.build-type = "Debug"
13
+
5
14
 
6
15
  [project]
7
16
  name = "PartSegCore_compiled_backend"
@@ -27,7 +36,7 @@ keywords = [
27
36
  ]
28
37
  requires-python = ">=3.9"
29
38
  dependencies = [
30
- "numpy>=1.25.0",
39
+ "numpy>=1.23.5",
31
40
  ]
32
41
  dynamic = [
33
42
  "version",
@@ -112,7 +121,7 @@ ignore = ["src/PartSegCore_compiled_backend/changelog.py", "src/PartSegCore_comp
112
121
  [tool.cibuildwheel]
113
122
  test-command = "pytest {project}/src/tests"
114
123
  test-extras = ["test"]
115
- skip = "pp*macos* pp31*"
124
+ skip = "pp*macos* pp31* pp39-manylinux*"
116
125
  build = "*64"
117
126
 
118
127
  [tool.cibuildwheel.macos]
@@ -124,10 +133,72 @@ before-all = [
124
133
 
125
134
  [tool.ruff]
126
135
  line-length = 120
136
+ fix=true
127
137
 
128
138
  [tool.ruff.format]
129
139
  quote-style = "single"
130
140
  indent-style = "space"
131
141
  docstring-code-format = true
132
142
  line-ending = "lf"
133
- skip-magic-trailing-comma = true
143
+ skip-magic-trailing-comma = false
144
+
145
+
146
+ [tool.ruff.lint]
147
+ select = [
148
+ "E", "F", "W", #flake8
149
+ "UP", # pyupgrade
150
+ "I", # isort
151
+ "YTT", #flake8-2020
152
+ "TCH", # flake8-type-checing
153
+ "BLE", # flake8-blind-exception
154
+ "B", # flake8-bugbear
155
+ "A", # flake8-builtins
156
+ "C4", # flake8-comprehensions
157
+ "ISC", # flake8-implicit-str-concat
158
+ "G", # flake8-logging-format
159
+ "PIE", # flake8-pie
160
+ "COM", # flake8-commas
161
+ "SIM", # flake8-simplify
162
+ "INP", # flake8-no-pep420
163
+ "PYI", # flake8-pyi
164
+ "Q", # flake8-quotes
165
+ "RSE", # flake8-raise
166
+ "RET", # flake8-return
167
+ "TID", # flake8-tidy-imports # replace absolutify import
168
+ "TRY", # tryceratops
169
+ "ICN", # flake8-import-conventions
170
+ "RUF", # ruff specyfic rules
171
+ "NPY201", # checks compatibility with numpy version 2.0
172
+ "ASYNC", # flake8-async
173
+ "EXE", # flake8-executable
174
+ "FA", # flake8-future-annotations
175
+ "LOG", # flake8-logging
176
+ "SLOT", # flake8-slots
177
+ "PT", # flake8-pytest-style
178
+ "T20", # flake8-print
179
+ ]
180
+ ignore = [
181
+ "E501", # line lenngth is handled by formatter
182
+ "COM812", # flake8-commas - we don't like adding comma on single line of arguments
183
+ "COM819", # conflicts with ruff-format
184
+ "TRY003", # require implement multiple exception class
185
+ "RUF005", # problem with numpy compatybility, see https://github.com/charliermarsh/ruff/issues/2142#issuecomment-1451038741
186
+ "W191", "Q000", "Q001", "Q002", "Q003", "ISC001", # https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
187
+ ]
188
+
189
+ [tool.ruff.lint.flake8-quotes]
190
+ docstring-quotes = "double"
191
+ inline-quotes = "single"
192
+ multiline-quotes = "double"
193
+
194
+ [tool.ruff.lint.per-file-ignores]
195
+ "src/tests/**.py" = ["B011", "INP001", "TRY301", "B018", "RUF012"]
196
+ "notebooks/**" = ["FA100", "INP001", "A001"]
197
+ "docs/conf.py" = ["INP001", "A001"]
198
+
199
+ [tool.ruff.lint.flake8-tidy-imports]
200
+ # Disallow all relative imports.
201
+ ban-relative-imports = "all"
202
+
203
+ [tool.codespell]
204
+ skip = "notebooks/*"
@@ -0,0 +1,3 @@
1
+ import numpy as np
2
+
3
+ def calc_bounds(labels: np.ndarray, components_num: int | None = None): ...
@@ -45,7 +45,7 @@ def calc_bounds(labels: np.ndarray, components_num: Optional[int]=None):
45
45
  }[labels.ndim](labels, components_num)
46
46
 
47
47
 
48
- def calc_bounds5(cnp.ndarray[label_types, ndim=5] labels, components_num: Py_ssize_t):
48
+ def calc_bounds5(cnp.ndarray[label_types, ndim=5] labels, Py_ssize_t components_num):
49
49
  """
50
50
  Calculate the bounds of the specified labels in a 5-dimensional array.
51
51
 
@@ -94,7 +94,7 @@ def calc_bounds5(cnp.ndarray[label_types, ndim=5] labels, components_num: Py_ssi
94
94
  return min_bound, max_bound
95
95
 
96
96
 
97
- def calc_bounds4(cnp.ndarray[label_types, ndim=4] labels, components_num: Py_ssize_t):
97
+ def calc_bounds4(cnp.ndarray[label_types, ndim=4] labels, Py_ssize_t components_num):
98
98
  """
99
99
  Calculate the bounds of the specified labels in a 4-dimensional array.
100
100
 
@@ -137,7 +137,7 @@ def calc_bounds4(cnp.ndarray[label_types, ndim=4] labels, components_num: Py_ssi
137
137
  max_bound[label_val, 3] = max(max_bound[label_val, 3], x)
138
138
  return min_bound, max_bound
139
139
 
140
- def calc_bounds3(cnp.ndarray[label_types, ndim=3] labels, components_num: Py_ssize_t):
140
+ def calc_bounds3(cnp.ndarray[label_types, ndim=3] labels, Py_ssize_t components_num):
141
141
  """
142
142
  Calculate the bounds of the specified labels in a 3-dimensional array.
143
143
 
@@ -178,7 +178,7 @@ def calc_bounds3(cnp.ndarray[label_types, ndim=3] labels, components_num: Py_ssi
178
178
  return min_bound, max_bound
179
179
 
180
180
 
181
- def calc_bounds2(cnp.ndarray[label_types, ndim=2] labels, components_num: Py_ssize_t):
181
+ def calc_bounds2(cnp.ndarray[label_types, ndim=2] labels, Py_ssize_t components_num):
182
182
  """
183
183
  Calculate the bounds of the specified labels in a 2-dimensional array.
184
184
 
@@ -9,7 +9,7 @@ For benchmark please see https://github.com/4DNucleome/PartSegCore-compiled-back
9
9
 
10
10
  import numpy as np
11
11
 
12
- from ._fast_unique import unique1d, unique2d, unique3d
12
+ from PartSegCore_compiled_backend._fast_unique import unique1d, unique2d, unique3d
13
13
 
14
14
 
15
15
  def label_unique(array, numpy_fallback=False) -> np.ndarray:
@@ -0,0 +1,3 @@
1
+ from PartSegCore_compiled_backend.multiscale_opening.mso_bind import MuType, PyMSO, calculate_mu, calculate_mu_mid
2
+
3
+ __all__ = ('MuType', 'PyMSO', 'calculate_mu', 'calculate_mu_mid')