Skip to content

FEAT: Rpyc integration #5416

FEAT: Rpyc integration

FEAT: Rpyc integration #5416

GitHub Actions / Test Report 3.11 failed Jan 24, 2025 in 0s

16 tests run, 7 passed, 0 skipped, 9 failed.

Annotations

Check failure on line 128 in tests/test_mechanical.py

See this annotation in the file changed.

@github-actions github-actions / Test Report 3.11

test_mechanical.test_upload_with_different_chunk_size[10]

TimeoutError: result expired
Raw output
mechanical = <ansys.mechanical.core.embedding.rpc.client.Client object at 0x7f126649e190>
chunk_size = 10
assets = PosixPath('/__w/pymechanical/pymechanical/tests/assets')

    @pytest.mark.remote_session_connect
    # we are using only a small test file
    # change the chunk_size for that
    # ideally this will be 64*1024, 1024*1024, etc.
    @pytest.mark.parametrize("chunk_size", [10, 50, 100])
    def test_upload_with_different_chunk_size(mechanical, chunk_size, assets):
        if not mechanical.is_alive:
            pytest.fail("Mechanical instance is not alive")
        file_path = os.path.join(assets, "hsec.x_t")
>       mechanical.run_python_script("ExtAPI.DataModel.Project.New()")

tests/test_mechanical.py:128: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/env/lib/python3.11/site-packages/rpyc/core/netref.py:239: in __call__
    return syncreq(_self, consts.HANDLE_CALL, args, kwargs)
/env/lib/python3.11/site-packages/rpyc/core/netref.py:63: in syncreq
    return conn.sync_request(handler, proxy, *args)
/env/lib/python3.11/site-packages/rpyc/core/protocol.py:744: in sync_request
    return _async_res.value
/env/lib/python3.11/site-packages/rpyc/core/async_.py:109: in value
    self.wait()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <AsyncResult object (expired) at 0x7f126640aac0>

    def wait(self):
        """Waits for the result to arrive. If the AsyncResult object has an
        expiry set, and the result did not arrive within that timeout,
        an :class:`AsyncResultTimeout` exception is raised"""
        while self._waiting():
            # Serve the connection since we are not ready. Suppose
            # the reply for our seq is served. The callback is this class
            # so __call__ sets our obj and _is_ready to true.
            self._conn.serve(self._ttl, waiting=self._waiting)
    
        # Check if we timed out before result was ready
        if not self._is_ready:
>           raise AsyncResultTimeout("result expired")
E           TimeoutError: result expired

/env/lib/python3.11/site-packages/rpyc/core/async_.py:55: TimeoutError

Check failure on line 126 in tests/test_mechanical.py

See this annotation in the file changed.

@github-actions github-actions / Test Report 3.11

test_mechanical.test_upload_with_different_chunk_size[50]

Failed: Mechanical instance is not alive
Raw output
mechanical = <ansys.mechanical.core.embedding.rpc.client.Client object at 0x7f126649e190>
chunk_size = 50
assets = PosixPath('/__w/pymechanical/pymechanical/tests/assets')

    @pytest.mark.remote_session_connect
    # we are using only a small test file
    # change the chunk_size for that
    # ideally this will be 64*1024, 1024*1024, etc.
    @pytest.mark.parametrize("chunk_size", [10, 50, 100])
    def test_upload_with_different_chunk_size(mechanical, chunk_size, assets):
        if not mechanical.is_alive:
>           pytest.fail("Mechanical instance is not alive")
E           Failed: Mechanical instance is not alive

tests/test_mechanical.py:126: Failed

Check failure on line 126 in tests/test_mechanical.py

See this annotation in the file changed.

@github-actions github-actions / Test Report 3.11

test_mechanical.test_upload_with_different_chunk_size[100]

Failed: Mechanical instance is not alive
Raw output
mechanical = <ansys.mechanical.core.embedding.rpc.client.Client object at 0x7f126649e190>
chunk_size = 100
assets = PosixPath('/__w/pymechanical/pymechanical/tests/assets')

    @pytest.mark.remote_session_connect
    # we are using only a small test file
    # change the chunk_size for that
    # ideally this will be 64*1024, 1024*1024, etc.
    @pytest.mark.parametrize("chunk_size", [10, 50, 100])
    def test_upload_with_different_chunk_size(mechanical, chunk_size, assets):
        if not mechanical.is_alive:
>           pytest.fail("Mechanical instance is not alive")
E           Failed: Mechanical instance is not alive

tests/test_mechanical.py:126: Failed

Check failure on line 156 in tests/test_mechanical.py

See this annotation in the file changed.

@github-actions github-actions / Test Report 3.11

test_mechanical.test_upload_attach_mesh_solve_use_api_non_distributed_solve

TimeoutError: result expired
Raw output
mechanical = <ansys.mechanical.core.embedding.rpc.client.Client object at 0x7f126649e190>
tmpdir = local('/tmp/pytest-of-root/pytest-0/test_upload_attach_mesh_solve_0')

    @pytest.mark.remote_session_connect
    # @pytest.mark.wip
    # @pytest.mark.skip(reason="avoid long running")
    def test_upload_attach_mesh_solve_use_api_non_distributed_solve(mechanical, tmpdir):
        # if mechanical._rpc_type == "rpyc":
        #     pytest.skip("This test is not supported for rpyc")
        # default is distributed solve
        # let's disable the distributed solve and then solve
        # enable the distributed solve back
    
        # this test could run under a container with 1 cpu
        # let us disable distributed solve
>       disable_distributed_solve(mechanical)

tests/test_mechanical.py:289: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_mechanical.py:156: in disable_distributed_solve
    mechanical.run_python_script(script)
src/ansys/mechanical/core/embedding/rpc/client.py:61: in __getattr__
    if hasattr(self.root, attr):
/env/lib/python3.11/site-packages/rpyc/core/netref.py:147: in __getattribute__
    return syncreq(self, consts.HANDLE_GETATTR, name)
/env/lib/python3.11/site-packages/rpyc/core/netref.py:63: in syncreq
    return conn.sync_request(handler, proxy, *args)
/env/lib/python3.11/site-packages/rpyc/core/protocol.py:744: in sync_request
    return _async_res.value
/env/lib/python3.11/site-packages/rpyc/core/async_.py:109: in value
    self.wait()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <AsyncResult object (expired) at 0x7f12661329d0>

    def wait(self):
        """Waits for the result to arrive. If the AsyncResult object has an
        expiry set, and the result did not arrive within that timeout,
        an :class:`AsyncResultTimeout` exception is raised"""
        while self._waiting():
            # Serve the connection since we are not ready. Suppose
            # the reply for our seq is served. The callback is this class
            # so __call__ sets our obj and _is_ready to true.
            self._conn.serve(self._ttl, waiting=self._waiting)
    
        # Check if we timed out before result was ready
        if not self._is_ready:
>           raise AsyncResultTimeout("result expired")
E           TimeoutError: result expired

/env/lib/python3.11/site-packages/rpyc/core/async_.py:55: TimeoutError

Check failure on line 171 in tests/test_mechanical.py

See this annotation in the file changed.

@github-actions github-actions / Test Report 3.11

test_mechanical.test_upload_attach_mesh_solve_use_api_distributed_solve

TimeoutError: result expired
Raw output
mechanical = <ansys.mechanical.core.embedding.rpc.client.Client object at 0x7f126649e190>
tmpdir = local('/tmp/pytest-of-root/pytest-0/test_upload_attach_mesh_solve_1')

    @pytest.mark.remote_session_connect
    def test_upload_attach_mesh_solve_use_api_distributed_solve(mechanical, tmpdir):
        # if mechanical._rpc_type == "rpyc":
        #     pytest.skip("This test is not supported for rpyc")
        # default is distributed solve
    
>       result = solve_and_return_results(mechanical)

tests/test_mechanical.py:320: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_mechanical.py:171: in solve_and_return_results
    mechanical.clear()
src/ansys/mechanical/core/embedding/rpc/client.py:61: in __getattr__
    if hasattr(self.root, attr):
/env/lib/python3.11/site-packages/rpyc/core/netref.py:147: in __getattribute__
    return syncreq(self, consts.HANDLE_GETATTR, name)
/env/lib/python3.11/site-packages/rpyc/core/netref.py:63: in syncreq
    return conn.sync_request(handler, proxy, *args)
/env/lib/python3.11/site-packages/rpyc/core/protocol.py:744: in sync_request
    return _async_res.value
/env/lib/python3.11/site-packages/rpyc/core/async_.py:109: in value
    self.wait()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <AsyncResult object (expired) at 0x7f1266133a10>

    def wait(self):
        """Waits for the result to arrive. If the AsyncResult object has an
        expiry set, and the result did not arrive within that timeout,
        an :class:`AsyncResultTimeout` exception is raised"""
        while self._waiting():
            # Serve the connection since we are not ready. Suppose
            # the reply for our seq is served. The callback is this class
            # so __call__ sets our obj and _is_ready to true.
            self._conn.serve(self._ttl, waiting=self._waiting)
    
        # Check if we timed out before result was ready
        if not self._is_ready:
>           raise AsyncResultTimeout("result expired")
E           TimeoutError: result expired

/env/lib/python3.11/site-packages/rpyc/core/async_.py:55: TimeoutError

Check failure on line 340 in tests/test_mechanical.py

See this annotation in the file changed.

@github-actions github-actions / Test Report 3.11

test_mechanical.test_download_file[hsec.x_t]

TimeoutError: result expired
Raw output
mechanical = <ansys.mechanical.core.embedding.rpc.client.Client object at 0x7f126649e190>
tmpdir = local('/tmp/pytest-of-root/pytest-0/test_download_file_hsec_x_t_0')
file_name = 'hsec.x_t'

    @pytest.mark.remote_session_connect
    # @pytest.mark.wip
    @pytest.mark.parametrize("file_name", ["hsec.x_t"])
    def test_download_file(mechanical, tmpdir, file_name):
>       verify_download(mechanical, tmpdir, file_name, 1024 * 1024)

tests/test_mechanical.py:367: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_mechanical.py:340: in verify_download
    directory = mechanical.run_python_script("ExtAPI.DataModel.Project.ProjectDirectory")
src/ansys/mechanical/core/embedding/rpc/client.py:61: in __getattr__
    if hasattr(self.root, attr):
/env/lib/python3.11/site-packages/rpyc/core/netref.py:147: in __getattribute__
    return syncreq(self, consts.HANDLE_GETATTR, name)
/env/lib/python3.11/site-packages/rpyc/core/netref.py:63: in syncreq
    return conn.sync_request(handler, proxy, *args)
/env/lib/python3.11/site-packages/rpyc/core/protocol.py:744: in sync_request
    return _async_res.value
/env/lib/python3.11/site-packages/rpyc/core/async_.py:109: in value
    self.wait()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <AsyncResult object (expired) at 0x7f12662e47c0>

    def wait(self):
        """Waits for the result to arrive. If the AsyncResult object has an
        expiry set, and the result did not arrive within that timeout,
        an :class:`AsyncResultTimeout` exception is raised"""
        while self._waiting():
            # Serve the connection since we are not ready. Suppose
            # the reply for our seq is served. The callback is this class
            # so __call__ sets our obj and _is_ready to true.
            self._conn.serve(self._ttl, waiting=self._waiting)
    
        # Check if we timed out before result was ready
        if not self._is_ready:
>           raise AsyncResultTimeout("result expired")
E           TimeoutError: result expired

/env/lib/python3.11/site-packages/rpyc/core/async_.py:55: TimeoutError

Check failure on line 340 in tests/test_mechanical.py

See this annotation in the file changed.

@github-actions github-actions / Test Report 3.11

test_mechanical.test_download_file_different_chunk_size1[10]

TimeoutError: result expired
Raw output
mechanical = <ansys.mechanical.core.embedding.rpc.client.Client object at 0x7f126649e190>
tmpdir = local('/tmp/pytest-of-root/pytest-0/test_download_file_different_c0')
chunk_size = 10

    @pytest.mark.remote_session_connect
    # we are using only a small test file
    # change the chunk_size for that
    # ideally this will be 64*1024, 1024*1024, etc.
    @pytest.mark.parametrize("chunk_size", [10, 50, 100])
    def test_download_file_different_chunk_size1(mechanical, tmpdir, chunk_size):
        file_name = "hsec.x_t"
    
>       verify_download(mechanical, tmpdir, file_name, chunk_size)

tests/test_mechanical.py:378: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_mechanical.py:340: in verify_download
    directory = mechanical.run_python_script("ExtAPI.DataModel.Project.ProjectDirectory")
src/ansys/mechanical/core/embedding/rpc/client.py:61: in __getattr__
    if hasattr(self.root, attr):
/env/lib/python3.11/site-packages/rpyc/core/netref.py:147: in __getattribute__
    return syncreq(self, consts.HANDLE_GETATTR, name)
/env/lib/python3.11/site-packages/rpyc/core/netref.py:63: in syncreq
    return conn.sync_request(handler, proxy, *args)
/env/lib/python3.11/site-packages/rpyc/core/protocol.py:744: in sync_request
    return _async_res.value
/env/lib/python3.11/site-packages/rpyc/core/async_.py:109: in value
    self.wait()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <AsyncResult object (expired) at 0x7f1266133c40>

    def wait(self):
        """Waits for the result to arrive. If the AsyncResult object has an
        expiry set, and the result did not arrive within that timeout,
        an :class:`AsyncResultTimeout` exception is raised"""
        while self._waiting():
            # Serve the connection since we are not ready. Suppose
            # the reply for our seq is served. The callback is this class
            # so __call__ sets our obj and _is_ready to true.
            self._conn.serve(self._ttl, waiting=self._waiting)
    
        # Check if we timed out before result was ready
        if not self._is_ready:
>           raise AsyncResultTimeout("result expired")
E           TimeoutError: result expired

/env/lib/python3.11/site-packages/rpyc/core/async_.py:55: TimeoutError

Check failure on line 340 in tests/test_mechanical.py

See this annotation in the file changed.

@github-actions github-actions / Test Report 3.11

test_mechanical.test_download_file_different_chunk_size1[50]

TimeoutError: result expired
Raw output
mechanical = <ansys.mechanical.core.embedding.rpc.client.Client object at 0x7f126649e190>
tmpdir = local('/tmp/pytest-of-root/pytest-0/test_download_file_different_c1')
chunk_size = 50

    @pytest.mark.remote_session_connect
    # we are using only a small test file
    # change the chunk_size for that
    # ideally this will be 64*1024, 1024*1024, etc.
    @pytest.mark.parametrize("chunk_size", [10, 50, 100])
    def test_download_file_different_chunk_size1(mechanical, tmpdir, chunk_size):
        file_name = "hsec.x_t"
    
>       verify_download(mechanical, tmpdir, file_name, chunk_size)

tests/test_mechanical.py:378: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_mechanical.py:340: in verify_download
    directory = mechanical.run_python_script("ExtAPI.DataModel.Project.ProjectDirectory")
src/ansys/mechanical/core/embedding/rpc/client.py:61: in __getattr__
    if hasattr(self.root, attr):
/env/lib/python3.11/site-packages/rpyc/core/netref.py:147: in __getattribute__
    return syncreq(self, consts.HANDLE_GETATTR, name)
/env/lib/python3.11/site-packages/rpyc/core/netref.py:63: in syncreq
    return conn.sync_request(handler, proxy, *args)
/env/lib/python3.11/site-packages/rpyc/core/protocol.py:744: in sync_request
    return _async_res.value
/env/lib/python3.11/site-packages/rpyc/core/async_.py:109: in value
    self.wait()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <AsyncResult object (expired) at 0x7f12661338d0>

    def wait(self):
        """Waits for the result to arrive. If the AsyncResult object has an
        expiry set, and the result did not arrive within that timeout,
        an :class:`AsyncResultTimeout` exception is raised"""
        while self._waiting():
            # Serve the connection since we are not ready. Suppose
            # the reply for our seq is served. The callback is this class
            # so __call__ sets our obj and _is_ready to true.
            self._conn.serve(self._ttl, waiting=self._waiting)
    
        # Check if we timed out before result was ready
        if not self._is_ready:
>           raise AsyncResultTimeout("result expired")
E           TimeoutError: result expired

/env/lib/python3.11/site-packages/rpyc/core/async_.py:55: TimeoutError

Check failure on line 340 in tests/test_mechanical.py

See this annotation in the file changed.

@github-actions github-actions / Test Report 3.11

test_mechanical.test_download_file_different_chunk_size1[100]

TimeoutError: result expired
Raw output
mechanical = <ansys.mechanical.core.embedding.rpc.client.Client object at 0x7f126649e190>
tmpdir = local('/tmp/pytest-of-root/pytest-0/test_download_file_different_c2')
chunk_size = 100

    @pytest.mark.remote_session_connect
    # we are using only a small test file
    # change the chunk_size for that
    # ideally this will be 64*1024, 1024*1024, etc.
    @pytest.mark.parametrize("chunk_size", [10, 50, 100])
    def test_download_file_different_chunk_size1(mechanical, tmpdir, chunk_size):
        file_name = "hsec.x_t"
    
>       verify_download(mechanical, tmpdir, file_name, chunk_size)

tests/test_mechanical.py:378: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_mechanical.py:340: in verify_download
    directory = mechanical.run_python_script("ExtAPI.DataModel.Project.ProjectDirectory")
src/ansys/mechanical/core/embedding/rpc/client.py:61: in __getattr__
    if hasattr(self.root, attr):
/env/lib/python3.11/site-packages/rpyc/core/netref.py:147: in __getattribute__
    return syncreq(self, consts.HANDLE_GETATTR, name)
/env/lib/python3.11/site-packages/rpyc/core/netref.py:63: in syncreq
    return conn.sync_request(handler, proxy, *args)
/env/lib/python3.11/site-packages/rpyc/core/protocol.py:744: in sync_request
    return _async_res.value
/env/lib/python3.11/site-packages/rpyc/core/async_.py:109: in value
    self.wait()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <AsyncResult object (expired) at 0x7f12662e6430>

    def wait(self):
        """Waits for the result to arrive. If the AsyncResult object has an
        expiry set, and the result did not arrive within that timeout,
        an :class:`AsyncResultTimeout` exception is raised"""
        while self._waiting():
            # Serve the connection since we are not ready. Suppose
            # the reply for our seq is served. The callback is this class
            # so __call__ sets our obj and _is_ready to true.
            self._conn.serve(self._ttl, waiting=self._waiting)
    
        # Check if we timed out before result was ready
        if not self._is_ready:
>           raise AsyncResultTimeout("result expired")
E           TimeoutError: result expired

/env/lib/python3.11/site-packages/rpyc/core/async_.py:55: TimeoutError