PyOPIA 2.7.0__tar.gz → 2.8.0__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.
- {pyopia-2.7.0 → pyopia-2.8.0}/PKG-INFO +2 -1
- pyopia-2.8.0/pyopia/__init__.py +1 -0
- {pyopia-2.7.0 → pyopia-2.8.0}/pyopia/cli.py +10 -7
- {pyopia-2.7.0 → pyopia-2.8.0}/pyproject.toml +3 -2
- pyopia-2.7.0/pyopia/__init__.py +0 -1
- {pyopia-2.7.0 → pyopia-2.8.0}/LICENSE +0 -0
- {pyopia-2.7.0 → pyopia-2.8.0}/README.md +0 -0
- {pyopia-2.7.0 → pyopia-2.8.0}/pyopia/background.py +0 -0
- {pyopia-2.7.0 → pyopia-2.8.0}/pyopia/classify.py +0 -0
- {pyopia-2.7.0 → pyopia-2.8.0}/pyopia/exampledata.py +0 -0
- {pyopia-2.7.0 → pyopia-2.8.0}/pyopia/instrument/__init__.py +0 -0
- {pyopia-2.7.0 → pyopia-2.8.0}/pyopia/instrument/common.py +0 -0
- {pyopia-2.7.0 → pyopia-2.8.0}/pyopia/instrument/holo.py +0 -0
- {pyopia-2.7.0 → pyopia-2.8.0}/pyopia/instrument/silcam.py +0 -0
- {pyopia-2.7.0 → pyopia-2.8.0}/pyopia/instrument/uvp.py +0 -0
- {pyopia-2.7.0 → pyopia-2.8.0}/pyopia/io.py +0 -0
- {pyopia-2.7.0 → pyopia-2.8.0}/pyopia/pipeline.py +0 -0
- {pyopia-2.7.0 → pyopia-2.8.0}/pyopia/plotting.py +0 -0
- {pyopia-2.7.0 → pyopia-2.8.0}/pyopia/process.py +0 -0
- {pyopia-2.7.0 → pyopia-2.8.0}/pyopia/simulator/__init__.py +0 -0
- {pyopia-2.7.0 → pyopia-2.8.0}/pyopia/simulator/silcam.py +0 -0
- {pyopia-2.7.0 → pyopia-2.8.0}/pyopia/statistics.py +0 -0
- {pyopia-2.7.0 → pyopia-2.8.0}/pyopia/tests/__init__.py +0 -0
- {pyopia-2.7.0 → pyopia-2.8.0}/pyopia/tests/test_classify.py +0 -0
- {pyopia-2.7.0 → pyopia-2.8.0}/pyopia/tests/test_notebooks.py +0 -0
- {pyopia-2.7.0 → pyopia-2.8.0}/pyopia/tests/test_pipeline.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PyOPIA
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.8.0
|
|
4
4
|
Summary: A Python Ocean Particle Image Analysis toolbox.
|
|
5
5
|
Home-page: https://github.com/sintef/pyopia
|
|
6
6
|
Keywords: Ocean,Particles,Imaging,Measurement,Size distribution
|
|
@@ -20,6 +20,7 @@ Requires-Dist: h5py (>=3.9.0,<4.0.0)
|
|
|
20
20
|
Requires-Dist: imageio (>=2.31.3,<3.0.0)
|
|
21
21
|
Requires-Dist: ipykernel (>=6.19.4)
|
|
22
22
|
Requires-Dist: jupyter-book (>=0.15.1,<0.16.0)
|
|
23
|
+
Requires-Dist: keras (==3.5.0) ; extra == "classification-arm64" or extra == "classification"
|
|
23
24
|
Requires-Dist: matplotlib (>=3.7)
|
|
24
25
|
Requires-Dist: myst-nb (>=0.17.2,<0.18.0)
|
|
25
26
|
Requires-Dist: nbclient (==0.7)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '2.8.0'
|
|
@@ -13,7 +13,7 @@ from rich.progress import Progress
|
|
|
13
13
|
from rich.logging import RichHandler
|
|
14
14
|
import rich.progress
|
|
15
15
|
import pandas as pd
|
|
16
|
-
import
|
|
16
|
+
import multiprocessing
|
|
17
17
|
|
|
18
18
|
import pyopia
|
|
19
19
|
import pyopia.background
|
|
@@ -187,19 +187,22 @@ def process(config_filename: str, num_chunks: int = 1, strategy: str = 'block'):
|
|
|
187
187
|
logger.error(e)
|
|
188
188
|
logger.debug(''.join(traceback.format_tb(e.__traceback__)))
|
|
189
189
|
|
|
190
|
-
# With one chunk we keep the non-
|
|
190
|
+
# With one chunk we keep the non-multiprocess functionality to ensure backwards compatibility
|
|
191
191
|
job_list = []
|
|
192
192
|
if num_chunks == 1:
|
|
193
193
|
process_file_list(raw_files, 0)
|
|
194
194
|
else:
|
|
195
195
|
for c, chunk in enumerate(raw_files.chunked_files):
|
|
196
|
-
job =
|
|
197
|
-
job.start()
|
|
196
|
+
job = multiprocessing.Process(target=process_file_list, args=(chunk, c))
|
|
198
197
|
job_list.append(job)
|
|
199
198
|
|
|
200
|
-
#
|
|
201
|
-
|
|
199
|
+
# Start all the jobs
|
|
200
|
+
[job.start() for job in job_list]
|
|
201
|
+
|
|
202
|
+
# If we are using multiprocessing, make sure all jobs have finished
|
|
202
203
|
[job.join() for job in job_list]
|
|
204
|
+
|
|
205
|
+
# Calculate and print total processing time
|
|
203
206
|
time_total = pd.to_timedelta(time.time() - t1, 'seconds')
|
|
204
207
|
with Progress(transient=True) as progress:
|
|
205
208
|
progress.console.print(f"[blue]PROCESSING COMPLETED IN {time_total}")
|
|
@@ -256,7 +259,7 @@ def setup_logging(pipeline_config):
|
|
|
256
259
|
handlers = [logging.FileHandler(log_file, mode='a')]
|
|
257
260
|
|
|
258
261
|
# Configure logger
|
|
259
|
-
log_format = '%(asctime)s %(levelname)s %(
|
|
262
|
+
log_format = '%(asctime)s %(levelname)s %(processName)s [%(module)s.%(funcName)s] %(message)s'
|
|
260
263
|
logging.basicConfig(level=log_level, datefmt='%Y-%m-%d %H:%M:%S', format=log_format, handlers=handlers)
|
|
261
264
|
|
|
262
265
|
|
|
@@ -43,14 +43,15 @@ h5py = "^3.9.0"
|
|
|
43
43
|
poetry-version-plugin = "^0.2.0"
|
|
44
44
|
tensorflow-macos = {version = "^2.16.2", optional = true, markers = "sys_platform == 'darwin' and platform_machine == 'arm64'"}
|
|
45
45
|
tensorflow-cpu = {version = "^2.16.2", optional = true}
|
|
46
|
+
keras = {version = "3.5.0", optional = true}
|
|
46
47
|
dask = ">=2024.8.1"
|
|
47
48
|
nbconvert = "^7.16.4"
|
|
48
49
|
h5netcdf = ">= 1.3.0"
|
|
49
50
|
scikit-image = "^0.24.0"
|
|
50
51
|
|
|
51
52
|
[tool.poetry.extras]
|
|
52
|
-
classification-arm64 = ["tensorflow-macos"]
|
|
53
|
-
classification = ["tensorflow-cpu"]
|
|
53
|
+
classification-arm64 = ["tensorflow-macos", "keras"]
|
|
54
|
+
classification = ["tensorflow-cpu", "keras"]
|
|
54
55
|
|
|
55
56
|
[tool.poetry-version-plugin]
|
|
56
57
|
source = "init"
|
pyopia-2.7.0/pyopia/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '2.7.0'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|