Skip to content

REF: Replace os.path with pathlib.Path in pandas_web.py #61604

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

iabhi4
Copy link
Contributor

@iabhi4 iabhi4 commented Jun 7, 2025

Replaces os.path with pathlib.Path in pandas_web.py, as suggested by @datapythonista in 61578. No functional changes, verified site generation remains correct

  • Ran pre-commit check

Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

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

Looks good, but we need to make everything that is a path a pathlib object when it's first created. Not create it as a string and cast it for every operation.

@iabhi4 iabhi4 force-pushed the refactor-pathlib-clean branch from d1a990f to 9492f87 Compare June 9, 2025 02:45
@iabhi4
Copy link
Contributor Author

iabhi4 commented Jun 9, 2025

Thanks for the review! updated to make sure all paths are created as Path early and used consistently. Removed redundant casts too.

Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

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

Looks good. Added few comments, but very nice clean up

@iabhi4 iabhi4 force-pushed the refactor-pathlib-clean branch from 9492f87 to e7a9b44 Compare June 9, 2025 20:09
@iabhi4
Copy link
Contributor Author

iabhi4 commented Jun 9, 2025

Addressed all the latest comments, switched to Path.rglob, cleaned up base_url, and ensured consistent Path usage. Let me know if anything else looks off, I also retested on local after the changes

@iabhi4 iabhi4 requested a review from datapythonista June 9, 2025 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants