Skip to content

DOC [PST] fix lock files and add sphinx-design #28379

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

Merged
merged 2 commits into from
Feb 8, 2024

Conversation

Charlie-XIAO
Copy link
Contributor

@Charlie-XIAO Charlie-XIAO commented Feb 7, 2024

Please note that this PR targets the new_web_theme branch!

@adrinjalali you may want to look at the discussion in #28084 (comment). This PR is simply updating the lock files, because the dependencies for pydata-sphinx-theme were removed due to preferring the lock files on main when resolving conflicts. I also added sphinx-design because I think there is no need to leave it for a separate PR.

For details how things are failing, see the CircleCI log.

@Charlie-XIAO Charlie-XIAO changed the title DOC [PST] DOC [PST] fix lock files and add sphinx-design Feb 7, 2024
Copy link

github-actions bot commented Feb 7, 2024

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 98ca02b. Link to the linter CI: here

@adrinjalali
Copy link
Member

@lesteve the issue is that with a good frequency theme related PRs are merged into main, for good reason. They improve things anyway, and makes merging this branch to main later much easier.

I just merged main into the branch, and had to deal with conflicts, which I just took files from main, which then breaks this branch.

I don't think there's a reasonable way to merge conflicts on lock files. Handling conflicts on lock files is like handling conflicts on a pdf or a .ps file. Sure they're text, technically, but they're far from trivial. So I would rather have dependencies on main, if they don't interfere with the way the website is rendered.

@lesteve
Copy link
Member

lesteve commented Feb 7, 2024

I think the approach for solving conflicts could be something like this (untested): #28084 (comment). Once we find the magical incantation this can be put in a .md file in the branch so that we copy and paste it each time we need.

The basic idea would be something like this:

  • solve the conflict arbitrarily git checkout --theirs (or --ours I never know)
  • rerun the update environment and lock files script to actually get the changes you want

If that is too complicated or painful because we want to update the sphinx-pydata-theme branch very often then I am fine with having the changes in main.

It could also be the case that you realise you need another dependency and then you need to do a PR to main and then merge main into your branch instead of keep working into your branch. I am not sure I find that simpler but oh well I am happy to do it if people working on it find it easier ...

Side-comment: I am not a huge fan that the branch name new_web_theme and the url prefix _spt_preview are very different but oh well ...

@lesteve
Copy link
Member

lesteve commented Feb 7, 2024

@Charlie-XIAO just curious, do you actually care about doc-min-dependencies build? If I were you I would just not bother with it for now and maybe find the easiest way to spend as little time with it. The doc-min-dependencies is low-priority and can be sorted out towards the end.

For example maybe something like this would work:

diff --git a/.circleci/config.yml b/.circleci/config.yml
index 79d0b1064b..6d91f8556e 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -35,7 +35,7 @@ jobs:
           keys:
             - doc-min-deps-ccache-{{ .Branch }}
             - doc-min-deps-ccache
-      - run: ./build_tools/circle/build_doc.sh
+      - run: echo "skip doc-min-dependencies for now"
       - save_cache:
           key: doc-min-deps-ccache-{{ .Branch }}-{{ .BuildNum }}
           paths:

@Charlie-XIAO
Copy link
Contributor Author

Charlie-XIAO commented Feb 7, 2024

Sorry if I misunderstood what you meant @lesteve. Even if I do not care about doc-min-dependencies don't we still need to make doc work so that we can deploy? Or did you mean that I should only fix for doc but not for doc-min-dependencies?

just curious, do you actually care about doc-min-dependencies build?

And you're right: I do not really care about doc-min-dependencies. I only need to make deploy to work, which relies on doc if I'm not mistaken.

@lesteve
Copy link
Member

lesteve commented Feb 7, 2024

And you're right: I do not really care about doc-min-dependencies. I only need to make deploy to work, which relies on doc if I'm not mistaken.

Yes exactly deploy only depends on doc, in other words, doc-min-dependencies only exist to make sure examples run fine with the minimum supported versions but doc-min-dependencies is never deployed. By having a quick green CI for doc-min-dependencies like I suggested in #28379 (comment), you would avoid the need to update doc-min-dependencies lock-file

@Charlie-XIAO
Copy link
Contributor Author

Charlie-XIAO commented Feb 8, 2024

If I were you I would just not bother with it for now and maybe find the easiest way to spend as little time with it. The doc-min-dependencies is low-priority and can be sorted out towards the end.

So, this is assuming that we will add dependencies to main right? Then to minimize the changes to main you want me to only add to doc but not doc-min-dependencies. Then on the new_web_theme branch I should ignore the doc-min-dependency workflow to make CI pass.

If this is the correct interpretation, I'm okay with it. @lesteve after you confirm I can open a PR towards main for it.

@lesteve
Copy link
Member

lesteve commented Feb 8, 2024

So, this is assuming that we will add dependencies to main right?

I don't think this is needed.

What I am suggesting is that in new_web_theme you do a quick pass for doc-min-dependencies for now. This will allow you to focus on the important things which is how the doc renders with pydata-sphinx-theme and getting feed-back from maintainers.

Longer-term, once all the other things have been sorted out, feed-back from maintainers has been gathered and there is some consensus, doing the doc-min-dependencies work in your new_web_theme will be a small amount of work.

In particular, this avoids updating lock-files for doc-min-dependencies and having to solve conflicts for something that is super low-priority compared to all the other things in the pydata-sphinx-theme work.

@Charlie-XIAO
Copy link
Contributor Author

Charlie-XIAO commented Feb 8, 2024

If you are talking about new_web_theme, I'm okay with bypassing doc-min-dependencies but I just found it unnecessary.

(1) doc-min-dependencies is not causing problem (CI is passing for this PR), so I don't see the necessity for doing a quick pass right now. It is not too late to bypass it when it causes a problem that can't be solved with a simple fix.

(2) Updating lock files is essentially running python build_tools/update_environments_and_lock_files.py --select-build "doc". It is only the difference of passing "doc$" or "doc", and maybe a little bit of difference in running time. Thus bypassing doc-min-dependencies does not really simplify things, at least from my perspective.

But well I'm not strongly against this, so I have pushed the commit 98ca02b. @lesteve please check if this is what you meant.

@lesteve
Copy link
Member

lesteve commented Feb 8, 2024

I am mostly trying to make your life easier by having to update and fix conflicts in one lock-file instead of two ...

Your change looks fine, you disabled the doc-min-dependencies build entirely which works.

@Charlie-XIAO
Copy link
Contributor Author

Charlie-XIAO commented Feb 8, 2024

Thanks @lesteve, and I'm sorry for any of my misunderstanding.

By the way, may I ask why we ship these generated lock files with the repository? I think I have seen a related issue somewhere but I cannot find it now.

@lesteve lesteve merged commit e8025fa into scikit-learn:new_web_theme Feb 8, 2024
@Charlie-XIAO Charlie-XIAO deleted the pydata-dep branch February 8, 2024 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants