Skip to content

Commit b19577a

Browse files
samanehsanrexwangcc
authored andcommitted
Use ingest api https endpoints (#112)
1 parent 5353529 commit b19577a

File tree

7 files changed

+58
-58
lines changed

7 files changed

+58
-58
lines changed

adapter_pipelines/submit_example.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"submit.input_bundle_uuid": "274e8e51-76b7-4fe6-b766-65df0a4e85bb",
1717
"submit.reference_bundle": "bf51d668-3e14-4843-9bc7-5d676fdf0e01",
1818
"submit.format_map": "gs://foo/format_map.json",
19-
"submit.submit_url": "http://api.ingest.staging.data.humancellatlas.org/",
19+
"submit.submit_url": "https://api.ingest.staging.data.humancellatlas.org/",
2020
"submit.method": "SmartSeq2SingleCell",
2121
"submit.analysis_file_version": "5.3.4",
2222
"submit.analysis_protocol_schema_version": "8.0.3",

pipeline_tools/create_envelope.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def build_envelope(submit_url, analysis_protocol_path, analysis_process_path, ra
4747
analysis_protocol_dict = json.load(f)
4848

4949
# URL for getting and creating the analysis protocol, e.g.
50-
# http://api.ingest.{deployment}.data.humancellatlas.org/submissionEnvelopes/{envelope_id}/protocols
50+
# https://api.ingest.{deployment}.data.humancellatlas.org/submissionEnvelopes/{envelope_id}/protocols
5151
analysis_protocol_url = get_subject_url(endpoint_dict=envelope_dict, subject='protocols')
5252

5353
# Check if an analysis_protocol already exists in the submission envelope from a previous attempt
@@ -88,7 +88,7 @@ def build_envelope(submit_url, analysis_protocol_path, analysis_process_path, ra
8888
link_url = get_subject_url(endpoint_dict=analysis_process_response, subject='protocols')
8989

9090
# URL for linking the analysis protocol to analysis process, e.g.
91-
# http://api.ingest.integration.data.humancellatlas.org/protocols/{protocol_document_id}
91+
# https://api.ingest.integration.data.humancellatlas.org/protocols/{protocol_document_id}
9292
analysis_protocol_entity_url = get_subject_url(analysis_protocol_response, 'self')
9393

9494
print('Linking analysis_protocol {0} to analysis_process at {1}'.format(analysis_protocol_entity_url, link_url))

pipeline_tools/tests/data/add_protocol_response.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@
2121
"validationErrors" : null,
2222
"_links" : {
2323
"self" : {
24-
"href" : "http://api.ingest.integration.data.humancellatlas.org/protocols/5bcb9777593d3c0007227a54"
24+
"href" : "https://api.ingest.integration.data.humancellatlas.org/protocols/5bcb9777593d3c0007227a54"
2525
},
2626
"protocol" : {
27-
"href" : "http://api.ingest.integration.data.humancellatlas.org/protocols/5bcb9777593d3c0007227a54",
27+
"href" : "https://api.ingest.integration.data.humancellatlas.org/protocols/5bcb9777593d3c0007227a54",
2828
"title" : "A single protocol"
2929
},
3030
"validating" : {
31-
"href" : "http://api.ingest.integration.data.humancellatlas.org/protocols/5bcb9777593d3c0007227a54/validatingEvent"
31+
"href" : "https://api.ingest.integration.data.humancellatlas.org/protocols/5bcb9777593d3c0007227a54/validatingEvent"
3232
},
3333
"submissionEnvelopes" : {
34-
"href" : "http://api.ingest.integration.data.humancellatlas.org/protocols/5bcb9777593d3c0007227a54/submissionEnvelopes",
34+
"href" : "https://api.ingest.integration.data.humancellatlas.org/protocols/5bcb9777593d3c0007227a54/submissionEnvelopes",
3535
"title" : "Access or create new submission envelopes"
3636
}
3737
}
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
11
{
22
"_links": {
33
"projects": {
4-
"href": "http://api.ingest.dev.data.humancellatlas.org/projects{?page,size,sort}",
4+
"href": "https://api.ingest.dev.data.humancellatlas.org/projects{?page,size,sort}",
55
"templated": true,
66
"title": "Access or create projects. Creation can only be done inside a submission envelope"
77
},
88
"schemas": {
9-
"href": "http://api.ingest.dev.data.humancellatlas.org/schemas{?page,size,sort}",
9+
"href": "https://api.ingest.dev.data.humancellatlas.org/schemas{?page,size,sort}",
1010
"templated": true
1111
},
1212
"bundleManifests": {
13-
"href": "http://api.ingest.dev.data.humancellatlas.org/bundleManifests{?page,size,sort}",
13+
"href": "https://api.ingest.dev.data.humancellatlas.org/bundleManifests{?page,size,sort}",
1414
"templated": true,
1515
"title": "Access or create bundle manifests (describing which submitted contents went into which bundle in the datastore)"
1616
},
1717
"protocols": {
18-
"href": "http://api.ingest.dev.data.humancellatlas.org/protocols{?page,size,sort}",
18+
"href": "https://api.ingest.dev.data.humancellatlas.org/protocols{?page,size,sort}",
1919
"templated": true,
2020
"title": "Access or create protocols"
2121
},
2222
"biomaterials": {
23-
"href": "http://api.ingest.dev.data.humancellatlas.org/biomaterials{?page,size,sort,projection}",
23+
"href": "https://api.ingest.dev.data.humancellatlas.org/biomaterials{?page,size,sort,projection}",
2424
"templated": true
2525
},
2626
"processes": {
27-
"href": "http://api.ingest.dev.data.humancellatlas.org/processes{?page,size,sort,projection}",
27+
"href": "https://api.ingest.dev.data.humancellatlas.org/processes{?page,size,sort,projection}",
2828
"templated": true
2929
},
3030
"files": {
31-
"href": "http://api.ingest.dev.data.humancellatlas.org/files{?page,size,sort}",
31+
"href": "https://api.ingest.dev.data.humancellatlas.org/files{?page,size,sort}",
3232
"templated": true,
3333
"title": "Access or create, within a submission envelope, a new assay"
3434
},
3535
"submissionEnvelopes": {
36-
"href": "http://api.ingest.dev.data.humancellatlas.org/submissionEnvelopes{?page,size,sort}",
36+
"href": "https://api.ingest.dev.data.humancellatlas.org/submissionEnvelopes{?page,size,sort}",
3737
"templated": true,
3838
"title": "Access or create new submission envelopes"
3939
},
4040
"user": {
41-
"href": "http://api.ingest.dev.data.humancellatlas.org/user"
41+
"href": "https://api.ingest.dev.data.humancellatlas.org/user"
4242
},
4343
"profile": {
44-
"href": "http://api.ingest.dev.data.humancellatlas.org/profile"
44+
"href": "https://api.ingest.dev.data.humancellatlas.org/profile"
4545
}
4646
}
4747
}

pipeline_tools/tests/test_confirm_submission.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
class TestConfirmSubmission(object):
1111

1212
def test_wait_for_valid_status_success(self, requests_mock):
13-
envelope_url = 'http://api.ingest.dev.data.humancellatlas.org/submissionEnvelopes/abcde'
13+
envelope_url = 'https://api.ingest.dev.data.humancellatlas.org/submissionEnvelopes/abcde'
1414

1515
def _request_callback(request, context):
1616
context.status_code = 200
@@ -24,7 +24,7 @@ def _request_callback(request, context):
2424
assert requests_mock.call_count == 1
2525

2626
def test_wait_for_valid_status_retries_if_not_valid(self, requests_mock):
27-
envelope_url = 'http://api.ingest.dev.data.humancellatlas.org/submissionEnvelopes/abcde'
27+
envelope_url = 'https://api.ingest.dev.data.humancellatlas.org/submissionEnvelopes/abcde'
2828

2929
def _request_callback(request, context):
3030
context.status_code = 200
@@ -36,7 +36,7 @@ def _request_callback(request, context):
3636
assert requests_mock.call_count == 3
3737

3838
def test_wait_for_valid_status_retries_on_error(self, requests_mock):
39-
envelope_url = 'http://api.ingest.dev.data.humancellatlas.org/submissionEnvelopes/abcde'
39+
envelope_url = 'https://api.ingest.dev.data.humancellatlas.org/submissionEnvelopes/abcde'
4040

4141
def _request_callback(request, context):
4242
context.status_code = 500
@@ -48,7 +48,7 @@ def _request_callback(request, context):
4848
assert requests_mock.call_count == 3
4949

5050
def test_wait_for_valid_status_retries_on_read_timeout_error(self, requests_mock):
51-
envelope_url = 'http://api.ingest.dev.data.humancellatlas.org/submissionEnvelopes/abcde'
51+
envelope_url = 'https://api.ingest.dev.data.humancellatlas.org/submissionEnvelopes/abcde'
5252

5353
def _request_callback(request, context):
5454
context.status_code = 500
@@ -60,7 +60,7 @@ def _request_callback(request, context):
6060
assert requests_mock.call_count == 3
6161

6262
def test_confirm_success(self, requests_mock):
63-
envelope_url = 'http://api.ingest.dev.data.humancellatlas.org/submissionEnvelopes/abcde'
63+
envelope_url = 'https://api.ingest.dev.data.humancellatlas.org/submissionEnvelopes/abcde'
6464

6565
def _request_callback(request, context):
6666
context.status_code = 200
@@ -72,7 +72,7 @@ def _request_callback(request, context):
7272
assert requests_mock.call_count == 1
7373

7474
def test_confirm_retries_on_error(self, requests_mock):
75-
envelope_url = 'http://api.ingest.dev.data.humancellatlas.org/submissionEnvelopes/abcde'
75+
envelope_url = 'https://api.ingest.dev.data.humancellatlas.org/submissionEnvelopes/abcde'
7676

7777
def _request_callback(request, context):
7878
context.status_code = 500
@@ -84,7 +84,7 @@ def _request_callback(request, context):
8484
assert requests_mock.call_count == 3
8585

8686
def test_confirm_retries_on_read_timeout_error(self, requests_mock):
87-
envelope_url = 'http://api.ingest.dev.data.humancellatlas.org/submissionEnvelopes/abcde'
87+
envelope_url = 'https://api.ingest.dev.data.humancellatlas.org/submissionEnvelopes/abcde'
8888

8989
def _request_callback(request, context):
9090
context.status_code = 500

0 commit comments

Comments
 (0)