diff --git a/examples/download_as_tsv.py b/examples/download_as_tsv.py index b14b720..eb90b07 100644 --- a/examples/download_as_tsv.py +++ b/examples/download_as_tsv.py @@ -2,7 +2,7 @@ from pipebio.pipebio_client import PipebioClient from pipebio.util import Util -document_id = int(os.environ['TARGET_DOCUMENT_ID']) +document_id = os.environ['TARGET_DOCUMENT_ID'] client = PipebioClient(url='https://app.pipebio.com') diff --git a/examples/download_original_file.py b/examples/download_original_file.py index 147bd9e..14be0a9 100644 --- a/examples/download_original_file.py +++ b/examples/download_original_file.py @@ -2,7 +2,7 @@ from pipebio.pipebio_client import PipebioClient from pipebio.util import Util -document_id = int(os.environ['TARGET_DOCUMENT_ID']) +document_id = os.environ['TARGET_DOCUMENT_ID'] client = PipebioClient(url='https://app.pipebio.com') diff --git a/examples/download_to_genbank.py b/examples/download_to_genbank.py index ebc04f9..61890c1 100644 --- a/examples/download_to_genbank.py +++ b/examples/download_to_genbank.py @@ -4,7 +4,7 @@ from pipebio.pipebio_client import PipebioClient from pipebio.util import Util -document_id = int(os.environ['TARGET_DOCUMENT_ID']) +document_id = os.environ['TARGET_DOCUMENT_ID'] client = PipebioClient(url='https://app.pipebio.com') diff --git a/examples/download_to_memory.py b/examples/download_to_memory.py index 215f31a..50e786e 100644 --- a/examples/download_to_memory.py +++ b/examples/download_to_memory.py @@ -1,7 +1,7 @@ import os from pipebio.pipebio_client import PipebioClient -document_id = int(os.environ['TARGET_DOCUMENT_ID']) +document_id = os.environ['TARGET_DOCUMENT_ID'] client = PipebioClient(url='https://app.pipebio.com') diff --git a/examples/upload_fasta.py b/examples/upload_fasta.py index f38a7d3..ae67160 100644 --- a/examples/upload_fasta.py +++ b/examples/upload_fasta.py @@ -4,7 +4,7 @@ from pipebio.pipebio_client import PipebioClient -folder_id = int(os.environ['TARGET_FOLDER_ID']) +folder_id = os.environ['TARGET_FOLDER_ID'] shareable_id = os.environ['TARGET_SHAREABLE_ID'] client = PipebioClient(url='https://app.pipebio.com') diff --git a/examples/upload_tsv.py b/examples/upload_tsv.py index eb4e108..1159682 100644 --- a/examples/upload_tsv.py +++ b/examples/upload_tsv.py @@ -10,7 +10,7 @@ from pipebio.pipebio_client import PipebioClient from pipebio.uploader import Uploader -folder_id = int(os.environ['TARGET_FOLDER_ID']) +folder_id = os.environ['TARGET_FOLDER_ID'] shareable_id = os.environ['TARGET_SHAREABLE_ID'] sequence_document_kind = SequenceDocumentKind.DNA diff --git a/examples/workflows_example.py b/examples/workflows_example.py index a9cccca..a976f73 100644 --- a/examples/workflows_example.py +++ b/examples/workflows_example.py @@ -19,7 +19,7 @@ upload_jobs = client.upload_files( absolute_folder_path=os.path.join(dirname(getsourcefile(lambda: 0)), f'../sample_data/adimab/'), - parent_id=int(target_folder_id), + parent_id=target_folder_id, project_id=current_project_id, filename_pattern='.*\.fsa', poll_jobs=True @@ -32,12 +32,11 @@ # Create a folder to store the results of this workflow. workflow_folder = client.entities.create_folder( - current_project_id, - # NOTE: The parameters name & id are back to front. We'll fix that in an upcoming version. + project_id=current_project_id, name='Trial WF', parent_id=target_folder_id, # Optionally hide the workflow results until the Workflow is done. - # While you're working on the workflow maybe it's best to show the folder. + # While you're working on the workflow you may like to hide hide the folder and set it visible afterwards. visible=True, ) workflow_folder_id = workflow_folder['id'] diff --git a/examples_test.py b/examples_test.py index 591b0ef..33dad7e 100644 --- a/examples_test.py +++ b/examples_test.py @@ -70,7 +70,6 @@ def clean_up(): folder_id = os.environ['TARGET_FOLDER_ID'] entities = client.shareables.list_entities(shareable_id) target_folder = client.entities.get(folder_id) - entity_ids = list( - int(e['id']) for e in entities if e['path'].startswith(target_folder['path']) and e['id'] != folder_id) + entity_ids = list(e['id'] for e in entities if e['path'].startswith(target_folder['path']) and e['id'] != folder_id) if len(entity_ids): client.entities.delete(entity_ids) \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index cc7bc3b..32c869e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -pipebio~=2.3.10 +pipebio~=3.0.0 pytest~=6.2.5 \ No newline at end of file