openskope / skope-deployment

Everything needed to deploy SKOPE in a new environment.
0 stars 1 forks source link

Make dsindex.py script for loading mapping into Elasticsearch runnable from command line #48

Open tmcphillips opened 6 years ago

tmcphillips commented 6 years ago

The script for loading the mapping for the datasets index into a new Elasticsearch instance currently defines two functions but does nothing when invoked from the command line. Adding a __main__ entry point to the script would make it easily runnable from the command line.

jterstriep commented 6 years ago

Just FYI, this has always worked. You shouldn't attempt to run python code directly from the code repository. You should always run the setup.py or pip to correctly install and configure a package. If this had been done the dsindex would have worked correctly.

tmcphillips commented 6 years ago

Well, that makes a lot more sense. I had no idea this was a working package. The dsloader.py program in the same directory has a main and works as is; the modification needed to dsindex.py to work without installing it was trivial. So my question and concern have always been--are these programs complete as is, or is there a clone of the repo out there that hasn't been pushed to GitHub? And how are you deploying and running these programs? It always sounded like they were not complete, so it never occurred to me to install it as a package.

What we need is documentation--of the entire process of working with the elasticsearch system, starting with installing this package.