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

Strategy for template-specific dependencies #52

Open
smmaurer opened this issue Oct 23, 2018 · 0 comments
Open

Strategy for template-specific dependencies #52

smmaurer opened this issue Oct 23, 2018 · 0 comments

Comments

@smmaurer
Copy link
Member

We are starting to accumulate template-specific dependencies, like PyLogit for Small MNL and Scikit-learn for Random Forest. At the moment, many of these model types are not used very often.

Conferring with @janowicz, I think a good strategy to avoid dependency bloat would be to not require these packages when installing urbansim_templates, but instead raise a helpful error if someone tries to use a template without having its particular dependencies installed.

This seems to be a fairly common design pattern for large libraries, e.g. Pandas requiring pytables to read HDFS files but not installing it automatically. It also extends well to future use cases where templates themselves are defined across multiple packages.

If we're generally using project-level Conda environments, it will be easy to include specific template requirements as needed.

Implementation

We'll need to update the setup files and add package import checks to the appropriate templates.

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

No branches or pull requests

1 participant