careamics 0.0.1__tar.gz → 0.0.2__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.

Potentially problematic release.


This version of careamics might be problematic. Click here for more details.

Files changed (228) hide show
  1. careamics-0.0.2/.github/ISSUE_TEMPLATE/bug_report.md +34 -0
  2. careamics-0.0.2/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  3. {careamics-0.0.1 → careamics-0.0.2}/.github/TEST_FAIL_TEMPLATE.md +1 -1
  4. careamics-0.0.2/.github/pull_request_template.md +39 -0
  5. {careamics-0.0.1 → careamics-0.0.2}/.github/workflows/ci.yml +18 -16
  6. careamics-0.0.2/.gitignore +170 -0
  7. careamics-0.0.2/.pre-commit-config.yaml +59 -0
  8. {careamics-0.0.1 → careamics-0.0.2}/LICENSE +1 -1
  9. careamics-0.0.2/PKG-INFO +78 -0
  10. careamics-0.0.2/README.md +33 -0
  11. careamics-0.0.2/examples/3D/example_flywing_3D.ipynb +346 -0
  12. careamics-0.0.2/examples/3D/n2v_flywing_3D.yml +73 -0
  13. careamics-0.0.2/examples/evaluate_LVAE.ipynb +1356 -0
  14. careamics-0.0.2/pyproject.toml +183 -0
  15. careamics-0.0.2/src/careamics/__init__.py +13 -0
  16. careamics-0.0.2/src/careamics/careamist.py +726 -0
  17. careamics-0.0.2/src/careamics/config/__init__.py +35 -0
  18. careamics-0.0.2/src/careamics/config/algorithm_model.py +162 -0
  19. careamics-0.0.2/src/careamics/config/architectures/__init__.py +17 -0
  20. careamics-0.0.2/src/careamics/config/architectures/architecture_model.py +37 -0
  21. careamics-0.0.2/src/careamics/config/architectures/custom_model.py +159 -0
  22. careamics-0.0.2/src/careamics/config/architectures/register_model.py +103 -0
  23. careamics-0.0.2/src/careamics/config/architectures/unet_model.py +118 -0
  24. careamics-0.0.2/src/careamics/config/architectures/vae_model.py +42 -0
  25. careamics-0.0.2/src/careamics/config/callback_model.py +123 -0
  26. careamics-0.0.2/src/careamics/config/configuration_factory.py +575 -0
  27. careamics-0.0.2/src/careamics/config/configuration_model.py +600 -0
  28. careamics-0.0.2/src/careamics/config/data_model.py +502 -0
  29. careamics-0.0.2/src/careamics/config/inference_model.py +239 -0
  30. careamics-0.0.2/src/careamics/config/optimizer_models.py +187 -0
  31. careamics-0.0.2/src/careamics/config/references/__init__.py +45 -0
  32. careamics-0.0.2/src/careamics/config/references/algorithm_descriptions.py +132 -0
  33. careamics-0.0.2/src/careamics/config/references/references.py +39 -0
  34. careamics-0.0.2/src/careamics/config/support/__init__.py +31 -0
  35. careamics-0.0.2/src/careamics/config/support/supported_activations.py +26 -0
  36. careamics-0.0.2/src/careamics/config/support/supported_algorithms.py +20 -0
  37. careamics-0.0.2/src/careamics/config/support/supported_architectures.py +20 -0
  38. careamics-0.0.2/src/careamics/config/support/supported_data.py +109 -0
  39. careamics-0.0.2/src/careamics/config/support/supported_loggers.py +10 -0
  40. careamics-0.0.2/src/careamics/config/support/supported_losses.py +27 -0
  41. careamics-0.0.2/src/careamics/config/support/supported_optimizers.py +57 -0
  42. careamics-0.0.2/src/careamics/config/support/supported_pixel_manipulations.py +15 -0
  43. careamics-0.0.2/src/careamics/config/support/supported_struct_axis.py +21 -0
  44. careamics-0.0.2/src/careamics/config/support/supported_transforms.py +11 -0
  45. careamics-0.0.2/src/careamics/config/tile_information.py +65 -0
  46. careamics-0.0.2/src/careamics/config/training_model.py +72 -0
  47. careamics-0.0.2/src/careamics/config/transformations/__init__.py +15 -0
  48. careamics-0.0.2/src/careamics/config/transformations/n2v_manipulate_model.py +64 -0
  49. careamics-0.0.2/src/careamics/config/transformations/normalize_model.py +60 -0
  50. careamics-0.0.2/src/careamics/config/transformations/transform_model.py +45 -0
  51. careamics-0.0.2/src/careamics/config/transformations/xy_flip_model.py +43 -0
  52. careamics-0.0.2/src/careamics/config/transformations/xy_random_rotate90_model.py +35 -0
  53. careamics-0.0.2/src/careamics/config/validators/__init__.py +5 -0
  54. careamics-0.0.2/src/careamics/config/validators/validator_utils.py +101 -0
  55. careamics-0.0.2/src/careamics/conftest.py +39 -0
  56. careamics-0.0.2/src/careamics/dataset/__init__.py +17 -0
  57. careamics-0.0.2/src/careamics/dataset/dataset_utils/__init__.py +19 -0
  58. careamics-0.0.2/src/careamics/dataset/dataset_utils/dataset_utils.py +101 -0
  59. careamics-0.0.2/src/careamics/dataset/dataset_utils/file_utils.py +141 -0
  60. careamics-0.0.2/src/careamics/dataset/dataset_utils/iterate_over_files.py +83 -0
  61. careamics-0.0.2/src/careamics/dataset/dataset_utils/running_stats.py +186 -0
  62. careamics-0.0.2/src/careamics/dataset/in_memory_dataset.py +310 -0
  63. careamics-0.0.2/src/careamics/dataset/in_memory_pred_dataset.py +88 -0
  64. careamics-0.0.2/src/careamics/dataset/in_memory_tiled_pred_dataset.py +129 -0
  65. careamics-0.0.2/src/careamics/dataset/iterable_dataset.py +295 -0
  66. careamics-0.0.2/src/careamics/dataset/iterable_pred_dataset.py +122 -0
  67. careamics-0.0.2/src/careamics/dataset/iterable_tiled_pred_dataset.py +140 -0
  68. careamics-0.0.2/src/careamics/dataset/patching/__init__.py +1 -0
  69. careamics-0.0.2/src/careamics/dataset/patching/patching.py +299 -0
  70. careamics-0.0.2/src/careamics/dataset/patching/random_patching.py +201 -0
  71. careamics-0.0.2/src/careamics/dataset/patching/sequential_patching.py +212 -0
  72. careamics-0.0.2/src/careamics/dataset/patching/validate_patch_dimension.py +64 -0
  73. careamics-0.0.2/src/careamics/dataset/tiling/__init__.py +10 -0
  74. careamics-0.0.2/src/careamics/dataset/tiling/collate_tiles.py +33 -0
  75. careamics-0.0.2/src/careamics/dataset/tiling/tiled_patching.py +164 -0
  76. careamics-0.0.2/src/careamics/dataset/zarr_dataset.py +151 -0
  77. careamics-0.0.2/src/careamics/file_io/__init__.py +15 -0
  78. careamics-0.0.2/src/careamics/file_io/read/__init__.py +12 -0
  79. careamics-0.0.2/src/careamics/file_io/read/get_func.py +56 -0
  80. careamics-0.0.2/src/careamics/file_io/read/tiff.py +58 -0
  81. careamics-0.0.2/src/careamics/file_io/read/zarr.py +60 -0
  82. careamics-0.0.2/src/careamics/file_io/write/__init__.py +15 -0
  83. careamics-0.0.2/src/careamics/file_io/write/get_func.py +63 -0
  84. careamics-0.0.2/src/careamics/file_io/write/tiff.py +40 -0
  85. careamics-0.0.2/src/careamics/lightning/__init__.py +17 -0
  86. careamics-0.0.2/src/careamics/lightning/callbacks/__init__.py +11 -0
  87. careamics-0.0.2/src/careamics/lightning/callbacks/hyperparameters_callback.py +49 -0
  88. careamics-0.0.2/src/careamics/lightning/callbacks/prediction_writer_callback/__init__.py +20 -0
  89. careamics-0.0.2/src/careamics/lightning/callbacks/prediction_writer_callback/file_path_utils.py +56 -0
  90. careamics-0.0.2/src/careamics/lightning/callbacks/prediction_writer_callback/prediction_writer_callback.py +233 -0
  91. careamics-0.0.2/src/careamics/lightning/callbacks/prediction_writer_callback/write_strategy.py +398 -0
  92. careamics-0.0.2/src/careamics/lightning/callbacks/prediction_writer_callback/write_strategy_factory.py +215 -0
  93. careamics-0.0.2/src/careamics/lightning/callbacks/progress_bar_callback.py +90 -0
  94. careamics-0.0.2/src/careamics/lightning/lightning_module.py +276 -0
  95. careamics-0.0.2/src/careamics/lightning/predict_data_module.py +333 -0
  96. careamics-0.0.2/src/careamics/lightning/train_data_module.py +680 -0
  97. careamics-0.0.2/src/careamics/losses/__init__.py +5 -0
  98. careamics-0.0.2/src/careamics/losses/loss_factory.py +49 -0
  99. careamics-0.0.2/src/careamics/losses/losses.py +98 -0
  100. careamics-0.0.2/src/careamics/lvae_training/__init__.py +0 -0
  101. careamics-0.0.2/src/careamics/lvae_training/data_modules.py +1220 -0
  102. careamics-0.0.2/src/careamics/lvae_training/data_utils.py +618 -0
  103. careamics-0.0.2/src/careamics/lvae_training/eval_utils.py +905 -0
  104. careamics-0.0.2/src/careamics/lvae_training/get_config.py +84 -0
  105. careamics-0.0.2/src/careamics/lvae_training/lightning_module.py +701 -0
  106. careamics-0.0.2/src/careamics/lvae_training/metrics.py +214 -0
  107. careamics-0.0.2/src/careamics/lvae_training/train_lvae.py +339 -0
  108. careamics-0.0.2/src/careamics/lvae_training/train_utils.py +121 -0
  109. careamics-0.0.2/src/careamics/model_io/__init__.py +7 -0
  110. careamics-0.0.2/src/careamics/model_io/bioimage/__init__.py +11 -0
  111. careamics-0.0.2/src/careamics/model_io/bioimage/_readme_factory.py +121 -0
  112. careamics-0.0.2/src/careamics/model_io/bioimage/bioimage_utils.py +52 -0
  113. careamics-0.0.2/src/careamics/model_io/bioimage/model_description.py +327 -0
  114. careamics-0.0.2/src/careamics/model_io/bmz_io.py +233 -0
  115. careamics-0.0.2/src/careamics/model_io/model_io_utils.py +83 -0
  116. careamics-0.0.2/src/careamics/models/__init__.py +7 -0
  117. careamics-0.0.2/src/careamics/models/activation.py +37 -0
  118. careamics-0.0.2/src/careamics/models/layers.py +493 -0
  119. careamics-0.0.2/src/careamics/models/lvae/__init__.py +0 -0
  120. careamics-0.0.2/src/careamics/models/lvae/layers.py +1998 -0
  121. careamics-0.0.2/src/careamics/models/lvae/likelihoods.py +312 -0
  122. careamics-0.0.2/src/careamics/models/lvae/lvae.py +985 -0
  123. careamics-0.0.2/src/careamics/models/lvae/noise_models.py +409 -0
  124. careamics-0.0.2/src/careamics/models/lvae/utils.py +395 -0
  125. careamics-0.0.2/src/careamics/models/model_factory.py +52 -0
  126. careamics-0.0.2/src/careamics/models/unet.py +443 -0
  127. careamics-0.0.2/src/careamics/prediction_utils/__init__.py +10 -0
  128. careamics-0.0.2/src/careamics/prediction_utils/prediction_outputs.py +135 -0
  129. careamics-0.0.2/src/careamics/prediction_utils/stitch_prediction.py +98 -0
  130. careamics-0.0.2/src/careamics/transforms/__init__.py +20 -0
  131. careamics-0.0.2/src/careamics/transforms/compose.py +107 -0
  132. careamics-0.0.2/src/careamics/transforms/n2v_manipulate.py +146 -0
  133. careamics-0.0.2/src/careamics/transforms/normalize.py +243 -0
  134. careamics-0.0.2/src/careamics/transforms/pixel_manipulation.py +407 -0
  135. careamics-0.0.2/src/careamics/transforms/struct_mask_parameters.py +20 -0
  136. careamics-0.0.2/src/careamics/transforms/transform.py +24 -0
  137. careamics-0.0.2/src/careamics/transforms/tta.py +88 -0
  138. careamics-0.0.2/src/careamics/transforms/xy_flip.py +123 -0
  139. careamics-0.0.2/src/careamics/transforms/xy_random_rotate90.py +101 -0
  140. careamics-0.0.2/src/careamics/utils/__init__.py +19 -0
  141. careamics-0.0.2/src/careamics/utils/autocorrelation.py +40 -0
  142. careamics-0.0.2/src/careamics/utils/base_enum.py +60 -0
  143. careamics-0.0.2/src/careamics/utils/context.py +66 -0
  144. careamics-0.0.2/src/careamics/utils/logging.py +322 -0
  145. careamics-0.0.2/src/careamics/utils/metrics.py +115 -0
  146. careamics-0.0.2/src/careamics/utils/path_utils.py +26 -0
  147. careamics-0.0.2/src/careamics/utils/ram.py +15 -0
  148. careamics-0.0.2/src/careamics/utils/receptive_field.py +108 -0
  149. careamics-0.0.2/src/careamics/utils/torch_utils.py +127 -0
  150. careamics-0.0.2/tests/config/architectures/test_architecture_model.py +11 -0
  151. careamics-0.0.2/tests/config/architectures/test_custom_model.py +100 -0
  152. careamics-0.0.2/tests/config/architectures/test_register_model.py +45 -0
  153. careamics-0.0.2/tests/config/architectures/test_unet_model.py +121 -0
  154. careamics-0.0.2/tests/config/support/test_supported_data.py +103 -0
  155. careamics-0.0.2/tests/config/support/test_supported_optimizers.py +18 -0
  156. careamics-0.0.2/tests/config/test_algorithm_model.py +101 -0
  157. careamics-0.0.2/tests/config/test_callback_models.py +16 -0
  158. careamics-0.0.2/tests/config/test_configuration_factory.py +523 -0
  159. careamics-0.0.2/tests/config/test_configuration_model.py +191 -0
  160. careamics-0.0.2/tests/config/test_data_model.py +333 -0
  161. careamics-0.0.2/tests/config/test_inference_model.py +117 -0
  162. careamics-0.0.2/tests/config/test_optimizers_model.py +146 -0
  163. careamics-0.0.2/tests/config/test_tile_information.py +72 -0
  164. careamics-0.0.2/tests/config/test_training_model.py +13 -0
  165. careamics-0.0.2/tests/config/transformations/test_n2v_manipulate_model.py +33 -0
  166. careamics-0.0.2/tests/config/transformations/test_normalize_model.py +85 -0
  167. careamics-0.0.2/tests/config/transformations/test_xy_flip_model.py +10 -0
  168. careamics-0.0.2/tests/config/transformations/test_xy_random_rotate90_model.py +10 -0
  169. careamics-0.0.2/tests/config/validators/test_validator_utils.py +70 -0
  170. careamics-0.0.2/tests/conftest.py +300 -0
  171. careamics-0.0.2/tests/dataset/dataset_utils/test_compute_normalization_stats.py +28 -0
  172. careamics-0.0.2/tests/dataset/dataset_utils/test_list_files.py +236 -0
  173. careamics-0.0.2/tests/dataset/patching/test_patching_utils.py +44 -0
  174. careamics-0.0.2/tests/dataset/patching/test_random_patching.py +63 -0
  175. careamics-0.0.2/tests/dataset/patching/test_sequential_patching.py +155 -0
  176. careamics-0.0.2/tests/dataset/test_in_memory_dataset.py +106 -0
  177. careamics-0.0.2/tests/dataset/test_in_memory_pred_dataset.py +72 -0
  178. careamics-0.0.2/tests/dataset/test_in_memory_tiled_pred_dataset.py +86 -0
  179. careamics-0.0.2/tests/dataset/test_iterable_dataset.py +240 -0
  180. careamics-0.0.2/tests/dataset/test_iterable_pred_dataset.py +90 -0
  181. careamics-0.0.2/tests/dataset/test_iterable_tiled_pred_dataset.py +104 -0
  182. careamics-0.0.2/tests/dataset/tiling/test_collate_tiles.py +75 -0
  183. careamics-0.0.2/tests/dataset/tiling/test_tiled_patching.py +120 -0
  184. careamics-0.0.2/tests/file_io/read/test_get_read_func.py +14 -0
  185. careamics-0.0.2/tests/file_io/read/test_read_tiff.py +32 -0
  186. careamics-0.0.2/tests/file_io/write/test_get_write_func.py +7 -0
  187. careamics-0.0.2/tests/file_io/write/test_write_tiff.py +27 -0
  188. careamics-0.0.2/tests/lightning/callbacks/prediction_writer_callback/test_cache_tiles_write_strategy.py +326 -0
  189. careamics-0.0.2/tests/lightning/callbacks/prediction_writer_callback/test_file_path_utils.py +54 -0
  190. careamics-0.0.2/tests/lightning/callbacks/prediction_writer_callback/test_prediction_writer_callback.py +345 -0
  191. careamics-0.0.2/tests/lightning/callbacks/prediction_writer_callback/test_write_image_write_strategy.py +126 -0
  192. careamics-0.0.2/tests/lightning/callbacks/prediction_writer_callback/test_write_strategy_factory.py +97 -0
  193. careamics-0.0.2/tests/lightning/test_lightning_api.py +133 -0
  194. careamics-0.0.2/tests/lightning/test_lightning_module.py +305 -0
  195. careamics-0.0.2/tests/lightning/test_predict_data_module.py +80 -0
  196. careamics-0.0.2/tests/lightning/test_train_data_module.py +179 -0
  197. careamics-0.0.2/tests/model_io/test_bmz_io.py +68 -0
  198. careamics-0.0.2/tests/models/test_model_factory.py +63 -0
  199. careamics-0.0.2/tests/models/test_unet.py +110 -0
  200. careamics-0.0.2/tests/prediction_utils/test_prediction_outputs.py +43 -0
  201. careamics-0.0.2/tests/prediction_utils/test_stitch_prediction.py +90 -0
  202. careamics-0.0.2/tests/test_careamist.py +901 -0
  203. careamics-0.0.2/tests/test_conftest.py +30 -0
  204. careamics-0.0.2/tests/transforms/test_compose.py +138 -0
  205. careamics-0.0.2/tests/transforms/test_manipulate_n2v.py +29 -0
  206. careamics-0.0.2/tests/transforms/test_normalize.py +71 -0
  207. careamics-0.0.2/tests/transforms/test_pixel_manipulation.py +280 -0
  208. careamics-0.0.2/tests/transforms/test_supported_transforms.py +8 -0
  209. careamics-0.0.2/tests/transforms/test_tta.py +105 -0
  210. careamics-0.0.2/tests/transforms/test_xy_flip.py +137 -0
  211. careamics-0.0.2/tests/transforms/test_xy_random_rotate90.py +96 -0
  212. careamics-0.0.2/tests/utils/test_autocorrelation.py +42 -0
  213. careamics-0.0.2/tests/utils/test_base_enum.py +12 -0
  214. careamics-0.0.2/tests/utils/test_context.py +21 -0
  215. careamics-0.0.2/tests/utils/test_logging.py +29 -0
  216. careamics-0.0.2/tests/utils/test_metrics.py +30 -0
  217. careamics-0.0.2/tests/utils/test_torch_utils.py +19 -0
  218. careamics-0.0.2/tests/utils/test_wandb.py +19 -0
  219. careamics-0.0.1/.github/ISSUE_TEMPLATE.md +0 -15
  220. careamics-0.0.1/.github/dependabot.yml +0 -10
  221. careamics-0.0.1/.gitignore +0 -111
  222. careamics-0.0.1/.pre-commit-config.yaml +0 -34
  223. careamics-0.0.1/PKG-INFO +0 -46
  224. careamics-0.0.1/README.md +0 -18
  225. careamics-0.0.1/pyproject.toml +0 -144
  226. careamics-0.0.1/src/careamics/__init__.py +0 -8
  227. careamics-0.0.1/tests/test_careamics.py +0 -2
  228. {careamics-0.0.1 → careamics-0.0.2}/src/careamics/py.typed +0 -0
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: "[BUG]"
5
+ labels: bug
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is.
12
+
13
+ **To Reproduce**
14
+ Code snippet allowing reproducing the behaviour:
15
+ ```python
16
+ # code here
17
+ ```
18
+
19
+ **Expected behavior**
20
+ A clear and concise description of what you expected to happen.
21
+
22
+ **Screenshots**
23
+ If applicable, add screenshots to help explain your problem.
24
+
25
+ **Desktop (please complete the following information):**
26
+ - OS: [e.g. iOS]
27
+ - Version [e.g. 22]
28
+ - microscopy-portfolio version [e.g. 0.0.5]
29
+
30
+ **Environment:**
31
+ Please add here the content of your conda environment with versions.
32
+
33
+ **Additional context**
34
+ Add any other context about the problem here.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: enhancement
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or screenshots about the feature request here.
@@ -9,4 +9,4 @@ with commit: {{ sha }}
9
9
 
10
10
  Full run: https://github.com/{{ repo }}/actions/runs/{{ env.RUN_ID }}
11
11
 
12
- (This post will be updated if another test fails, as long as this issue remains open.)
12
+ (This post will be updated if another test fails, as long as this issue remains open.)
@@ -0,0 +1,39 @@
1
+ ### Description
2
+
3
+ Please provide a brief description of the changes in this PR. Include any relevant context or background information.
4
+
5
+ - **What**: Clearly and concisely describe what changes you have made.
6
+ - **Why**: Explain the reasoning behind these changes. What problem are you solving? Why is this change necessary?
7
+ - **How**: Describe how you implemented these changes. Provide an overview of the approach and any important implementation details.
8
+
9
+ ### Changes Made
10
+
11
+ - **Added**: List new features or files added.
12
+ - **Modified**: Describe existing features or files modified.
13
+ - **Removed**: Detail features or files that were removed.
14
+
15
+ ### Related Issues
16
+
17
+ Link to any related issues or discussions. Use keywords like "Fixes", "Resolves", or "Closes" to link to issues automatically.
18
+
19
+ - Fixes #
20
+ - Resolves #
21
+ - Closes #
22
+
23
+ ### Breaking changes
24
+
25
+ Describe any breaking change.
26
+
27
+
28
+ ### Additional Notes and Examples
29
+
30
+ Include any additional notes or context that reviewers should be aware of, including snippets of code illustrating your new feature.
31
+
32
+ ---
33
+
34
+ **Please ensure your PR meets the following requirements:**
35
+
36
+ - [ ] Code builds and passes tests locally, including doctests
37
+ - [ ] New tests have been added (for bug fixes/features)
38
+ - [ ] Pre-commit passes
39
+ - [ ] PR to the documentation exists (for bug fixes / features)
@@ -27,8 +27,9 @@ jobs:
27
27
  strategy:
