Skip to content

Commit

Permalink
Remove references to migrate-pickled-result-object cmd
Browse files Browse the repository at this point in the history
This no longer works and should no longer be needed anyway since the
migration from Result pickles to DB two years ago.
  • Loading branch information
cjao committed May 29, 2024
1 parent ca95ba3 commit 7036b15
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 45 deletions.
10 changes: 0 additions & 10 deletions covalent/_workflow/electron.py
Original file line number Diff line number Diff line change
Expand Up @@ -851,16 +851,6 @@ def wait(child, parents):
return child


@electron
def to_decoded_electron_collection(**x):
"""Interchanges order of serialize -> collection"""
collection = list(x.values())[0]
if isinstance(collection, list):
return TransportableObject.deserialize_list(collection)
elif isinstance(collection, dict):
return TransportableObject.deserialize_dict(collection)


# Copied from runner.py
def _build_sublattice_graph(sub: Lattice, json_parent_metadata: str, *args, **kwargs):
import os
Expand Down
2 changes: 1 addition & 1 deletion doc/source/api/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ The command line interface (CLI) tool is used to manage the Covalent server.

.. click:: covalent_dispatcher._cli.cli:cli
:prog: covalent
:commands: start,stop,restart,status,purge,logs,db,migrate-legacy-result-object,cluster
:commands: start,stop,restart,status,purge,logs,db,cluster
:nested: full
18 changes: 1 addition & 17 deletions doc/source/version_migrations/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,4 @@ If you are using Covalent v0.110.2 or later you can upgrade to Covalent v0.177.0
$ covalent start
Covalent server has started at http://localhost:48008
6. Use the data migration tool to migrate any workflows you want to port to the new version of Covalent.

For example, for a workflow with dispatch ID :code:`e0ba03a2-fdc0-474e-9997-7fa8e82932c5`:

.. code:: bash
$ covalent migrate-legacy-result-object ./results/e0ba03a2-fdc0-474e-9997-7fa8e82932c5/result.pkl
Processing result object for dispatch e0ba03a2-fdc0-474e-9997-7fa8e82932c5
Processing node 0
Processing node 1
Processing node 2
Processing node 3
Processed transport graph
Processed lattice
7. Navigate to the UI (http://localhost:48008) to view your workflows.
6. Navigate to the UI (http://localhost:48008) to view your workflows.
Binary file not shown.
15 changes: 0 additions & 15 deletions tests/covalent_tests/workflow/electron_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
_build_sublattice_graph,
filter_null_metadata,
get_serialized_function_str,
to_decoded_electron_collection,
)
from covalent._workflow.lattice import Lattice
from covalent._workflow.transport import TransportableObject, encode_metadata
Expand Down Expand Up @@ -238,20 +237,6 @@ def test_wait_for_post_processing_when_returning_waiting_electron():
assert workflow_2.workflow_function.get_deserialized()() == 64


def test_collection_node_helper_electron():
"""Unit test for `to_decoded_electron_collection`"""

list_collection = [
TransportableObject.make_transportable(1),
TransportableObject.make_transportable(2),
]

dict_collection = {"a": list_collection[0], "b": list_collection[1]}
assert to_decoded_electron_collection(x=list_collection) == [1, 2]

assert to_decoded_electron_collection(x=dict_collection) == {"a": 1, "b": 2}


def test_injected_inputs_are_not_in_tg():
"""Test that arguments to electrons injected by calldeps aren't
added to the transport graph"""
Expand Down
2 changes: 0 additions & 2 deletions tests/covalent_tests/workflow/lattice_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

def test_lattice_draw(mocker, capsys):
draw_preview_url = get_ui_url("/preview")
mock_send_draw_req = mocker.patch("covalent_ui.result_webhook.send_draw_request")
mock_webbrowser_open = mocker.patch("webbrowser.open")

@ct.electron
Expand All @@ -48,7 +47,6 @@ def workflow(x):
== f"To preview the transport graph of the lattice, visit {draw_preview_url}\n"
)

mock_send_draw_req.assert_called_once()
mock_webbrowser_open.assert_called_once()


Expand Down

0 comments on commit 7036b15

Please sign in to comment.