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.

Make setup.py require dash

See original GitHub issue

Really just a suggestion, but I believe it would be nice to have setup.py require dash by default: https://github.com/plotly/dash-bio/blob/bd5ce53c4529ce3e0c783cb61eb6eab7b298dd93/setup.py#L11-L20

That way, when the user installs dash-bio, they simply need to create a venv and run:

pip install dash-bio

with dash, dash-html-components, dash_renderer being installed as well.

It could be implemented along the line of:

 setup( 
     name=package_name, 
     version=package["version"], 
     author=package['author'], 
     packages=[package_name, '{}/utils'.format(package_name), '{}/component_factory'.format(package_name)], 
     include_package_data=True, 
     license=package['license'], 
     description=package['description'] if 'description' in package else package_name, 
     install_requires=[
         'dash', 'dash-html-components', 'dash_renderer'
     ] 
 ) 

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:19 (19 by maintainers)

github_iconTop GitHub Comments

2reactions
alexcjohnsoncommented, Mar 12, 2019

An interesting discussion indeed. The app/library and abstract/specific distinctions seem like good starting points for thinking through what will actually happen when a random user installs and uses this software, but they’re not the end of the story.

An app, in this sense, means no further code is going to be connected to it, it’s just going to be run as is. In that case locking down the exact versions of all the pieces makes sense: that’s how the app was put together and tested, so stick with that.

dash-bio is fairly near the top of the stack, but it’s still a library in the sense that it integrates with the user’s code, which may independently import and use some of these same packages. We still test it with specific versions of all the dependents, so it would be nice if we could ensure that these same versions will always be used by everyone using it, but we can’t, at least not in Python, where a given package can only have a single version in a given environment (as opposed to JS where the recursive node_modules structure allows each package to use its own versions of dependents… but that has its own problems!). So to play nice with our users’ environments, we want to be flexible with versions of these dependencies.

That’s fine for things like pandas which is widely used and (presumably) stable enough that whatever version a user has already will very likely work for us too. But for dash it’s not fine: dash and dash-bio are being developed in tandem, we know there are breaking changes that preclude earlier versions, and it’s completely reasonable for us to require users to upgrade dash when they upgrade dash-bio. So pandas is abstract, dash is specific, and every other dependent should be evaluated on a similar basis.

2reactions
mkcorcommented, Mar 12, 2019

Hi @xhlulu,

Thanks for bringing this up. It’s probably okay to let dependencies be that ‘abstract’ in the setup.py file, although Dash Bio is more of an app than a library… For a discussion on this, please read: https://caremad.io/posts/2013/07/setup-vs-requirement/)

In any case, I would make sense to specify sklearn>=0.20.1 at least in the requirements.txt file. Cc’ing @shammamah here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why python package is installed with dash in its name?
When I run command python setup.py install , the package is installed with the name ... How can I make installation with right...
Read more >
Part 1. Installation | Dash for Python Documentation | Plotly
Dash Installation. In your terminal, install dash . pip install dash. This also brings along the plotly graphing library. This library is under...
Read more >
Specifying Your Project's Version - Setuptools
Setuptools can work well with most versioning schemes. ... Pre-release tags make a version be considered older than the version they are appended...
Read more >
Minimal package layout
Minimal package layout¶. To start off, we will take a look at the minimal set of files you will need to create an...
Read more >
dash.py · PyPI
Create python docs for dash easily. ... dash.py 0.2.1. pip install dash.py ... Dash.py is a tool that helps you install python documents...
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