From bc182256732e33796f99bc6667453bb1e678c6e0 Mon Sep 17 00:00:00 2001 From: Chad Yates Date: Tue, 4 Apr 2023 21:17:20 -0700 Subject: [PATCH 1/5] Try and setup for Visual Studio. --- .gitignore | 2 + dali-rp2.pyproj | 134 ++++++++++++++++++++++++++++++++++++++++++++++++ dali-rp2.sln | 23 +++++++++ 3 files changed, 159 insertions(+) create mode 100644 dali-rp2.pyproj create mode 100644 dali-rp2.sln diff --git a/.gitignore b/.gitignore index d0780a24..6e7fdaa3 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,5 @@ __pycache__/ src/*.egg-info/ .venv/ .vscode/ +_ReSharper.Caches/ +TestResults/ diff --git a/dali-rp2.pyproj b/dali-rp2.pyproj new file mode 100644 index 00000000..cfaec2a0 --- /dev/null +++ b/dali-rp2.pyproj @@ -0,0 +1,134 @@ + + + + Debug + 2.0 + {21de6965-e7a9-45bf-bc35-9aafe37f7ddf} + + src\dali\plugin\country\us.py + + . + . + {888888a0-9f3d-457c-b088-3a5042f75d52} + Standard Python launcher + MSBuild|.venv|$(MSBuildProjectFullPath) + -t 1 -s -o C:\Users\cyates\Documents\rp2-files\cyates\dali-output -p cyates- C:\Users\cyates\Documents\rp2-files\cyates\cyates.ini + False + pytest + test*.py + tests + + + + + 10.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .venv + .venv (Python 3.9) + Scripts\python.exe + Scripts\pythonw.exe + 3.9 + X64 + PYTHONPATH + + + + \ No newline at end of file diff --git a/dali-rp2.sln b/dali-rp2.sln new file mode 100644 index 00000000..580b7a18 --- /dev/null +++ b/dali-rp2.sln @@ -0,0 +1,23 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.6.33513.286 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "dali-rp2", "dali-rp2.pyproj", "{21DE6965-E7A9-45BF-BC35-9AAFE37F7DDF}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {21DE6965-E7A9-45BF-BC35-9AAFE37F7DDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {21DE6965-E7A9-45BF-BC35-9AAFE37F7DDF}.Release|Any CPU.ActiveCfg = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {939DD0FF-121C-4BCB-9181-BCB6BBEEA96E} + EndGlobalSection +EndGlobal From dda9b65ae3de17621a27f2573669af23bc1953ec Mon Sep 17 00:00:00 2001 From: Chad Yates Date: Tue, 4 Apr 2023 21:10:42 -0700 Subject: [PATCH 2/5] Add entry points for launching from a debugger. --- src/dali/plugin/country/jp.py | 5 +++++ src/dali/plugin/country/us.py | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/dali/plugin/country/jp.py b/src/dali/plugin/country/jp.py index 4712cca6..86045812 100644 --- a/src/dali/plugin/country/jp.py +++ b/src/dali/plugin/country/jp.py @@ -21,3 +21,8 @@ # JP-specific entry point def dali_entry() -> None: dali_main(JP()) + +# This traditional entry point is used for debugging purposes only, dali_entry() +# is normally called through the use of an installed console script in setup.py. +if __name__ == '__main__': + dali_entry() diff --git a/src/dali/plugin/country/us.py b/src/dali/plugin/country/us.py index 8fd497bb..658df9cb 100644 --- a/src/dali/plugin/country/us.py +++ b/src/dali/plugin/country/us.py @@ -21,3 +21,8 @@ # US-specific entry point def dali_entry() -> None: dali_main(US()) + +# This traditional entry point is used for debugging purposes only, dali_entry() +# is normally called through the use of an installed console script in setup.py. +if __name__ == '__main__': + dali_entry() From e309a92862412e122eba53774cf16692c25eb671 Mon Sep 17 00:00:00 2001 From: Chad Yates Date: Wed, 5 Apr 2023 18:43:34 -0700 Subject: [PATCH 3/5] Always enable debug logging when running from Visual Studio. --- dali-rp2.pyproj | 1 + 1 file changed, 1 insertion(+) diff --git a/dali-rp2.pyproj b/dali-rp2.pyproj index cfaec2a0..a55fb9ab 100644 --- a/dali-rp2.pyproj +++ b/dali-rp2.pyproj @@ -17,6 +17,7 @@ pytest test*.py tests + LOG_LEVEL=DEBUG From 3af83b4d2ad43e339257116cf75aadbf4074b0ae Mon Sep 17 00:00:00 2001 From: Chad Yates Date: Thu, 6 Apr 2023 21:36:07 -0700 Subject: [PATCH 4/5] Remove generated/unneeded files. --- dali-rp2.pyproj | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/dali-rp2.pyproj b/dali-rp2.pyproj index a55fb9ab..40811286 100644 --- a/dali-rp2.pyproj +++ b/dali-rp2.pyproj @@ -28,11 +28,6 @@ - - - - - @@ -63,24 +58,16 @@ - - - - - - - - @@ -114,10 +101,7 @@ - - - From 59e67ee3fce298e1b1449ed4b80567a25a481133 Mon Sep 17 00:00:00 2001 From: Chad Yates Date: Thu, 6 Apr 2023 21:29:29 -0700 Subject: [PATCH 5/5] Use sample project as debug parameters. --- dali-rp2.pyproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dali-rp2.pyproj b/dali-rp2.pyproj index 40811286..cace7b5b 100644 --- a/dali-rp2.pyproj +++ b/dali-rp2.pyproj @@ -12,7 +12,7 @@ {888888a0-9f3d-457c-b088-3a5042f75d52} Standard Python launcher MSBuild|.venv|$(MSBuildProjectFullPath) - -t 1 -s -o C:\Users\cyates\Documents\rp2-files\cyates\dali-output -p cyates- C:\Users\cyates\Documents\rp2-files\cyates\cyates.ini + -t 1 -s -o output -p test_ config\test_config.ini False pytest test*.py