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

Support Windows for pre-commit hook usage #165

Merged
merged 22 commits into from
Aug 28, 2023
Merged

Conversation

CasperWA
Copy link
Collaborator

@CasperWA CasperWA commented Aug 21, 2023

Remove any OS-specific commands in order to support Windows.

Fixes #160

Several CI test jobs have been added to run all pre-commit hooks in both Linux and Windows environments, furthermore all pytest jobs have been extended to include Windows environments.

The expanded test-space have revealed some weaknesses regarding path-handling, which have been fixed through the usage of pathlib.PurePosixPath. This ensures the user inputs should still match what is explained in the documentation for paths, namely that one should use POSIX (Linux) type path strings (with forward slashes (/) and excluding drives and similar).

Finally, any Linux-specific commands used through invoke.context.run(), which calls the OS shell, have been removed in favor of a Pythonic approach. Note: It is still necessary that the git command can be run in the given shell where pre-commit is run.

@codecov
Copy link

codecov bot commented Aug 21, 2023

Codecov Report

Merging #165 (f502549) into main (fbd86e5) will decrease coverage by 0.19%.
The diff coverage is 59.37%.

@@            Coverage Diff             @@
##             main     #165      +/-   ##
==========================================
- Coverage   71.61%   71.42%   -0.19%     
==========================================
  Files           9        9              
  Lines         546      567      +21     
==========================================
+ Hits          391      405      +14     
- Misses        155      162       +7     
Files Changed Coverage Δ
ci_cd/tasks/docs_index.py 24.24% <25.00%> (+0.90%) ⬆️
ci_cd/tasks/api_reference_docs.py 64.58% <52.38%> (-0.84%) ⬇️
ci_cd/utils.py 94.48% <100.00%> (+0.32%) ⬆️

@CasperWA CasperWA marked this pull request as ready for review August 22, 2023 13:11
@CasperWA CasperWA requested a review from sygout August 22, 2023 13:11
@CasperWA CasperWA merged commit a056de7 into main Aug 28, 2023
16 of 18 checks passed
@CasperWA CasperWA deleted the cwa/fix-160-windows-support branch August 28, 2023 06:58
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.

Pre-commit for documentation not working on windows
2 participants