Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
f9236f6
fix merge conflict
stevekm Jan 22, 2020
0a08197
Merge branch 'develop' into test-pairing
stevekm Jan 28, 2020
e20a550
add tests for base RoslinQcOperator class
stevekm Jan 29, 2020
78f4b39
add test to Makefile
stevekm Feb 4, 2020
855cfbf
Merge branch 'develop' into roslin-qc
stevekm Feb 4, 2020
4083992
merge against develop
stevekm Feb 5, 2020
55550b6
update fixture dump script for dumping Run's
stevekm Feb 5, 2020
ed36d82
start Roslin QC operator and input parsing with tests and fixtures
stevekm Feb 5, 2020
def34a1
merge against develop
stevekm Feb 5, 2020
30790fc
add tests for serializer using output_metadata field
stevekm Feb 11, 2020
1040c3d
merge against develop
stevekm Feb 11, 2020
4f19baa
update demo run methods and input.json template
stevekm Feb 12, 2020
ed25ec4
add fixture duplication script
stevekm Feb 15, 2020
6bb3bd8
Merge branch 'duplication-script' into roslin-qc
stevekm Feb 15, 2020
57f48f0
add multiple run handling for roslin qc input, update fixtures and sc…
stevekm Feb 16, 2020
cd3eb71
merge against develop
stevekm Feb 16, 2020
83a3e8e
merge against develop
stevekm Feb 16, 2020
765b963
add RoslinQCOperator to get by classname for Operator Factory
stevekm Feb 18, 2020
f1bf450
make Roslin operator data easier to read
stevekm Feb 19, 2020
e852f1c
update Makefile and operator tests
stevekm Feb 19, 2020
623d43b
add roslin qc pipeline fixture
stevekm Feb 19, 2020
f8874ec
clean up Roslin operator
stevekm Feb 19, 2020
bbda6fa
add sorting to QC inputs for reproducibility
stevekm Feb 19, 2020
a967e30
update Roslin qc operator and tests
stevekm Feb 19, 2020
9a3843b
disable bid to cwl conversion since its handled elsewhere
stevekm Feb 20, 2020
04ca7c2
remove CWL conversion
stevekm Feb 20, 2020
0b14477
refactor job data generation methods
stevekm Feb 24, 2020
464d53a
update Roslin QC operator tests
stevekm Feb 24, 2020
defda6b
update test for input generation
stevekm Feb 24, 2020
f0650d8
merge against develop and fix conflicts
stevekm Feb 24, 2020
00e3ff6
merge against develop
stevekm Feb 25, 2020
f228919
merge against roslin-qc
stevekm Feb 25, 2020
059ea54
update serializer tests
stevekm Feb 25, 2020
bd31e31
merge against roslin-qc
stevekm Feb 25, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ db*
scripts/*.json
conda*
input.json
scripts/*.json*
*.swp
37 changes: 28 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ check-env:
BEAGLE_AUTH_LDAP_SERVER_URI \
BEAGLE_LIMS_PASSWORD \
BEAGLE_LIMS_USERNAME; do \
[ -z "$$(printenv BEAGLE_LIMS_USERNAME)" ] && echo ">>> env variable $$i is not set; some features may not work" || : ; done
[ -z "$$(printenv $$i)" ] && echo ">>> env variable $$i is not set; some features may not work" || : ; done

# start the RabbitMQ server in the background
rabbitmq-start: $(LOG_DIR_ABS)
Expand Down Expand Up @@ -316,10 +316,14 @@ export DJ_DEBUG_LOG:=$(LOG_DIR_ABS)/dj.debug.log
# initialize the Django app in the database
# do this after setting up the db above
django-init:
python manage.py makemigrations --merge
python manage.py makemigrations # --merge
python manage.py migrate
$(MAKE) django-load-fixtures
python manage.py createsuperuser

django-load-fixtures:
python manage.py loaddata \
beagle_etl.operator.json \
file_system.filegroup.json \
file_system.filetype.json \
file_system.storage.json \
Expand Down Expand Up @@ -430,6 +434,7 @@ files-request:
--data '{"request_ids":["$(REQID)"]}' \
http://$(DJANGO_BEAGLE_IP):$(DJANGO_BEAGLE_PORT)/v0/fs/files/
# python ./beagle_cli.py files list --metadata='requestId:$(REQID)'
# http://localhost:6991/v0/fs/files/?metadata=requestId:DemoRequest1

# get info on a single file
REQFILE:=b37.fasta
Expand All @@ -440,22 +445,28 @@ file-get:
http://$(DJANGO_BEAGLE_IP):$(DJANGO_BEAGLE_PORT)/v0/fs/files/?filename=$(REQFILE)

# start a Roslin run for a given request in the Beagle db
run-request:
PIPELINE:=roslin
run-request: $(AUTH_FILE)
token=$$( jq -r '.token' "$(AUTH_FILE)" ) && \
echo ">>> token: $$token" && \
curl -H "Content-Type: application/json" \
-X POST \
-H "Authorization: Bearer $(TOKEN)" \
--data '{"request_ids":["$(REQID)"], "pipeline_name": "roslin"}' \
-H "Authorization: Bearer $$token" \
--data '{"request_ids":["$(REQID)"], "pipeline_name": "$(PIPELINE)"}' \
http://$(DJANGO_BEAGLE_IP):$(DJANGO_BEAGLE_PORT)/v0/run/request/

# send a pipeline input to the API to start running
REQJSON:=fixtures/tests/run_roslin.json
run-request-api: $(AUTH_FILE)
@token=$$( jq -r '.token' "$(AUTH_FILE)" ) && \
token=$$( jq -r '.token' "$(AUTH_FILE)" ) && \
echo ">>> token: $$token" && \
curl -H "Content-Type: application/json" \
-X POST \
-H "Authorization: Bearer $$token" \
--data @$(REQJSON) \
http://$(DJANGO_BEAGLE_IP):$(DJANGO_BEAGLE_PORT)/v0/run/api/
# http://localhost:6991/v0/run/api/?metadata=requestId:10277_C
# http://localhost:6991/v0/run/api/?requestId%3D10277_C/

# make a demo Roslin input.json file from the template fixture;
# need to update the fixture with the app ID of the demo pipeline that was loaded in the database
Expand All @@ -471,12 +482,22 @@ $(DEMO_INPUT): $(INPUT_TEMPLATE) $(AUTH_FILE)
.PHONY: $(DEMO_INPUT)

# submit a demo Roslin run using the dev Roslin pipeline entry in the database
demo-run: register-dev-pipeline $(DEMO_INPUT)
# submit using the API endpoint; bypasses the Operator
demo-run-api: register-dev-pipeline $(DEMO_INPUT)
@python manage.py loaddata fixtures/tests/juno_roslin_demo2.file.json
@python manage.py loaddata fixtures/tests/juno_roslin_demo2.filemetadata.json
@python manage.py loaddata fixtures/tests/roslin_reference_files.json
@$(MAKE) run-request-api REQID=DemoRequest1 REQJSON=$(DEMO_INPUT)

# run the update-request endpoint for a request ID in order to update the metadata about a request
update-request:
@token=$$( jq -r '.token' "$(AUTH_FILE)" ) && \
curl -H "Content-Type: application/json" \
-X POST \
-H "Authorization: Bearer $$token" \
--data '{"request_ids":["$(REQID)"], "pipeline_name": "roslin"}' \
http://$(DJANGO_BEAGLE_IP):$(DJANGO_BEAGLE_PORT)/v0/etl/update-requests/

# check if the ports needed for services and servers are already in use on this system
ifeq ($(UNAME), Darwin)
# On macOS High Sierra, use this command: lsof -nP -i4TCP:$PORT | grep LISTEN
Expand Down Expand Up @@ -514,5 +535,3 @@ PORT=
port-check:
ss -lntup | grep ':$(PORT)'
endif


10 changes: 10 additions & 0 deletions beagle_etl/fixtures/beagle_etl.operator.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,15 @@
"class_name": "AccessOperator",
"slug": "access"
}
},
{
"model": "beagle_etl.operator",
"pk": 3,
"fields": {
"active": true,
"recipes": "[]",
"class_name": "RoslinQcOperator",
"slug": "roslin-qc"
}
}
]
Loading