Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions audits/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,10 @@ These remain because coverage has not fully moved off them yet. Each one goes wh
its users does.

- **Core's legacy fixture loader** (`data.json`, `action.json`, `expected.json` through
`TemplatedTestBase`). It runs 5 legacy fixture directories, each with a documented source: 4
tracked as legacy-only in `cutover.json` with the strict check they fail, and one declaration
that needs alternative commands. 384 cases have moved to the runner; the 167 legacy tests whose
`TemplatedTestBase`). No legacy fixture directory remains: 386 cases have moved to the runner; the 167 legacy tests whose
fixtures no documented source reproduced were deleted and are recorded in
`audits/catalog/deleted-fixtures.json`.
`audits/catalog/deleted-fixtures.json`, with the three whose pages print results that do not
parse. The loader code itself retires next.
- **The legacy RST extractor** (`rst/`, `model/CodeBlock`). Cutover and the example inventory
read pages through it, with tested snippets spliced in and only the mongosh content of each
language choice kept. It goes once the structured parser (`scenarios/`) owns example extraction,
Expand Down
64 changes: 10 additions & 54 deletions audits/catalog/curated-repairs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2701,18 +2701,6 @@
"method" : "testSwitchAggregationExpressionOperator",
"options" : [ ],
"type" : "dev.morphia.test.aggregation.expressions.TestSwitch"
}, {
"assertions" : [ "SERIALIZATION", "BEHAVIOR" ],
"categories" : [ ],
"collections" : { },
"disabled" : false,
"disposition" : "UNCORRECTED",
"fixture" : "aggregation/expressions/tan/tangentOfValueInRadians",
"helpers" : [ "testPipeline" ],
"markers" : [ ],
"method" : "testTangentOfValueInRadians",
"options" : [ ],
"type" : "dev.morphia.test.aggregation.expressions.TestTan"
}, {
"assertions" : [ "SERIALIZATION", "BEHAVIOR" ],
"categories" : [ ],
Expand Down Expand Up @@ -3181,21 +3169,6 @@
"method" : "testCountAggregationStage",
"options" : [ ],
"type" : "dev.morphia.test.aggregation.stages.TestCount"
}, {
"assertions" : [ "SERIALIZATION", "BEHAVIOR" ],
"categories" : [ "EXTRACTION" ],
"collections" : { },
"disabled" : false,
"disposition" : "OVERRIDDEN",
"fixture" : "aggregation/stages/densify/densifyTimeSeriesData",
"helpers" : [ "testPipeline" ],
"markers" : [ ],
"method" : "testDensifyTimeSeriesData",
"options" : [ {
"argument" : "true",
"name" : "removeIds"
} ],
"type" : "dev.morphia.test.aggregation.stages.TestDensify"
}, {
"assertions" : [ "SERIALIZATION", "BEHAVIOR" ],
"categories" : [ ],
Expand Down Expand Up @@ -3286,23 +3259,6 @@
"name" : "removeIds"
} ],
"type" : "dev.morphia.test.aggregation.stages.TestFill"
}, {
"assertions" : [ "SERIALIZATION", "BEHAVIOR" ],
"categories" : [ "MORPHIA_FORM" ],
"collections" : {
"data2.json" : "airports"
},
"disabled" : false,
"disposition" : "OVERRIDDEN",
"fixture" : "aggregation/stages/graphLookup/acrossMultipleCollections",
"helpers" : [ "testPipeline" ],
"markers" : [ ],
"method" : "testAcrossMultipleCollections",
"options" : [ {
"argument" : "false",
"name" : "orderMatters"
} ],
"type" : "dev.morphia.test.aggregation.stages.TestGraphLookup"
}, {
"assertions" : [ "SERIALIZATION", "BEHAVIOR" ],
"categories" : [ "FIXTURE_CURATION" ],
Expand Down Expand Up @@ -4615,7 +4571,7 @@
"markers" : [ ],
"method" : "testSelectRandomItemsFromACollection",
"options" : [ {
"argument" : "new FindOptions().projection().include(\"name\", \"registered\")",
"argument" : "new FindOptions().projection().include(\"name\", \"registered\").projection().exclude(\"_id\")",
"name" : "findOptions"
}, {
"argument" : "false",
Expand Down Expand Up @@ -5289,23 +5245,23 @@
"repositoryRevision" : "70fde7825fcaa6f09efde4cab59b09318dfe6ee6",
"schemaVersion" : 1,
"summary" : {
"assertion.BEHAVIOR" : 360,
"assertion.BEHAVIOR" : 357,
"assertion.CUSTOM" : 0,
"assertion.DISABLED" : 1,
"assertion.NONE" : 0,
"assertion.SERIALIZATION" : 386,
"assertion.SERIALIZATION" : 383,
"category.DOCS_ERROR" : 26,
"category.EXTRACTION" : 28,
"category.EXTRACTION" : 27,
"category.FIXTURE_CURATION" : 10,
"category.MORPHIA_FORM" : 52,
"category.MORPHIA_FORM" : 51,
"category.NUMERIC_TYPE" : 17,
"category.SHELL_SYNTAX" : 10,
"category.UNTESTABLE" : 0,
"disposition.NOT_EXECUTED" : 0,
"disposition.OVERRIDDEN" : 137,
"disposition.OVERRIDDEN" : 135,
"disposition.PRESERVED_CURATED" : 0,
"disposition.UNCORRECTED" : 251,
"examples" : 388,
"disposition.UNCORRECTED" : 250,
"examples" : 385,
"examples.locked" : 0,
"exclusion.DEFERRED" : 1,
"exclusion.ENVIRONMENT_UNAVAILABLE" : 3,
Expand All @@ -5315,8 +5271,8 @@
"markers.lock" : 0,
"markers.lockd" : 0,
"option.findOptions" : 4,
"option.orderMatters" : 78,
"option.removeIds" : 41,
"option.orderMatters" : 77,
"option.removeIds" : 40,
"option.serverVersion" : 12,
"option.skipActionCheck" : 1,
"option.skipDataCheck" : 27
Expand Down
18 changes: 1 addition & 17 deletions audits/catalog/cutover.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
{
"contexts" : [ "aggregation/expressions", "aggregation/stages", "query" ],
"legacyOnly" : [ {
"check" : "SOURCE",
"detail" : "the shell normalizer cannot read the documented results (expected syntax)",
"fixture" : "aggregation/expressions/tan/tangentOfValueInRadians"
}, {
"check" : "SOURCE",
"detail" : "the shell normalizer cannot read the documented results (expected syntax)",
"fixture" : "aggregation/stages/densify/densifyTimeSeriesData"
}, {
"check" : "SOURCE",
"detail" : "the shell normalizer cannot read the documented results (expected syntax)",
"fixture" : "aggregation/stages/graphLookup/acrossMultipleCollections"
}, {
"check" : "SERIALIZATION",
"detail" : "the page's projection is {_id: 0, name: 1, registered: 1}; the test includes name and registered and drops _id with removeIds, so Morphia's projection lacks the _id exclusion",
"fixture" : "query/filters/rand/selectRandomItemsFromACollection"
} ],
"legacyOnly" : [ ],
"schemaVersion" : 1
}
36 changes: 36 additions & 0 deletions audits/catalog/deleted-fixtures.json
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,17 @@
"fixture" : "aggregation/expressions/tan/tangentOfValueInDegrees",
"reason" : "locked, and no documented source reproduces it: SOURCE_UNSUPPORTED expected syntax",
"test" : "dev.morphia.test.aggregation.expressions.TestTan#testTangentOfValueInDegrees"
}, {
"bodySha256" : "5b1267ed95c62fdab6cc54f6f8ac4e9463b5c513fb3cb4684f32bb13aaa9ac9d",
"files" : {
"action.json" : "996a16cd8f0fc500f6c70207c16c5fe5394bc3417543d3457e47d18d6369395e",
"data.json" : "fd1f3c01af034e96548f5056994d7debe99c6ce7a330aea1e56e6caf09a423ba",
"expected.json" : "e45e98a10aad1cd7060ca3fa3d3566d774330eec741f74d7c5c134428b36372e",
"name" : "85550610332a687515dc5c999ff1738f22eb8164fdabad152f2c32cc31ca1a88"
},
"fixture" : "aggregation/expressions/tan/tangentOfValueInRadians",
"reason" : "the page's printed results do not parse (a typo in the page, such as a missing comma or quote), so no documented result backs the fixture",
"test" : "dev.morphia.test.aggregation.expressions.TestTan#testTangentOfValueInRadians"
}, {
"bodySha256" : "a41457eb765f883b58f66f5df3048ef78b356728b743279ac1c7a7702cb7318a",
"files" : {
Expand Down Expand Up @@ -902,6 +913,18 @@
"fixture" : "aggregation/stages/densify/densifictionWithPartitions",
"reason" : "locked, and no documented source reproduces it: RESIDUAL_DIFFERENCE action KEY_ORDER at /0/$densify/range",
"test" : "dev.morphia.test.aggregation.stages.TestDensify#testDensifictionWithPartitions"
}, {
"bodySha256" : "a30db196605d546a69f0d17e0b0a646ca48fbed4ebae721b2795c8d08168aff6",
"files" : {
"action.json" : "2348c50766595c53d3d646d242869d3d5c23b9c41283814f87ecb4068cc052fb",
"data.json" : "18db83af8ad8ec5f3a608e49643b0dba82ef9a13dcd319571e8b8cb7829dae99",
"expected.json" : "cc772d102dd3d52323c98e7ea2885cee9b495a73bad284c32d96df908df7ae5c",
"lock" : "94aca22c7d8d4fe590088e718ab515314a21777f16edce24999e53b9858fbf7f",
"name" : "02802cbee4a01571e39dc003c5c2d17b7d17e1353a1c745e4077c2bdc66ad77c"
},
"fixture" : "aggregation/stages/densify/densifyTimeSeriesData",
"reason" : "the page's printed results do not parse (a typo in the page, such as a missing comma or quote), so no documented result backs the fixture",
"test" : "dev.morphia.test.aggregation.stages.TestDensify#testDensifyTimeSeriesData"
}, {
"bodySha256" : "bf20a2a13bae62691f781828e8d7199b76d92ce7a9c798dd56d36ff9e79c94f6",
"files" : {
Expand Down Expand Up @@ -1005,6 +1028,19 @@
"fixture" : "aggregation/stages/geoNear/specifyWhichGeospatialIndexToUse",
"reason" : "no documented page reproduces it: RESIDUAL_DIFFERENCE index.json has no documented source",
"test" : "dev.morphia.test.aggregation.stages.TestGeoNear#testSpecifyWhichGeospatialIndexToUse"
}, {
"bodySha256" : "703c2dcb40ba995d98829a527eb99cc0e1c4650c115a522d170481b7940bb193",
"files" : {
"action.json" : "605bde048bff6db6a77944897b2df3024bd5c19158386dbfedf765486f47c1ee",
"data.json" : "00061634b23aeb5b13f358628171b20dd87ace338afa8b215a93425424ba9ea1",
"data2.json" : "c31732455fc49cd4428e47822663db4ee0c9116e7031a2e1da8f0f1ffa850205",
"expected.json" : "4d8f3e5295b46da09ca3cad0636c361668e6dbbe153419f294674219a9623ff5",
"lock" : "837a91236817cbc098b8d616cb3ef2e055d7ba25a14e79ec7a9e509765c910b1",
"name" : "068903a39c63f8c83b724e2fa3024427b5554c7ceb0d05c972c48097cefb5777"
},
"fixture" : "aggregation/stages/graphLookup/acrossMultipleCollections",
"reason" : "the page's printed results do not parse (a typo in the page, such as a missing comma or quote), so no documented result backs the fixture",
"test" : "dev.morphia.test.aggregation.stages.TestGraphLookup#testAcrossMultipleCollections"
}, {
"bodySha256" : "fc228272ac5563a6d012197015d746c9cf56d833a2c5305c7f86b2560f116db8",
"files" : {
Expand Down
68 changes: 54 additions & 14 deletions audits/catalog/documented-examples.json
Original file line number Diff line number Diff line change
Expand Up @@ -6207,11 +6207,23 @@
"stem" : "mainTangentOfValueInDegrees",
"title" : "main :: Tangent of Value in Degrees"
}, {
"blocks" : [ ],
"blocks" : [ {
"role" : "ACTION",
"sha256" : "77142b787e783ee8c05ae6136926b5f5739eb5b9c584cd0977285b1e6333d795",
"text" : "db.trigonometry.aggregate([\n {\n $addFields : {\n \"side_b\" : {\n $multiply : [\n { $tan : \"$angle_a\" },\n \"$side_a\"\n ]\n }\n }\n }\n])"
}, {
"role" : "DATA",
"sha256" : "32aea62bc2358b846c116d8494678e6c3c179959a768c6fd85113aaf6ea52b83",
"text" : "{\n \"_id\" : ObjectId(\"5c50782193f833234ba90d85\"),\n \"angle_a\" : Decimal128(\"0.9272952180016122324285124629224288\"),\n \"side_a\" : Decimal128(\"3\")\n}"
}, {
"role" : "EXPECTED",
"sha256" : "b1cec4c24b23c8ddfd3de82a2ddabd511a8959d8e49c491793911b6597c5e78b",
"text" : "{\n \"_id\" : ObjectId(\"5c50782193f833234ba90d85\"),\n \"angle_a\" : Decimal128(\"0.9272952180016122324285124629224288\"),\n \"side_a\" : Decimal128(\"3\")\n \"side_b\" : Decimal128(\"3.999999999999999999999999999999999\")\n}"
} ],
"detail" : null,
"owner" : "aggregation/expressions/tan/tangentOfValueInRadians",
"status" : "OWNED",
"stem" : null,
"owner" : null,
"status" : "UNOWNED",
"stem" : "mainTangentOfValueInRadians",
"title" : "main :: Tangent of Value in Radians"
} ],
"includes" : [ ],
Expand Down Expand Up @@ -7574,11 +7586,23 @@
}, {
"context" : "aggregation/stages",
"examples" : [ {
"blocks" : [ ],
"blocks" : [ {
"role" : "ACTION",
"sha256" : "f04db7a01a8e97bf6b450b0c3940bdcbcb7d7c31f839149369613c311b3fa6f6",
"text" : "db.weather.aggregate( [\n {\n $densify: {\n field: \"timestamp\",\n range: {\n step: 1,\n unit: \"hour\",\n bounds:[ ISODate(\"2021-05-18T00:00:00.000Z\"), ISODate(\"2021-05-18T08:00:00.000Z\") ]\n }\n }\n }\n] )"
}, {
"role" : "DATA",
"sha256" : "b3415be8c72026acf1cf50ca163d7f39ee479da9656ea12e68de9d9c9953d1a9",
"text" : "db.weather.insertMany( [\n {\n \"metadata\": { \"sensorId\": 5578, \"type\": \"temperature\" },\n \"timestamp\": ISODate(\"2021-05-18T00:00:00.000Z\"),\n \"temp\": 12\n },\n {\n \"metadata\": { \"sensorId\": 5578, \"type\": \"temperature\" },\n \"timestamp\": ISODate(\"2021-05-18T04:00:00.000Z\"),\n \"temp\": 11\n },\n {\n \"metadata\": { \"sensorId\": 5578, \"type\": \"temperature\" },\n \"timestamp\": ISODate(\"2021-05-18T08:00:00.000Z\"),\n \"temp\": 11\n },\n {\n \"metadata\": { \"sensorId\": 5578, \"type\": \"temperature\" },\n \"timestamp\": ISODate(\"2021-05-18T12:00:00.000Z\"),\n \"temp\": 12\n }\n] )"
}, {
"role" : "EXPECTED",
"sha256" : "876e2bcb09f785c573f004c5f99ca084eb86c69b594b1a492d3feff8986b2a9a",
"text" : "[\n {\n _id: ObjectId(\"618c207c63056cfad0ca4309\"),\n metadata: { sensorId: 5578, type: 'temperature' },\n timestamp: ISODate(\"2021-05-18T00:00:00.000Z\"),\n temp: 12\n },\n { timestamp: ISODate(\"2021-05-18T01:00:00.000Z\") },\n { timestamp: ISODate(\"2021-05-18T02:00:00.000Z\") },\n { timestamp: ISODate(\"2021-05-18T03:00:00.000Z\") },\n {\n _id: ObjectId(\"618c207c63056cfad0ca430a\"),\n metadata: { sensorId: 5578, type: 'temperature' },\n timestamp: ISODate(\"2021-05-18T04:00:00.000Z\"),\n temp: 11\n },\n { timestamp: ISODate(\"2021-05-18T05:00:00.000Z\") },\n { timestamp: ISODate(\"2021-05-18T06:00:00.000Z\") },\n { timestamp: ISODate(\"2021-05-18T07:00:00.000Z\") },\n {\n _id: ObjectId(\"618c207c63056cfad0ca430b\"),\n metadata: { sensorId: 5578, type: 'temperature' },\n timestamp: ISODate(\"2021-05-18T08:00:00.000Z\"),\n temp: 11\n }\n {\n _id: ObjectId(\"618c207c63056cfad0ca430c\"),\n metadata: { sensorId: 5578, type: 'temperature' },\n timestamp: ISODate(\"2021-05-18T12:00:00.000Z\"),\n temp: 12\n }\n]"
} ],
"detail" : null,
"owner" : "aggregation/stages/densify/densifyTimeSeriesData",
"status" : "OWNED",
"stem" : null,
"owner" : null,
"status" : "UNOWNED",
"stem" : "densifyTimeSeriesData",
"title" : "Densify Time Series Data"
}, {
"blocks" : [ {
Expand Down Expand Up @@ -7920,11 +7944,27 @@
"stem" : null,
"title" : "Within a Single Collection"
}, {
"blocks" : [ ],
"blocks" : [ {
"role" : "ACTION",
"sha256" : "2307d7043a9abff0bcb4efcb4efe26c89801cbfab9d54f1d483d0fe04ad826cc",
"text" : "db.travelers.aggregate( [\n {\n $graphLookup: {\n from: \"airports\",\n startWith: \"$nearestAirport\",\n connectFromField: \"connects\",\n connectToField: \"airport\",\n maxDepth: 2,\n depthField: \"numConnections\",\n as: \"destinations\"\n }\n }\n] )"
}, {
"role" : "DATA",
"sha256" : "515ac57d4c6bc472d31aca191bdefc9796ec1db572bcd3eb90213e63ba3682f3",
"text" : "db.airports.insertMany( [\n { _id: 0, airport: \"JFK\", connects: [ \"BOS\", \"ORD\" ] },\n { _id: 1, airport: \"BOS\", connects: [ \"JFK\", \"PWM\" ] },\n { _id: 2, airport: \"ORD\", connects: [ \"JFK\" ] },\n { _id: 3, airport: \"PWM\", connects: [ \"BOS\", \"LHR\" ] },\n { _id: 4, airport: \"LHR\", connects: [ \"PWM\" ] }\n] )"
}, {
"role" : "DATA",
"sha256" : "315799a351d0730be7d528103983e43515d196c72d7538eb718c52b568870af4",
"text" : "db.travelers.insertMany( [\n { _id: 1, name: \"Dev\", nearestAirport: \"JFK\" },\n { _id: 2, name: \"Eliot\", nearestAirport: \"JFK\" },\n { _id: 3, name: \"Jeff\", nearestAirport: \"BOS\" }\n] )"
}, {
"role" : "EXPECTED",
"sha256" : "bba1f4e6a15396c2fabc96ecbf4159bba529360957a0513d002e4dd62750cac7",
"text" : "[\n {\n _id: 1,\n name: 'Dev',\n nearestAirport: 'JFK',\n destinations: [\n {\n _id: 0,\n airport: 'JFK',\n connects: [ 'BOS', 'ORD' ],\n numConnections: Long('0')\n },\n {\n _id: 1,\n airport: 'BOS',\n connects: [ 'JFK', 'PWM' ],\n numConnections: Long('1')\n },\n {\n _id: 3,\n airport: 'PWM',\n connects: [ 'BOS', 'LHR' ],\n numConnections: Long('2')\n },\n {\n _id: 2,\n airport: 'ORD',\n connects: [ 'JFK' ],\n numConnections: Long('1')\n }\n ]\n },\n {\n _id: 2,\n name: 'Eliot',\n nearestAirport: 'JFK',\n destinations: [\n {\n _id: 0,\n airport: 'JFK',\n connects: [ 'BOS', 'ORD' ],\n numConnections: Long('0')\n },\n {\n _id: 1,\n airport: 'BOS',\n connects: [ 'JFK', 'PWM' ],\n numConnections: Long('1')\n },\n {\n _id: 3,\n airport: 'PWM',\n connects: [ 'BOS', 'LHR' ],\n numConnections: Long('2')\n },\n {\n _id: 2,\n airport: 'ORD',\n connects: [ 'JFK' ],\n numConnections: Long('1')\n }\n ]\n },\n {\n _id: 3,\n name: 'Jeff',\n nearestAirport: 'BOS',\n destinations: [\n {\n _id: 0,\n airport: 'JFK',\n connects: [ 'BOS', 'ORD' ],\n numConnections: Long('1')\n },\n {\n _id: 1,\n airport: 'BOS',\n connects: [ 'JFK', 'PWM' ],\n numConnections: Long('0')\n },\n {\n _id: 4,\n airport: 'LHR',\n connects: [ 'PWM' ],\n numConnections: Long('2')\n },\n {\n _id: 3,\n airport: 'PWM',\n connects: [ 'BOS', 'LHR' ],\n numConnections: Long('1')\n },\n {\n _id: 2,\n airport: 'ORD',\n connects: [ 'JFK' ],\n numConnections: Long('2')\n }\n ]\n }\n]"
} ],
"detail" : null,
"owner" : "aggregation/stages/graphLookup/acrossMultipleCollections",
"status" : "OWNED",
"stem" : null,
"owner" : null,
"status" : "UNOWNED",
"stem" : "acrossMultipleCollections",
"title" : "Across Multiple Collections"
}, {
"blocks" : [ ],
Expand Down Expand Up @@ -13918,9 +13958,9 @@
"sourceRepository" : "mongodb/docs",
"summary" : {
"examples.ambiguous" : 0,
"examples.owned" : 323,
"examples.owned" : 320,
"examples.unnamed" : 0,
"examples.unowned" : 259,
"examples.unowned" : 262,
"pages" : 297,
"pages.skipped" : 3,
"reviews.stale" : 0
Expand Down
Loading