Skip to content
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

Use shutil.rmtree over shelling out to rm -rf in noxfile #519

Merged
merged 1 commit into from
Dec 22, 2021
Merged

Use shutil.rmtree over shelling out to rm -rf in noxfile #519

merged 1 commit into from
Dec 22, 2021

Conversation

FollowTheProcess
Copy link
Collaborator

I was looking through the older issues to try and find the low hanging fruit to close off and found #298.

This PR addresses point 1:

  1. Change rm -rf to shutil.rmtree.

I did some digging around points 2 and 3, it would seem that point 2 at least has been resolved anyway (see here).

  1. Change the Python version to 3.7 because sphinx-autobuild, which relies on tornado, no longer works on Windows on 3.8.

Point 3 I'm not too sure and I don't have access to a Windows machine to easily test but since we build the official project docs in an ubuntu image on CI I don't see a major issue here?

  1. Sphinx fails to follow the reference to changelog and contributing.

Unrelated, but I also noticed that on my machine (macos, python 3.10) running bare nox results in ugly looking failures because it tries to run conda-tests and I don't have conda installed. A simple switch should fix this:

nox.options.sessions = ["tests", "cover", "blacken", "lint", "docs"]
if shutil.which("conda"):
    nox.options.sessions.append("conda_tests")

I'll raise that in a separate issue/PR though to keep things clean 👍🏻

Copy link
Collaborator

@cjolowicz cjolowicz left a comment

Choose a reason for hiding this comment

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

LGTM :)

@FollowTheProcess FollowTheProcess merged commit f4037b2 into wntrblm:main Dec 22, 2021
@FollowTheProcess FollowTheProcess deleted the use-rmtree-over-rmrf branch December 22, 2021 17:35
@cjolowicz
Copy link
Collaborator

Point 3 I'm not too sure and I don't have access to a Windows machine to easily test but since we build the official project docs in an ubuntu image on CI I don't see a major issue here?

  1. Sphinx fails to follow the reference to changelog and contributing.

@FollowTheProcess I'm wondering if this problem can be solved by enabling symlink support on Windows?

It would be nice to allow contributors on Windows to build the docs without too much hassle.

@FollowTheProcess
Copy link
Collaborator Author

@cjolowicz Ahh I see it's because those documents are symlinked into the docs? I'm not sure to be honest, I haven't been on a Windows machine for a long time!

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

Successfully merging this pull request may close these issues.

Update noxfile.py to have better support for Windows
2 participants