Skip to content

Comments

Allow SQLite files in WoF-Root#243

Open
arnesetzer wants to merge 4 commits intopelias:masterfrom
arnesetzer:feat/allowWoFRoot
Open

Allow SQLite files in WoF-Root#243
arnesetzer wants to merge 4 commits intopelias:masterfrom
arnesetzer:feat/allowWoFRoot

Conversation

@arnesetzer
Copy link

👋 I did some awesome work for the Pelias project and would love for everyone to have a look at it and provide feedback.


Here's the reason for this change 🚀

Follow up on pelias/whosonfirst#557 to also allow the placeholder to use sqlite files which are not in the sqlite directory.


Here's what actually got changed 👏

The 'WOF_DIR' variable is now a string array set to '[config.datapath, config.datapath.sqlite]' if 'process.env.WOF_DIR' is not set. The correct path for each file is determined and saved for importing from both directories. The same logic applies as in pelias/whosonfirst#557: if a file with the same name exists in both the root directory and the sqlite directory, the sqlite file will be used.


Here's how others can test the changes 👀

  1. Check out the PR.
  2. Put some files in the WOF root directory/sqlite directory.
  3. Run the command 'npm run extract' and check that all databases have been imported into wof.extract.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant