From b34e35c206fb688f334dafcdca9ad7e8f9ca67a4 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Wed, 20 Apr 2022 19:01:44 -0400 Subject: [PATCH 1/5] Update Chore --- pdm.lock | 38 +++++++++++++++++++------------------- pyproject.toml | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/pdm.lock b/pdm.lock index fefa5a8..5f4dbf4 100644 --- a/pdm.lock +++ b/pdm.lock @@ -1,6 +1,6 @@ [[package]] name = "astroid" -version = "2.11.2" +version = "2.11.3" requires_python = ">=3.6.2" summary = "An abstract syntax tree for Python with inference support." dependencies = [ @@ -126,7 +126,7 @@ summary = "Utility library for gitignore style pattern matching of file paths." [[package]] name = "platformdirs" -version = "2.5.1" +version = "2.5.2" requires_python = ">=3.7" summary = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." @@ -153,11 +153,11 @@ dependencies = [ [[package]] name = "pylint" -version = "2.13.5" +version = "2.13.7" requires_python = ">=3.6.2" summary = "python code static checker" dependencies = [ - "astroid<=2.12.0-dev0,>=2.11.2", + "astroid<=2.12.0-dev0,>=2.11.3", "colorama; sys_platform == \"win32\"", "dill>=0.2", "isort<6,>=4.2.5", @@ -237,9 +237,9 @@ summary = "Style preserving TOML library" [[package]] name = "typing-extensions" -version = "4.1.1" -requires_python = ">=3.6" -summary = "Backported and Experimental Type Hints for Python 3.6+" +version = "4.2.0" +requires_python = ">=3.7" +summary = "Backported and Experimental Type Hints for Python 3.7+" [[package]] name = "wrapt" @@ -252,9 +252,9 @@ lock_version = "3.1" content_hash = "sha256:fd1d9812a5b77dc7e8b93ed0d0f723d7d03a1fec4fc66f6b19ec2158fb2ffbf7" [metadata.files] -"astroid 2.11.2" = [ - {file = "astroid-2.11.2-py3-none-any.whl", hash = "sha256:cc8cc0d2d916c42d0a7c476c57550a4557a083081976bf42a73414322a6411d9"}, - {file = "astroid-2.11.2.tar.gz", hash = "sha256:8d0a30fe6481ce919f56690076eafbb2fb649142a89dc874f1ec0e7a011492d0"}, +"astroid 2.11.3" = [ + {file = "astroid-2.11.3-py3-none-any.whl", hash = "sha256:f1af57483cd17e963b2eddce8361e00fc593d1520fe19948488e94ff6476bd71"}, + {file = "astroid-2.11.3.tar.gz", hash = "sha256:4e5ba10571e197785e312966ea5efb2f5783176d4c1a73fa922d474ae2be59f7"}, ] "atomicwrites 1.4.0" = [ {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, @@ -411,9 +411,9 @@ content_hash = "sha256:fd1d9812a5b77dc7e8b93ed0d0f723d7d03a1fec4fc66f6b19ec2158f {file = "pathspec-0.9.0-py2.py3-none-any.whl", hash = "sha256:7d15c4ddb0b5c802d161efc417ec1a2558ea2653c2e8ad9c19098201dc1c993a"}, {file = "pathspec-0.9.0.tar.gz", hash = "sha256:e564499435a2673d586f6b2130bb5b95f04a3ba06f81b8f895b651a3c76aabb1"}, ] -"platformdirs 2.5.1" = [ - {file = "platformdirs-2.5.1-py3-none-any.whl", hash = "sha256:bcae7cab893c2d310a711b70b24efb93334febe65f8de776ee320b517471e227"}, - {file = "platformdirs-2.5.1.tar.gz", hash = "sha256:7535e70dfa32e84d4b34996ea99c5e432fa29a708d0f4e394bbcb2a8faa4f16d"}, +"platformdirs 2.5.2" = [ + {file = "platformdirs-2.5.2-py3-none-any.whl", hash = "sha256:027d8e83a2d7de06bbac4e5ef7e023c02b863d7ea5d079477e722bb41ab25788"}, + {file = "platformdirs-2.5.2.tar.gz", hash = "sha256:58c8abb07dcb441e6ee4b11d8df0ac856038f944ab98b7be6b27b2a3c7feef19"}, ] "pluggy 1.0.0" = [ {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, @@ -460,9 +460,9 @@ content_hash = "sha256:fd1d9812a5b77dc7e8b93ed0d0f723d7d03a1fec4fc66f6b19ec2158f {file = "pydantic-1.9.0-py3-none-any.whl", hash = "sha256:085ca1de245782e9b46cefcf99deecc67d418737a1fd3f6a4f511344b613a5b3"}, {file = "pydantic-1.9.0.tar.gz", hash = "sha256:742645059757a56ecd886faf4ed2441b9c0cd406079c2b4bee51bcc3fbcd510a"}, ] -"pylint 2.13.5" = [ - {file = "pylint-2.13.5-py3-none-any.whl", hash = "sha256:c149694cfdeaee1aa2465e6eaab84c87a881a7d55e6e93e09466be7164764d1e"}, - {file = "pylint-2.13.5.tar.gz", hash = "sha256:dab221658368c7a05242e673c275c488670144123f4bd262b2777249c1c0de9b"}, +"pylint 2.13.7" = [ + {file = "pylint-2.13.7-py3-none-any.whl", hash = "sha256:13ddbbd8872c804574149e81197c28877eba75224ba6b76cd8652fc31df55c1c"}, + {file = "pylint-2.13.7.tar.gz", hash = "sha256:911d3a97c808f7554643bcc5416028cfdc42eae34ed129b150741888c688d5d5"}, ] "pyparsing 3.0.8" = [ {file = "pyparsing-3.0.8-py3-none-any.whl", hash = "sha256:ef7b523f6356f763771559412c0d7134753f037822dad1b16945b7b846f7ad06"}, @@ -496,9 +496,9 @@ content_hash = "sha256:fd1d9812a5b77dc7e8b93ed0d0f723d7d03a1fec4fc66f6b19ec2158f {file = "tomlkit-0.10.1-py3-none-any.whl", hash = "sha256:3eba517439dcb2f84cf39f4f85fd2c3398309823a3c75ac3e73003638daf7915"}, {file = "tomlkit-0.10.1.tar.gz", hash = "sha256:3c517894eadef53e9072d343d37e4427b8f0b6200a70b7c9a19b2ebd1f53b951"}, ] -"typing-extensions 4.1.1" = [ - {file = "typing_extensions-4.1.1-py3-none-any.whl", hash = "sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2"}, - {file = "typing_extensions-4.1.1.tar.gz", hash = "sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42"}, +"typing-extensions 4.2.0" = [ + {file = "typing_extensions-4.2.0-py3-none-any.whl", hash = "sha256:6657594ee297170d19f67d55c05852a874e7eb634f4f753dbd667855e07c1708"}, + {file = "typing_extensions-4.2.0.tar.gz", hash = "sha256:f1c24655a0da0d1b67f07e17a5e6b2a105894e6824b92096378bb3668ef02376"}, ] "wrapt 1.14.0" = [ {file = "wrapt-1.14.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:5a9a1889cc01ed2ed5f34574c90745fab1dd06ec2eee663e8ebeefe363e8efd7"}, diff --git a/pyproject.toml b/pyproject.toml index f6ef25b..b802a2b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,7 @@ version = {use_scm = true} [tool.pdm.dev-dependencies] lint = [ "black>=22.3.0", - "pylint>=2.13.5", + "pylint>=2.13.7", "isort>=5.10.1", ] test = [ From 0947802baf85e9d4035a944a824571f2ac412bb7 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Fri, 29 Apr 2022 07:17:03 -0400 Subject: [PATCH 2/5] Enable f-string Logging --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index b802a2b..299809f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,6 +60,7 @@ profile = "black" [tool.pylint.messages_control] disable = "C0330, C0326" +disable = "logging-fstring-interpolation" extension-pkg-whitelist = "pydantic" [tool.pylint.format] From 26b0e80f0831260d7fae790ab50bc37a4cdacbbf Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Fri, 29 Apr 2022 07:23:23 -0400 Subject: [PATCH 3/5] Update Key --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 299809f..09e2631 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,8 +59,7 @@ preview = true profile = "black" [tool.pylint.messages_control] -disable = "C0330, C0326" -disable = "logging-fstring-interpolation" +disable = "C0330, C0326, logging-fstring-interpolation" extension-pkg-whitelist = "pydantic" [tool.pylint.format] From d3ae1ff2e913c327e3464a2c332000d145bac3e1 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Sun, 1 May 2022 11:09:27 -0400 Subject: [PATCH 4/5] Pin CPPython Dev Deps --- pdm.lock | 44 ++++++++++++++++++++++---------------------- pyproject.toml | 10 +++++----- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/pdm.lock b/pdm.lock index 5f4dbf4..d453217 100644 --- a/pdm.lock +++ b/pdm.lock @@ -36,7 +36,7 @@ dependencies = [ [[package]] name = "click" -version = "8.1.2" +version = "8.1.3" requires_python = ">=3.7" summary = "Composable command line interface toolkit" dependencies = [ @@ -68,7 +68,7 @@ dependencies = [ [[package]] name = "cppython-core" -version = "0.3.2" +version = "0.3.3.dev0" requires_python = ">=3.10" summary = "Data definitions for CPPython" dependencies = [ @@ -174,7 +174,7 @@ summary = "pyparsing module - Classes and methods to define and execute parsing [[package]] name = "pytest" -version = "7.1.1" +version = "7.1.2" requires_python = ">=3.7" summary = "pytest: simple powerful testing with Python" dependencies = [ @@ -200,11 +200,11 @@ dependencies = [ [[package]] name = "pytest-cppython" -version = "0.1.6" +version = "0.1.7.dev0" requires_python = ">=3.10" summary = "A pytest plugin that imports CPPython testing types" dependencies = [ - "cppython-core>=0.3.2", + "cppython-core>=0.3.3.dev0", "pydantic>=1.9.0", ] @@ -231,7 +231,7 @@ summary = "A lil' TOML parser" [[package]] name = "tomlkit" -version = "0.10.1" +version = "0.10.2" requires_python = ">=3.6,<4.0" summary = "Style preserving TOML library" @@ -249,7 +249,7 @@ summary = "Module for decorators, wrappers and monkey patching." [metadata] lock_version = "3.1" -content_hash = "sha256:fd1d9812a5b77dc7e8b93ed0d0f723d7d03a1fec4fc66f6b19ec2158fb2ffbf7" +content_hash = "sha256:f0f83bc774902223916236b1cf03239ba70ebfae99961ebf2f1d3ec0801aafe4" [metadata.files] "astroid 2.11.3" = [ @@ -289,9 +289,9 @@ content_hash = "sha256:fd1d9812a5b77dc7e8b93ed0d0f723d7d03a1fec4fc66f6b19ec2158f {file = "black-22.3.0-py3-none-any.whl", hash = "sha256:bc58025940a896d7e5356952228b68f793cf5fcb342be703c3a2669a1488cb72"}, {file = "black-22.3.0.tar.gz", hash = "sha256:35020b8886c022ced9282b51b5a875b6d1ab0c387b31a065b84db7c33085ca79"}, ] -"click 8.1.2" = [ - {file = "click-8.1.2-py3-none-any.whl", hash = "sha256:24e1a4a9ec5bf6299411369b208c1df2188d9eb8d916302fe6bf03faed227f1e"}, - {file = "click-8.1.2.tar.gz", hash = "sha256:479707fe14d9ec9a0757618b7a100a0ae4c4e236fac5b7f80ca68028141a1a72"}, +"click 8.1.3" = [ + {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, + {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, ] "colorama 0.4.4" = [ {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, @@ -340,9 +340,9 @@ content_hash = "sha256:fd1d9812a5b77dc7e8b93ed0d0f723d7d03a1fec4fc66f6b19ec2158f {file = "coverage-6.3.2-pp36.pp37.pp38-none-any.whl", hash = "sha256:18d520c6860515a771708937d2f78f63cc47ab3b80cb78e86573b0a760161faf"}, {file = "coverage-6.3.2.tar.gz", hash = "sha256:03e2a7826086b91ef345ff18742ee9fc47a6839ccd517061ef8fa1976e652ce9"}, ] -"cppython-core 0.3.2" = [ - {file = "cppython_core-0.3.2-py3-none-any.whl", hash = "sha256:bd7ee3988fe73206476c7d3979392279f203ed696e2920e00075163b00a5aea9"}, - {file = "cppython-core-0.3.2.tar.gz", hash = "sha256:65da9e2cac0db22c8e061978bd910137560ad1bbb0c28f240797e0b8a7b5d6fa"}, +"cppython-core 0.3.3.dev0" = [ + {file = "cppython_core-0.3.3.dev0-py3-none-any.whl", hash = "sha256:ad8b23058bb8d0e4f1999a2ad197f539860a56c7da230c2e215f2234eb40cf5c"}, + {file = "cppython-core-0.3.3.dev0.tar.gz", hash = "sha256:af4e8b312dae02d495ccd4544c0d38517fa48bc09808f8bf38d22be106cf320f"}, ] "dill 0.3.4" = [ {file = "dill-0.3.4-py2.py3-none-any.whl", hash = "sha256:7e40e4a70304fd9ceab3535d36e58791d9c4a776b38ec7f7ec9afc8d3dca4d4f"}, @@ -468,17 +468,17 @@ content_hash = "sha256:fd1d9812a5b77dc7e8b93ed0d0f723d7d03a1fec4fc66f6b19ec2158f {file = "pyparsing-3.0.8-py3-none-any.whl", hash = "sha256:ef7b523f6356f763771559412c0d7134753f037822dad1b16945b7b846f7ad06"}, {file = "pyparsing-3.0.8.tar.gz", hash = "sha256:7bf433498c016c4314268d95df76c81b842a4cb2b276fa3312cfb1e1d85f6954"}, ] -"pytest 7.1.1" = [ - {file = "pytest-7.1.1-py3-none-any.whl", hash = "sha256:92f723789a8fdd7180b6b06483874feca4c48a5c76968e03bb3e7f806a1869ea"}, - {file = "pytest-7.1.1.tar.gz", hash = "sha256:841132caef6b1ad17a9afde46dc4f6cfa59a05f9555aae5151f73bdf2820ca63"}, +"pytest 7.1.2" = [ + {file = "pytest-7.1.2-py3-none-any.whl", hash = "sha256:13d0e3ccfc2b6e26be000cb6568c832ba67ba32e719443bfe725814d3c42433c"}, + {file = "pytest-7.1.2.tar.gz", hash = "sha256:a06a0425453864a270bc45e71f783330a7428defb4230fb5e6a731fde06ecd45"}, ] "pytest-cov 3.0.0" = [ {file = "pytest_cov-3.0.0-py3-none-any.whl", hash = "sha256:578d5d15ac4a25e5f961c938b85a05b09fdaae9deef3bb6de9a6e766622ca7a6"}, {file = "pytest-cov-3.0.0.tar.gz", hash = "sha256:e7f0f5b1617d2210a2cabc266dfe2f4c75a8d32fb89eafb7ad9d06f6d076d470"}, ] -"pytest-cppython 0.1.6" = [ - {file = "pytest_cppython-0.1.6-py3-none-any.whl", hash = "sha256:bfdced9e41d40b2fcf9d74dc92c3029bb08aa9147b0530db3c96250b02b47587"}, - {file = "pytest-cppython-0.1.6.tar.gz", hash = "sha256:38743eb491ba068b87b55e56d343ced1905e22ed50025b9964b4ced3c60106b2"}, +"pytest-cppython 0.1.7.dev0" = [ + {file = "pytest_cppython-0.1.7.dev0-py3-none-any.whl", hash = "sha256:92b5812f6f7ed9deb55ee45086273315cd310e7ebd12030db7e412b889dc500b"}, + {file = "pytest-cppython-0.1.7.dev0.tar.gz", hash = "sha256:634d2111df4127d6f280ee2f8f236fefb47135cf1d272031cd22eddd0be844e9"}, ] "pytest-mock 3.7.0" = [ {file = "pytest_mock-3.7.0-py3-none-any.whl", hash = "sha256:6cff27cec936bf81dc5ee87f07132b807bcda51106b5ec4b90a04331cba76231"}, @@ -492,9 +492,9 @@ content_hash = "sha256:fd1d9812a5b77dc7e8b93ed0d0f723d7d03a1fec4fc66f6b19ec2158f {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] -"tomlkit 0.10.1" = [ - {file = "tomlkit-0.10.1-py3-none-any.whl", hash = "sha256:3eba517439dcb2f84cf39f4f85fd2c3398309823a3c75ac3e73003638daf7915"}, - {file = "tomlkit-0.10.1.tar.gz", hash = "sha256:3c517894eadef53e9072d343d37e4427b8f0b6200a70b7c9a19b2ebd1f53b951"}, +"tomlkit 0.10.2" = [ + {file = "tomlkit-0.10.2-py3-none-any.whl", hash = "sha256:905cf92c2111ef80d355708f47ac24ad1b6fc2adc5107455940088c9bbecaedb"}, + {file = "tomlkit-0.10.2.tar.gz", hash = "sha256:30d54c0b914e595f3d10a87888599eab5321a2a69abc773bbefff51599b72db6"}, ] "typing-extensions 4.2.0" = [ {file = "typing_extensions-4.2.0-py3-none-any.whl", hash = "sha256:6657594ee297170d19f67d55c05852a874e7eb634f4f753dbd667855e07c1708"}, diff --git a/pyproject.toml b/pyproject.toml index 09e2631..a8b1de0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,9 +14,9 @@ dynamic = ["version"] requires-python = ">=3.10" dependencies = [ - "click>=8.1.2", - "tomlkit>=0.10.1", - "cppython-core>=0.3.2", + "click>=8.1.3", + "tomlkit>=0.10.2", + "cppython-core>=0.3.3.dev0", "pydantic>=1.9.0", ] @@ -37,10 +37,10 @@ lint = [ "isort>=5.10.1", ] test = [ - "pytest>=7.1.1", + "pytest>=7.1.2", "pytest-cov>=3.0.0", "pytest-mock>=3.7.0", - "pytest-cppython>=0.1.6", + "pytest-cppython>=0.1.7.dev0", ] [project.scripts] From 3394ee035a22b936ba654aa5fd2437eddea3547b Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Sun, 1 May 2022 18:39:48 -0400 Subject: [PATCH 5/5] Remove Default Data --- cppython/data.py | 12 ------------ tests/unit/test_interface.py | 15 +++++++++++++-- tests/unit/test_project.py | 10 +++++++++- 3 files changed, 22 insertions(+), 15 deletions(-) delete mode 100644 cppython/data.py diff --git a/cppython/data.py b/cppython/data.py deleted file mode 100644 index 55fe04b..0000000 --- a/cppython/data.py +++ /dev/null @@ -1,12 +0,0 @@ -""" -Defaulted data to help testing -""" - -from cppython_core.schema import PEP621, CPPythonData, PyProject, TargetEnum, ToolData - -default_pep621 = PEP621(name="test_name", version="1.0") - -# CMake is a default plugin -default_cppython_data = CPPythonData(**{"target": TargetEnum.EXE}) -default_tool_data = ToolData(**{"cppython": default_cppython_data}) -default_pyproject = PyProject(**{"project": default_pep621, "tool": default_tool_data}) diff --git a/tests/unit/test_interface.py b/tests/unit/test_interface.py index 657ae71..55e61fd 100644 --- a/tests/unit/test_interface.py +++ b/tests/unit/test_interface.py @@ -4,12 +4,23 @@ import pytest from click.testing import CliRunner -from cppython_core.schema import API +from cppython_core.schema import ( + API, + PEP621, + CPPythonData, + PyProject, + TargetEnum, + ToolData, +) from pytest_cppython.plugin import InterfaceUnitTests from pytest_mock.plugin import MockerFixture from cppython.console import Config, ConsoleInterface, cli -from cppython.data import default_pyproject + +default_pep621 = PEP621(name="test_name", version="1.0") +default_cppython_data = CPPythonData(**{"target": TargetEnum.EXE}) +default_tool_data = ToolData(**{"cppython": default_cppython_data}) +default_pyproject = PyProject(**{"project": default_pep621, "tool": default_tool_data}) class TestCLIInterface(InterfaceUnitTests): diff --git a/tests/unit/test_project.py b/tests/unit/test_project.py index 4d8d5a1..1398550 100644 --- a/tests/unit/test_project.py +++ b/tests/unit/test_project.py @@ -5,16 +5,24 @@ import logging from cppython_core.schema import ( + PEP621, + CPPythonData, Generator, GeneratorConfiguration, GeneratorData, PyProject, + TargetEnum, + ToolData, ) from pytest_mock import MockerFixture -from cppython.data import default_pyproject from cppython.project import Project, ProjectBuilder, ProjectConfiguration +default_pep621 = PEP621(name="test_name", version="1.0") +default_cppython_data = CPPythonData(**{"target": TargetEnum.EXE}) +default_tool_data = ToolData(**{"cppython": default_cppython_data}) +default_pyproject = PyProject(**{"project": default_pep621, "tool": default_tool_data}) + class MockGeneratorData(GeneratorData): """