Skip to content

Commit

Permalink
feat: Merge pull request #226 from pelias/switch-to-all-in-one-admin-…
Browse files Browse the repository at this point in the history
…lookup

Switch to all-in-one admin lookup
  • Loading branch information
trescube authored Feb 13, 2017
2 parents b827f63 + 6b1f544 commit 8527ffa
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 193 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
*.log
11 changes: 7 additions & 4 deletions import.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ var logger = require( 'pelias-logger' ).get( 'openaddresses' );
var parameters = require( './lib/parameters' );
var importPipeline = require( './lib/importPipeline' );

var adminLookupStream = require('./lib/streams/adminLookupStream');
const adminLookupStream = require('pelias-wof-admin-lookup');
var deduplicatorStream = require('./lib/streams/deduplicatorStream');

var wofAdminLookup = require('pelias-wof-admin-lookup');
var addressDeduplicator = require('pelias-address-deduplicator');


Expand All @@ -37,10 +36,14 @@ if( 'exitCode' in args ){
} else {
startTiming();

if (peliasConfig.imports.openaddresses.hasOwnProperty('adminLookup')) {
logger.info('imports.openaddresses.adminLookup has been deprecated, ' +
'enabled adminLookup using imports.adminLookup.enabled = true');
}

var files = parameters.getFileList(peliasConfig, args);

var deduplicator = deduplicatorStream.create(peliasConfig, addressDeduplicator);
var adminLookup = adminLookupStream.create(peliasConfig, wofAdminLookup);

importPipeline.create( files, args.dirPath, deduplicator, adminLookup );
importPipeline.create( files, args.dirPath, deduplicator, adminLookupStream.create() );
}
29 changes: 0 additions & 29 deletions lib/streams/adminLookupStream.js

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"pelias-dbclient": "2.0.0",
"pelias-logger": "0.1.0",
"pelias-model": "4.4.0",
"pelias-wof-admin-lookup": "2.11.0",
"pelias-wof-admin-lookup": "3.0.0",
"through2": "^2.0.3",
"through2-filter": "^2.0.0",
"through2-map": "^3.0.0",
Expand Down
158 changes: 0 additions & 158 deletions test/streams/adminLookupStream.js

This file was deleted.

1 change: 0 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

require( './schema' );
require( './isValidCsvRecord' );
require( './streams/adminLookupStream');
require( './import');
require( './importPipeline');
require( './parameters' );
Expand Down

0 comments on commit 8527ffa

Please sign in to comment.