Skip to content

Commit

Permalink
fix build context.
Browse files Browse the repository at this point in the history
  • Loading branch information
nsheff committed Jun 26, 2024
1 parent 001e92e commit 17ad293
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 29 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy_release_software.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ jobs:
uses: docker/build-push-action@v4
with:
file: deployment/dockerhub/Dockerfile
context: seqcolapi
push: true
tags: databio/seqcolapi:latest
2 changes: 1 addition & 1 deletion README_seqcolapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This repository contains:

1. Sequence collections API software (the `seqcolapi` package). This package is based on the `refget` package. It simply provides an wrapper to implement the Sequence Collections API.
2. Configuration and GitHub Actions for demo server instance ([servers subfolder](/servers)).
2. Configuration and GitHub Actions for demo server instance ([deployment subfolder](/deployment)).

## Instructions

Expand Down
54 changes: 27 additions & 27 deletions load_demo_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
from refget.models import *
from refget.agents import *



dbc = RefgetDBAgent()
print(f"SQL Engine: {dbc.engine}")

fa_root="test_fasta"

Expand All @@ -20,36 +23,33 @@



# import json
# from refget import SeqColClient

import json
from refget import SeqColClient

template = """
Filepath: {f}
Digest: {digest}
Object:
{pretty_str}
"""

scc = SeqColClient("http://127.0.0.1:8100")
scc.get_collection(digest)

for demo_file in DEMO_FILES:
f = os.path.join(fa_root, demo_file)
print("Fasta file to be loaded: {}".format(f))
digest = refget.fasta_file_to_digest(f, dbc.inherent_attrs)
seqcol = scc.get_collection(digest)
pretty_str = json.dumps(
seqcol,
separators=(",", ":"),
ensure_ascii=False,
allow_nan=False,
sort_keys=True,
indent=2,
)
print(template.format(f=f, digest=digest, pretty_str=pretty_str))
# template = """
# Filepath: {f}
# Digest: {digest}
# Object:
# {pretty_str}
# """

# scc = SeqColClient("http://127.0.0.1:8100")
# scc.get_collection(digest)

# for demo_file in DEMO_FILES:
# f = os.path.join(fa_root, demo_file)
# print("Fasta file to be loaded: {}".format(f))
# digest = refget.fasta_file_to_digest(f, dbc.inherent_attrs)
# seqcol = scc.get_collection(digest)
# pretty_str = json.dumps(
# seqcol,
# separators=(",", ":"),
# ensure_ascii=False,
# allow_nan=False,
# sort_keys=True,
# indent=2,
# )
# print(template.format(f=f, digest=digest, pretty_str=pretty_str))


# demo_results = {}
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def schema_path():
def fa_root():
return os.path.join(
os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir),
"demo_fasta",
"test_fasta",
)


Expand Down

0 comments on commit 17ad293

Please sign in to comment.