Skip to content

Commit

Permalink
Merge pull request #400 from hms-dbmi-cellenics/v1-cleanup
Browse files Browse the repository at this point in the history
[BIOMAGE-2017] Removed v1 references
  • Loading branch information
kafkasl authored Jul 28, 2022
2 parents 53017c9 + 6c090d3 commit 249ac11
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 19 deletions.
1 change: 0 additions & 1 deletion src/api.v2/helpers/pipeline/gem2s.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ const generateGem2sParams = async (experimentId, authJWT) => {
sampleIds: experiment.samplesOrder,
sampleNames: _.map(samplesInOrder, 'name'),
sampleS3Paths: s3Paths,
apiVersion: 'v2',
authJWT,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const getQCParams = (task, context, stepArgs) => {
...perSample ? { 'sampleUuid.$': '$.sampleUuid' } : { sampleUuid: '' },
...uploadCountMatrix ? { uploadCountMatrix: true } : { uploadCountMatrix: false },
authJWT: context.authJWT,
apiVersion: 'v2',
};
};

Expand Down
3 changes: 0 additions & 3 deletions tests/api.v2/controllers/qcController.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const processingConfigUpdate = [{
'f87892f0-3403-4ba9-b871-c366e3fa855e': {
auto: false,
enabled: true,
apiVersion: 'v2',
filterSettings: { regressionType: 'linear', regressionTypeSettings: { linear: { 'p.level': 0.00095 }, spline: { 'p.level': 0.001 } } },
defaultFilterSettings: { regressionType: 'linear', regressionTypeSettings: { linear: { 'p.level': 0.001 }, spline: { 'p.level': 0.001 } } },
},
Expand All @@ -39,7 +38,6 @@ const qcResponsePayload = {
taskName: 'configureEmbedding',
processName: 'qc',
config: {
apiVersion: 'v2',
embeddingSettings:
{
method: 'umap',
Expand All @@ -53,7 +51,6 @@ const qcResponsePayload = {
sampleUuid: '',
uploadCountMatrix: false,
authJWT: 'Bearer someLongAndConfusingString',
apiVersion: 'v2',
},
output: { bucket: 'worker-results-development', key: 'de2f3434-dc63-4007-907b-28d3e72b140d' },
response: { error: false },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ exports[`createGem2sPipeline works correctly 2`] = `
Array [
"mockExperimentId",
Object {
"apiVersion": "v2",
"authJWT": "mockAuthJWT",
"experimentName": "asdsadsada",
"input": Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ Array [
"End": true,
"HeartbeatSeconds": 90,
"Parameters": Object {
"apiVersion": "v2",
"config": Object {},
"experimentId": "testExperimentId",
"processName": "qc",
Expand Down Expand Up @@ -262,7 +261,6 @@ Array [
"End": true,
"HeartbeatSeconds": 90,
"Parameters": Object {
"apiVersion": "v2",
"config": Object {},
"experimentId": "testExperimentId",
"processName": "qc",
Expand All @@ -286,7 +284,6 @@ Array [
"HeartbeatSeconds": 90,
"Next": "EndOfPipeline",
"Parameters": Object {
"apiVersion": "v2",
"config": Object {},
"experimentId": "testExperimentId",
"processName": "qc",
Expand All @@ -304,7 +301,6 @@ Array [
"HeartbeatSeconds": 90,
"Next": "ConfigureEmbedding",
"Parameters": Object {
"apiVersion": "v2",
"config": Object {},
"experimentId": "testExperimentId",
"processName": "qc",
Expand All @@ -327,7 +323,6 @@ Array [
"End": true,
"HeartbeatSeconds": 90,
"Parameters": Object {
"apiVersion": "v2",
"config": Object {
"oneSample": Object {
"defaultFilterSettings": Object {
Expand Down Expand Up @@ -376,7 +371,6 @@ Array [
"End": true,
"HeartbeatSeconds": 90,
"Parameters": Object {
"apiVersion": "v2",
"config": Object {},
"experimentId": "testExperimentId",
"processName": "qc",
Expand Down Expand Up @@ -405,7 +399,6 @@ Array [
"End": true,
"HeartbeatSeconds": 90,
"Parameters": Object {
"apiVersion": "v2",
"config": Object {},
"experimentId": "testExperimentId",
"processName": "qc",
Expand Down
6 changes: 3 additions & 3 deletions tests/api.v2/middlewares/authMiddlewares.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ describe('Tests for authorization/authentication middlewares', () => {

const req = {
params: { experimentId: fake.EXPERIMENT_ID },
url: fake.RESOURCE_V1,
url: fake.RESOURCE_V2,
method: 'POST',
};
const next = jest.fn();
Expand All @@ -105,7 +105,7 @@ describe('Tests for authorization/authentication middlewares', () => {

const req = {
params: { experimentId: fake.EXPERIMENT_ID },
url: fake.RESOURCE_V1,
url: fake.RESOURCE_V2,
user: {
sub: 'allowed-user-id',
},
Expand Down Expand Up @@ -147,7 +147,7 @@ describe('Tests for authorization/authentication middlewares', () => {
it('Express middleware can reject unauthenticated requests', async () => {
const req = {
params: { experimentId: fake.EXPERIMENT_ID },
url: fake.RESOURCE_V1,
url: fake.RESOURCE_V2,
method: 'POST',
};
const next = jest.fn();
Expand Down
1 change: 0 additions & 1 deletion tests/api.v2/mocks/data/gem2sUploadToAWSPayload.json
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@
"features10x": "2451aae8-2aa2-4611-a280-247c767968f2"
}
},
"apiVersion": "v2",
"authJWT": "Bearer someHugeHash"
}
}
2 changes: 0 additions & 2 deletions tests/test-utils/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ const USER = {
// Try to use realistic values but DO NOT USE real ones.
module.exports = Object.freeze({
SOCKET_ENDPOINT: 'localhost:5000',
URL_V1: 'localhost:5000/v1/experiments',
URL_V2: 'localhost:5000/v2/experiments',
RESOURCE_V1: '/v1/experiments',
RESOURCE_V2: '/v2/experiments',
EXPERIMENT_ID: 'experimentid11111111111111111111',
S3_BUCKET: 'worker-results-test',
Expand Down

0 comments on commit 249ac11

Please sign in to comment.