Skip to content

Commit 734ac73

Browse files
committed
Merge branch 'refs/heads/master' into add-metadata-types-endpoint
2 parents cd6c358 + 3ac7673 commit 734ac73

32 files changed

+1266
-309
lines changed

.github/workflows/release-and-publish-sdk.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121

122122
- uses: actions/upload-artifact@v4
123123
with:
124-
name: swagger-schema
124+
name: swagger-schema-${{ github.sha }}
125125
path: ./swagger-schema.json
126126

127127
generate-upload-sdk:
@@ -139,7 +139,7 @@ jobs:
139139

140140
- uses: actions/download-artifact@v4
141141
with:
142-
name: swagger-schema
142+
name: swagger-schema-${{ github.sha }}
143143
path: .
144144

145145
- name: Generate Client
@@ -215,7 +215,7 @@ jobs:
215215
uses: actions/checkout@v4
216216

217217
- name: Set up Python
218-
uses: actions/setup-python@v4
218+
uses: actions/setup-python@v5
219219
with:
220220
python-version: ${{ env.PYTHON_VERSION }}
221221

.github/workflows/upload-sdk-artifact.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
- uses: actions/upload-artifact@v4
4141
with:
42-
name: swagger-schema
42+
name: swagger-schema-${{ github.sha }}
4343
path: ./swagger-schema.json
4444

4545
generate-and-upload-sdk:
@@ -56,7 +56,7 @@ jobs:
5656

5757
- uses: actions/download-artifact@v4
5858
with:
59-
name: swagger-schema
59+
name: swagger-schema-${{ github.sha }}
6060
path: .
6161

6262
- name: Generate Client

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
[![Test](https://github.com/SciCatProject/scicat-backend-next/actions/workflows/test.yml/badge.svg)](https://github.com/SciCatProject/scicat-backend-next/actions/workflows/test.yml)
88
[![Deploy](https://github.com/SciCatProject/scicat-backend-next/actions/workflows/deploy.yml/badge.svg)](https://github.com/SciCatProject/scicat-backend-next/actions/workflows/deploy.yml)
9+
[![Generate and upload latest SDK artifacts](https://github.com/SciCatProject/scicat-backend-next/actions/workflows/upload-sdk-artifact.yml/badge.svg?branch=master)](https://github.com/SciCatProject/scicat-backend-next/actions/workflows/upload-sdk-artifact.yml)
910
[![DeepScan grade](https://deepscan.io/api/teams/8394/projects/19251/branches/494247/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=8394&pid=19251&bid=494247)
1011
[![Known Vulnerabilities](https://snyk.io/test/github/SciCatProject/scicat-backend-next/master/badge.svg?targetFile=package.json)](https://snyk.io/test/github/SciCatProject/scicat-backend-next/master?targetFile=package.json)
1112

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
module.exports = {
2+
async up(db, client) {
3+
// TODO write your migration here.
4+
// See https://github.com/seppevs/migrate-mongo/#creating-a-new-migration-script
5+
// Example:
6+
// await db.collection('albums').updateOne({artist: 'The Beatles'}, {$set: {blacklisted: true}});
7+
await db.collection("Dataset").updateMany({}, [
8+
{
9+
$set: {
10+
proposalIds: ["$proposalId"],
11+
instrumentIds: ["$instrumentId"],
12+
sampleIds: ["$sampleId"],
13+
},
14+
},
15+
]);
16+
await db.collection("Dataset").updateMany({ type: "derived" }, [
17+
{
18+
$set: {
19+
principalInvestigator: "$investigator",
20+
},
21+
},
22+
]);
23+
},
24+
25+
async down(db, client) {
26+
// TODO write the statements to rollback your migration (if possible)
27+
// Example:
28+
// await db.collection('albums').updateOne({artist: 'The Beatles'}, {$set: {blacklisted: false}});
29+
30+
await db.collection("Dataset").updateMany({}, [
31+
{
32+
$set: {
33+
proposalId: "$proposalIds[0]",
34+
instrumentId: "$instrumentId[0]",
35+
sampleId: "$sampleId[0]",
36+
},
37+
},
38+
]);
39+
await db.collection("Dataset").updateMany({ type: "derived" }, [
40+
{
41+
$set: {
42+
investigator: "$principalInvestigator",
43+
},
44+
},
45+
]);
46+
},
47+
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
2727
"test:api": "npm run test:api:jest --maxWorkers=50% && concurrently -k -s first \"wait-on http://localhost:3000/explorer/ && npm run test:api:mocha\" \"npm run start\"",
2828
"test:api:jest": "jest --config ./test/config/jest-e2e.json --maxWorkers=50%",
29-
"test:api:mocha": "mocha --config ./test/config/.mocharc.json -r chai/register-should.js ",
29+
"test:api:mocha": "mocha --config ./test/config/.mocharc.json -r chai/register-should.js",
3030
"prepare:local": "docker-compose -f CI/E2E/docker-compose-local.yaml --env-file CI/E2E/.env.elastic-search up -d && cp functionalAccounts.json.test functionalAccounts.json"
3131
},
3232
"dependencies": {

src/config/configuration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const configuration = () => {
5959

6060
const config = {
6161
versions: {
62-
api: "v3",
62+
api: "3",
6363
},
6464
swaggerPath: process.env.SWAGGER_PATH || "explorer",
6565
loggerConfigs: jsonConfigMap.loggers || [defaultLogger],

0 commit comments

Comments
 (0)