28
28
  fail-fast: false
29
29
  matrix:
30
- python-version: ["3.8", "3.9", "3.10", "3.11"]
31
- platform: [ubuntu-latest, macos-latest, windows-latest]
30
+ python-version: ["3.9", "3.10", "3.11", "3.12"]
31
+ # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
32
+ platform: [ubuntu-latest, macos-13, windows-latest]
32
33
 
33
34
  steps:
34
35
  - name: 🛑 Cancel Previous Runs
@@ -49,10 +50,10 @@ jobs:
49
50
  run: |
50
51
  python -m pip install -U pip
51
52
  # if running a cron job, we add the --pre flag to test against pre-releases
52
- python -m pip install .[test] ${{ github.event_name == 'schedule' && '--pre' || '' }}
53
+ python -m pip install .[dev] ${{ github.event_name == 'schedule' && '--pre' || '' }}
53
54
 
54
55
  - name: 🧪 Run Tests
55
- run: pytest --color=yes --cov --cov-report=xml --cov-report=term-missing
56
+ run: pytest --color=yes --cov --cov-config=pyproject.toml --cov-report=xml --cov-report=term-missing
56
57
 
57
58
  # If something goes wrong with --pre tests, we can open an issue in the repo
58
59
  - name: 📝 Report --pre Failures
