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

Adds code quality #168

Merged
merged 9 commits into from
Jan 24, 2024
Merged

Adds code quality #168

merged 9 commits into from
Jan 24, 2024

Conversation

edbeeching
Copy link
Owner

@edbeeching edbeeching commented Jan 23, 2024

It is about time we have some code quality standards on the project. At least for the python part. This PR adds a github action to test for quality and also formats all files to meet this standard.

The only downside is that it makes blaming harder as it touches almost all files.

@edbeeching edbeeching marked this pull request as ready for review January 23, 2024 21:26
@edbeeching edbeeching requested a review from Ivan-267 January 23, 2024 21:27
@Ivan-267
Copy link
Collaborator

Ivan-267 commented Jan 23, 2024

This is a good idea. Just as a note, make doesn't work directly on Windows, but running the commands manually did work.

Either a script can be written for those commands on Windows, and/or some compatibility tool can be installed to allow using Make (e.g. I just locally added the style/quality lines to a .bat file I called StyleQuality.bat):

black --line-length 120 --target-version py310 tests godot_rl examples
isort -w 120 tests godot_rl examples
black --check --line-length 120 --target-version py310 tests godot_rl examples
isort -w 120 --check-only tests godot_rl examples
flake8 --max-line-length 120 tests godot_rl examples

Running that file from powershell within a conda env works.

@edbeeching edbeeching merged commit 39960d8 into main Jan 24, 2024
13 checks passed
@edbeeching edbeeching deleted the code-quality branch January 24, 2024 20:41
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