Skip to content

Commit

Permalink
WIP: debug e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorjerse committed Jun 13, 2024
1 parent f8e2581 commit bdd2f57
Show file tree
Hide file tree
Showing 16 changed files with 35 additions and 511 deletions.
3 changes: 3 additions & 0 deletions docs/files/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
# All paired-end fastq objects
res.data.filter(type='data:reads:fastq:paired')

print("All data objects")
print(res.data.all())

# Get specific object by slug
reads = res.data.get('resdk-example-reads')

Expand Down
33 changes: 32 additions & 1 deletion tests/functional/docs/e2e_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import shutil
import sys
import tempfile
import time
from unittest.mock import patch

from resdk import Resolwe
Expand Down Expand Up @@ -44,6 +45,7 @@ def tearDown(self):

if hasattr(self, "collection"):
self.collection.delete(force=True)
time.sleep(10)

def run_tutorial_script(self, script_name, replace_lines=None):
"""Run a script from tutorial folder.
Expand Down Expand Up @@ -71,13 +73,42 @@ def run_tutorial_script(self, script_name, replace_lines=None):
exec("".join(content))

def upload_reads(self, res):
print("Uploading reads")
print("Using res", res)
reads = res.run(
slug="upload-fastq-single",
input={"src": os.path.join(TEST_FILES_DIR, "reads.fastq.gz")},
collection=self.collection.id,
)
self.set_slug(reads, self.reads_slug)

print("Uploaded reads")
print(reads)
print("All data")
print(res.data.all())
print("All samples")
print(res.sample.all())

self.set_slug(reads.sample, self.sample_slug)
self.set_slug(reads, self.reads_slug)

print("After set slug")
print(reads)
print("All data")
print(res.data.all())
print("All samples")
print(res.sample.all())

reads.sample.slug = self.sample_slug
reads.sample.save()
reads.slug = self.reads_slug
reads.save()
print("After set slug manual")
reads.update()
print(reads)
print("All data")
print(res.data.all())
print("All samples")
print(res.sample.all())

return reads

Expand Down
Empty file.
37 changes: 0 additions & 37 deletions tests/functional/duplication/e2e_duplication.py

This file was deleted.

Empty file.
117 changes: 0 additions & 117 deletions tests/functional/filters/e2e_filtering.py

This file was deleted.

Empty file.
36 changes: 0 additions & 36 deletions tests/functional/genesets/e2e_genesets.py

This file was deleted.

Empty file.
35 changes: 0 additions & 35 deletions tests/functional/metadata/e2e_metadata.py

This file was deleted.

Empty file.
81 changes: 0 additions & 81 deletions tests/functional/permissions/e2e_permissions.py

This file was deleted.

Empty file.
Loading

0 comments on commit bdd2f57

Please sign in to comment.