@@ -70,39 +71,40 @@ jobs:
70
71
 
71
72
  - name: Coverage
72
73
  uses: codecov/codecov-action@v3
74
+ with:
75
+ version: v0.7.3
73
76
 
74
77
  deploy:
75
- name: Deploy
78
+ name: Release
76
79
  needs: test
77
80
  if: success() && startsWith(github.ref, 'refs/tags/') && github.event_name != 'schedule'
78
81
  runs-on: ubuntu-latest
79
- environment: release # Needs to be created in the gh repository settings
82
+
80
83
  permissions:
81
- # IMPORTANT: this permission is mandatory for trusted publishing on PyPi
82
- # see https://docs.pypi.org/trusted-publishers/
84
+ # IMPORTANT: this permission is mandatory for trusted publishing
83
85
  id-token: write
84
86
 
85
87
  # This permission allows writing releases
86
88
  contents: write
87
89
 
88
90
  steps:
89
- - uses: actions/checkout@v3
91
+ - uses: actions/checkout@v4
90
92
  with:
91
93
  fetch-depth: 0
92
94
 
93
- - name: 🐍 Set up Python
94
- uses: actions/setup-python@v4
95
+ - name: Set up Python
96
+ uses: actions/setup-python@v5
95
97
  with:
96
- python-version: "3.x"
98
+ python-version: "3.9"
97
99
 
