Skip to content

Fix doc build #57821

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 6 commits into from
Mar 12, 2024
Merged

Fix doc build #57821

merged 6 commits into from
Mar 12, 2024

Conversation

tqa236
Copy link
Contributor

@tqa236 tqa236 commented Mar 12, 2024

@mrocklin would you mind taking a look at this PR? I think it'll fix the doc build on main

@tqa236
Copy link
Contributor Author

tqa236 commented Mar 12, 2024

Sorry for the noise, the error seems to be more complicated than an error in a single file, will try something else

@tqa236 tqa236 marked this pull request as draft March 12, 2024 18:18
@mroeschke
Copy link
Member

Could you add dask-expr to environment.yml. I think that's the error from what I get locally

WARNING: ources... [ 95%] user_guide/scale
>>>-------------------------------------------------------------------------
Exception in /doc/source/user_guide/scale.rst at block ending on line None
Specify :okexcept: as an option in the ipython:: block to suppress this message
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
File /opt/miniconda3/envs/pandas-dev/lib/python3.10/site-packages/dask/dataframe/__init__.py:22, in _dask_expr_enabled()
     21 try:
---> 22     import dask_expr  # noqa: F401
     23 except ImportError:

ModuleNotFoundError: No module named 'dask_expr'

During handling of the above exception, another exception occurred:

ValueError                                Traceback (most recent call last)
Cell In[33], line 1
----> 1 import dask.dataframe as dd

File /opt/miniconda3/envs/pandas-dev/lib/python3.10/site-packages/dask/dataframe/__init__.py:87
     84 except ImportError:
     85     pass
---> 87 if _dask_expr_enabled():
     88     import dask_expr as dd
     90     # trigger loading of dask-expr which will in-turn import dask.dataframe and run remainder
     91     # of this module's init updating attributes to be dask-expr
     92     # note: needs reload, incase dask-expr imported before dask.dataframe; works fine otherwise

File /opt/miniconda3/envs/pandas-dev/lib/python3.10/site-packages/dask/dataframe/__init__.py:24, in _dask_expr_enabled()
     22     import dask_expr  # noqa: F401
     23 except ImportError:
---> 24     raise ValueError("Must install dask-expr to activate query planning.")
     25 return True

ValueError: Must install dask-expr to activate query planning.

<<<-------------------------------------------------------------------------

@tqa236
Copy link
Contributor Author

tqa236 commented Mar 12, 2024

@mroeschke I added the package. If you don't mind me asking, is the reason "single file" build works for me locally after fixing the pathlib error is because I use an old environment?

Is there an easy way to only test with the latest environment, or the one that's the same as CI?

@mroeschke
Copy link
Member

If you don't mind me asking, is the reason "single file" build works for me locally after fixing the pathlib error is because I use an old environment?

Are you referring to build a doc build or a single doc page? I'm not sure if it has to do with environment, but the CI runs the doc build over all files, so building a single file of the docs is not equivalent to what is run on the CI

@tqa236
Copy link
Contributor Author

tqa236 commented Mar 12, 2024

@mroeschke I think I would like to know how to update the local environment so that it'll use the latest versions as in the CI.

Currently I have dask==2024.2.1 locally, but I think the CI fails because of the new release dask=2024.3.0

Looking at the commit history, some changes are directly related to dask-expr so it's probably the reason for the failed build on CI, but I can't reproduce locally because of my old dask version

@mroeschke
Copy link
Member

Ah I see. In that case, if you're using a conda environment, you can run conda env update -f environment.yml and it should update the dependency versions as well. If not, you can just recreate the environment.

@tqa236 tqa236 marked this pull request as ready for review March 12, 2024 19:16
@tqa236
Copy link
Contributor Author

tqa236 commented Mar 12, 2024

@mroeschke thank you for your debugging and the update command. I think this PR should be ready for review, as the "doc build" job passes in the previous commit

@mroeschke mroeschke added the Docs label Mar 12, 2024
@mroeschke mroeschke added this to the 2.2.2 milestone Mar 12, 2024
@mroeschke mroeschke merged commit b150258 into pandas-dev:main Mar 12, 2024
50 of 51 checks passed
@mroeschke
Copy link
Member

Thanks for the quick fix here @tqa236

meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Mar 12, 2024
@tqa236 tqa236 deleted the fix-doc-build branch March 12, 2024 20:06
mroeschke pushed a commit that referenced this pull request Mar 12, 2024
Backport PR #57821: Fix doc build

Co-authored-by: Trinh Quoc Anh <[email protected]>
pmhatre1 pushed a commit to pmhatre1/pandas-pmhatre1 that referenced this pull request May 7, 2024
* Fix doc build

* Add additional package

* Add additional package

* Add additional package

* Update doc/source/user_guide/scale.rst

Co-authored-by: Matthew Roeschke <[email protected]>

---------

Co-authored-by: Matthew Roeschke <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants