question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Optional extras to manage dependencies

See original GitHub issue

It would help if xarray provided a bunch of optional extras to manage the dependencies when it’s installed, e.g. xarray['netcdf4'] etc etc; it’s not sufficient to simply list a few things on http://xarray.pydata.org/en/stable/installing.html because that provides no guidance or management for compatible versions. Since some dependencies like Pandas are still at 0.x versions that can and will break APIs, it’s important to have this version guidance and management (including relevant test suites).

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dazza-codescommented, Apr 23, 2019

Since xarray is operating as a meta-package with various wrappers, it is the only place that can apply version compatibility on it’s dependencies. If there are optional dependencies, the python package extras are the process to manage them (not a README). The SEM-VER standards allow specification of more than one version for any dependency (so long as it complies with SEM-VER standards).

Essentially, this is a request for more sophistication in the setup.py file

Consider, for example, how Apache Airflow does it:

0reactions
equaeghecommented, Jul 17, 2020

Even if version information is (not yet) available, this would be very useful. Currently, when packaging xarray for downstream distributions, it is a very burdensome task to piece together which optional dependencies there are in the first place. I understand that dealing with the backlog makes this a rather tedious task, but making it a requirement going forward to add such dependency information whenever a dependency is changed or added would be required in any case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dependencies Management in Setuptools
There are three types of dependency styles offered by setuptools: 1) build system requirement, 2) required dependency and 3) optional dependency.
Read more >
Help packaging optional application features, using extras?
Making extra features available without making them mandatory, to minimise the default set of dependencies; Having the option for a 'minimal ...
Read more >
A Better Practice for Managing Many extras_require ...
In this article, I introduce a simple yet effective solution to manage optional dependencies via extras_require in Python. This method is ...
Read more >
Recursive Optional Dependencies in Python - Hynek Schlawack
A package's optional dependencies (also known as extras) are named sets of dependencies that are installed by putting their names inside square ...
Read more >
Maven – Optional Dependencies and Dependency Exclusions
The idea is that some of the dependencies are only used for certain features in the project and will not be needed if...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found