98
- - name: 👷 Build
100
+ - name: Build
99
101
  run: |
100
102
  python -m pip install build
101
103
  python -m build
102
104
 
103
- - name: 🚢 Publish to PyPI
105
+ - name: Publish to PyPI
104
106
  uses: pypa/gh-action-pypi-publish@release/v1
105
107
 
106
- - uses: softprops/action-gh-release@v1
108
+ - uses: softprops/action-gh-release@v2
107
109
  with:
108
- generate_release_notes: true
110
+ generate_release_notes: true
@@ -0,0 +1,170 @@
1
+ .vscode
2
+ *.DS_Store
3
+ **/.DS_Store
4
+ **/.ipynb_checkpoints
5
+
6
+ # torch related
7
+ **/lightning_logs
8
+ **/*.ckpt
9
+
10
+ # Byte-compiled / optimized / DLL files
11
+ __pycache__/
12
+ **/__pycache__
13
+ *.py[cod]
14
+ *$py.class
15
+
16
+ # C extensions
17
+ *.so
18
+
19
+ # Distribution / packaging
20
+ .Python
21
+ build/
22
+ develop-eggs/
23
+ dist/
24
+ downloads/
25
+ eggs/
26
+ .eggs/
27
+ lib/
28
+ lib64/
29
+ parts/
30
+ sdist/
31
+ var/
32
+ wheels/
33
+ share/python-wheels/
34
+ *.egg-info/
35
+ .installed.cfg
36
+ *.egg
37
+ MANIFEST
38
+
39
+ # PyInstaller
40
+ # Usually these files are written by a python script from a template
41
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
42
+ *.manifest
43
+ *.spec
44
+
45
+ # Installer logs
46
+ pip-log.txt
47
+ pip-delete-this-directory.txt
48
+
49
+ # Unit test / coverage reports
50
+ htmlcov/
51
+ .tox/
52
+ .nox/
53
+ .coverage
54
+ .coverage.*
55
+ .cache
56
+ nosetests.xml
57
+ coverage.xml
58
+ *.cover
59
+ *.py,cover
60
+ .hypothesis/
61
+ .pytest_cache/
62
+ .pytest*
63
+ cover/
64
+
65
+ # Translations
66
+ *.mo
67
+ *.pot
68
+
69
+ # Django stuff:
70
+ *.log
71
+ local_settings.py
72
+ db.sqlite3
73
+ db.sqlite3-journal
74
+
75
+ # Flask stuff:
76
+ instance/
77
+ .webassets-cache
78
+
79
+ # Scrapy stuff:
80
+ .scrapy
81
+
82
+ # Sphinx documentation
83
+ docs/_build/
84
+
85
+ # PyBuilder
86
+ .pybuilder/
87
+ target/
88
+
89
+ # Jupyter Notebook
90
+ .ipynb_checkpoints
91
+ **/.ipynb_checkpoints
92
+
93
+ # IPython
94
+ profile_default/
95
+ ipython_config.py
96
+
97
+ # pyenv
98
+ # For a library or package, you might want to ignore these files since the code is
99
+ # intended to run in multiple environments; otherwise, check them in:
100
+ # .python-version
101
+
102
+ # pipenv
103
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
104
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
105
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
106
+ # install all needed dependencies.
107
+ #Pipfile.lock
108
+
109
+ # poetry
110
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
111
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
112
+ # commonly ignored for libraries.
113
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
114
+ #poetry.lock
115
+
116
+ # pdm
117
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
118
+ #pdm.lock
119
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
120
+ # in version control.
121
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
122
+ .pdm.toml
123
+ .pdm-python
124
+ .pdm-build/
125
+
126
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
127
+ __pypackages__/
128
+
129
+ # Celery stuff
130
+ celerybeat-schedule
131
+ celerybeat.pid
132
+
133
+ # SageMath parsed files
134
+ *.sage.py
135
+
136
+ # Environments
137
+ .env
138
+ .venv
139
+ env/
140
+ venv/
141
+ ENV/
142
+ env.bak/
143
+ venv.bak/
144
+
145
+ # Spyder project settings
146
+ .spyderproject
147
+ .spyproject
148
+
149
+ # Rope project settings
150
+ .ropeproject
151
+
152
+ # mkdocs documentation
153
+ /site
154
+
155
+ # ruff
156
+ .ruff_cache
157
+
158
+ # mypy
159
+ .mypy_cache/
160
+ .dmypy.json
161
+ dmypy.json
162
+
163
+ # Pyre type checker
164
+ .pyre/
165
+
166
+ # pytype static type analyzer
167
+ .pytype/
168
+
169
+ # Cython debug symbols
170
+ cython_debug/
@@ -0,0 +1,59 @@
1
+ # enable pre-commit.ci at https://pre-commit.ci/
2
+ # it adds:
3
+ # 1. auto fixing pull requests
4
+ # 2. auto updating the pre-commit configuration
5
+ ci:
6
+ autoupdate_schedule: monthly
7
+ autofix_commit_msg: "style(pre-commit.ci): auto fixes [...]"
8
+ autoupdate_commit_msg: "ci(pre-commit.ci): autoupdate"
9
+
10
+ repos:
11
+ - repo: https://github.com/abravalheri/validate-pyproject
12
+ rev: v0.18
13
+ hooks:
14
+ - id: validate-pyproject
15
+
16
+ - repo: https://github.com/astral-sh/ruff-pre-commit
17
+ rev: v0.5.6
18
+ hooks:
19
+ - id: ruff
20
+ exclude: "^src/careamics/lvae_training/.*|^src/careamics/models/lvae/.*"
21
+ args: [--fix, --target-version, py38]
22
+
23
+ - repo: https://github.com/psf/black
24
+ rev: 24.8.0
25
+ hooks:
26
+ - id: black
27
+
28
+ - repo: https://github.com/pre-commit/mirrors-mypy
29
+ rev: v1.11.1
30
+ hooks:
31
+ - id: mypy
32
+ files: "^src/"
33
+ exclude: "^src/careamics/lvae_training/.*|^src/careamics/models/lvae/.*"
34
+ additional_dependencies:
35
+ - numpy
36
+ - types-PyYAML
37
+ - types-setuptools
38
+
39
+ # check docstrings
40
+ - repo: https://github.com/numpy/numpydoc
41
+ rev: v1.8.0rc2
42
+ hooks:
43
+ - id: numpydoc-validation
44
+ exclude: "^src/careamics/lvae_training/.*|^src/careamics/models/lvae/.*"
45
+
46
+ # # jupyter linting and formatting
47
+ # - repo: https://github.com/nbQA-dev/nbQA
48
+ # rev: 1.8.5
49
+ # hooks:
50
+ # - id: nbqa-ruff
51
+ # args: [--fix]
52
+ # - id: nbqa-black
53
+ # #- id: nbqa-mypy
54
+
55
+ # strip out jupyter notebooks
56
+ - repo: https://github.com/kynan/nbstripout
57
+ rev: 0.7.1
58
+ hooks:
59
+ - id: nbstripout
@@ -1,6 +1,6 @@
1
1
  BSD 3-Clause License
