-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add jupyter-book #12516
Add jupyter-book #12516
Conversation
just in case someone else does it first |
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
- sphinx_book_theme >=0.0.34 | ||
- sphinx_togglebutton | ||
- sphinxcontrib-bibtex | ||
|
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.
It might also be nice to add outputs to support capturing the pdf output target... e.g. jupyter-book-pdf
...
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.
Can you explain this further thanks, I'm not quite sure what added benefit this brings?
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.
Conda doesn't support the [extras]
section that pip does (which ends up being kinda weird, anyway, as it isn't respected by pip check
, nor will extra pins be taking into account for later solves, but anyway...) so if folk want the pdf output option (which is great) they'll get the nastygram about installing pypetteer
, etc. If a lot of people want pdf, this might be a sensible default, but that toolchain has problems of its own (downloading chromium at runtime), so an easy out would be useful
concretely, there could be a jupyter-book-core
, which contains all the hard dependencies, and a jupyter-book-webpdf
which depends on -core
and pypetteer
(with the appropriate version), while jupyter-book
could depend on -core
and -pdf
.
outputs:
- name: jupyter-book
requirements:
run:
- jupyter-book-core ={{ version }}
- jupyter-book-webpdf ={{ version }}
- name: jupyter-book-core
requirements:
run: # all the reqs
- name: jupyter-book-webpdf
requirements:
run:
- jupyter-book-core ={{ version }}
- pypeteer
Of course, this would be better if there was an nbformat-webpdf
we could depend on... but the run_constrained
will at least take care of the version, so the pin wouldn't have to track here.
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.
Oh yeh ta I forgot that was under outputs
. I do something similar on another project https://github.com/conda-forge/aiida-core-feedstock/blob/master/recipe/meta.yaml
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.
yeah, outputs are kinda gross, but the best we have today...
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 good to me, and would add some nice flexibility.
Might this need a rerender now that @conda-forge-admin please rerender |
ha, wait this is @conda-forge-admin please restart ci failing that, just closing and re-opening it would probably work |
Thanks @conda-forge-admin 😆 |
Looks like there's just a touch of
|
Looks like upstream add yet another dependency on the https://github.com/russellballestrini/nested-lookup It's public domain, but doesn't have any description of its intent in-repo: |
Oof, I didn’t realize that it didn’t have a license. If that is a big dealbreaker we can try to disentangle the dependency from it, it’s not a huge dep in terms of our use, but it’d take a bit of work |
out of interest, what top-level dependency does this dependency come from? |
It’s added in Jupyter book, I believe by this pr jupyter-book/jupyter-book#1123 not sure it was the right decision to include it as a dep 🤔 |
Well, kinda... there are well-known examples of stuff that is public domain (e.g.
Yeah, turns out it's kind of an odd duck to solve... something like |
Note - it sounds like the author does not want to license it as anything other than "public domain", so I think these are our options if they won't add a license:
|
if jupyter-book doesn't want to be part of products, that's fine, but then the interest from folks who do like to ship products (such as myself, or day job alter ego) just dropped down to close to zero in helping maintain/improve it. Also: a number of the dependencies are lagging behind significantly on the conda-forge feedstocks. Once this feedstock is in, it would be possible to have a number of maintainers in that group (e.g. It's also possible to add automerge, which will... automatically merge PRs created by the bot for new versions. I am very leery of this unless the full test suite of such a feedstock is being run, with a coverage threshold, |
I'd say do this; there is a very small number of code lines anyway, so not worth dealing with an author that does not want to add a simple license (also no other issues have been addressed recently.) |
I should have noted my preferences too - I think i prefer option 1, I suspect the amount of time we've all spent on figuring out this license issue is more than the time itd take to just write a recursive lookup function with just the functionality we need. Thanks for clarifying the other downsides of points 2 and 3, that sounds reasonable to me! And for the group of maintainers ,that sounds great to me. |
|
We're not using automerge |
Right, but my point is: running more robust tests as a downstream distribution occasionally discovers issues that upstreams won't find, as their test setups either pin down to point releases, don't run on exotic architectures, etc. This helps lead to upstream PRs, which sometimes starts changing peoples' minds about conda-forge as somehow "coming for your ecosystem." We're just a bunch of nerds that want all our software to work well together for SCIENCE, with as little manual intervention (or redistribution woes) as possible. |
this is what i came up with. It's very well insufficient, but a starting point: import typing
def find_values(key: str, obj: typing.Any) -> typing.Iterator[typing.Any]:
"""find all of `key` in a nested JSON-compatible object
"""
if obj is None or isinstance(obj, (str, int, bool, float)):
return
elif isinstance(obj, dict):
if key in obj:
yield obj[key]
for child in obj.values():
yield from find_values(key, child)
elif isinstance(obj, list):
for child in obj:
yield from find_values(key, child) If we want to get pedantic: i make the above available under the terms of the BSD-3-Clause license, blah, blah. |
Yeh looks good, just make a PR to jupyter-book 👍 |
I came across this when trying a |
Here is an attempt: #13918 Maybe it will get merged as is. |
The nested-lookup feedstock is now available under an MIT license. |
Thanks |
I'm happy with whatever y'all think is a reasonable-enough practice, I don't know much about licensing :-) |
I've opened this PR: #13989 which builds on this one and builds jupyter-book 0.8.2. FYI |
We merged in a feedstock for 0.8.2. Once it is live, feel free to iterate on that to add newer versions or the outputs as @bollwyvl suggested. But hopefully that version can at least get folks started using this with conda. Thanks! |
Huzzah!
The other thing mentioned was PRing @conda-forge/jupyter-book as a
maintainer on all the otherwise-novel-to-cf deps, which should help keep
the machine running.
|
hooray! @bollwyvl - is that actionable on our end? I don't understand most of those words 😅 |
Checklist
url
) rather than a repo (e.g.git_url
) is used in your recipe (see here for more details)