From c0310a1e0c1b0ba15fe65711837b9c4ce88f29f8 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Wed, 23 Mar 2022 02:11:11 -0400 Subject: [PATCH 01/10] Dynamic Generator Fields --- cppython/console.py | 12 ++--- cppython/project.py | 106 +++++++++++++++++++++++++------------ pdm.lock | 10 ++-- pyproject.toml | 2 +- tests/unit/test_project.py | 23 ++++++++ 5 files changed, 108 insertions(+), 45 deletions(-) create mode 100644 tests/unit/test_project.py diff --git a/cppython/console.py b/cppython/console.py index 50474ee..3495212 100644 --- a/cppython/console.py +++ b/cppython/console.py @@ -3,17 +3,17 @@ """ from pathlib import Path -from typing import Type +from typing import Any, Type from xmlrpc.client import Boolean import click import tomlkit -from cppython_core.schema import GeneratorDataType, Interface, PyProject +from cppython_core.schema import GeneratorDataType, Interface from cppython.project import Project, ProjectConfiguration -def _create_pyproject(): +def _create_pyproject() -> dict[str, Any]: # Search for a path upward path = Path.cwd() @@ -30,7 +30,7 @@ def _create_pyproject(): data = tomlkit.loads(path.read_text(encoding="utf-8")) # Interpret and validate data - return PyProject(**data) + return data class Config: @@ -39,7 +39,7 @@ class Config: """ def __init__(self): - self.pyproject = _create_pyproject() + self.pyproject_data = _create_pyproject() self.interface = ConsoleInterface() self.configuration = ProjectConfiguration() @@ -47,7 +47,7 @@ def create_project(self) -> Project: """ TODO """ - return Project(self.configuration, self.interface, self.pyproject) + return Project(self.configuration, self.interface, self.pyproject_data) pass_config = click.make_pass_decorator(Config, ensure=True) diff --git a/cppython/project.py b/cppython/project.py index c345af7..8540c4a 100644 --- a/cppython/project.py +++ b/cppython/project.py @@ -4,11 +4,20 @@ from dataclasses import dataclass from importlib import metadata -from typing import Callable, Optional, Type, TypeVar +from typing import Any, Type, TypeVar from xmlrpc.client import Boolean from cppython_core.exceptions import ConfigError -from cppython_core.schema import API, Generator, Interface, Plugin, PyProject +from cppython_core.schema import ( + API, + CPPythonData, + Generator, + Interface, + Plugin, + PyProject, + ToolData, +) +from pydantic import create_model @dataclass @@ -25,7 +34,9 @@ class Project(API): The object constructed at each entry_point """ - def __init__(self, configuration: ProjectConfiguration, interface: Interface, pyproject: PyProject) -> None: + def __init__( + self, configuration: ProjectConfiguration, interface: Interface, pyproject_data: dict[str, Any] + ) -> None: self.enabled = False self.verbose = configuration.verbose @@ -33,6 +44,32 @@ def __init__(self, configuration: ProjectConfiguration, interface: Interface, py if self.verbose: interface.print("Starting CPPython project initialization") + # Gather + plugins = self._gather_plugins(Generator) + + if not plugins: + if self.verbose: + interface.print("No generator plugin was found.") + return + + plugin_fields = {} + for plugin_type in plugins: + plugin_fields[plugin_type.name()] = plugin_type.data_type() + + ExtendedCPPythonData = create_model( + "ExtendedCPPythonData", + **plugin_fields, + __base__=CPPythonData, + ) + + ExtendedToolData = create_model( + "ToolData", + cppython=ExtendedCPPythonData, + __base__=ToolData, + ) + + pyproject = PyProject(**pyproject_data) + if pyproject.tool is None: if self.verbose: interface.print("Table [tool] is not defined") @@ -47,44 +84,41 @@ def __init__(self, configuration: ProjectConfiguration, interface: Interface, py self._interface = interface - PluginType = TypeVar("PluginType", bound=Type[Plugin]) - - def find_plugin_type(plugin_type: PluginType, condition: Callable[[str], bool]) -> Optional[PluginType]: - """ - Finds the first plugin that satisfies the given condition - """ - - entry_points = metadata.entry_points(group=f"cppython.{plugin_type.plugin_group()}") - - for entry_point in entry_points: - loaded_plugin_type = entry_point.load() - if issubclass(loaded_plugin_type, plugin_type) & (loaded_plugin_type is not plugin_type): - if condition(loaded_plugin_type.name()): - return loaded_plugin_type + self._generators = [] + for plugin_type in plugins: + self._generators.append(plugin_type(pyproject)) - return None + if self.verbose: + interface.print("CPPython project initialized") - plugin_type = find_plugin_type(Generator, lambda name: name == pyproject.tool.cppython.generator) + _PluginType = TypeVar("_PluginType", bound=Type[Plugin]) - if plugin_type is None: - raise ConfigError(f"No generator plugin with the name '{pyproject.tool.cppython.generator}' was found.") + def _gather_plugins(self, plugin_type: _PluginType) -> list[Type[_PluginType]]: + """ + TODO + """ + plugins = [] + entry_points = metadata.entry_points(group=f"cppython.{plugin_type.plugin_group()}") - generator_data = interface.read_generator_data(plugin_type.data_type()) - self._generator = plugin_type(pyproject, generator_data) + for entry_point in entry_points: + loaded_plugin_type = entry_point.load() + if issubclass(loaded_plugin_type, plugin_type) & (loaded_plugin_type is not plugin_type): + plugins.append(loaded_plugin_type) - if self.verbose: - interface.print("CPPython project initialized") + return plugins def download(self): """ Download the generator tooling if required """ - if not self._generator.generator_downloaded(): - self._interface.print(f"Downloading the {self._generator.name()} tool") + for generator in self._generators: + + if not generator.generator_downloaded(): + self._interface.print(f"Downloading the {generator.name()} tool") - # TODO: Make async with progress bar - self._generator.download_generator() - self._interface.print("Download complete") + # TODO: Make async with progress bar + generator.download_generator() + self._interface.print("Download complete") # API Contract @@ -93,16 +127,22 @@ def install(self) -> None: if self.verbose: self._interface.print("CPPython: Installing...") self.download() - self._generator.install() + + for generator in self._generators: + generator.install() def update(self) -> None: if self.enabled: if self.verbose: self._interface.print("CPPython: Updating...") - self._generator.update() + + for generator in self._generators: + generator.update() def build(self) -> None: if self.enabled: if self.verbose: self._interface.print("CPPython: Building...") - self._generator.build() + + for generator in self._generators: + generator.build() diff --git a/pdm.lock b/pdm.lock index 8ecd217..9719850 100644 --- a/pdm.lock +++ b/pdm.lock @@ -68,7 +68,7 @@ dependencies = [ [[package]] name = "cppython-core" -version = "0.1.2" +version = "0.1.4" requires_python = ">=3.10" summary = "Data definitions for CPPython" dependencies = [ @@ -245,7 +245,7 @@ summary = "Module for decorators, wrappers and monkey patching." [metadata] lock_version = "3.1" -content_hash = "sha256:cf6784e9ae16b1b1e951c6562ddcc2cc1724364e32c81aa431f0f3fce9005342" +content_hash = "sha256:c2d0bac429ed766e18e9a8f9bc048d3c89d83b86bbdec3a679f8f28b77dcacf4" [metadata.files] "astroid 2.9.3" = [ @@ -336,9 +336,9 @@ content_hash = "sha256:cf6784e9ae16b1b1e951c6562ddcc2cc1724364e32c81aa431f0f3fce {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.1.2" = [ - {file = "cppython_core-0.1.2-py3-none-any.whl", hash = "sha256:6320acc041d6fd012d05de93d8d9a3df7bfb4585ae71f564642f0c2177fc987c"}, - {file = "cppython-core-0.1.2.tar.gz", hash = "sha256:458e96ec672edce68b339a4b68a32a95dc4d2c0a37bf405bfd529208ca0b0469"}, +"cppython-core 0.1.4" = [ + {file = "cppython_core-0.1.4-py3-none-any.whl", hash = "sha256:1856a7b9e58c3b95eb376fa01b04227c499726285868fce96152e52417d8178f"}, + {file = "cppython-core-0.1.4.tar.gz", hash = "sha256:cc787deda93fe3a3386d4c04e3dc209b9e7ff0d96fa3bab168047be11b911f9d"}, ] "iniconfig 1.1.1" = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, diff --git a/pyproject.toml b/pyproject.toml index a4cbedb..bc16b27 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ requires-python = ">=3.10" dependencies = [ "click>=8.0.3", "tomlkit>=0.10.0", - "cppython-core>=0.1.2", + "cppython-core>=0.1.4", ] [project.license-files] diff --git a/tests/unit/test_project.py b/tests/unit/test_project.py new file mode 100644 index 0000000..42bde7f --- /dev/null +++ b/tests/unit/test_project.py @@ -0,0 +1,23 @@ +""" +Test the functions related to the internal interface implementation and the 'Interface' interface itself +""" + +from pytest_mock import MockerFixture + +from cppython.data import default_pyproject +from cppython.project import Project, ProjectConfiguration + + +class TestProject: + """ + TODO + """ + + def test_construction(self, mocker: MockerFixture): + """ + Makes sure the project can be created from the default PyProject data + """ + + interface_mock = mocker.MagicMock() + configuration = ProjectConfiguration() + Project(configuration, interface_mock, default_pyproject) From 862cb714603959bf4fc02881f04ce2c34ac88c47 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Thu, 24 Mar 2022 21:05:30 -0400 Subject: [PATCH 02/10] Update Chore --- pdm.lock | 181 ++++++++++++++++++++++++++----------------------- pyproject.toml | 2 +- 2 files changed, 99 insertions(+), 84 deletions(-) diff --git a/pdm.lock b/pdm.lock index 9719850..aa12d9c 100644 --- a/pdm.lock +++ b/pdm.lock @@ -1,12 +1,12 @@ [[package]] name = "astroid" -version = "2.9.3" +version = "2.11.1" requires_python = ">=3.6.2" summary = "An abstract syntax tree for Python with inference support." dependencies = [ "lazy-object-proxy>=1.4.0", "setuptools>=20.0", - "wrapt<1.14,>=1.11", + "wrapt<2,>=1.11", ] [[package]] @@ -75,6 +75,12 @@ dependencies = [ "pydantic>=1.9", ] +[[package]] +name = "dill" +version = "0.3.4" +requires_python = ">=2.7, !=3.0.*" +summary = "serialize all of python" + [[package]] name = "iniconfig" version = "1.1.1" @@ -94,7 +100,8 @@ summary = "A fast and thorough lazy object proxy." [[package]] name = "mccabe" -version = "0.6.1" +version = "0.7.0" +requires_python = ">=3.6" summary = "McCabe checker, plugin for flake8" [[package]] @@ -145,16 +152,17 @@ dependencies = [ [[package]] name = "pylint" -version = "2.12.2" +version = "2.13.0" requires_python = ">=3.6.2" summary = "python code static checker" dependencies = [ - "astroid<2.10,>=2.9.0", + "astroid<=2.12.0-dev0,>=2.11.0", "colorama; sys_platform == \"win32\"", + "dill>=0.2", "isort<6,>=4.2.5", - "mccabe<0.7,>=0.6", + "mccabe<0.8,>=0.6", "platformdirs>=2.2.0", - "toml>=0.9.2", + "tomli>=1.1.0; python_version < \"3.11\"", ] [[package]] @@ -209,16 +217,10 @@ dependencies = [ [[package]] name = "setuptools" -version = "60.10.0" +version = "61.0.0" requires_python = ">=3.7" summary = "Easily download, build, install, upgrade, and uninstall Python packages" -[[package]] -name = "toml" -version = "0.10.2" -requires_python = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" -summary = "Python Library for Tom's Obvious, Minimal Language" - [[package]] name = "tomli" version = "2.0.1" @@ -239,7 +241,7 @@ summary = "Backported and Experimental Type Hints for Python 3.6+" [[package]] name = "wrapt" -version = "1.13.3" +version = "1.14.0" requires_python = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" summary = "Module for decorators, wrappers and monkey patching." @@ -248,9 +250,9 @@ lock_version = "3.1" content_hash = "sha256:c2d0bac429ed766e18e9a8f9bc048d3c89d83b86bbdec3a679f8f28b77dcacf4" [metadata.files] -"astroid 2.9.3" = [ - {file = "astroid-2.9.3-py3-none-any.whl", hash = "sha256:506daabe5edffb7e696ad82483ad0228245a9742ed7d2d8c9cdb31537decf9f6"}, - {file = "astroid-2.9.3.tar.gz", hash = "sha256:1efdf4e867d4d8ba4a9f6cf9ce07cd182c4c41de77f23814feb27ca93ca9d877"}, +"astroid 2.11.1" = [ + {file = "astroid-2.11.1-py3-none-any.whl", hash = "sha256:e3ae0984c28b7bae2a107dffbc6e9acecf9b06506322f3465e914405dd652394"}, + {file = "astroid-2.11.1.tar.gz", hash = "sha256:33f1c15fe9661348a50b7ec6789947089ead2a5de727bb4782d530d9d2fff2c8"}, ] "atomicwrites 1.4.0" = [ {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, @@ -340,6 +342,10 @@ content_hash = "sha256:c2d0bac429ed766e18e9a8f9bc048d3c89d83b86bbdec3a679f8f28b7 {file = "cppython_core-0.1.4-py3-none-any.whl", hash = "sha256:1856a7b9e58c3b95eb376fa01b04227c499726285868fce96152e52417d8178f"}, {file = "cppython-core-0.1.4.tar.gz", hash = "sha256:cc787deda93fe3a3386d4c04e3dc209b9e7ff0d96fa3bab168047be11b911f9d"}, ] +"dill 0.3.4" = [ + {file = "dill-0.3.4-py2.py3-none-any.whl", hash = "sha256:7e40e4a70304fd9ceab3535d36e58791d9c4a776b38ec7f7ec9afc8d3dca4d4f"}, + {file = "dill-0.3.4.zip", hash = "sha256:9f9734205146b2b353ab3fec9af0070237b6ddae78452af83d2fca84d739e675"}, +] "iniconfig 1.1.1" = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, @@ -387,9 +393,9 @@ content_hash = "sha256:c2d0bac429ed766e18e9a8f9bc048d3c89d83b86bbdec3a679f8f28b7 {file = "lazy_object_proxy-1.7.1-pp37.pp38-none-any.whl", hash = "sha256:d66906d5785da8e0be7360912e99c9188b70f52c422f9fc18223347235691a84"}, {file = "lazy-object-proxy-1.7.1.tar.gz", hash = "sha256:d609c75b986def706743cdebe5e47553f4a5a1da9c5ff66d76013ef396b5a8a4"}, ] -"mccabe 0.6.1" = [ - {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, - {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, +"mccabe 0.7.0" = [ + {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, + {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, ] "mypy-extensions 0.4.3" = [ {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, @@ -452,9 +458,9 @@ content_hash = "sha256:c2d0bac429ed766e18e9a8f9bc048d3c89d83b86bbdec3a679f8f28b7 {file = "pydantic-1.9.0-py3-none-any.whl", hash = "sha256:085ca1de245782e9b46cefcf99deecc67d418737a1fd3f6a4f511344b613a5b3"}, {file = "pydantic-1.9.0.tar.gz", hash = "sha256:742645059757a56ecd886faf4ed2441b9c0cd406079c2b4bee51bcc3fbcd510a"}, ] -"pylint 2.12.2" = [ - {file = "pylint-2.12.2-py3-none-any.whl", hash = "sha256:daabda3f7ed9d1c60f52d563b1b854632fd90035bcf01443e234d3dc794e3b74"}, - {file = "pylint-2.12.2.tar.gz", hash = "sha256:9d945a73640e1fec07ee34b42f5669b770c759acd536ec7b16d7e4b87a9c9ff9"}, +"pylint 2.13.0" = [ + {file = "pylint-2.13.0-py3-none-any.whl", hash = "sha256:ea1692d409487a93cdcc015ddf2fd92f2367fb1193d46ece76df98b6fefc0dda"}, + {file = "pylint-2.13.0.tar.gz", hash = "sha256:f04508086a0772f1a459b4e9facd02416943b47dda5a98ed79d4d87e709da04f"}, ] "pyparsing 3.0.7" = [ {file = "pyparsing-3.0.7-py3-none-any.whl", hash = "sha256:a6c06a88f252e6c322f65faf8f418b16213b51bdfaece0524c1c1bc30c63c484"}, @@ -476,13 +482,9 @@ content_hash = "sha256:c2d0bac429ed766e18e9a8f9bc048d3c89d83b86bbdec3a679f8f28b7 {file = "pytest_mock-3.7.0-py3-none-any.whl", hash = "sha256:6cff27cec936bf81dc5ee87f07132b807bcda51106b5ec4b90a04331cba76231"}, {file = "pytest-mock-3.7.0.tar.gz", hash = "sha256:5112bd92cc9f186ee96e1a92efc84969ea494939c3aead39c50f421c4cc69534"}, ] -"setuptools 60.10.0" = [ - {file = "setuptools-60.10.0-py3-none-any.whl", hash = "sha256:782ef48d58982ddb49920c11a0c5c9c0b02e7d7d1c2ad0aa44e1a1e133051c96"}, - {file = "setuptools-60.10.0.tar.gz", hash = "sha256:6599055eeb23bfef457d5605d33a4d68804266e6cb430b0fb12417c5efeae36c"}, -] -"toml 0.10.2" = [ - {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, - {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, +"setuptools 61.0.0" = [ + {file = "setuptools-61.0.0-py3-none-any.whl", hash = "sha256:ad88b13f3dc60420259c9877486908ddad12c7befaff0d624c7190f742abd64f"}, + {file = "setuptools-61.0.0.tar.gz", hash = "sha256:6221e37dc86fcdc9dad9d9eb2002e9f9798fe4aca1bf18f280e66e50c0eb7fca"}, ] "tomli 2.0.1" = [ {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, @@ -496,56 +498,69 @@ content_hash = "sha256:c2d0bac429ed766e18e9a8f9bc048d3c89d83b86bbdec3a679f8f28b7 {file = "typing_extensions-4.1.1-py3-none-any.whl", hash = "sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2"}, {file = "typing_extensions-4.1.1.tar.gz", hash = "sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42"}, ] -"wrapt 1.13.3" = [ - {file = "wrapt-1.13.3-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:e05e60ff3b2b0342153be4d1b597bbcfd8330890056b9619f4ad6b8d5c96a81a"}, - {file = "wrapt-1.13.3-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:85148f4225287b6a0665eef08a178c15097366d46b210574a658c1ff5b377489"}, - {file = "wrapt-1.13.3-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:2dded5496e8f1592ec27079b28b6ad2a1ef0b9296d270f77b8e4a3a796cf6909"}, - {file = "wrapt-1.13.3-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:e94b7d9deaa4cc7bac9198a58a7240aaf87fe56c6277ee25fa5b3aa1edebd229"}, - {file = "wrapt-1.13.3-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:498e6217523111d07cd67e87a791f5e9ee769f9241fcf8a379696e25806965af"}, - {file = "wrapt-1.13.3-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:ec7e20258ecc5174029a0f391e1b948bf2906cd64c198a9b8b281b811cbc04de"}, - {file = "wrapt-1.13.3-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:87883690cae293541e08ba2da22cacaae0a092e0ed56bbba8d018cc486fbafbb"}, - {file = "wrapt-1.13.3-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:f99c0489258086308aad4ae57da9e8ecf9e1f3f30fa35d5e170b4d4896554d80"}, - {file = "wrapt-1.13.3-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:6a03d9917aee887690aa3f1747ce634e610f6db6f6b332b35c2dd89412912bca"}, - {file = "wrapt-1.13.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:936503cb0a6ed28dbfa87e8fcd0a56458822144e9d11a49ccee6d9a8adb2ac44"}, - {file = "wrapt-1.13.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:f9c51d9af9abb899bd34ace878fbec8bf357b3194a10c4e8e0a25512826ef056"}, - {file = "wrapt-1.13.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:220a869982ea9023e163ba915077816ca439489de6d2c09089b219f4e11b6785"}, - {file = "wrapt-1.13.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:0877fe981fd76b183711d767500e6b3111378ed2043c145e21816ee589d91096"}, - {file = "wrapt-1.13.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:43e69ffe47e3609a6aec0fe723001c60c65305784d964f5007d5b4fb1bc6bf33"}, - {file = "wrapt-1.13.3-cp310-cp310-win32.whl", hash = "sha256:78dea98c81915bbf510eb6a3c9c24915e4660302937b9ae05a0947164248020f"}, - {file = "wrapt-1.13.3-cp310-cp310-win_amd64.whl", hash = "sha256:ea3e746e29d4000cd98d572f3ee2a6050a4f784bb536f4ac1f035987fc1ed83e"}, - {file = "wrapt-1.13.3-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:8c73c1a2ec7c98d7eaded149f6d225a692caa1bd7b2401a14125446e9e90410d"}, - {file = "wrapt-1.13.3-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:086218a72ec7d986a3eddb7707c8c4526d677c7b35e355875a0fe2918b059179"}, - {file = "wrapt-1.13.3-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:e92d0d4fa68ea0c02d39f1e2f9cb5bc4b4a71e8c442207433d8db47ee79d7aa3"}, - {file = "wrapt-1.13.3-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:d4a5f6146cfa5c7ba0134249665acd322a70d1ea61732723c7d3e8cc0fa80755"}, - {file = "wrapt-1.13.3-cp35-cp35m-win32.whl", hash = "sha256:8aab36778fa9bba1a8f06a4919556f9f8c7b33102bd71b3ab307bb3fecb21851"}, - {file = "wrapt-1.13.3-cp35-cp35m-win_amd64.whl", hash = "sha256:944b180f61f5e36c0634d3202ba8509b986b5fbaf57db3e94df11abee244ba13"}, - {file = "wrapt-1.13.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:2ebdde19cd3c8cdf8df3fc165bc7827334bc4e353465048b36f7deeae8ee0918"}, - {file = "wrapt-1.13.3-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:610f5f83dd1e0ad40254c306f4764fcdc846641f120c3cf424ff57a19d5f7ade"}, - {file = "wrapt-1.13.3-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:5601f44a0f38fed36cc07db004f0eedeaadbdcec90e4e90509480e7e6060a5bc"}, - {file = "wrapt-1.13.3-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:e6906d6f48437dfd80464f7d7af1740eadc572b9f7a4301e7dd3d65db285cacf"}, - {file = "wrapt-1.13.3-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:766b32c762e07e26f50d8a3468e3b4228b3736c805018e4b0ec8cc01ecd88125"}, - {file = "wrapt-1.13.3-cp36-cp36m-win32.whl", hash = "sha256:5f223101f21cfd41deec8ce3889dc59f88a59b409db028c469c9b20cfeefbe36"}, - {file = "wrapt-1.13.3-cp36-cp36m-win_amd64.whl", hash = "sha256:f122ccd12fdc69628786d0c947bdd9cb2733be8f800d88b5a37c57f1f1d73c10"}, - {file = "wrapt-1.13.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:46f7f3af321a573fc0c3586612db4decb7eb37172af1bc6173d81f5b66c2e068"}, - {file = "wrapt-1.13.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:778fd096ee96890c10ce96187c76b3e99b2da44e08c9e24d5652f356873f6709"}, - {file = "wrapt-1.13.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:0cb23d36ed03bf46b894cfec777eec754146d68429c30431c99ef28482b5c1df"}, - {file = "wrapt-1.13.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:96b81ae75591a795d8c90edc0bfaab44d3d41ffc1aae4d994c5aa21d9b8e19a2"}, - {file = "wrapt-1.13.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:7dd215e4e8514004c8d810a73e342c536547038fb130205ec4bba9f5de35d45b"}, - {file = "wrapt-1.13.3-cp37-cp37m-win32.whl", hash = "sha256:47f0a183743e7f71f29e4e21574ad3fa95676136f45b91afcf83f6a050914829"}, - {file = "wrapt-1.13.3-cp37-cp37m-win_amd64.whl", hash = "sha256:fd76c47f20984b43d93de9a82011bb6e5f8325df6c9ed4d8310029a55fa361ea"}, - {file = "wrapt-1.13.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b73d4b78807bd299b38e4598b8e7bd34ed55d480160d2e7fdaabd9931afa65f9"}, - {file = "wrapt-1.13.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:ec9465dd69d5657b5d2fa6133b3e1e989ae27d29471a672416fd729b429eb554"}, - {file = "wrapt-1.13.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:dd91006848eb55af2159375134d724032a2d1d13bcc6f81cd8d3ed9f2b8e846c"}, - {file = "wrapt-1.13.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ae9de71eb60940e58207f8e71fe113c639da42adb02fb2bcbcaccc1ccecd092b"}, - {file = "wrapt-1.13.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:51799ca950cfee9396a87f4a1240622ac38973b6df5ef7a41e7f0b98797099ce"}, - {file = "wrapt-1.13.3-cp38-cp38-win32.whl", hash = "sha256:4b9c458732450ec42578b5642ac53e312092acf8c0bfce140ada5ca1ac556f79"}, - {file = "wrapt-1.13.3-cp38-cp38-win_amd64.whl", hash = "sha256:7dde79d007cd6dfa65afe404766057c2409316135cb892be4b1c768e3f3a11cb"}, - {file = "wrapt-1.13.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:981da26722bebb9247a0601e2922cedf8bb7a600e89c852d063313102de6f2cb"}, - {file = "wrapt-1.13.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:705e2af1f7be4707e49ced9153f8d72131090e52be9278b5dbb1498c749a1e32"}, - {file = "wrapt-1.13.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:25b1b1d5df495d82be1c9d2fad408f7ce5ca8a38085e2da41bb63c914baadff7"}, - {file = "wrapt-1.13.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:77416e6b17926d953b5c666a3cb718d5945df63ecf922af0ee576206d7033b5e"}, - {file = "wrapt-1.13.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:865c0b50003616f05858b22174c40ffc27a38e67359fa1495605f96125f76640"}, - {file = "wrapt-1.13.3-cp39-cp39-win32.whl", hash = "sha256:0a017a667d1f7411816e4bf214646d0ad5b1da2c1ea13dec6c162736ff25a374"}, - {file = "wrapt-1.13.3-cp39-cp39-win_amd64.whl", hash = "sha256:81bd7c90d28a4b2e1df135bfbd7c23aee3050078ca6441bead44c42483f9ebfb"}, - {file = "wrapt-1.13.3.tar.gz", hash = "sha256:1fea9cd438686e6682271d36f3481a9f3636195578bab9ca3382e2f5f01fc185"}, +"wrapt 1.14.0" = [ + {file = "wrapt-1.14.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:5a9a1889cc01ed2ed5f34574c90745fab1dd06ec2eee663e8ebeefe363e8efd7"}, + {file = "wrapt-1.14.0-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:9a3ff5fb015f6feb78340143584d9f8a0b91b6293d6b5cf4295b3e95d179b88c"}, + {file = "wrapt-1.14.0-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:4b847029e2d5e11fd536c9ac3136ddc3f54bc9488a75ef7d040a3900406a91eb"}, + {file = "wrapt-1.14.0-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:9a5a544861b21e0e7575b6023adebe7a8c6321127bb1d238eb40d99803a0e8bd"}, + {file = "wrapt-1.14.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:88236b90dda77f0394f878324cfbae05ae6fde8a84d548cfe73a75278d760291"}, + {file = "wrapt-1.14.0-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:f0408e2dbad9e82b4c960274214af533f856a199c9274bd4aff55d4634dedc33"}, + {file = "wrapt-1.14.0-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:9d8c68c4145041b4eeae96239802cfdfd9ef927754a5be3f50505f09f309d8c6"}, + {file = "wrapt-1.14.0-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:22626dca56fd7f55a0733e604f1027277eb0f4f3d95ff28f15d27ac25a45f71b"}, + {file = "wrapt-1.14.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:65bf3eb34721bf18b5a021a1ad7aa05947a1767d1aa272b725728014475ea7d5"}, + {file = "wrapt-1.14.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:09d16ae7a13cff43660155383a2372b4aa09109c7127aa3f24c3cf99b891c330"}, + {file = "wrapt-1.14.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:debaf04f813ada978d7d16c7dfa16f3c9c2ec9adf4656efdc4defdf841fc2f0c"}, + {file = "wrapt-1.14.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:748df39ed634851350efa87690c2237a678ed794fe9ede3f0d79f071ee042561"}, + {file = "wrapt-1.14.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1807054aa7b61ad8d8103b3b30c9764de2e9d0c0978e9d3fc337e4e74bf25faa"}, + {file = "wrapt-1.14.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:763a73ab377390e2af26042f685a26787c402390f682443727b847e9496e4a2a"}, + {file = "wrapt-1.14.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:8529b07b49b2d89d6917cfa157d3ea1dfb4d319d51e23030664a827fe5fd2131"}, + {file = "wrapt-1.14.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:68aeefac31c1f73949662ba8affaf9950b9938b712fb9d428fa2a07e40ee57f8"}, + {file = "wrapt-1.14.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:59d7d92cee84a547d91267f0fea381c363121d70fe90b12cd88241bd9b0e1763"}, + {file = "wrapt-1.14.0-cp310-cp310-win32.whl", hash = "sha256:3a88254881e8a8c4784ecc9cb2249ff757fd94b911d5df9a5984961b96113fff"}, + {file = "wrapt-1.14.0-cp310-cp310-win_amd64.whl", hash = "sha256:9a242871b3d8eecc56d350e5e03ea1854de47b17f040446da0e47dc3e0b9ad4d"}, + {file = "wrapt-1.14.0-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:a65bffd24409454b889af33b6c49d0d9bcd1a219b972fba975ac935f17bdf627"}, + {file = "wrapt-1.14.0-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:9d9fcd06c952efa4b6b95f3d788a819b7f33d11bea377be6b8980c95e7d10775"}, + {file = "wrapt-1.14.0-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:db6a0ddc1282ceb9032e41853e659c9b638789be38e5b8ad7498caac00231c23"}, + {file = "wrapt-1.14.0-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:14e7e2c5f5fca67e9a6d5f753d21f138398cad2b1159913ec9e9a67745f09ba3"}, + {file = "wrapt-1.14.0-cp35-cp35m-win32.whl", hash = "sha256:6d9810d4f697d58fd66039ab959e6d37e63ab377008ef1d63904df25956c7db0"}, + {file = "wrapt-1.14.0-cp35-cp35m-win_amd64.whl", hash = "sha256:d808a5a5411982a09fef6b49aac62986274ab050e9d3e9817ad65b2791ed1425"}, + {file = "wrapt-1.14.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:b77159d9862374da213f741af0c361720200ab7ad21b9f12556e0eb95912cd48"}, + {file = "wrapt-1.14.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:36a76a7527df8583112b24adc01748cd51a2d14e905b337a6fefa8b96fc708fb"}, + {file = "wrapt-1.14.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a0057b5435a65b933cbf5d859cd4956624df37b8bf0917c71756e4b3d9958b9e"}, + {file = "wrapt-1.14.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3a0a4ca02752ced5f37498827e49c414d694ad7cf451ee850e3ff160f2bee9d3"}, + {file = "wrapt-1.14.0-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:8c6be72eac3c14baa473620e04f74186c5d8f45d80f8f2b4eda6e1d18af808e8"}, + {file = "wrapt-1.14.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:21b1106bff6ece8cb203ef45b4f5778d7226c941c83aaaa1e1f0f4f32cc148cd"}, + {file = "wrapt-1.14.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:493da1f8b1bb8a623c16552fb4a1e164c0200447eb83d3f68b44315ead3f9036"}, + {file = "wrapt-1.14.0-cp36-cp36m-win32.whl", hash = "sha256:89ba3d548ee1e6291a20f3c7380c92f71e358ce8b9e48161401e087e0bc740f8"}, + {file = "wrapt-1.14.0-cp36-cp36m-win_amd64.whl", hash = "sha256:729d5e96566f44fccac6c4447ec2332636b4fe273f03da128fff8d5559782b06"}, + {file = "wrapt-1.14.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:891c353e95bb11abb548ca95c8b98050f3620a7378332eb90d6acdef35b401d4"}, + {file = "wrapt-1.14.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:23f96134a3aa24cc50614920cc087e22f87439053d886e474638c68c8d15dc80"}, + {file = "wrapt-1.14.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6807bcee549a8cb2f38f73f469703a1d8d5d990815c3004f21ddb68a567385ce"}, + {file = "wrapt-1.14.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6915682f9a9bc4cf2908e83caf5895a685da1fbd20b6d485dafb8e218a338279"}, + {file = "wrapt-1.14.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:f2f3bc7cd9c9fcd39143f11342eb5963317bd54ecc98e3650ca22704b69d9653"}, + {file = "wrapt-1.14.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:3a71dbd792cc7a3d772ef8cd08d3048593f13d6f40a11f3427c000cf0a5b36a0"}, + {file = "wrapt-1.14.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:5a0898a640559dec00f3614ffb11d97a2666ee9a2a6bad1259c9facd01a1d4d9"}, + {file = "wrapt-1.14.0-cp37-cp37m-win32.whl", hash = "sha256:167e4793dc987f77fd476862d32fa404d42b71f6a85d3b38cbce711dba5e6b68"}, + {file = "wrapt-1.14.0-cp37-cp37m-win_amd64.whl", hash = "sha256:d066ffc5ed0be00cd0352c95800a519cf9e4b5dd34a028d301bdc7177c72daf3"}, + {file = "wrapt-1.14.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d9bdfa74d369256e4218000a629978590fd7cb6cf6893251dad13d051090436d"}, + {file = "wrapt-1.14.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:2498762814dd7dd2a1d0248eda2afbc3dd9c11537bc8200a4b21789b6df6cd38"}, + {file = "wrapt-1.14.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f24ca7953f2643d59a9c87d6e272d8adddd4a53bb62b9208f36db408d7aafc7"}, + {file = "wrapt-1.14.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5b835b86bd5a1bdbe257d610eecab07bf685b1af2a7563093e0e69180c1d4af1"}, + {file = "wrapt-1.14.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b21650fa6907e523869e0396c5bd591cc326e5c1dd594dcdccac089561cacfb8"}, + {file = "wrapt-1.14.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:354d9fc6b1e44750e2a67b4b108841f5f5ea08853453ecbf44c81fdc2e0d50bd"}, + {file = "wrapt-1.14.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:1f83e9c21cd5275991076b2ba1cd35418af3504667affb4745b48937e214bafe"}, + {file = "wrapt-1.14.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:61e1a064906ccba038aa3c4a5a82f6199749efbbb3cef0804ae5c37f550eded0"}, + {file = "wrapt-1.14.0-cp38-cp38-win32.whl", hash = "sha256:28c659878f684365d53cf59dc9a1929ea2eecd7ac65da762be8b1ba193f7e84f"}, + {file = "wrapt-1.14.0-cp38-cp38-win_amd64.whl", hash = "sha256:b0ed6ad6c9640671689c2dbe6244680fe8b897c08fd1fab2228429b66c518e5e"}, + {file = "wrapt-1.14.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b3f7e671fb19734c872566e57ce7fc235fa953d7c181bb4ef138e17d607dc8a1"}, + {file = "wrapt-1.14.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:87fa943e8bbe40c8c1ba4086971a6fefbf75e9991217c55ed1bcb2f1985bd3d4"}, + {file = "wrapt-1.14.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4775a574e9d84e0212f5b18886cace049a42e13e12009bb0491562a48bb2b758"}, + {file = "wrapt-1.14.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9d57677238a0c5411c76097b8b93bdebb02eb845814c90f0b01727527a179e4d"}, + {file = "wrapt-1.14.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:00108411e0f34c52ce16f81f1d308a571df7784932cc7491d1e94be2ee93374b"}, + {file = "wrapt-1.14.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d332eecf307fca852d02b63f35a7872de32d5ba8b4ec32da82f45df986b39ff6"}, + {file = "wrapt-1.14.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:01f799def9b96a8ec1ef6b9c1bbaf2bbc859b87545efbecc4a78faea13d0e3a0"}, + {file = "wrapt-1.14.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:47045ed35481e857918ae78b54891fac0c1d197f22c95778e66302668309336c"}, + {file = "wrapt-1.14.0-cp39-cp39-win32.whl", hash = "sha256:2eca15d6b947cfff51ed76b2d60fd172c6ecd418ddab1c5126032d27f74bc350"}, + {file = "wrapt-1.14.0-cp39-cp39-win_amd64.whl", hash = "sha256:bb36fbb48b22985d13a6b496ea5fb9bb2a076fea943831643836c9f6febbcfdc"}, + {file = "wrapt-1.14.0.tar.gz", hash = "sha256:8323a43bd9c91f62bb7d4be74cc9ff10090e7ef820e27bfe8815c57e68261311"}, ] diff --git a/pyproject.toml b/pyproject.toml index bc16b27..0c4be47 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ version = {use_scm = true} [tool.pdm.dev-dependencies] lint = [ "black>=22.1.0", - "pylint>=2.12.2", + "pylint>=2.13.0", "isort>=5.10.1", ] test = [ From bf6db4674eb6afcb29791c8b683d5ebc517b94ee Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Tue, 29 Mar 2022 17:36:52 -0400 Subject: [PATCH 03/10] Fix --- tests/unit/test_project.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/unit/test_project.py b/tests/unit/test_project.py index 42bde7f..8aaf150 100644 --- a/tests/unit/test_project.py +++ b/tests/unit/test_project.py @@ -20,4 +20,6 @@ def test_construction(self, mocker: MockerFixture): interface_mock = mocker.MagicMock() configuration = ProjectConfiguration() - Project(configuration, interface_mock, default_pyproject) + Project(configuration, interface_mock, default_pyproject.dict()) + + def From 4ebdc2381dd63118367d9de6a868fb44efa471f4 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Tue, 29 Mar 2022 17:37:41 -0400 Subject: [PATCH 04/10] Update Chore --- pdm.lock | 100 ++++++++++++++++++++++++------------------------- pyproject.toml | 4 +- 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/pdm.lock b/pdm.lock index aa12d9c..4701fb5 100644 --- a/pdm.lock +++ b/pdm.lock @@ -1,6 +1,6 @@ [[package]] name = "astroid" -version = "2.11.1" +version = "2.11.2" requires_python = ">=3.6.2" summary = "An abstract syntax tree for Python with inference support." dependencies = [ @@ -23,7 +23,7 @@ summary = "Classes Without Boilerplate" [[package]] name = "black" -version = "22.1.0" +version = "22.3.0" requires_python = ">=3.6.2" summary = "The uncompromising code formatter." dependencies = [ @@ -31,13 +31,13 @@ dependencies = [ "mypy-extensions>=0.4.3", "pathspec>=0.9.0", "platformdirs>=2", - "tomli>=1.1.0", + "tomli>=1.1.0; python_version < \"3.11\"", ] [[package]] name = "click" -version = "8.0.4" -requires_python = ">=3.6" +version = "8.1.0" +requires_python = ">=3.7" summary = "Composable command line interface toolkit" dependencies = [ "colorama; platform_system == \"Windows\"", @@ -152,11 +152,11 @@ dependencies = [ [[package]] name = "pylint" -version = "2.13.0" +version = "2.13.3" requires_python = ">=3.6.2" summary = "python code static checker" dependencies = [ - "astroid<=2.12.0-dev0,>=2.11.0", + "astroid<=2.12.0-dev0,>=2.11.2", "colorama; sys_platform == \"win32\"", "dill>=0.2", "isort<6,>=4.2.5", @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "setuptools" -version = "61.0.0" +version = "61.2.0" requires_python = ">=3.7" summary = "Easily download, build, install, upgrade, and uninstall Python packages" @@ -229,7 +229,7 @@ summary = "A lil' TOML parser" [[package]] name = "tomlkit" -version = "0.10.0" +version = "0.10.1" requires_python = ">=3.6,<4.0" summary = "Style preserving TOML library" @@ -247,12 +247,12 @@ summary = "Module for decorators, wrappers and monkey patching." [metadata] lock_version = "3.1" -content_hash = "sha256:c2d0bac429ed766e18e9a8f9bc048d3c89d83b86bbdec3a679f8f28b77dcacf4" +content_hash = "sha256:dbdc8379c4d32d101b87e09fb91030f33cf033a29404927302553c1d9029235a" [metadata.files] -"astroid 2.11.1" = [ - {file = "astroid-2.11.1-py3-none-any.whl", hash = "sha256:e3ae0984c28b7bae2a107dffbc6e9acecf9b06506322f3465e914405dd652394"}, - {file = "astroid-2.11.1.tar.gz", hash = "sha256:33f1c15fe9661348a50b7ec6789947089ead2a5de727bb4782d530d9d2fff2c8"}, +"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"}, ] "atomicwrites 1.4.0" = [ {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, @@ -262,34 +262,34 @@ content_hash = "sha256:c2d0bac429ed766e18e9a8f9bc048d3c89d83b86bbdec3a679f8f28b7 {file = "attrs-21.4.0-py2.py3-none-any.whl", hash = "sha256:2d27e3784d7a565d36ab851fe94887c5eccd6a463168875832a1be79c82828b4"}, {file = "attrs-21.4.0.tar.gz", hash = "sha256:626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd"}, ] -"black 22.1.0" = [ - {file = "black-22.1.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:1297c63b9e1b96a3d0da2d85d11cd9bf8664251fd69ddac068b98dc4f34f73b6"}, - {file = "black-22.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2ff96450d3ad9ea499fc4c60e425a1439c2120cbbc1ab959ff20f7c76ec7e866"}, - {file = "black-22.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0e21e1f1efa65a50e3960edd068b6ae6d64ad6235bd8bfea116a03b21836af71"}, - {file = "black-22.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e2f69158a7d120fd641d1fa9a921d898e20d52e44a74a6fbbcc570a62a6bc8ab"}, - {file = "black-22.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:228b5ae2c8e3d6227e4bde5920d2fc66cc3400fde7bcc74f480cb07ef0b570d5"}, - {file = "black-22.1.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:b1a5ed73ab4c482208d20434f700d514f66ffe2840f63a6252ecc43a9bc77e8a"}, - {file = "black-22.1.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:35944b7100af4a985abfcaa860b06af15590deb1f392f06c8683b4381e8eeaf0"}, - {file = "black-22.1.0-cp36-cp36m-win_amd64.whl", hash = "sha256:7835fee5238fc0a0baf6c9268fb816b5f5cd9b8793423a75e8cd663c48d073ba"}, - {file = "black-22.1.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:dae63f2dbf82882fa3b2a3c49c32bffe144970a573cd68d247af6560fc493ae1"}, - {file = "black-22.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5fa1db02410b1924b6749c245ab38d30621564e658297484952f3d8a39fce7e8"}, - {file = "black-22.1.0-cp37-cp37m-win_amd64.whl", hash = "sha256:c8226f50b8c34a14608b848dc23a46e5d08397d009446353dad45e04af0c8e28"}, - {file = "black-22.1.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:2d6f331c02f0f40aa51a22e479c8209d37fcd520c77721c034517d44eecf5912"}, - {file = "black-22.1.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:742ce9af3086e5bd07e58c8feb09dbb2b047b7f566eb5f5bc63fd455814979f3"}, - {file = "black-22.1.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:fdb8754b453fb15fad3f72cd9cad3e16776f0964d67cf30ebcbf10327a3777a3"}, - {file = "black-22.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5660feab44c2e3cb24b2419b998846cbb01c23c7fe645fee45087efa3da2d61"}, - {file = "black-22.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:6f2f01381f91c1efb1451998bd65a129b3ed6f64f79663a55fe0e9b74a5f81fd"}, - {file = "black-22.1.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:efbadd9b52c060a8fc3b9658744091cb33c31f830b3f074422ed27bad2b18e8f"}, - {file = "black-22.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8871fcb4b447206904932b54b567923e5be802b9b19b744fdff092bd2f3118d0"}, - {file = "black-22.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ccad888050f5393f0d6029deea2a33e5ae371fd182a697313bdbd835d3edaf9c"}, - {file = "black-22.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:07e5c049442d7ca1a2fc273c79d1aecbbf1bc858f62e8184abe1ad175c4f7cc2"}, - {file = "black-22.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:373922fc66676133ddc3e754e4509196a8c392fec3f5ca4486673e685a421321"}, - {file = "black-22.1.0-py3-none-any.whl", hash = "sha256:3524739d76b6b3ed1132422bf9d82123cd1705086723bc3e235ca39fd21c667d"}, - {file = "black-22.1.0.tar.gz", hash = "sha256:a7c0192d35635f6fc1174be575cb7915e92e5dd629ee79fdaf0dcfa41a80afb5"}, -] -"click 8.0.4" = [ - {file = "click-8.0.4-py3-none-any.whl", hash = "sha256:6a7a62563bbfabfda3a38f3023a1db4a35978c0abd76f6c9605ecd6554d6d9b1"}, - {file = "click-8.0.4.tar.gz", hash = "sha256:8458d7b1287c5fb128c90e23381cf99dcde74beaf6c7ff6384ce84d6fe090adb"}, +"black 22.3.0" = [ + {file = "black-22.3.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:2497f9c2386572e28921fa8bec7be3e51de6801f7459dffd6e62492531c47e09"}, + {file = "black-22.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5795a0375eb87bfe902e80e0c8cfaedf8af4d49694d69161e5bd3206c18618bb"}, + {file = "black-22.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e3556168e2e5c49629f7b0f377070240bd5511e45e25a4497bb0073d9dda776a"}, + {file = "black-22.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67c8301ec94e3bcc8906740fe071391bce40a862b7be0b86fb5382beefecd968"}, + {file = "black-22.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:fd57160949179ec517d32ac2ac898b5f20d68ed1a9c977346efbac9c2f1e779d"}, + {file = "black-22.3.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:cc1e1de68c8e5444e8f94c3670bb48a2beef0e91dddfd4fcc29595ebd90bb9ce"}, + {file = "black-22.3.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d2fc92002d44746d3e7db7cf9313cf4452f43e9ea77a2c939defce3b10b5c82"}, + {file = "black-22.3.0-cp36-cp36m-win_amd64.whl", hash = "sha256:a6342964b43a99dbc72f72812bf88cad8f0217ae9acb47c0d4f141a6416d2d7b"}, + {file = "black-22.3.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:328efc0cc70ccb23429d6be184a15ce613f676bdfc85e5fe8ea2a9354b4e9015"}, + {file = "black-22.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:06f9d8846f2340dfac80ceb20200ea5d1b3f181dd0556b47af4e8e0b24fa0a6b"}, + {file = "black-22.3.0-cp37-cp37m-win_amd64.whl", hash = "sha256:ad4efa5fad66b903b4a5f96d91461d90b9507a812b3c5de657d544215bb7877a"}, + {file = "black-22.3.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e8477ec6bbfe0312c128e74644ac8a02ca06bcdb8982d4ee06f209be28cdf163"}, + {file = "black-22.3.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:637a4014c63fbf42a692d22b55d8ad6968a946b4a6ebc385c5505d9625b6a464"}, + {file = "black-22.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:863714200ada56cbc366dc9ae5291ceb936573155f8bf8e9de92aef51f3ad0f0"}, + {file = "black-22.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10dbe6e6d2988049b4655b2b739f98785a884d4d6b85bc35133a8fb9a2233176"}, + {file = "black-22.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:cee3e11161dde1b2a33a904b850b0899e0424cc331b7295f2a9698e79f9a69a0"}, + {file = "black-22.3.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:5891ef8abc06576985de8fa88e95ab70641de6c1fca97e2a15820a9b69e51b20"}, + {file = "black-22.3.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:30d78ba6bf080eeaf0b7b875d924b15cd46fec5fd044ddfbad38c8ea9171043a"}, + {file = "black-22.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ee8f1f7228cce7dffc2b464f07ce769f478968bfb3dd1254a4c2eeed84928aad"}, + {file = "black-22.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ee227b696ca60dd1c507be80a6bc849a5a6ab57ac7352aad1ffec9e8b805f21"}, + {file = "black-22.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:9b542ced1ec0ceeff5b37d69838106a6348e60db7b8fdd245294dc1d26136265"}, + {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.0" = [ + {file = "click-8.1.0-py3-none-any.whl", hash = "sha256:19a4baa64da924c5e0cd889aba8e947f280309f1a2ce0947a3e3a7bcb7cc72d6"}, + {file = "click-8.1.0.tar.gz", hash = "sha256:977c213473c7665d3aa092b41ff12063227751c41d7b17165013e10069cc5cd2"}, ] "colorama 0.4.4" = [ {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, @@ -458,9 +458,9 @@ content_hash = "sha256:c2d0bac429ed766e18e9a8f9bc048d3c89d83b86bbdec3a679f8f28b7 {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.0" = [ - {file = "pylint-2.13.0-py3-none-any.whl", hash = "sha256:ea1692d409487a93cdcc015ddf2fd92f2367fb1193d46ece76df98b6fefc0dda"}, - {file = "pylint-2.13.0.tar.gz", hash = "sha256:f04508086a0772f1a459b4e9facd02416943b47dda5a98ed79d4d87e709da04f"}, +"pylint 2.13.3" = [ + {file = "pylint-2.13.3-py3-none-any.whl", hash = "sha256:c8837b6ec6440e3490ab8f066054b0645a516a29ca51ce442f16f7004f711a70"}, + {file = "pylint-2.13.3.tar.gz", hash = "sha256:12ed2520510c40db647e4ec7f747b07e0d669b33ab41479c2a07bb89b92877db"}, ] "pyparsing 3.0.7" = [ {file = "pyparsing-3.0.7-py3-none-any.whl", hash = "sha256:a6c06a88f252e6c322f65faf8f418b16213b51bdfaece0524c1c1bc30c63c484"}, @@ -482,17 +482,17 @@ content_hash = "sha256:c2d0bac429ed766e18e9a8f9bc048d3c89d83b86bbdec3a679f8f28b7 {file = "pytest_mock-3.7.0-py3-none-any.whl", hash = "sha256:6cff27cec936bf81dc5ee87f07132b807bcda51106b5ec4b90a04331cba76231"}, {file = "pytest-mock-3.7.0.tar.gz", hash = "sha256:5112bd92cc9f186ee96e1a92efc84969ea494939c3aead39c50f421c4cc69534"}, ] -"setuptools 61.0.0" = [ - {file = "setuptools-61.0.0-py3-none-any.whl", hash = "sha256:ad88b13f3dc60420259c9877486908ddad12c7befaff0d624c7190f742abd64f"}, - {file = "setuptools-61.0.0.tar.gz", hash = "sha256:6221e37dc86fcdc9dad9d9eb2002e9f9798fe4aca1bf18f280e66e50c0eb7fca"}, +"setuptools 61.2.0" = [ + {file = "setuptools-61.2.0-py3-none-any.whl", hash = "sha256:8f4813dd6a4d6cc17bde85fb2e635fe19763f96efbb0ddf5575562e5ee0bc47a"}, + {file = "setuptools-61.2.0.tar.gz", hash = "sha256:c3d4e2ab578fbf83775755cd76dae73627915a22832cf4ea5de895978767833b"}, ] "tomli 2.0.1" = [ {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.0" = [ - {file = "tomlkit-0.10.0-py3-none-any.whl", hash = "sha256:cac4aeaff42f18fef6e07831c2c2689a51df76cf2ede07a6a4fa5fcb83558870"}, - {file = "tomlkit-0.10.0.tar.gz", hash = "sha256:d99946c6aed3387c98b89d91fb9edff8f901bf9255901081266a84fb5604adcd"}, +"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"}, ] "typing-extensions 4.1.1" = [ {file = "typing_extensions-4.1.1-py3-none-any.whl", hash = "sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2"}, diff --git a/pyproject.toml b/pyproject.toml index 0c4be47..664df8f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,8 +31,8 @@ version = {use_scm = true} [tool.pdm.dev-dependencies] lint = [ - "black>=22.1.0", - "pylint>=2.13.0", + "black>=22.3.0", + "pylint>=2.13.3", "isort>=5.10.1", ] test = [ From 3669be37852d852da76aae2f7f1b83c787284276 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Tue, 29 Mar 2022 17:39:29 -0400 Subject: [PATCH 05/10] Update Lock --- pdm.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdm.lock b/pdm.lock index 4701fb5..6c9f69b 100644 --- a/pdm.lock +++ b/pdm.lock @@ -247,7 +247,7 @@ summary = "Module for decorators, wrappers and monkey patching." [metadata] lock_version = "3.1" -content_hash = "sha256:dbdc8379c4d32d101b87e09fb91030f33cf033a29404927302553c1d9029235a" +content_hash = "sha256:0bcc3fb89830fe1572070d59d4b5bc6337e43f5a2862972e9c71419cf76f30a7" [metadata.files] "astroid 2.11.2" = [ From 8a400995767ac1a2bd1c09f74933cc6e3c77c60d Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Sat, 2 Apr 2022 14:05:33 -0400 Subject: [PATCH 06/10] Update Chore --- pdm.lock | 24 ++++++++++++------------ pyproject.toml | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pdm.lock b/pdm.lock index 6c9f69b..3c92b5e 100644 --- a/pdm.lock +++ b/pdm.lock @@ -36,7 +36,7 @@ dependencies = [ [[package]] name = "click" -version = "8.1.0" +version = "8.1.2" requires_python = ">=3.7" summary = "Composable command line interface toolkit" dependencies = [ @@ -152,7 +152,7 @@ dependencies = [ [[package]] name = "pylint" -version = "2.13.3" +version = "2.13.4" requires_python = ">=3.6.2" summary = "python code static checker" dependencies = [ @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "setuptools" -version = "61.2.0" +version = "61.3.1" requires_python = ">=3.7" summary = "Easily download, build, install, upgrade, and uninstall Python packages" @@ -287,9 +287,9 @@ content_hash = "sha256:0bcc3fb89830fe1572070d59d4b5bc6337e43f5a2862972e9c71419cf {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.0" = [ - {file = "click-8.1.0-py3-none-any.whl", hash = "sha256:19a4baa64da924c5e0cd889aba8e947f280309f1a2ce0947a3e3a7bcb7cc72d6"}, - {file = "click-8.1.0.tar.gz", hash = "sha256:977c213473c7665d3aa092b41ff12063227751c41d7b17165013e10069cc5cd2"}, +"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"}, ] "colorama 0.4.4" = [ {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, @@ -458,9 +458,9 @@ content_hash = "sha256:0bcc3fb89830fe1572070d59d4b5bc6337e43f5a2862972e9c71419cf {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.3" = [ - {file = "pylint-2.13.3-py3-none-any.whl", hash = "sha256:c8837b6ec6440e3490ab8f066054b0645a516a29ca51ce442f16f7004f711a70"}, - {file = "pylint-2.13.3.tar.gz", hash = "sha256:12ed2520510c40db647e4ec7f747b07e0d669b33ab41479c2a07bb89b92877db"}, +"pylint 2.13.4" = [ + {file = "pylint-2.13.4-py3-none-any.whl", hash = "sha256:8672cf7441b81410f5de7defdf56e2d559c956fd0579652f2e0a0a35bea2d546"}, + {file = "pylint-2.13.4.tar.gz", hash = "sha256:7cc6d0c4f61dff440f9ed8b657f4ecd615dcfe35345953eb7b1dc74afe901d7a"}, ] "pyparsing 3.0.7" = [ {file = "pyparsing-3.0.7-py3-none-any.whl", hash = "sha256:a6c06a88f252e6c322f65faf8f418b16213b51bdfaece0524c1c1bc30c63c484"}, @@ -482,9 +482,9 @@ content_hash = "sha256:0bcc3fb89830fe1572070d59d4b5bc6337e43f5a2862972e9c71419cf {file = "pytest_mock-3.7.0-py3-none-any.whl", hash = "sha256:6cff27cec936bf81dc5ee87f07132b807bcda51106b5ec4b90a04331cba76231"}, {file = "pytest-mock-3.7.0.tar.gz", hash = "sha256:5112bd92cc9f186ee96e1a92efc84969ea494939c3aead39c50f421c4cc69534"}, ] -"setuptools 61.2.0" = [ - {file = "setuptools-61.2.0-py3-none-any.whl", hash = "sha256:8f4813dd6a4d6cc17bde85fb2e635fe19763f96efbb0ddf5575562e5ee0bc47a"}, - {file = "setuptools-61.2.0.tar.gz", hash = "sha256:c3d4e2ab578fbf83775755cd76dae73627915a22832cf4ea5de895978767833b"}, +"setuptools 61.3.1" = [ + {file = "setuptools-61.3.1-py3-none-any.whl", hash = "sha256:41aface2e85b517c3a466b4689b8055c02cd2e623461f09af7d93f3da65c4709"}, + {file = "setuptools-61.3.1.tar.gz", hash = "sha256:88fafba4abc2f047e08a188fd4bbc10b0e464592c37b514c19f8f8f88d94450b"}, ] "tomli 2.0.1" = [ {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, diff --git a/pyproject.toml b/pyproject.toml index 664df8f..19e535d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ version = {use_scm = true} [tool.pdm.dev-dependencies] lint = [ "black>=22.3.0", - "pylint>=2.13.3", + "pylint>=2.13.4", "isort>=5.10.1", ] test = [ From 34591198359c15bfd1081e466abc5d510b90e3de Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Sun, 3 Apr 2022 18:14:23 -0400 Subject: [PATCH 07/10] Update Lock --- pdm.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdm.lock b/pdm.lock index 3c92b5e..037fa9b 100644 --- a/pdm.lock +++ b/pdm.lock @@ -247,7 +247,7 @@ summary = "Module for decorators, wrappers and monkey patching." [metadata] lock_version = "3.1" -content_hash = "sha256:0bcc3fb89830fe1572070d59d4b5bc6337e43f5a2862972e9c71419cf76f30a7" +content_hash = "sha256:97376b176687b697d1d0ae17975b79ae776920a1cf473be364e146384c8bede9" [metadata.files] "astroid 2.11.2" = [ From 58baa2fd7632954223979c1ffca024de3370bc5d Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Mon, 4 Apr 2022 16:44:24 -0400 Subject: [PATCH 08/10] Update --- pdm.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pdm.lock b/pdm.lock index 037fa9b..19fed91 100644 --- a/pdm.lock +++ b/pdm.lock @@ -217,7 +217,7 @@ dependencies = [ [[package]] name = "setuptools" -version = "61.3.1" +version = "62.0.0" requires_python = ">=3.7" summary = "Easily download, build, install, upgrade, and uninstall Python packages" @@ -482,9 +482,9 @@ content_hash = "sha256:97376b176687b697d1d0ae17975b79ae776920a1cf473be364e146384 {file = "pytest_mock-3.7.0-py3-none-any.whl", hash = "sha256:6cff27cec936bf81dc5ee87f07132b807bcda51106b5ec4b90a04331cba76231"}, {file = "pytest-mock-3.7.0.tar.gz", hash = "sha256:5112bd92cc9f186ee96e1a92efc84969ea494939c3aead39c50f421c4cc69534"}, ] -"setuptools 61.3.1" = [ - {file = "setuptools-61.3.1-py3-none-any.whl", hash = "sha256:41aface2e85b517c3a466b4689b8055c02cd2e623461f09af7d93f3da65c4709"}, - {file = "setuptools-61.3.1.tar.gz", hash = "sha256:88fafba4abc2f047e08a188fd4bbc10b0e464592c37b514c19f8f8f88d94450b"}, +"setuptools 62.0.0" = [ + {file = "setuptools-62.0.0-py3-none-any.whl", hash = "sha256:a65e3802053e99fc64c6b3b29c11132943d5b8c8facbcc461157511546510967"}, + {file = "setuptools-62.0.0.tar.gz", hash = "sha256:7999cbd87f1b6e1f33bf47efa368b224bed5e27b5ef2c4d46580186cbcb1a86a"}, ] "tomli 2.0.1" = [ {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, From 8224c517cde9890f5a39b1ceb8f4cf20ea3667d2 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Thu, 7 Apr 2022 14:10:34 -0400 Subject: [PATCH 09/10] Move Plugin Gather to Module Scope --- cppython/project.py | 36 ++++++++++++++++++------------------ pdm.lock | 10 +++++----- pyproject.toml | 4 +++- tests/unit/test_project.py | 17 +++++++++++++++-- 4 files changed, 41 insertions(+), 26 deletions(-) diff --git a/cppython/project.py b/cppython/project.py index 8540c4a..50a913c 100644 --- a/cppython/project.py +++ b/cppython/project.py @@ -7,7 +7,6 @@ from typing import Any, Type, TypeVar from xmlrpc.client import Boolean -from cppython_core.exceptions import ConfigError from cppython_core.schema import ( API, CPPythonData, @@ -19,6 +18,23 @@ ) from pydantic import create_model +PluginType = TypeVar("PluginType", bound=Type[Plugin]) + + +def gather_plugins(plugin_type: PluginType) -> list[Type[PluginType]]: + """ + TODO + """ + plugins = [] + entry_points = metadata.entry_points(group=f"cppython.{plugin_type.plugin_group()}") + + for entry_point in entry_points: + loaded_plugin_type = entry_point.load() + if issubclass(loaded_plugin_type, plugin_type) & (loaded_plugin_type is not plugin_type): + plugins.append(loaded_plugin_type) + + return plugins + @dataclass class ProjectConfiguration: @@ -45,7 +61,7 @@ def __init__( interface.print("Starting CPPython project initialization") # Gather - plugins = self._gather_plugins(Generator) + plugins = gather_plugins(Generator) if not plugins: if self.verbose: @@ -91,22 +107,6 @@ def __init__( if self.verbose: interface.print("CPPython project initialized") - _PluginType = TypeVar("_PluginType", bound=Type[Plugin]) - - def _gather_plugins(self, plugin_type: _PluginType) -> list[Type[_PluginType]]: - """ - TODO - """ - plugins = [] - entry_points = metadata.entry_points(group=f"cppython.{plugin_type.plugin_group()}") - - for entry_point in entry_points: - loaded_plugin_type = entry_point.load() - if issubclass(loaded_plugin_type, plugin_type) & (loaded_plugin_type is not plugin_type): - plugins.append(loaded_plugin_type) - - return plugins - def download(self): """ Download the generator tooling if required diff --git a/pdm.lock b/pdm.lock index 19fed91..3ba589a 100644 --- a/pdm.lock +++ b/pdm.lock @@ -152,7 +152,7 @@ dependencies = [ [[package]] name = "pylint" -version = "2.13.4" +version = "2.13.5" requires_python = ">=3.6.2" summary = "python code static checker" dependencies = [ @@ -247,7 +247,7 @@ summary = "Module for decorators, wrappers and monkey patching." [metadata] lock_version = "3.1" -content_hash = "sha256:97376b176687b697d1d0ae17975b79ae776920a1cf473be364e146384c8bede9" +content_hash = "sha256:99e233e2e11b01fc8a5d15b1b222bb34f6082fa365d91a4eab0ad94bd4792b1a" [metadata.files] "astroid 2.11.2" = [ @@ -458,9 +458,9 @@ content_hash = "sha256:97376b176687b697d1d0ae17975b79ae776920a1cf473be364e146384 {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.4" = [ - {file = "pylint-2.13.4-py3-none-any.whl", hash = "sha256:8672cf7441b81410f5de7defdf56e2d559c956fd0579652f2e0a0a35bea2d546"}, - {file = "pylint-2.13.4.tar.gz", hash = "sha256:7cc6d0c4f61dff440f9ed8b657f4ecd615dcfe35345953eb7b1dc74afe901d7a"}, +"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"}, ] "pyparsing 3.0.7" = [ {file = "pyparsing-3.0.7-py3-none-any.whl", hash = "sha256:a6c06a88f252e6c322f65faf8f418b16213b51bdfaece0524c1c1bc30c63c484"}, diff --git a/pyproject.toml b/pyproject.toml index 19e535d..320eeb4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,6 +17,7 @@ dependencies = [ "click>=8.0.3", "tomlkit>=0.10.0", "cppython-core>=0.1.4", + "pydantic>=1.9.0", ] [project.license-files] @@ -32,7 +33,7 @@ version = {use_scm = true} [tool.pdm.dev-dependencies] lint = [ "black>=22.3.0", - "pylint>=2.13.4", + "pylint>=2.13.5", "isort>=5.10.1", ] test = [ @@ -59,6 +60,7 @@ profile = "black" [tool.pylint.messages_control] disable = "C0330, C0326" +extension-pkg-whitelist = "pydantic" [tool.pylint.format] max-line-length = "120" diff --git a/tests/unit/test_project.py b/tests/unit/test_project.py index 8aaf150..f59b9dc 100644 --- a/tests/unit/test_project.py +++ b/tests/unit/test_project.py @@ -2,10 +2,11 @@ Test the functions related to the internal interface implementation and the 'Interface' interface itself """ +from cppython_core.schema import Generator from pytest_mock import MockerFixture from cppython.data import default_pyproject -from cppython.project import Project, ProjectConfiguration +from cppython.project import Project, ProjectConfiguration, gather_plugins class TestProject: @@ -22,4 +23,16 @@ def test_construction(self, mocker: MockerFixture): configuration = ProjectConfiguration() Project(configuration, interface_mock, default_pyproject.dict()) - def + def test_plugin_gather(self, mocker: MockerFixture): + """ + TODO + """ + mocker.patch("cppython.console._create_pyproject", return_value=default_pyproject) + plugins = gather_plugins(Generator) + + assert len(plugins) == 0 + + def test_generator_data_construction(self): + """ + TODO + """ From 33fa70027457e759427924b465194bbe210ade4b Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Fri, 8 Apr 2022 06:40:54 -0400 Subject: [PATCH 10/10] Project Builder --- cppython/project.py | 97 ++++++++++++++++++++++---------------- tests/unit/test_project.py | 20 ++++++-- 2 files changed, 73 insertions(+), 44 deletions(-) diff --git a/cppython/project.py b/cppython/project.py index 50a913c..ced9257 100644 --- a/cppython/project.py +++ b/cppython/project.py @@ -18,23 +18,6 @@ ) from pydantic import create_model -PluginType = TypeVar("PluginType", bound=Type[Plugin]) - - -def gather_plugins(plugin_type: PluginType) -> list[Type[PluginType]]: - """ - TODO - """ - plugins = [] - entry_points = metadata.entry_points(group=f"cppython.{plugin_type.plugin_group()}") - - for entry_point in entry_points: - loaded_plugin_type = entry_point.load() - if issubclass(loaded_plugin_type, plugin_type) & (loaded_plugin_type is not plugin_type): - plugins.append(loaded_plugin_type) - - return plugins - @dataclass class ProjectConfiguration: @@ -45,29 +28,32 @@ class ProjectConfiguration: verbose: Boolean = False -class Project(API): +class ProjectBuilder: """ - The object constructed at each entry_point + TODO """ - def __init__( - self, configuration: ProjectConfiguration, interface: Interface, pyproject_data: dict[str, Any] - ) -> None: - - self.enabled = False - self.verbose = configuration.verbose + def __init__(self, configuration: ProjectConfiguration) -> None: + self.configuration = configuration - if self.verbose: - interface.print("Starting CPPython project initialization") + def gather_plugins(self, plugin_type: Type[Plugin]) -> list[Type[Plugin]]: + """ + TODO + """ + plugins = [] + entry_points = metadata.entry_points(group=f"cppython.{plugin_type.plugin_group()}") - # Gather - plugins = gather_plugins(Generator) + for entry_point in entry_points: + loaded_plugin_type = entry_point.load() + if issubclass(loaded_plugin_type, plugin_type) & (loaded_plugin_type is not plugin_type): + plugins.append(loaded_plugin_type) - if not plugins: - if self.verbose: - interface.print("No generator plugin was found.") - return + return plugins + def generate_model(self, plugins: list[Type[Plugin]]) -> Type[PyProject]: + """ + TODO + """ plugin_fields = {} for plugin_type in plugins: plugin_fields[plugin_type.name()] = plugin_type.data_type() @@ -84,15 +70,46 @@ def __init__( __base__=ToolData, ) - pyproject = PyProject(**pyproject_data) + return create_model( + "PyProject", + tool=ExtendedToolData, + __base__=PyProject, + ) + + +class Project(API): + """ + The object constructed at each entry_point + """ + + def __init__( + self, configuration: ProjectConfiguration, interface: Interface, pyproject_data: dict[str, Any] + ) -> None: + + self.enabled = False + self.configuration = configuration + + if self.configuration.verbose: + interface.print("Starting CPPython project initialization") + + builder = ProjectBuilder(self.configuration) + plugins = builder.gather_plugins(Generator) + + if not plugins: + if self.configuration.verbose: + interface.print("No generator plugin was found.") + return + + ExtendedPyProject = builder.generate_model(plugins) + pyproject = ExtendedPyProject(**pyproject_data) if pyproject.tool is None: - if self.verbose: + if self.configuration.verbose: interface.print("Table [tool] is not defined") return if pyproject.tool.cppython is None: - if self.verbose: + if self.configuration.verbose: interface.print("Table [tool.cppython] is not defined") return @@ -104,7 +121,7 @@ def __init__( for plugin_type in plugins: self._generators.append(plugin_type(pyproject)) - if self.verbose: + if self.configuration.verbose: interface.print("CPPython project initialized") def download(self): @@ -124,7 +141,7 @@ def download(self): def install(self) -> None: if self.enabled: - if self.verbose: + if self.configuration.verbose: self._interface.print("CPPython: Installing...") self.download() @@ -133,7 +150,7 @@ def install(self) -> None: def update(self) -> None: if self.enabled: - if self.verbose: + if self.configuration.verbose: self._interface.print("CPPython: Updating...") for generator in self._generators: @@ -141,7 +158,7 @@ def update(self) -> None: def build(self) -> None: if self.enabled: - if self.verbose: + if self.configuration.verbose: self._interface.print("CPPython: Building...") for generator in self._generators: diff --git a/tests/unit/test_project.py b/tests/unit/test_project.py index f59b9dc..06b4c0b 100644 --- a/tests/unit/test_project.py +++ b/tests/unit/test_project.py @@ -6,7 +6,7 @@ from pytest_mock import MockerFixture from cppython.data import default_pyproject -from cppython.project import Project, ProjectConfiguration, gather_plugins +from cppython.project import Project, ProjectBuilder, ProjectConfiguration class TestProject: @@ -23,12 +23,20 @@ def test_construction(self, mocker: MockerFixture): configuration = ProjectConfiguration() Project(configuration, interface_mock, default_pyproject.dict()) - def test_plugin_gather(self, mocker: MockerFixture): + +class TestBuilder: + """ + TODO + """ + + def test_plugin_gather(self): """ TODO """ - mocker.patch("cppython.console._create_pyproject", return_value=default_pyproject) - plugins = gather_plugins(Generator) + + configuration = ProjectConfiguration() + builder = ProjectBuilder(configuration) + plugins = builder.gather_plugins(Generator) assert len(plugins) == 0 @@ -36,3 +44,7 @@ def test_generator_data_construction(self): """ TODO """ + + configuration = ProjectConfiguration() + builder = ProjectBuilder(configuration) + Model = builder.generate_model([])