2
2
 
3
- Copyright (c) 2023, Jug lab
3
+ Copyright (c) 2023, CAREamics contributors
4
4
 
5
5
  Redistribution and use in source and binary forms, with or without
6
6
  modification, are permitted provided that the following conditions are met:
@@ -0,0 +1,78 @@
1
+ Metadata-Version: 2.3
2
+ Name: careamics
3
+ Version: 0.0.2
4
+ Summary: Toolbox for running N2V and friends.
5
+ Project-URL: homepage, https://careamics.github.io/
6
+ Project-URL: repository, https://github.com/CAREamics/careamics
7
+ Author-email: Melisande Croft <melisande.croft@fht.org>, Joran Deschamps <joran.deschamps@fht.org>, Igor Zubarev <igor.zubarev@fht.org>
8
+ License: BSD-3-Clause
9
+ License-File: LICENSE
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: License :: OSI Approved :: BSD License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Typing :: Typed
18
+ Requires-Python: >=3.9
19
+ Requires-Dist: bioimageio-core>=0.6.0
20
+ Requires-Dist: numpy<2.0.0
21
+ Requires-Dist: psutil
22
+ Requires-Dist: pydantic>=2.5
23
+ Requires-Dist: pytorch-lightning>=2.2.0
24
+ Requires-Dist: pyyaml
25
+ Requires-Dist: scikit-image<=0.23.2
26
+ Requires-Dist: tifffile
27
+ Requires-Dist: torch>=2.0.0
28
+ Requires-Dist: torchvision
29
+ Requires-Dist: zarr<3.0.0
30
+ Provides-Extra: dev
31
+ Requires-Dist: pre-commit; extra == 'dev'
32
+ Requires-Dist: pytest; extra == 'dev'
33
+ Requires-Dist: pytest-cov; extra == 'dev'
34
+ Requires-Dist: sybil; extra == 'dev'
35
+ Provides-Extra: examples
36
+ Requires-Dist: careamics-portfolio; extra == 'examples'
37
+ Requires-Dist: jupyter; extra == 'examples'
38
+ Requires-Dist: matplotlib; extra == 'examples'
39
+ Provides-Extra: tensorboard
40
+ Requires-Dist: protobuf==3.20.3; extra == 'tensorboard'
41
+ Requires-Dist: tensorboard; extra == 'tensorboard'
42
+ Provides-Extra: wandb
43
+ Requires-Dist: wandb; extra == 'wandb'
44
+ Description-Content-Type: text/markdown
45
+
46
+ <p align="center">
47
+ <a href="https://careamics.github.io/">
48
+ <img src="https://raw.githubusercontent.com/CAREamics/.github/main/profile/images/banner_careamics.png">
49
+ </a>
50
+ </p>
51
+
52
+ # CAREamics
53
+
54
+ [![License](https://img.shields.io/pypi/l/careamics.svg?color=green)](https://github.com/CAREamics/careamics/blob/main/LICENSE)
55
+ [![PyPI](https://img.shields.io/pypi/v/careamics.svg?color=green)](https://pypi.org/project/careamics)
56
+ [![Python Version](https://img.shields.io/pypi/pyversions/careamics.svg?color=green)](https://python.org)
57
+ [![CI](https://github.com/CAREamics/careamics/actions/workflows/ci.yml/badge.svg)](https://github.com/CAREamics/careamics/actions/workflows/ci.yml)
58
+ [![codecov](https://codecov.io/gh/CAREamics/careamics/branch/main/graph/badge.svg)](https://codecov.io/gh/CAREamics/careamics)
59
+
60
+
61
+ CAREamics is a PyTorch library aimed at simplifying the use of Noise2Void and its many
62
+ variants and cousins (CARE, Noise2Noise, N2V2, P(P)N2V, HDN, muSplit etc.).
63
+
64
+ ## Why CAREamics?
65
+
66
+ Noise2Void is a widely used denoising algorithm, and is readily available from the `n2v`
67
+ python package. However, `n2v` is based on TensorFlow, while more recent methods
68
+ denoising methods (PPN2V, DivNoising, HDN) are all implemented in PyTorch, but are
69
+ lacking the extra features that would make them usable by the community.
70
+
71
+ The aim of CAREamics is to provide a PyTorch library reuniting all the latest methods
72
+ in one package, while providing a simple and consistent API. The library relies on
73
+ PyTorch Lightning as a back-end. In addition, we will provide extensive documentation and
74
+ tutorials on how to best apply these methods in a scientific context.
75
+
76
+ ## Installation and use
77
+
78
+ Check out the [documentation](https://careamics.github.io/) for installation instructions and guides!
@@ -0,0 +1,33 @@
1
+ <p align="center">
2
+ <a href="https://careamics.github.io/">
3
+ <img src="https://raw.githubusercontent.com/CAREamics/.github/main/profile/images/banner_careamics.png">
4
+ </a>
5
+ </p>
6
+
7
+ # CAREamics
8
+
9
+ [![License](https://img.shields.io/pypi/l/careamics.svg?color=green)](https://github.com/CAREamics/careamics/blob/main/LICENSE)
10
+ [![PyPI](https://img.shields.io/pypi/v/careamics.svg?color=green)](https://pypi.org/project/careamics)
11
+ [![Python Version](https://img.shields.io/pypi/pyversions/careamics.svg?color=green)](https://python.org)
12
+ [![CI](https://github.com/CAREamics/careamics/actions/workflows/ci.yml/badge.svg)](https://github.com/CAREamics/careamics/actions/workflows/ci.yml)
13
+ [![codecov](https://codecov.io/gh/CAREamics/careamics/branch/main/graph/badge.svg)](https://codecov.io/gh/CAREamics/careamics)
14
+
15
+
16
+ CAREamics is a PyTorch library aimed at simplifying the use of Noise2Void and its many
17
+ variants and cousins (CARE, Noise2Noise, N2V2, P(P)N2V, HDN, muSplit etc.).
18
+
19
+ ## Why CAREamics?
20
+
21
+ Noise2Void is a widely used denoising algorithm, and is readily available from the `n2v`
22
+ python package. However, `n2v` is based on TensorFlow, while more recent methods
23
+ denoising methods (PPN2V, DivNoising, HDN) are all implemented in PyTorch, but are
24
+ lacking the extra features that would make them usable by the community.
25
+
26
+ The aim of CAREamics is to provide a PyTorch library reuniting all the latest methods
27
+ in one package, while providing a simple and consistent API. The library relies on
28
+ PyTorch Lightning as a back-end. In addition, we will provide extensive documentation and
29
+ tutorials on how to best apply these methods in a scientific context.
30
+
31
+ ## Installation and use
32
+
33
+ Check out the [documentation](https://careamics.github.io/) for installation instructions and guides!