Skip to content

fix for building docs on Windows #61686

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
Jun 22, 2025

Conversation

Dr-Irv
Copy link
Contributor

@Dr-Irv Dr-Irv commented Jun 22, 2025

I was having two issues with building the docs on Windows.

  1. Building a single page with --single was very slow because it was reading in lots of files. So there is a fix in conf.py that changes any backslashes to / in the paths. Probably a better fix is to not be using os.join and use pathlib, but that's a larger change.
  2. For BUG: Docs won't build (Unexpected exception in doc\source\user_guide\enhancingperf.rst) #60149, there are 2 issues with building enhancingperf.rst:

@@ -83,7 +83,7 @@ using the `prun ipython magic function <https://ipython.readthedocs.io/en/stable
.. ipython:: python

# most time consuming 4 calls
%prun -l 4 df.apply(lambda x: integrate_f(x["a"], x["b"], x["N"]), axis=1) # noqa E999
%prun -l 4 df.apply(lambda x: integrate_f(x['a'], x['b'], x['N']), axis=1) # noqa E999
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E999 has been removed. Remove the comment?

https://docs.astral.sh/ruff/rules/syntax-error/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -204,7 +204,7 @@ calls are needed to utilize this function.

.. ipython:: python

%timeit apply_integrate_f(df["a"].to_numpy(), df["b"].to_numpy(), df["N"].to_numpy())
%timeit apply_integrate_f(df['a'].to_numpy(), df['b'].to_numpy(), df['N'].astype(int).to_numpy())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you instead create this as a 64-bit on L53 above?

"N": np.random.randint(100, 1000, (1000), dtype="int64"),

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@rhshadrach rhshadrach added Docs Windows Windows OS labels Jun 22, 2025
Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rhshadrach rhshadrach added this to the 3.0 milestone Jun 22, 2025
@rhshadrach rhshadrach merged commit 1da0d02 into pandas-dev:main Jun 22, 2025
8 checks passed
@rhshadrach
Copy link
Member

Thanks @Dr-Irv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Windows Windows OS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Docs won't build (Unexpected exception in doc\source\user_guide\enhancingperf.rst)
2 participants