From 01742c13eace7501668423cdcdd00cebcecf94fe Mon Sep 17 00:00:00 2001 From: theresa Date: Thu, 26 Aug 2021 11:58:28 +0200 Subject: [PATCH] People: Add face + subject fixtures #22 --- internal/entity/face_fixtures.go | 12 ++++++++++++ internal/entity/subject_fixtures.go | 17 +++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/internal/entity/face_fixtures.go b/internal/entity/face_fixtures.go index 103141368..e95e4216a 100644 --- a/internal/entity/face_fixtures.go +++ b/internal/entity/face_fixtures.go @@ -54,6 +54,18 @@ var FaceFixtures = FaceMap{ CreatedAt: Timestamp(), UpdatedAt: Timestamp(), }, + "jane-doe": Face{ + ID: "VF7ANLDET2BKZNT4VQWJMMC6HBEFDOG7", + EmbeddingJSON: []byte("[0.0007977288249999999,0.00627412635,0.010081367249999999,0.060607290999999994,0.0198231296325,0.00677942925,0.0127981935,0.0173897118,-0.0031311625250000003,-0.01667410885,-0.063420228,0.018361592,-0.08858173750000001,0.03073611525,-0.031917364749999996,-0.038458696,-0.0547301015,-0.008465875175,0.01761571915,-0.004627128875,-0.014689141,0.0638510155,-0.06016673375,0.0427068645,-0.0018743572750000003,-0.01726785,0.01797843425,0.013435698749999999,-0.02318214925,0.022266988,0.010709568150000001,-0.006173700925,0.05487494425,-0.00735372625,-0.00730452625,-0.009618603875,0.02644855175,0.03581387875,0.0603323515,0.0274974055,-0.011483472,0.018239579750000002,0.0330916205,0.02055146915,0.0242073965,-0.0006206512774999994,-0.01502779865,-0.00663770983,0.020805977000000003,0.025900334499999997,0.03035390375,0.0032148387500000003,-0.00391496355,0.054927406750000005,0.038901408,0.045302014249999994,0.003995124,0.03543321425,0.06059028175,-0.1112412095,-0.0058859643825,0.006096619500000001,0.034855345,-0.0979946125,-0.01321143025,0.11343869000000001,0.006484222825,0.025919567249999997,0.06456440150000001,-0.004858886425,-0.006586231,-0.012453104075,-0.0045703442499999995,0.06079882,-0.0248508515,0.0585631235,0.0204748375,-0.050474988250000005,-0.0601280055,0.0206371795,0.05054124575,0.07786492925,0.06104633175,0.0122962905,-0.020578794,0.04871231525,-0.0046306429,-0.11645592,-0.0016124173750000003,-0.0174920002425,0.0055334826,0.04527567075,0.07851289325,-0.0053165103000000005,-0.02369275525,0.017747101675,-0.0519253465,-0.00209848275,-0.012302984500000001,-0.013717400199999999,0.01359236975,0.02108301525,0.041778528499999995,-0.10003224,0.005552072275,0.024320880750000003,0.011672114249999999,-0.056534426750000005,-0.06916763575,-0.06349918,-0.0056744145,0.0346825085,-0.05831162125,-0.001728813,0.026253652175,-0.00694282505,0.07631711775,0.0162711135,-0.025647805849999997,-0.05708761650000001,-0.1363480425,0.0731495385,0.074582931,0.01708094025,-0.0401903185,-0.014694330250000002,-0.0015122242499999994,-0.0527830695,0.03213205125,0.01814980125,-0.0022534211875,0.006620919325,0.0096743934,-0.00950359475,-0.03451209525,-0.077583193,-0.0327730455,-0.00922135715,0.047522121,0.010230271575,0.0098390256,0.05241573875,-0.0001339010500000001,0.0493660095,0.04127633175,0.0588596835,-0.008334644124999999,-0.013199373475000001,0.00565431415,0.02194862975,0.053116437,-0.06246536,-0.06762575875,0.0083671415,-0.062960726,0.028651681,-0.0047957945,0.02279490325,-0.01949435125,-0.0145249815,0.0179922025,-0.0050103798,-0.02183141475,0.014762827225,-0.0098820205,0.050833761500000005,-0.06879305050000001,-0.019839172457500002,0.03499764575,0.0508008915,-0.0215009885,0.006626853750000001,-0.038975954,0.029960057999999998,0.0196604121,0.010876822750000001,0.02900263525,-0.00548767725,0.013630449250000001,0.0005998975,0.019220962075,-0.0465303345,0.019054888,-0.02356633375,-0.038011357999999995,-0.025119104500000003,0.03871977525,0.024482080750000003,0.08431583125,0.02732495225,0.0949345775,0.0306948015,-0.01885955675,0.0670141655,-0.0106550329825,0.0004984321480000002,0.03305477934,0.03265502,-0.03410266475,0.06414483,-0.042341717,0.0491270175,0.03191559375,0.02826792625,0.1142247775,0.03742189875,0.03385123675,0.043446917,0.0065846527,0.019319251675,0.050761064999999994,-0.03899118075,0.02432739675,0.056898795,-0.07070233249999999,-0.0063754505,-0.0538108965,-0.0519101365,-0.08475072950000001,0.0080495835,-0.08008777975,-0.0499128635,0.0237340165,0.0359055565,-0.043358586500000004,0.031290711,0.0449176795,-0.003326489350000001,0.0373564235,0.017098932,0.058522701499999996,-0.013411767875000001,-0.03544247725,-0.00710222475,-0.026729970750000002,-0.0142197245,-0.002157010249999999,0.05803525749999999,-0.051960914,0.02590911975,0.0300332645,0.0244066115,0.026088825249999996,0.07373419,-0.060161999499999994,-0.0263518045,0.0149505905,0.005806035210000001,-0.07896729899999999,0.006424700950000001,-0.0104141191,0.01328528435,-0.05459953475,0.04573714225,0.047946037999999996,-0.030557348499999998,-0.033911058,0.028284643249999998,0.031623838,-0.017917532,0.038332007,0.04307251675,0.062034384750000005,-0.013643519,-0.06629597425,0.0846901,0.032617285999999995,0.016660794,-0.0103782503,-0.0035999764999999997,-0.04074201625,-0.045392795,-0.0567024655,0.0534449995,0.032140247999999996,-0.002615942875,0.003970428749999999,0.0006793384999999996,0.0479470605,-0.016679134425,0.002493526,-0.007884887625,-0.07609053,-0.06749486625000001,-0.015545290075,-0.02866428275,-0.04221165,0.0099219202,0.03324765825,0.06594442824999999,-0.05207292325,0.0256602945,-0.008784434175000001,-0.020650667,-0.01128855048,-0.026282654000000003,-0.06931673275,-0.03460548625,-0.0039021685000000003,-0.003175222075,-0.025202154450000003,0.03085420725,0.062878601,0.036194557625,0.0315831115,-0.013516679,-0.016713230000000003,0.03202856975,-0.013251297775,0.020228611,0.0753752425,0.08055008,0.08036205,0.05738650225,-0.029444540749999998,0.0182663646,-0.04029768,0.05418008275,-0.00337875545,0.0869958875,0.04981642525,0.021226451,0.067376955,0.05702456425000001,0.0256154065,0.0165551525,0.0573363425,-0.1131940465,-0.048254465999999996,-0.006381563175,-0.02805285125,-0.0843180615,-0.02208099575,0.043981212500000005,-0.049404160749999995,-0.02832630175,-0.019787925749999997,-0.044114692,0.09415466650000001,-0.0715971185,0.053612709999999994,0.0617767915,0.011761299175,-0.0743617975,-0.07687093,-0.04184027125,-0.03814104625,0.0190135215,-0.02036469565,0.0043338230499999995,-0.046716389250000004,0.0342062435,0.0023538994499999995,-0.04717579125,-0.0273496055,0.04244376625,0.03831893575,0.01170549475,-0.03156427225,0.011907790275,-0.060581235,0.041743171499999995,0.099892805,0.08941036024999999,0.07931023225,-0.0045060146,-0.02298178175,0.0170326654,0.002005552125,0.03624607975,-0.00254639081,-0.021702498499999997,0.00025758344999999975,-0.05735207875,-0.058512898,0.054487390999999996,-0.069780037,-0.0482861765,0.0426412765,-0.0005190220499999999,0.026654973999999998,-0.018059142435,0.015806152,0.0052889667500000005,-0.0156201485,0.0704166475,0.060801867999999995,-0.0465132285,-0.020886614749999997,-0.011178703875000001,-0.0090127261,-0.009662520155,0.03789897025,-0.051430011,0.01944026075,0.07463842749999999,0.051795128075,0.011506837975000002,-0.008200053,0.011794975,0.03101000675,-0.049201035000000004,-0.0443442445,-0.0134417219,-0.006325725025,-0.01755221025,-0.0607596845,-0.05817676075,0.015325420199999999,0.026280469425,-0.07285754675,-0.06974749,0.01869944075,-0.023075805624999998,0.0091478072825,0.031091439499999998,-0.006865514,-0.04208474925,-0.0054626954749999995,0.0188026845,-0.049544713000000004,0.032261805,0.02338521525,-0.013330432,-0.0224570155,-0.07082244425,-0.014643495500000001,0.1226712625,0.0132564726,-0.031361429749999996,0.0379521724,-0.0066203463,-0.06123780825,-0.019100098,-0.027406878750000002,-0.0161381114,0.02359161625,0.01835811065,0.0794485855,-0.0399414135,-0.051978358749999995,-0.079630794,-0.054609961750000005,0.0144952945,-0.0032930052749999997,0.1006953125,0.0168597975,0.003768769525,-0.024148695999999997,-0.038411440875,0.0352168475,0.0783426045,-0.06891328699999999,-0.044475929750000004,-0.0476271525,-0.0257017798,0.007319193000000001,-0.045860846,0.03613755025,0.032934875749999995,-0.015392466625,-0.0171107225,-0.021246307,-0.0049659322075,-0.1082791675,-0.04918869425,-0.061089002,0.03516362325,0.033606162499999995,-0.01977699145,-0.029709126250000002,0.09406408499999999,0.023276244,-0.061732811,-0.008581465,-0.0577642725,-0.02751739825,0.0150603045,-0.013947836,0.0069377069999999996,-0.030457946,0.0455026755,0.015736250325,0.04198308775,0.050190193499999994,-0.009795321,-0.0626410775,-0.0029042444000000013,-0.010100665375,0.033087972,0.019320060942499998,-0.03953386525,0.022216985874999998,-0.013800474,-0.010697693999999999,-0.007538092125,0.07874210100000001,-0.013867060100000002,-0.015251711,0.03930575225,0.047296916,0.04652198125,-0.0124463654,0.0721478725,-0.010877033000000001,0.0175319255,0.038609693,0.0295120445,0.011322374,0.07543583300000001,0.00606530779,-0.06794421925]"), + SubjectUID: SubjectFixtures.Get("jane-doe").SubjectUID, + FaceSrc: SrcManual, + SampleRadius: 0.2849559839760571, + Samples: 3, + Collisions: 0, + CollisionRadius: 0, + CreatedAt: Timestamp(), + UpdatedAt: Timestamp(), + }, } // CreateFaceFixtures inserts known entities into the database for testing. diff --git a/internal/entity/subject_fixtures.go b/internal/entity/subject_fixtures.go index eccf98f62..a67de3388 100644 --- a/internal/entity/subject_fixtures.go +++ b/internal/entity/subject_fixtures.go @@ -70,6 +70,23 @@ var SubjectFixtures = SubjectMap{ UpdatedAt: Timestamp(), DeletedAt: nil, }, + "jane-doe": Subject{ + SubjectUID: "jqy1y111h1njaaab", + SubjectSlug: "jane-doe", + SubjectName: "Jane Doe", + SubjectType: SubjectPerson, + SubjectSrc: SrcMarker, + Favorite: false, + Private: false, + Hidden: false, + SubjectDescription: "", + SubjectNotes: "", + MetadataJSON: []byte(""), + PhotoCount: 3, + CreatedAt: Timestamp(), + UpdatedAt: Timestamp(), + DeletedAt: nil, + }, } // CreateSubjectFixtures inserts known entities into the database for testing.