dotbot icon indicating copy to clipboard operation
dotbot copied to clipboard

Add support for Windows and Cygwin

Open kurtmckee opened this issue 2 years ago • 4 comments

This PR introduces the following changes:

  • Add full support for Windows Powershell (CPython 3.8+) and Cygwin (CPython 2.7+, PyPy 2.7, and PyPy 3.9).
  • Migrate all existing unit tests from bash to Python.
  • Isolate all unit test filesystem interactions so they run entirely in a temporary directory. This includes verification that files are not being opened or created outside the temporary directory.
  • Test dotbot in CI on Linux, MacOS, and Windows, across all supported CPython and PyPy versions.
  • Add code coverage reports when running locally. This includes summary output at the CLI and generated HTML reports in htmlcov/.
  • Document how to run the unit tests locally, including environment setup.

The changes have been tested on these platforms:

  • Windows Powershell (locally, and in CI)
  • Linux (locally, and in CI)
  • Cygwin (locally)
  • MacOS (in CI)

Closes #102 Closes #307 Closes #309

kurtmckee avatar May 18 '22 12:05 kurtmckee

I am excited to see the new testing framework in action - it was always challenging to develop tests for new features. Thanks for the efforts @kurtmckee

eengstrom avatar May 18 '22 12:05 eengstrom

This looks like a huge improvement for dotbot on Windows, and I believe it will fix an issue I'm seeing that is closely related to #307. Thank you very much for all the work!

rgwood avatar Jun 06 '22 04:06 rgwood

Thank you for this PR, looks awesome! I will take a closer look and give feedback / merge soon.

anishathalye avatar Jun 06 '22 18:06 anishathalye

Thanks all for the feedback!

@anishathalye Please let me know if you see anything that needs adjusting. I'm happy to make changes. Thanks for your work on dotbot, and for reviewing this PR!

kurtmckee avatar Jun 06 '22 19:06 kurtmckee

@anishathalye I've ported the recent repo changes over to keep this PR up-to-date. The latest commit resolves the associated merge conflicts.

kurtmckee avatar Dec 16 '22 19:12 kurtmckee

This is beautiful, very thoroughly done. Thank you so much! And thank you for your patience, it took me forever to get around to looking at this.

anishathalye avatar Dec 17 '22 19:12 anishathalye

You're welcome, and thanks for all of your work on dotbot! 😀

kurtmckee avatar Dec 18 '22 00:12 kurtmckee