-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into mboulais/O2B-1373/store-run-type-from-enviro…
…nment-configuration
- Loading branch information
Showing
41 changed files
with
1,100 additions
and
301 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
lib/database/migrations/20240902123000-add-read-for-skimming-column.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* @license | ||
* Copyright CERN and copyright holders of ALICE O2. This software is | ||
* distributed under the terms of the GNU General Public License v3 (GPL | ||
* Version 3), copied verbatim in the file "COPYING". | ||
* | ||
* See http://alice-o2.web.cern.ch/license for full licensing information. | ||
* | ||
* In applying this license CERN does not waive the privileges and immunities | ||
* granted to it by virtue of its status as an Intergovernmental Organization | ||
* or submit itself to any jurisdiction. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const { Sequelize } = require('sequelize'); | ||
|
||
/** @type {import('sequelize-cli').Migration} */ | ||
module.exports = { | ||
up: (queryInterface) => queryInterface.addColumn('data_passes_runs', 'ready_for_skimming', { | ||
type: Sequelize.BOOLEAN, | ||
allowNull: true, | ||
}), | ||
|
||
down: (queryInterface) => queryInterface.removeColumn('data_passes_runs', 'ready_for_skimming'), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* @license | ||
* Copyright CERN and copyright holders of ALICE O2. This software is | ||
* distributed under the terms of the GNU General Public License v3 (GPL | ||
* Version 3), copied verbatim in the file "COPYING". | ||
* | ||
* See http://alice-o2.web.cern.ch/license for full licensing information. | ||
* | ||
* In applying this license CERN does not waive the privileges and immunities | ||
* granted to it by virtue of its status as an Intergovernmental Organization | ||
* or submit itself to any jurisdiction. | ||
*/ | ||
|
||
const Sequelize = require('sequelize'); | ||
|
||
module.exports = (sequelize) => { | ||
const DataPassRun = sequelize.define( | ||
'DataPassRun', | ||
{ | ||
dataPassId: { | ||
type: Sequelize.INTEGER, | ||
primaryKey: true, | ||
}, | ||
runNumber: { | ||
type: Sequelize.INTEGER, | ||
primaryKey: true, | ||
}, | ||
readyForSkimming: { | ||
type: Sequelize.BOOLEAN, | ||
allowNull: true, | ||
}, | ||
}, | ||
{ tableName: 'data_passes_runs' }, | ||
); | ||
|
||
DataPassRun.removeAttribute('id'); | ||
|
||
DataPassRun.associate = (models) => { | ||
DataPassRun.belongsTo(models.DataPass); | ||
DataPassRun.belongsTo(models.Run, { sourceKey: 'runNumber', foreignKey: 'runNumber' }); | ||
}; | ||
|
||
return DataPassRun; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* @license | ||
* Copyright 2019-2020 CERN and copyright holders of ALICE O2. | ||
* See http://alice-o2.web.cern.ch/copyright for details of the copyright holders. | ||
* All rights not expressly granted are reserved. | ||
* | ||
* This software is distributed under the terms of the GNU General Public | ||
* License v3 (GPL Version 3), copied verbatim in the file "COPYING". | ||
* | ||
* In applying this license CERN does not waive the privileges and immunities | ||
* granted to it by virtue of its status as an Intergovernmental Organization | ||
* or submit itself to any jurisdiction. | ||
*/ | ||
|
||
const { models: { DataPassRun } } = require('..'); | ||
const Repository = require('./Repository'); | ||
|
||
/** | ||
* Sequelize implementation of the DataPassRunRepository. | ||
*/ | ||
class DataPassRunRepository extends Repository { | ||
/** | ||
* Creates a new `DataPassRunRepository` instance. | ||
*/ | ||
constructor() { | ||
super(DataPassRun); | ||
} | ||
} | ||
|
||
module.exports = new DataPassRunRepository(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* @license | ||
* Copyright CERN and copyright holders of ALICE O2. This software is | ||
* distributed under the terms of the GNU General Public License v3 (GPL | ||
* Version 3), copied verbatim in the file "COPYING". | ||
* | ||
* See http://alice-o2.web.cern.ch/license for full licensing information. | ||
* | ||
* In applying this license CERN does not waive the privileges and immunities | ||
* granted to it by virtue of its status as an Intergovernmental Organization | ||
* or submit itself to any jurisdiction. | ||
*/ | ||
|
||
const PdpBeamType = Object.freeze({ | ||
PROTON_PROTON: 'pp', | ||
LEAD_LEAD: 'PbPb', | ||
}); | ||
|
||
module.exports = { PdpBeamType }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* @license | ||
* Copyright CERN and copyright holders of ALICE O2. This software is | ||
* distributed under the terms of the GNU General Public License v3 (GPL | ||
* Version 3), copied verbatim in the file "COPYING". | ||
* | ||
* See http://alice-o2.web.cern.ch/license for full licensing information. | ||
* | ||
* In applying this license CERN does not waive the privileges and immunities | ||
* granted to it by virtue of its status as an Intergovernmental Organization | ||
* or submit itself to any jurisdiction. | ||
*/ | ||
|
||
export const SkimmingStage = Object.freeze({ | ||
SKIMMABLE: 'Skimmable', | ||
SKIMMING: 'Skimming', | ||
SKIMMED: 'Skimmed', | ||
POST_SKIMMED: 'PostSkimmed', | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* @license | ||
* Copyright CERN and copyright holders of ALICE O2. This software is | ||
* distributed under the terms of the GNU General Public License v3 (GPL | ||
* Version 3), copied verbatim in the file "COPYING". | ||
* | ||
* See http://alice-o2.web.cern.ch/license for full licensing information. | ||
* | ||
* In applying this license CERN does not waive the privileges and immunities | ||
* granted to it by virtue of its status as an Intergovernmental Organization | ||
* or submit itself to any jurisdiction. | ||
*/ | ||
|
||
import { jsonFetch } from './jsonFetch.js'; | ||
|
||
/** | ||
* Send the given body as JSON PATCH request to the server and return the result parsed from JSON | ||
* | ||
* @param {string} endpoint the remote endpoint to send request to | ||
* @param {string|object} body the body of the request to send | ||
* @return {Promise<*>} resolves with the result parsed from JSON | ||
*/ | ||
export const jsonPatch = (endpoint, body) => { | ||
if (typeof body !== 'string') { | ||
body = JSON.stringify(body); | ||
} | ||
|
||
return jsonFetch(endpoint, { | ||
method: 'PATCH', | ||
headers: { Accept: 'application/json', 'Content-Type': 'application/json' }, | ||
body, | ||
}); | ||
}; |
Oops, something went wrong.