8 Commits

Author SHA1 Message Date
Sylvain Briat
a1ff6f9f45 1.4.0 2023-11-06 09:55:14 +01:00
Sylvain Briat
c09b1b9863 remove useless match id from matching data 2023-11-06 09:54:59 +01:00
Sylvain Briat
337c28370d Merge branch 'security' into 'main'
Add Gitlab Security checks

See merge request v3/service/matcher!17
2023-11-04 09:40:40 +00:00
Sylvain Briat
14c43afb34 try secret detection security --check 2023-11-04 10:31:05 +01:00
Sylvain Briat
73ed3a948e try sast security --check 2023-11-04 10:25:17 +01:00
Sylvain Briat
b0718e83df Merge branch 'fixMatchMapperUnitTest' into 'main'
fix bad matchMapper unit test

See merge request v3/service/matcher!16
2023-11-03 10:31:31 +00:00
Sylvain Briat
4547dcf655 fix bad matchMapper unit test 2023-11-03 11:25:02 +01:00
Sylvain Briat
c5e58db5a6 Merge branch 'fixJourneyVO' into 'main'
Fix journey vo

See merge request v3/service/matcher!15
2023-11-02 16:19:14 +00:00
5 changed files with 29 additions and 51 deletions

View File

@@ -4,6 +4,10 @@ stages:
- test
- build
include:
- template: Security/SAST.gitlab-ci.yml
- template: Security/Secret-Detection.gitlab-ci.yml
##############
# TEST STAGE #
##############

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@mobicoop/matcher",
"version": "1.3.1",
"version": "1.4.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@mobicoop/matcher",
"version": "1.3.1",
"version": "1.4.0",
"license": "AGPL",
"dependencies": {
"@grpc/grpc-js": "^1.9.9",

View File

@@ -1,6 +1,6 @@
{
"name": "@mobicoop/matcher",
"version": "1.3.1",
"version": "1.4.0",
"description": "Mobicoop V3 Matcher",
"author": "sbriat",
"private": true,

View File

@@ -57,18 +57,17 @@ enum AlgorithmType {
}
message Match {
string id = 1;
string adId = 2;
string role = 3;
int32 distance = 4;
int32 duration = 5;
int32 initialDistance = 6;
int32 initialDuration = 7;
int32 distanceDetour = 8;
int32 durationDetour = 9;
double distanceDetourPercentage = 10;
double durationDetourPercentage = 11;
repeated Journey journeys = 12;
string adId = 1;
string role = 2;
int32 distance = 3;
int32 duration = 4;
int32 initialDistance = 5;
int32 initialDuration = 6;
int32 distanceDetour = 7;
int32 durationDetour = 8;
double distanceDetourPercentage = 9;
double durationDetourPercentage = 10;
repeated Journey journeys = 11;
}
message Journey {

View File

@@ -195,8 +195,15 @@ const mockMatchMapper = {
frequency: 'RECURRENT',
distance: 356041,
duration: 12647,
initialDistance: 349251,
initialDuration: 12103,
distanceDetour: 6790,
durationDetour: 544,
distanceDetourPercentage: 4.1,
durationDetourPercentage: 3.8,
journeys: [
{
day: 5,
firstDate: '2023-09-01',
lastDate: '2024-08-30',
journeyItems: [
@@ -205,16 +212,11 @@ const mockMatchMapper = {
lon: 6.17651,
duration: 0,
distance: 0,
time: '07:00',
actorTimes: [
{
role: 'DRIVER',
target: 'START',
firstDatetime: '2023-09-01 07:00',
firstMinDatetime: '2023-09-01 06:45',
firstMaxDatetime: '2023-09-01 07:15',
lastDatetime: '2024-08-30 07:00',
lastMinDatetime: '2024-08-30 06:45',
lastMaxDatetime: '2024-08-30 07:15',
},
],
},
@@ -223,26 +225,15 @@ const mockMatchMapper = {
lon: 6.67487,
duration: 2100,
distance: 56878,
time: '07:35',
actorTimes: [
{
role: 'DRIVER',
target: 'NEUTRAL',
firstDatetime: '2023-09-01 07:35',
firstMinDatetime: '2023-09-01 07:20',
firstMaxDatetime: '2023-09-01 07:50',
lastDatetime: '2024-08-30 07:35',
lastMinDatetime: '2024-08-30 07:20',
lastMaxDatetime: '2024-08-30 07:50',
},
{
role: 'PASSENGER',
target: 'START',
firstDatetime: '2023-09-01 07:32',
firstMinDatetime: '2023-09-01 07:17',
firstMaxDatetime: '2023-09-01 07:47',
lastDatetime: '2024-08-30 07:32',
lastMinDatetime: '2024-08-30 07:17',
lastMaxDatetime: '2024-08-30 07:47',
},
],
},
@@ -251,26 +242,15 @@ const mockMatchMapper = {
lon: 6.9427,
duration: 3840,
distance: 76491,
time: '08:04',
actorTimes: [
{
role: 'DRIVER',
target: 'NEUTRAL',
firstDatetime: '2023-09-01 08:04',
firstMinDatetime: '2023-09-01 07:51',
firstMaxDatetime: '2023-09-01 08:19',
lastDatetime: '2024-08-30 08:04',
lastMinDatetime: '2024-08-30 07:51',
lastMaxDatetime: '2024-08-30 08:19',
},
{
role: 'PASSENGER',
target: 'FINISH',
firstDatetime: '2023-09-01 08:01',
firstMinDatetime: '2023-09-01 07:46',
firstMaxDatetime: '2023-09-01 08:16',
lastDatetime: '2024-08-30 08:01',
lastMinDatetime: '2024-08-30 07:46',
lastMaxDatetime: '2024-08-30 08:16',
},
],
},
@@ -279,16 +259,11 @@ const mockMatchMapper = {
lon: 7.02154,
duration: 4980,
distance: 96475,
time: '08:23',
actorTimes: [
{
role: 'DRIVER',
target: 'FINISH',
firstDatetime: '2023-09-01 08:23',
firstMinDatetime: '2023-09-01 08:08',
firstMaxDatetime: '2023-09-01 08:38',
lastDatetime: '2024-08-30 08:23',
lastMinDatetime: '2024-08-30 08:08',
lastMaxDatetime: '2024-08-30 08:38',
},
],
},