Skip to content

Commit

Permalink
Linting and removing extra
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieulemieux committed May 27, 2024
1 parent ff73e99 commit 84615a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
10 changes: 0 additions & 10 deletions src/civic/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,9 @@ const upload = async ({
logger.info(`\n\n${'#'.repeat(80)}\n## PROCESSING RECORDS\n${'#'.repeat(80)}\n`);
let recordNumber = 0;

// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
const specialId = null; // '11681'; //

// MAIN LOOP
// Looping through Evidence Items
for (const [id, evidenceItem] of Object.entries(evidenceItemsById)) {
if (specialId && id !== specialId) {
continue;
}
/* PROCESSING EVIDENCEITEMS */

recordNumber++;
Expand Down Expand Up @@ -393,10 +387,6 @@ const upload = async ({
}
}
countsST = incrementCounts(countsST, loaclCountsST);

if (specialId && id === specialId) {
process.exit();
}
}
logger.info(`\n\n${'#'.repeat(80)}\n## END OF RECORD PROCESSING\n${'#'.repeat(80)}\n`);

Expand Down
10 changes: 3 additions & 7 deletions src/civic/statement.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,9 @@ const { logger } = require('../logging');
* @param {object} fromGkb actual content from GraphKB
* @returns {boolean} whether both contents are matching or not
*/
const isMatching = ({ fromCivic, fromGkb, p = ['conditions', 'subject'] }) => {
const c = JSON.stringify(_.pick(fromCivic, ...p));
const g = JSON.stringify(_.pick(fromGkb, ...p));
const rel = c === g;
// console.log({ p, c, g, rel });
return rel; // JSON.stringify(_.pick(fromCivic, ...p)) === JSON.stringify(_.pick(fromGkb, ...p));
};
const isMatching = ({ fromCivic, fromGkb, p = ['conditions', 'subject'] }) => (
JSON.stringify(_.pick(fromCivic, ...p)) === JSON.stringify(_.pick(fromGkb, ...p))
);

/**
* Evaluate if a statement needs to be updated
Expand Down

0 comments on commit 84615a5

Please sign in to comment.