Skip to content

Commit

Permalink
Merge pull request #63 from p2m2/62_hotfix_Calib_multi_area
Browse files Browse the repository at this point in the history
62 hotfix calib multi area
  • Loading branch information
Marcellino-Palerme authored Nov 20, 2024
2 parents 8a0a523 + 6bf2f07 commit fa85fe3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ __0.2.1__

## Reuse compliance
<!--REUSE--></br>
[![Reuse compliant](./badges/reuse_compliant.svg)](https://github.com/p2m2/EP2M2/actions/runs/11927197538)<!--REUSE-END-->
[![Reuse compliant](./badges/reuse_compliant.svg)](https://github.com/p2m2/EP2M2/actions/runs/11927660060)<!--REUSE-END-->

## Tests
<!--GAMFC--></br>
[![result](./badges/tests-result.svg) ![total](./badges/tests-total.svg) ![passed](./badges/tests-passed.svg) ![failed](./badges/tests-failed.svg) ![todo](./badges/tests-todo.svg)](https://github.com/p2m2/EP2M2/actions/runs/11927197538) </br>[![Branches](./badges/coverage-branches.svg) ![Functions](./badges/coverage-functions.svg) ![Lines](./badges/coverage-lines.svg)![Statements](./badges/coverage-statements.svg) ![Coverage total](./badges/coverage-total.svg)](https://github.com/p2m2/EP2M2/actions/runs/11927197538)<!--GAMFC-END-->
[![result](./badges/tests-result.svg) ![total](./badges/tests-total.svg) ![passed](./badges/tests-passed.svg) ![failed](./badges/tests-failed.svg) ![todo](./badges/tests-todo.svg)](https://github.com/p2m2/EP2M2/actions/runs/11927660060) </br>[![Branches](./badges/coverage-branches.svg) ![Functions](./badges/coverage-functions.svg) ![Lines](./badges/coverage-lines.svg)![Statements](./badges/coverage-statements.svg) ![Coverage total](./badges/coverage-total.svg)](https://github.com/p2m2/EP2M2/actions/runs/11927660060)<!--GAMFC-END-->

## Features
- Extraction of formats files of the metabolomics data acquisition devices of the P2M2 platform
- gcms
Expand Down
4 changes: 3 additions & 1 deletion db/init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ CREATE TABLE equivalent
id_relation INT
);

-- create transitivty of equivalent when A=B and B=C then A=C
CREATE OR REPLACE FUNCTION maintain_equivalence_transitivity()
RETURNS TRIGGER AS $$
DECLARE
Expand Down Expand Up @@ -211,6 +212,7 @@ BEGIN
END;
$$ LANGUAGE plpgsql;

-- launch equivalent transitivity when add equivalent
CREATE TRIGGER trigger_maintain_equivalence_transitivity
AFTER INSERT ON equivalent
FOR EACH ROW
Expand Down Expand Up @@ -284,7 +286,7 @@ CREATE TABLE daughter
id_mol VARCHAR(52),
area FLOAT NOT NULL,
concentration FLOAT NOT NULL,
PRIMARY KEY (id_calib_curves, id_file, id_mol)
PRIMARY KEY (id_calib_curves, id_file, id_mol, area)
);

CREATE VIEW view_calib_curve AS
Expand Down
2 changes: 1 addition & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,5 @@ export default defineNuxtConfig({
},
},

compatibilityDate: "2024-11-15",
compatibilityDate: "2024-11-19",
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ep2m2",
"version": "0.3.0",
"version": "0.3.1",
"private": true,
"type": "module",
"scripts": {
Expand Down
5 changes: 2 additions & 3 deletions server/api/UpdateCalibCurve.post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ export default defineEventHandler(async (event) => {
(${idFile}, '${daughter.nameMeta}',
${body.idCalibCurve}, ${daughter.area},
${daughter.concentration})
ON CONFLICT (id_file, id_mol, id_calib_curves)
DO UPDATE SET concentration = ${daughter.concentration},
area = ${daughter.area}`
ON CONFLICT (id_file, id_mol, id_calib_curves, area)
DO UPDATE SET concentration = ${daughter.concentration}`
));
}
}
Expand Down

0 comments on commit fa85fe3

Please sign in to comment.