-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Ability to pin Sphinx and friends in a conda environment #3829
Comments
In my comment #3769 (comment) I mentioned that the problem is the order of the commands executed. RTD first:
The last step that installs these packages will UPGRADE them if they are already installed in the conda env. I've been checking the option
(output cropped) I don't have too much knowledge about Otherwise, we will need to think in another solution. For example, "remove that command" from the flow, which involves force the user to always add those default packages (sphinx, mock, pillow, rtd_sphinx_theme) to their YAML file, which I think it's not a good "solution". cc @juanlu001, @willingc do you know if there is an option in |
cc @kalefranz |
Until conda/conda#6845 was filed, I hadn't recognized that we didn't cover that use case. Right now, unfortunately, there's no good way :( |
This is the relevant part of the code Where conda is installed first and then rtd installs its pip requirements @humitos isn't an option pin the sphinx version like is done with the python environment? |
Kind of related to #1364 |
@stsewd we decided to unpin them some time ago because we had incompatibility problems with conda. Check this PR #2876 I think what we are doing now is correct, but we need I'm marking this as blocked on conda/conda#6845 for now (when that feature gets implemented I think this will be fixed automatically in RTD without code changes) If there are someone with a better solution for the general problem that works in these different scenarios, we should probably implement it --but for now, we don't have a better solution :( |
@stsewd does this mean you can't pin sphinx at the moment (sorry am not quite understanding it) |
@wkerzendorf no, you can't. If you pin sphinx it will be updated by rtd later, this issue depends on conda/conda#6845 |
That’s unfortunate- any idea for some work around. Could I revert to pip or does that also not work. Could RTD just change the order of when which conda is called |
@wkerzendorf you can do it with pip, this is only a conda problem. |
conda/conda#6845 should be resolved in conda 4.6 with conda/conda#7291 |
Any idea when this is coming out? |
Best estimate right now is to have 4.6 enter the beta stage in canary in six weeks, which would mean a release to defaults around six weeks after that.
…Sent from my iPhone
On May 17, 2018, at 4:55 PM, Wolfgang Kerzendorf ***@***.***> wrote:
Any idea when this is coming out?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@kalefranz I wonder what happens if you have Sphinx install in the pip section of the environment.yml. I'm on limited bandwidth right now or I would try it now. |
I don't think we add any type of |
This issue was closed in conda (implemented by conda/conda#7291) I suppose that we will need to wait for the next mini conda release that contains this feature and then:
|
Although the conda issue is already solved in code, it will be available in 4.6.0 which is unreleased at this time. I'd like to work on the PR to add/fix this once it's released. |
We run 3 steps when a project depends on conda. 1. create the whole environment based on user's YAML file 2. run `conda install` with our own dependencies 3. run `pip install` with some of our dependencies that are not published on conda repositories. This commit changes this to make it in just one step (at environment creation). To do this, it appends our own requirements to the `environment.yml` file under `dependencies` and `dependencies.pip` config (see https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#create-env-file-manually) It also shows the resulting `environment.yml` in the build output. This behavior is added behind a feature flag so we can test it first. This allow users to be able to pin their dependencies as they want without us upgrading them in the second step. Also, this should improve the build time, since dependencies resolution is done just once. Related to * #3829 * #5631
Hi everybody! This issue has been opened for a long time and we tried different ways to achieve it. Unfortunately, most of them failed and we found that Now, we deployed a new Feature Flag ( This feature is under a Feature Flag because it's not broadly tested yet and may need some extra work once we have more data on projects using it and having common issues. I'd be happy to enable this flag to any project that has been involved in this issue and get some feedback from you.
Please, let me know what are the projects you would like to enable these flags, and I will do it next week probably. Thanks you all for the support on this! |
I believe CQ is also suffering from this issue: https://readthedocs.org/projects/cadquery/builds/10978472/ CC: @jmwright |
@adam-urbanczyk Done! Let me know if there is any problem (better in a new issue or support email, so we don't notify all the people involved in this issue). Thanks! |
Just a note here, looks like the default conda channel has really old versions of sphinx and the rtd-theme. If you are going to pin your deps to an updated version, you should include the conda-forge channel (when doing using the We could also try to use that channel explicitly to install our deps, but I'm not sure if that could break something. But I think we should just always use the |
I just skimmed this thread to understand the current status of the issue, but still need a bit more time to read. For now, let me leave a quick answer to this one concern:
I think it's worth trying. Today I got confirmation on Twitter from @isuruf that the Just for future reference, the new (April 2020) Anaconda Inc. Terms of Service impose several restrictions on free of charge use of the |
Also switch to the = syntax to pull the latest bugfix release 3.11.*. Problems with the bulleted lists should have been fixed: readthedocs/readthedocs.org#8252 But conda environments don't work well when the users specifies sphinx and sphinx_rtd_theme: readthedocs/readthedocs.org#3829
Bulleted lists were not rendering properly. Apparently, this is an old bug (readthedocs/sphinx_rtd_theme#1115) that has recently resurfaced. The solution is to pin newer versions of sphinx and sphinx_rtd_theme (https://stackoverflow.com/questions/67542699/readthedocs-sphinx-not-rendering-bullet-list-from-rst-file/71069918#71069918). However, readthedocs conda build environment does not allow pinning: readthedocs/readthedocs.org#3829 Thus, the only solution is to convert to a requirements.txt build on readthedocs. While configuring this build, I also updated to the latest system image, python version, and to a non-deprecated name for the readthedocs configuration file (https://docs.readthedocs.io/en/stable/config-file/v2.html).
Is this issue still valid? I think we have removed |
I think that this probably can be closed. @jakirkham? |
Also these days there’s https://docs.readthedocs.io/en/stable/config-file/v2.html#build-tools-python to choose between conda and mamba |
OK, thanks for the feedback here. I think we can close this issue then, but feel free to re-open or ping me here if you consider it shouldn't be closed. |
Details
Expected Result
We are currently pinning Sphinx with the expectation that RTD honors this pinning.
Actual Result
However it appears that RTD overrides our Sphinx pinning later, which is causing a different problem ( #3769 ).
cc @humitos
The text was updated successfully, but these errors were encountered: