SuLab / WikidataIntegrator

A Wikidata Python module integrating the MediaWiki API and the Wikidata SPARQL endpoint
MIT License
244 stars 46 forks source link

Pandas required but not installed by pip install #101

Closed boxed closed 1 year ago

boxed commented 4 years ago

Also, is pandas really required? Seems a bit excessive to get all of pandas and numpy for basic wikidata access. Just importing * from wdi_core takes forever.

andrawaag commented 4 years ago

Can you elaborate a bit? What steps did you take and in what version of pip install? In the current requirements file pandas is listed: https://github.com/SuLab/WikidataIntegrator/blob/master/requirements.txt. Pandas does get installed in our bot workflows. wrt basic wikidata access it might indeed be a bit excessive, however pandas is used to process for example sparql results from the wikidata query service. If however this is causing slow response in basic scenario's I am happy to review a more slim approach. i.e. moving those function to a designated module.

boxed commented 4 years ago

You can just move the import inside the function that needs it.

boxed commented 4 years ago

As for pandas: https://github.com/SuLab/WikidataIntegrator/blob/master/setup.py#L34

The normal way to do setup.py is to read requirements.txt and insert its contents there.