From 69283d6c97ec284cb6e1a552d63c02038fcf458f Mon Sep 17 00:00:00 2001 From: "Gregory M. Kapfhammer" Date: Thu, 15 Sep 2022 17:12:42 -0400 Subject: [PATCH 1/7] fix: Use unicode symbols for icon in check_result more likely to render on Windows without error. --- gatorgrade/output/check_result.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gatorgrade/output/check_result.py b/gatorgrade/output/check_result.py index c9b091c0..18a9d12d 100644 --- a/gatorgrade/output/check_result.py +++ b/gatorgrade/output/check_result.py @@ -1,6 +1,11 @@ """Define check result class.""" + import rich +import unicodedata + +UTF_ENCODE = "utf-8" + class CheckResult: # pylint: disable=too-few-public-methods """Represent the result of running a check.""" @@ -32,7 +37,7 @@ def display_result(self, show_diagnostic: bool = False) -> str: show_diagnostic: If true, show the diagnostic message if the check has failed. Defaults to false. """ - icon = "" if self.passed else "✘" + icon = "✓" if self.passed else "✕" icon_color = "green" if self.passed else "red" message = f"[{icon_color}]{icon}[/] {self.description}" if not self.passed and show_diagnostic: From e9dd93f3eb22e0c2d7dce7a150079319f4e532db Mon Sep 17 00:00:00 2001 From: "Gregory M. Kapfhammer" Date: Thu, 15 Sep 2022 17:19:20 -0400 Subject: [PATCH 2/7] style: Reformat the source code in check_result and delete imports. --- gatorgrade/output/check_result.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/gatorgrade/output/check_result.py b/gatorgrade/output/check_result.py index 18a9d12d..8a844d34 100644 --- a/gatorgrade/output/check_result.py +++ b/gatorgrade/output/check_result.py @@ -2,10 +2,6 @@ import rich -import unicodedata - -UTF_ENCODE = "utf-8" - class CheckResult: # pylint: disable=too-few-public-methods """Represent the result of running a check.""" From 84f0f2983629ab5444d92209187a6ed94b0394f4 Mon Sep 17 00:00:00 2001 From: "Gregory M. Kapfhammer" Date: Thu, 15 Sep 2022 17:19:39 -0400 Subject: [PATCH 3/7] fix: Correct the assertion in test_output related to Check TODOs. --- tests/output/test_output.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/output/test_output.py b/tests/output/test_output.py index a7d3d126..1dd27672 100644 --- a/tests/output/test_output.py +++ b/tests/output/test_output.py @@ -28,7 +28,7 @@ def test_run_checks_gg_check_should_show_passed(capsys): output.run_checks([check]) # Then the output shows that the check has passed out, _ = capsys.readouterr() - assert " Check TODOs" in out + assert "✓ Check TODOs" in out def test_run_checks_invalid_gg_args_prints_exception(capsys): From 882ccfb091528496785b20fe1087a8cab7de5cfb Mon Sep 17 00:00:00 2001 From: "Gregory M. Kapfhammer" Date: Thu, 15 Sep 2022 17:20:01 -0400 Subject: [PATCH 4/7] fix: Use correct checkmark and xmark symbols in test_main. --- tests/test_main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_main.py b/tests/test_main.py index df96061d..bfc3b30b 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -87,8 +87,8 @@ def cleanup_files(monkeypatch): [ ("Complete all TODOs", 2), ("Use an if statement", 1), - ("", 3), - ("✘", 0), + ("✓", 3), + ("✕", 0), ("Passed 3/3 (100%) of checks", 1), ], ) From 155248bca47ac9081d64e9ec8492295afa6b4c8f Mon Sep 17 00:00:00 2001 From: "Gregory M. Kapfhammer" Date: Sun, 18 Sep 2022 20:05:06 -0400 Subject: [PATCH 5/7] chore: Improve the description in the pyproject.toml file. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 108e5d3f..f39c02dc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "gatorgrade" version = "0.3.0" -description = "Python tool to execute GatorGrader" +description = "GatorGrade executes GatorGrader checks!" authors = ["Michael Abraham", "Jacob Allebach", "Liam Black", "Katherine Burgess", "Yanqiao Chen", "Ochirsaikhan Davaajambal", "Tuguldurnemekh Gantulga", "Anthony Grant-Cook", "Dylan Holland", "Gregory M. Kapfhammer", "Peyton Kelly", "Luke Lacaria", "Lauren Nevill", "Jack Turner", "Daniel Ullrich", "Garrison Vanzin", "Rian Watson"] [tool.poetry.dependencies] From c549051ff2500f304e4b206dff0d0ecb37701c59 Mon Sep 17 00:00:00 2001 From: "Gregory M. Kapfhammer" Date: Sun, 18 Sep 2022 20:08:29 -0400 Subject: [PATCH 6/7] chore: Bump the semver in the pyproject.toml file. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f39c02dc..fdfa5885 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "gatorgrade" -version = "0.3.0" +version = "0.3.1" description = "GatorGrade executes GatorGrader checks!" authors = ["Michael Abraham", "Jacob Allebach", "Liam Black", "Katherine Burgess", "Yanqiao Chen", "Ochirsaikhan Davaajambal", "Tuguldurnemekh Gantulga", "Anthony Grant-Cook", "Dylan Holland", "Gregory M. Kapfhammer", "Peyton Kelly", "Luke Lacaria", "Lauren Nevill", "Jack Turner", "Daniel Ullrich", "Garrison Vanzin", "Rian Watson"] From dfe79be44510241ce16991ba90a30ede74d5f9e3 Mon Sep 17 00:00:00 2001 From: "Gregory M. Kapfhammer" Date: Sun, 18 Sep 2022 20:11:49 -0400 Subject: [PATCH 7/7] chore: Add the readme attribute to tool.poetry in pyproject.toml. --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index fdfa5885..85ab4976 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,6 +3,7 @@ name = "gatorgrade" version = "0.3.1" description = "GatorGrade executes GatorGrader checks!" authors = ["Michael Abraham", "Jacob Allebach", "Liam Black", "Katherine Burgess", "Yanqiao Chen", "Ochirsaikhan Davaajambal", "Tuguldurnemekh Gantulga", "Anthony Grant-Cook", "Dylan Holland", "Gregory M. Kapfhammer", "Peyton Kelly", "Luke Lacaria", "Lauren Nevill", "Jack Turner", "Daniel Ullrich", "Garrison Vanzin", "Rian Watson"] +readme = "README.md" [tool.poetry.dependencies] python = ">=3.7,<4.0"