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
9 changes: 9 additions & 0 deletions podpac/core/managers/multi_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from multiprocessing import Queue
import traitlets as tl
import logging
import warnings

from podpac.core.node import Node
from podpac.core.utils import NodeTrait
Expand Down Expand Up @@ -39,6 +40,14 @@ class Process(Node):
timeout = tl.Int(None, allow_none=True)
block = tl.Bool(True)

def _first_init(self, **kwargs):
warnings.warn(
"Process node is deprecated and will be removed in a future version of podpac.",
DeprecationWarning,
stacklevel=1,
)
return super(Process, self)._first_init(**kwargs)

@property
def outputs(self):
return self.source.outputs
Expand Down
2 changes: 2 additions & 0 deletions podpac/core/managers/test/test_multiprocess.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import pytest
import numpy as np

from multiprocessing import Queue
Expand All @@ -7,6 +8,7 @@
from podpac.core.managers.multi_process import Process, _f


@pytest.mark.skip(reason="Process node is deprecated and will be removed.")
class TestProcess(object):
def test_mp_results_the_same(self):
coords = Coordinates([[1, 2, 3, 4, 5]], ["time"])
Expand Down
6 changes: 6 additions & 0 deletions podpac/core/managers/test/test_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import numpy as np
import tempfile
import logging
import pytest

from podpac.core.coordinates import Coordinates
from podpac.core.algorithm.utility import CoordData
Expand Down Expand Up @@ -35,6 +36,7 @@ def test_parallel_multi_thread_compute_fill_output2(self):

np.testing.assert_array_equal(o, o_p)

@pytest.mark.skip(reason="Process node is deprecated and will be removed.")
def test_parallel_process(self):
node = Process(source=CoordData(coord_name="time"))
coords = Coordinates([[1, 2, 3, 4, 5]], ["time"])
Expand All @@ -49,6 +51,7 @@ def test_parallel_process(self):


class TestParallelAsync(object):
@pytest.mark.skip(reason="Process node is deprecated and will be removed.")
def test_parallel_process_async(self):
node = Process(source=CoordData(coord_name="time")) # , block=False)
coords = Coordinates([[1, 2, 3, 4, 5]], ["time"])
Expand All @@ -59,6 +62,7 @@ def test_parallel_process_async(self):


class TestParallelOutputZarr(object):
@pytest.mark.skip(reason="Process node is deprecated and will be removed.")
def test_parallel_process_zarr(self):
# Can't use tempfile.TemporaryDirectory because multiple processess need access to dir
tmpdir = os.path.join(tempfile.gettempdir(), "test_parallel_process_zarr.zarr")
Expand All @@ -74,6 +78,7 @@ def test_parallel_process_zarr(self):

shutil.rmtree(tmpdir)

@pytest.mark.skip(reason="Process node is deprecated and will be removed.")
def test_parallel_process_zarr_async(self):
# Can't use tempfile.TemporaryDirectory because multiple processess need access to dir
tmpdir = os.path.join(tempfile.gettempdir(), "test_parallel_process_zarr_async.zarr")
Expand All @@ -89,6 +94,7 @@ def test_parallel_process_zarr_async(self):

shutil.rmtree(tmpdir)

@pytest.mark.skip(reason="Process node is deprecated and will be removed.")
def test_parallel_process_zarr_async_starti(self):
# Can't use tempfile.TemporaryDirectory because multiple processess need access to dir
tmpdir = os.path.join(tempfile.gettempdir(), "test_parallel_process_zarr_async_starti.zarr")
Expand Down
Loading