Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up the optional dependencies #68

Open
bt2901 opened this issue May 24, 2020 · 2 comments
Open

Clean up the optional dependencies #68

bt2901 opened this issue May 24, 2020 · 2 comments
Labels
discuss Not everything clear, further communication required documentation Improvements or additions to documentation enhancement New feature or request

Comments

@bt2901
Copy link
Contributor

bt2901 commented May 24, 2020

We have a number of dependencies which setuptools calls "extras": packages that only needed for unlocking additional functionality but not used otherwise. Ideally, we should not require the user to install them.

It appears that we need to add something like the following to the setup.py:

    extras_require = {
        "custom_regularizers'':  ["numba"],
        "large_datasets'':  ["dask[dataset]"],
    }

and then check if the optional package is installed (I'm not clear how it works exactly)

Then user could install our library with the following syntax: pip install topicnet[custom_regularizers] (which will pull numba).

PS: Naming suggestions are welcome.

@Alvant Alvant added discuss Not everything clear, further communication required documentation Improvements or additions to documentation enhancement New feature or request labels May 24, 2020
@Evgeny-Egorov-Projects
Copy link
Contributor

I need 2 questions answered:
What are the benefits of that action?
Will it create problems with installation (like tests failing for some versions)?

@bt2901
Copy link
Contributor Author

bt2901 commented May 25, 2020

  1. In our case, the practical benefits are insignificant (getting rid of installing superfluous libraries, but they are not heavy), but this seems to be a good practice.

  2. I don't think so. It should be sufficient to skip some tests after checking their dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Not everything clear, further communication required documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants