uma-pi1 / kge

LibKGE - A knowledge graph embedding library for reproducible research
MIT License
765 stars 124 forks source link

fix setup.py not including all kge packages #270

Closed ppoffice closed 1 year ago

ppoffice commented 1 year ago

When kge is installed directly from its Git URL using pip or other python dependency managers, its submodules will be omitted because the packages are not correctly defined in the setup.py.

$ pip install pip install git+https://github.com/uma-pi1/kge.git

Only these files will be present in the installed package:

LICENSE
README.md
setup.cfg
setup.py
kge/__init__.py
kge/__main__.py
kge/cli.py
kge/config.py
kge/dataset.py
kge/indexing.py
kge/misc.py
libkge.egg-info/PKG-INFO
libkge.egg-info/SOURCES.txt
libkge.egg-info/dependency_links.txt
libkge.egg-info/entry_points.txt
libkge.egg-info/not-zip-safe
libkge.egg-info/requires.txt
libkge.egg-info/top_level.txt

This fix is to include all packages under kge/ so that a user can correctly install kge without having to clone the repository first.

ppoffice commented 1 year ago

Any update on this?

AdrianKs commented 1 year ago

Thanks for the PR. However, currently there is still the issue that .yaml files don't seem to be included. In particular, config-default.yaml and all other yaml files configuring models and embedders. Also, I am not sure yet, if downloading the data would work in the current setup. Do you have an idea how this can be fixed?

ppoffice commented 1 year ago

@AdrianKs It appears that the location of the dataset is closely tied to the location of the kge modules. In order to turn libkge into a library that can be installed from Git or Pip, a significant refactoring of the dataset creation logic is inevitable. As a result, I will be closing this PR for now.