Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

analysis-reports

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

analysis-reports - npm Package Compare versions

Comparing version 13.112.1 to 13.113.0

lib/missing-ontologies.js

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

# [13.113.0](https://bitbucket.org/wonderflowbv/wonderweb/compare/v13.112.1...v13.113.0) (2023-03-30)
**Note:** Version bump only for package analysis-reports
## [13.112.1](https://bitbucket.org/wonderflowbv/wonderweb/compare/v13.112.0...v13.112.1) (2023-03-30)

@@ -8,0 +16,0 @@

11

commands/missing-ontologies.js

@@ -1,2 +0,2 @@

const { missingOntologiesReport } = require('../lib/ missing-ontologies')
const { missingOntologiesReport } = require('../lib/missing-ontologies')
const log = require('../log')

@@ -27,3 +27,4 @@ const sendEmail = require('../lib/utils/send-email')

const { numberOfReviews, numberOfNewReviews, reviewsWithMissingOntologies, numberOfInvalidAnnotations, missingOntologies } = await missingOntologiesReport({ productIds, language, email })
const { numberOfReviews, numberOfNewReviews, reviewsWithMissingOntologies, numberOfInvalidAnnotations, missingOntologies } = await missingOntologiesReport({ productIds, language })
let parameters = ''

@@ -44,10 +45,10 @@ if (scope) parameters += `scope: ${scope}`

to: email,
from: 'analysis-report@wonderflow.co',
from: 'analysis-report@wonderflow.ai',
subject: `OEs not linked - ${parameters}`,
text: `
Report on Opinion expression not linked for the following parameters: ${parameters}\n
Reviews having all unlinked OEs: ${reviewsWithMissingOntologies}/${numberOfReviews} (${+(reviewsWithMissingOntologies / numberOfReviews * 100).toFixed(2)}%)\n
⚠️ Reviews having all unlinked OEs: ${reviewsWithMissingOntologies}/${numberOfReviews} (${+(reviewsWithMissingOntologies / numberOfReviews * 100).toFixed(2)}%)\n
Reviews with status NEW: ${numberOfNewReviews}/${numberOfReviews} (${+(numberOfNewReviews / numberOfReviews * 100).toFixed(2)}%)\n
Total number of Opinion Expressions not linked: ${numberOfInvalidAnnotations}\n
Breakdown of the ${numberOfInvalidAnnotations} OE not linked:\n
Breakdown of the ${numberOfInvalidAnnotations} OEs not linked:\n
${breakdown}\n`

@@ -54,0 +55,0 @@ })

const test = require('ava')
const TestUtils = require('@bitliner/test-utils')
const { missingOntologiesReport } = require('./ missing-ontologies')
const { missingOntologiesReport } = require('./missing-ontologies')
const { id, Reviews } = require('../db')

@@ -49,10 +49,8 @@

const { numberOfNewReviews, numberOfReviews, numberOfInvalidAnnotations, missingOntologies } = await missingOntologiesReport({ productIds: [pid] })
const { numberOfInvalidAnnotations, missingOntologies } = await missingOntologiesReport({ productIds: [pid] })
t.is(numberOfReviews, 5)
t.is(numberOfNewReviews, 2)
t.is(numberOfInvalidAnnotations, 5)
t.deepEqual(missingOntologies, {
'firstAspectId - reason: This opinion is not linked to any topic in the dictionary': 2,
'secondAspectId - reason: example-reason': 3
'firstAspectId\n- reason: This opinion is not linked to any topic in the dictionary': 2,
'secondAspectId\n- reason: example-reason': 3
})

@@ -80,4 +78,4 @@ })

t.deepEqual(missingOntologies, {
'firstAspectId - reason: This opinion is not linked to any topic in the dictionary': 2
'firstAspectId\n- reason: This opinion is not linked to any topic in the dictionary': 2
})
})
{
"name": "analysis-reports",
"version": "13.112.1",
"version": "13.113.0",
"description": "Module to compute the reports after an analysis has run",

@@ -15,5 +15,5 @@ "main": "index.js",

"@bitliner/mongo-db": "^13.89.0",
"@bitliner/scope": "^13.112.0",
"@bitliner/scope": "^13.113.0",
"@bitliner/send-email": "^13.0.4",
"@bitliner/test-utils": "^13.112.0",
"@bitliner/test-utils": "^13.113.0",
"yargs": "^17.7.1"

@@ -26,3 +26,3 @@ },

},
"gitHead": "28b136336a3f05a7b7c9026c114710039e8b4241"
"gitHead": "05ff3c1f8d8f41a50bd314c2af4261d2f9f79985"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc