-
Notifications
You must be signed in to change notification settings - Fork 163
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
HoloViz: the full Holoviews + Panel + Param + Colorcet stack #1063
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a great chunk of work, thanks!
I'm not familiar with HoloViz so I'll let someone else approve/merge but I've left some general Python packaging tips. They're mostly nit-picks but I thought I'd say them so you know -- a lot of it was a good excuse to link to helpful docs which we need to better advertise though.
Let me know if you have any questions but otherwise I'll leave it to the experts. Cheers!
EDIT: If you can for any easy ones, please add tests with distutils_enable_tests. If they're not, cool, we'll do it another time (or not bother -- some upstreams don't really intend for downstreams to run them). Sometimes upstreams end up saying pytest but anything will work - no idea if it's the same with nose though.
KEYWORDS="~amd64 ~x86" | ||
IUSE="" | ||
|
||
BDEPEND=">=dev-python/setuptools-30.3.0[${PYTHON_USEDEP}]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can avoid this, it's set by default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha. I thought that might be the case, but wasn't quite sure.
IUSE="" | ||
|
||
BDEPEND=">=dev-python/setuptools-30.3.0[${PYTHON_USEDEP}]" | ||
DEPEND=" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these needed at build time? (Sometimes the answer is yes, but it's often no if it's pure Python)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly, yes. setup.py
for HoloViz packages is more convoluted than expected (or needed, frankly). The Colorcet setup.py
contains this snippet, for example:
import pyct.build
def get_setup_version(reponame):
...
try:
from param import version
except:
version = None
if version is not None:
return version.Version.setup_version(basepath, reponame, archive_commit="$Format:%h$")
else:
print("WARNING: param>=1.6.0 unavailable. If you are installing a package, this warning can safely be ignored. If you are creating a package or otherwise operating in a git repository, you should install param>=1.6.0.")
We could probably patch out the get_setup_version()
call and thus the install-time param
import, but... the pyct.build
system might dynamically hook into that import somehow.
Their build workflow looks suspiciously fragile to me, so it might be better to just leave this as is.
LICENSE="BSD" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~x86" | ||
IUSE="" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can drop empty IUSE (this is a nit, I just like giving people the link to PMS so they're aware of it - it's ok to keep it as-is).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Nice nitpick, too. I'm all for dropping extraneous lines.
<email>sci@gentoo.org</email> | ||
<name>Gentoo Science Project</name> | ||
</maintainer> | ||
</pkgmetadata> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add <stabilize-allarches/>
if it's pure Python (no compilation and so on)?
(Applies to all packages where appropriate, as with most of these comments - I'l try make clear if it's just one.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I'll do so. Shamefully, this is the first I've heard of <stabilize-allarches/>
. I will now use that everywhere.
There's an interesting parallel here with conda-forge
, the automated packaging system for third-party Anaconda packages. conda-forge
recipes support a similar noarch: python
directive:
Noarch packages are packages that are not architecture specific and therefore only have to be built once. Declaring these packages as
noarch
in thebuild
section of themeta.yaml
reduces shared CI resources. Therefore all packages that qualify to benoarch packages
, should be declared as such.
KEYWORDS="~amd64 ~x86" | ||
IUSE="" | ||
|
||
BDEPEND=">=dev-python/setuptools-30.3.0[${PYTHON_USEDEP}]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can drop this and IUSE as DISTUTILS_USE_SETUPTOOLS=rdepend
includes BDEPEND.
(This isn't true for the RDEPEND variable in general, it's just what the eclass does.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You got it. 👍
KEYWORDS="~amd64 ~x86" | ||
IUSE="" | ||
|
||
DEPEND=">=dev-python/param-1.7.0[${PYTHON_USEDEP}]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely needed at build time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely. I solemnly swear it on my fat Maine Coon cat.
dev-python/pyct/pyct-0.4.8.ebuild
Outdated
LICENSE="BSD" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~x86" | ||
IUSE="" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So long, IUSE
. We'll miss you.
<email>sci@gentoo.org</email> | ||
<name>Gentoo Science Project</name> | ||
</maintainer> | ||
</pkgmetadata> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ALLARCHES if applicable, remote-ids, maintain yourself if interested?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, yes, I'd rather stab myself with a plastic spork.
LICENSE="BSD" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~x86" | ||
IUSE="" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're dead meat, IUSE
!
<email>sci@gentoo.org</email> | ||
<name>Gentoo Science Project</name> | ||
</maintainer> | ||
</pkgmetadata> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allarches if appropriate, remote-ids, maintain yourself if interested?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, yes, spork-stabbing.
Thanks for the incisive nitpicks, @thesamesam. I have now levelled up my Python packaging and am grateful for it.
...you're right. I should do that. Parsing the 100-line Let's give that a go. 👍 |
This looks good @leycec 👍 While you're changing things anyway, could you please add a |
Repoman is telling me that:
Are you sure this works as intended, because the ebuild manual does not list 'network-sandbox' as a valid entry for the RESTRICT variable? Usually if the tests require network access, RESTRICT="test" is added to just disable the tests.
We should mask |
add dev-python/{colorcet,holoviews,panel,param,pyct,pyviz_comms} Signed-off-by: Cecil Curry <leycec@gmail.com>
Done and done. Commit 5e52673 resolves all the bad things, including:
That should make all the bad things go away. Thanks for the prompt, detailed, and overly generous review, @thesamesam and @AndrewAmmerlaan. I appreciate it. Really. Also, GURU looks hot – filling a void left by the long-dead Sunrise overlay. Thanks for maintaining that on behalf of the community, @AndrewAmmerlaan. ❤️ The Horror of "RESTRICT=network-sandbox"For those curious about
Here's why we needed that before but don't now. For future posterity (and my future self when I bump into this again), here's what Panel is doing:
I've verified this works by serving a toy Panel app. It works without having to run that one-liner, which means that Panel is wrong when it thinks its bundled Node.js packages are desynchronized in some way with the currently installed version of Bokeh. We suspect Panel developers were trying to minimize issue churn on their bug tracker by forcing Node.js rebuilds on each Panel installation, which had the unintended side effect of preventing Panel from being packaged by any system package manager. Woops. We should file an upstream issue. Sadly, I am lazy. |
Done and done. Commit 5e52673 resolves all the bad things, including:
That should make all the bad things go away. Thanks for the prompt, detailed, and overly generous review, @thesamesam and @AndrewAmmerlaan. I appreciate it. Really. Also, GURU looks hot – filling a void left by the long-dead Sunrise overlay. Thanks for maintaining that on behalf of the community, @AndrewAmmerlaan. ❤️ The Horror of "RESTRICT=network-sandbox"For those curious about
Here's why we needed that before but don't now. For future posterity (and my future self when I bump into this again), here's what Panel is doing:
I've verified this works by serving a toy Panel app. It works without having to run that one-liner, which means that Panel is wrong when it thinks its bundled Node.js packages are desynchronized in some way with the currently installed version of Bokeh. We suspect Panel developers were trying to minimize issue churn on their bug tracker by forcing Node.js rebuilds on each Panel installation, which had the unintended side effect of preventing Panel from being packaged by any system package manager. Woops. We should file an upstream issue. Sadly, I am lazy. |
Thanks @leycec |
Thanks! Just ping me (@leycec) when these need bumping. 👍 |
@philippjfr: Gentoo Linux now quasi-officially packages most of HoloViz. Just thought you'd like to know. 😉 |
Thanks, really appreciate your efforts here. I'm not following all the details here but let me know if you need me to explain any of the reasoning behind some of the packaging decisions in Panel in particular. |
Sure thing! I'd intended to open a Panels issue with a few feature requests to simplify packaging by system package managers (e.g., The big "pain point" for us are Ideally, we'd like Panel's
Do you think either of those two things might be feasible? If not, no worries. We currently patch Panel's Lastly, it'd also be great if Panel's
That installs Panel's Jupyter configuration into
The above
...or something. We leave this in your capable hands. Thanks for all the data visualization, Phil. HoloViz rocks the science sphere. |
This PR finalizes Gentoo support for most of the HoloViz data visualization stack, including:
Thankfully, this overlay already provides the core Bokeh server required by those packages. That makes life easy for everyone.
Tests are omitted. Some of those packages still test with
nose
, which is dead and soon to be last-rited. More importantly, supporting tests would've been so time-prohibitive I just never would've done it. The tests for HoloViews and Panel are... really involved. If no one objects, I'd like to defer that to later. 🙏Thanks for a decade of scientific packaging, everyone – especially @AndrewAmmerlaan for his constant dedication to the cause.