From 59c1ccc32faf98d19a68bcf7f70544756fac3b6c Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Thu, 15 Jun 2023 03:39:45 -0400 Subject: [PATCH 01/68] Update pdm.lock --- pdm.lock | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/pdm.lock b/pdm.lock index 8fcf779..c4f1532 100644 --- a/pdm.lock +++ b/pdm.lock @@ -63,7 +63,7 @@ dependencies = [ [[package]] name = "cppython-core" -version = "0.6.1.dev68" +version = "0.6.1.dev70" requires_python = ">=3.11" summary = "Data definitions for CPPython" dependencies = [ @@ -130,7 +130,7 @@ summary = "Utility library for gitignore style pattern matching of file paths." [[package]] name = "platformdirs" -version = "3.5.1" +version = "3.5.3" requires_python = ">=3.7" summary = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." @@ -142,7 +142,7 @@ summary = "plugin and hook calling mechanisms for python" [[package]] name = "pydantic" -version = "2.0b1" +version = "2.0b2" requires_python = ">=3.7" summary = "Data validation using Python type hints" dependencies = [ @@ -174,7 +174,7 @@ dependencies = [ [[package]] name = "pytest" -version = "7.3.1" +version = "7.3.2" requires_python = ">=3.7" summary = "pytest: simple powerful testing with Python" dependencies = [ @@ -205,7 +205,7 @@ dependencies = [ [[package]] name = "pytest-cppython" -version = "0.3.1.dev42" +version = "0.3.1.dev44" requires_python = ">=3.11" summary = "A pytest plugin that imports CPPython testing types" dependencies = [ @@ -230,7 +230,7 @@ summary = "Style preserving TOML library" [[package]] name = "typing-extensions" -version = "4.6.2" +version = "4.6.3" requires_python = ">=3.7" summary = "Backported and Experimental Type Hints for Python 3.7+" @@ -352,9 +352,9 @@ content_hash = "sha256:773ab8aa79c3209ee9a05956dc5808f351d35914c4c996301b024b71c {url = "https://files.pythonhosted.org/packages/fe/57/e4f8ad64d84ca9e759d783a052795f62a9f9111585e46068845b1cb52c2b/coverage-7.2.7-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6f48351d66575f535669306aa7d6d6f71bc43372473b54a832222803eb956fd1"}, {url = "https://files.pythonhosted.org/packages/ff/d5/52fa1891d1802ab2e1b346d37d349cb41cdd4fd03f724ebbf94e80577687/coverage-7.2.7-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f2f67fe12b22cd130d34d0ef79206061bfb5eda52feb6ce0dba0644e20a03cf4"}, ] -"cppython-core 0.6.1.dev68" = [ - {url = "https://files.pythonhosted.org/packages/5a/bd/f8bb92a67c89cc907031436960a0e4a7a97bfb5ac83bb0356ca0075d711b/cppython-core-0.6.1.dev68.tar.gz", hash = "sha256:17330d7a1dfb8ec39d65f5140befd374696dfe3e315549d84c4a0a17fdbb27af"}, - {url = "https://files.pythonhosted.org/packages/6f/79/7c91049050e3714317f934f9a23ca7232b39930fd79a74cb09672a1016ee/cppython_core-0.6.1.dev68-py3-none-any.whl", hash = "sha256:b3343fd13575757d2b39aecd30ba675177b94df8371055ca0c2e4ceb4cc04ca4"}, +"cppython-core 0.6.1.dev70" = [ + {url = "https://files.pythonhosted.org/packages/82/44/6b22f00a9590ac4edba724f891f05ac4936b441456ab26bf90dbf80e6d07/cppython_core-0.6.1.dev70-py3-none-any.whl", hash = "sha256:c2761c1b9f20d5da53f52d2273be9dced812f56d2f8186786ccd662505da14fc"}, + {url = "https://files.pythonhosted.org/packages/b9/a7/cdad28d35ac41701ebf868f238abd9ac8eecb89283bfafdedbcbe644d4aa/cppython-core-0.6.1.dev70.tar.gz", hash = "sha256:55dc44f3570c67a63ca9d88848a543d71eff476fe13f77948f11ea5f579822b9"}, ] "dill 0.3.6" = [ {url = "https://files.pythonhosted.org/packages/7c/e7/364a09134e1062d4d5ff69b853a56cf61c223e0afcc6906b6832bcd51ea8/dill-0.3.6.tar.gz", hash = "sha256:e5db55f3687856d8fbdab002ed78544e1c4559a130302693d839dfe8f93f2373"}, @@ -450,17 +450,17 @@ content_hash = "sha256:773ab8aa79c3209ee9a05956dc5808f351d35914c4c996301b024b71c {url = "https://files.pythonhosted.org/packages/95/60/d93628975242cc515ab2b8f5b2fc831d8be2eff32f5a1be4776d49305d13/pathspec-0.11.1.tar.gz", hash = "sha256:2798de800fa92780e33acca925945e9a19a133b715067cf165b8866c15a31687"}, {url = "https://files.pythonhosted.org/packages/be/c8/551a803a6ebb174ec1c124e68b449b98a0961f0b737def601e3c1fbb4cfd/pathspec-0.11.1-py3-none-any.whl", hash = "sha256:d8af70af76652554bd134c22b3e8a1cc46ed7d91edcdd721ef1a0c51a84a5293"}, ] -"platformdirs 3.5.1" = [ - {url = "https://files.pythonhosted.org/packages/89/7e/c6ff9ddcf93b9b36c90d88111c4db354afab7f9a58c7ac3257fa717f1268/platformdirs-3.5.1-py3-none-any.whl", hash = "sha256:e2378146f1964972c03c085bb5662ae80b2b8c06226c54b2ff4aa9483e8a13a5"}, - {url = "https://files.pythonhosted.org/packages/9c/0e/ae9ef1049d4b5697e79250c4b2e72796e4152228e67733389868229c92bb/platformdirs-3.5.1.tar.gz", hash = "sha256:412dae91f52a6f84830f39a8078cecd0e866cb72294a5c66808e74d5e88d251f"}, +"platformdirs 3.5.3" = [ + {url = "https://files.pythonhosted.org/packages/6d/1a/96efea7b36835ce89911d7813fe68f5b1db7ecae4023bf209a7aeba93017/platformdirs-3.5.3-py3-none-any.whl", hash = "sha256:0ade98a4895e87dc51d47151f7d2ec290365a585151d97b4d8d6312ed6132fed"}, + {url = "https://files.pythonhosted.org/packages/d2/5d/29eed8861e07378ef46e956650615a9677f8f48df7911674f923236ced2b/platformdirs-3.5.3.tar.gz", hash = "sha256:e48fabd87db8f3a7df7150a4a5ea22c546ee8bc39bc2473244730d4b56d2cc4e"}, ] "pluggy 1.0.0" = [ {url = "https://files.pythonhosted.org/packages/9e/01/f38e2ff29715251cf25532b9082a1589ab7e4f571ced434f98d0139336dc/pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, {url = "https://files.pythonhosted.org/packages/a1/16/db2d7de3474b6e37cbb9c008965ee63835bba517e22cdb8c35b5116b5ce1/pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, ] -"pydantic 2.0b1" = [ - {url = "https://files.pythonhosted.org/packages/41/ef/dbe593b0a21e187ebbd7d63f714a0d8eeb069520afea5decb46642ff8854/pydantic-2.0b1.tar.gz", hash = "sha256:cba25f8a6090f8bdbc7bea424ad95a53687e10be2f23883c3460a32afd7223d6"}, - {url = "https://files.pythonhosted.org/packages/c9/30/34f9376cb61eaf06973b4d1915fa6aaed5a9db9ad0e255c3d317ae672e34/pydantic-2.0b1-py3-none-any.whl", hash = "sha256:669f0d5e777462bd000682dd3ad4cee249e3c14bab9d0648aa179a766ac0ccd4"}, +"pydantic 2.0b2" = [ + {url = "https://files.pythonhosted.org/packages/05/6f/504e94dcda88a5ec8c680864d188bf3501090536f0bbd3e72c8cb22446bf/pydantic-2.0b2.tar.gz", hash = "sha256:3491863cd9be6608f9cae6796a4fd151d38df1872242c1d5e992dcceb27697fe"}, + {url = "https://files.pythonhosted.org/packages/ad/87/2cc0ffb4493da08e2b76296f380a5e912abbcb95d2f460a08a67259f6151/pydantic-2.0b2-py3-none-any.whl", hash = "sha256:a07edf22ceb91790a4954db62b82dfc0360034e2ab30c1a23d4a65024bc66eb9"}, ] "pydantic-core 0.38.0" = [ {url = "https://files.pythonhosted.org/packages/00/16/21726a8e6d18512f6d604934adc82e6a326cccaa1b6b3b7a29fbfe0f8f12/pydantic_core-0.38.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:16aa493f005447bf6528734432ecf571c7c4dcf54712154a6e3fe70d0576b9d0"}, @@ -549,9 +549,9 @@ content_hash = "sha256:773ab8aa79c3209ee9a05956dc5808f351d35914c4c996301b024b71c {url = "https://files.pythonhosted.org/packages/04/4c/3f7d42a1378c40813772bc5f25184144da09f00ffbe3f60ae985ffa7e10f/pylint-2.17.4-py3-none-any.whl", hash = "sha256:7a1145fb08c251bdb5cca11739722ce64a63db479283d10ce718b2460e54123c"}, {url = "https://files.pythonhosted.org/packages/7e/d4/aba77d10841710fea016422f419dfe501dee05fa0fc3898dc048f7bf3f60/pylint-2.17.4.tar.gz", hash = "sha256:5dcf1d9e19f41f38e4e85d10f511e5b9c35e1aa74251bf95cdd8cb23584e2db1"}, ] -"pytest 7.3.1" = [ - {url = "https://files.pythonhosted.org/packages/1b/d1/72df649a705af1e3a09ffe14b0c7d3be1fd730da6b98beb4a2ed26b8a023/pytest-7.3.1-py3-none-any.whl", hash = "sha256:3799fa815351fea3a5e96ac7e503a96fa51cc9942c3753cda7651b93c1cfa362"}, - {url = "https://files.pythonhosted.org/packages/ec/d9/36b65598f3d19d0a14d13dc87ad5fa42869ae53bb7471f619a30eaabc4bf/pytest-7.3.1.tar.gz", hash = "sha256:434afafd78b1d78ed0addf160ad2b77a30d35d4bdf8af234fe621919d9ed15e3"}, +"pytest 7.3.2" = [ + {url = "https://files.pythonhosted.org/packages/58/2a/07c65fdc40846ecb8a9dcda2c38fcb5a06a3e39d08d4a4960916431951cb/pytest-7.3.2.tar.gz", hash = "sha256:ee990a3cc55ba808b80795a79944756f315c67c12b56abd3ac993a7b8c17030b"}, + {url = "https://files.pythonhosted.org/packages/7a/d0/de969198293cdea22b3a6fb99a99aeeddb7b3827f0823b33c5dc0734bbe5/pytest-7.3.2-py3-none-any.whl", hash = "sha256:cdcbd012c9312258922f8cd3f1b62a6580fdced17db6014896053d47cddf9295"}, ] "pytest-click 1.1.0" = [ {url = "https://files.pythonhosted.org/packages/72/1a/eb53371999b94b3c995c00117f3a232dbf6f56c7152a52cf3e3777e7d49d/pytest_click-1.1.0-py3-none-any.whl", hash = "sha256:eade4742c2f02c345e78a32534a43e8db04acf98d415090539dacc880b7cd0e9"}, @@ -561,9 +561,9 @@ content_hash = "sha256:773ab8aa79c3209ee9a05956dc5808f351d35914c4c996301b024b71c {url = "https://files.pythonhosted.org/packages/7a/15/da3df99fd551507694a9b01f512a2f6cf1254f33601605843c3775f39460/pytest-cov-4.1.0.tar.gz", hash = "sha256:3904b13dfbfec47f003b8e77fd5b589cd11904a21ddf1ab38a64f204d6a10ef6"}, {url = "https://files.pythonhosted.org/packages/a7/4b/8b78d126e275efa2379b1c2e09dc52cf70df16fc3b90613ef82531499d73/pytest_cov-4.1.0-py3-none-any.whl", hash = "sha256:6ba70b9e97e69fcc3fb45bfeab2d0a138fb65c4d0d6a41ef33983ad114be8c3a"}, ] -"pytest-cppython 0.3.1.dev42" = [ - {url = "https://files.pythonhosted.org/packages/0f/39/0588ed438c66da56810e14540c4821ce3d56953ca09ef077b0a19e66395d/pytest_cppython-0.3.1.dev42-py3-none-any.whl", hash = "sha256:03e917571605cc6bb86f90839ffb441d743e96280feb49094b1f577e232dbfd5"}, - {url = "https://files.pythonhosted.org/packages/b8/84/6848328a2ce0f9fe495ae2b21845ce7dc95aed4cf2ce6b7b0396545114f3/pytest-cppython-0.3.1.dev42.tar.gz", hash = "sha256:8cda22c1c44312c62e6b3d88c687047a48aec26ec474508c0a861f5fcdcdeb7f"}, +"pytest-cppython 0.3.1.dev44" = [ + {url = "https://files.pythonhosted.org/packages/36/46/87da70abaf4cd3fb4b63418c2da15d81cdbdc9286883a9c51b98b3285772/pytest_cppython-0.3.1.dev44-py3-none-any.whl", hash = "sha256:ef033a44691a950bae1ef083bd7efad145818b6b697fa2588e17a1e36bbc5bca"}, + {url = "https://files.pythonhosted.org/packages/dc/3f/1149db4cdfbe2759626e631377fd8c119c8293a0d9fcfa807665c1cdd5bb/pytest-cppython-0.3.1.dev44.tar.gz", hash = "sha256:690bacb37be24c68ab7ce7bfc3c967768fa8824c452f86f31e1b6729bfd77f1f"}, ] "pytest-mock 3.10.0" = [ {url = "https://files.pythonhosted.org/packages/91/84/c951790e199cd54ddbf1021965b62a5415b81193ebdb4f4af2659fd06a73/pytest_mock-3.10.0-py3-none-any.whl", hash = "sha256:f4c973eeae0282963eb293eb173ce91b091a79c1334455acfac9ddee8a1c784b"}, @@ -573,9 +573,9 @@ content_hash = "sha256:773ab8aa79c3209ee9a05956dc5808f351d35914c4c996301b024b71c {url = "https://files.pythonhosted.org/packages/10/37/dd53019ccb72ef7d73fff0bee9e20b16faff9658b47913a35d79e89978af/tomlkit-0.11.8.tar.gz", hash = "sha256:9330fc7faa1db67b541b28e62018c17d20be733177d290a13b24c62d1614e0c3"}, {url = "https://files.pythonhosted.org/packages/ef/a8/b1c193be753c02e2a94af6e37ee45d3378a74d44fe778c2434a63af92731/tomlkit-0.11.8-py3-none-any.whl", hash = "sha256:8c726c4c202bdb148667835f68d68780b9a003a9ec34167b6c673b38eff2a171"}, ] -"typing-extensions 4.6.2" = [ - {url = "https://files.pythonhosted.org/packages/38/60/300ad6f93adca578bf05d5f6cd1d854b7d140bebe2f9829561aa9977d9f3/typing_extensions-4.6.2-py3-none-any.whl", hash = "sha256:3a8b36f13dd5fdc5d1b16fe317f5668545de77fa0b8e02006381fd49d731ab98"}, - {url = "https://files.pythonhosted.org/packages/be/fc/3d12393d634fcb31d5f4231c28feaf4ead225124ba08021046317d5f450d/typing_extensions-4.6.2.tar.gz", hash = "sha256:06006244c70ac8ee83fa8282cb188f697b8db25bc8b4df07be1873c43897060c"}, +"typing-extensions 4.6.3" = [ + {url = "https://files.pythonhosted.org/packages/42/56/cfaa7a5281734dadc842f3a22e50447c675a1c5a5b9f6ad8a07b467bffe7/typing_extensions-4.6.3.tar.gz", hash = "sha256:d91d5919357fe7f681a9f2b5b4cb2a5f1ef0a1e9f59c4d8ff0d3491e05c0ffd5"}, + {url = "https://files.pythonhosted.org/packages/5f/86/d9b1518d8e75b346a33eb59fa31bdbbee11459a7e2cc5be502fa779e96c5/typing_extensions-4.6.3-py3-none-any.whl", hash = "sha256:88a4153d8505aabbb4e13aacb7c486c2b4a33ca3b3f807914a9b4c844c471c26"}, ] "wrapt 1.15.0" = [ {url = "https://files.pythonhosted.org/packages/0c/6e/f80c23efc625c10460240e31dcb18dd2b34b8df417bc98521fbfd5bc2e9a/wrapt-1.15.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:21f6d9a0d5b3a207cdf7acf8e58d7d13d463e639f0c7e01d82cdb671e6cb7923"}, From f12cdb57074ff2ec47899016cd3daf5d46b57ee6 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Mon, 19 Jun 2023 19:40:10 -0400 Subject: [PATCH 02/68] Updates --- cppython/builder.py | 44 ++++++++-- cppython/project.py | 3 +- pdm.lock | 210 ++++++++++++++++++++++---------------------- 3 files changed, 145 insertions(+), 112 deletions(-) diff --git a/cppython/builder.py b/cppython/builder.py index f456966..e163f01 100644 --- a/cppython/builder.py +++ b/cppython/builder.py @@ -115,7 +115,6 @@ def generate_core_data( self, project_data: ProjectData, pyproject: PyProject, - pep621_data: PEP621Data, plugin_build_date: PluginBuildData, ) -> CoreData: """Parses and returns resolved data from all configuration sources @@ -123,7 +122,6 @@ def generate_core_data( Args: project_data: Project data pyproject: TODO - pep621_data: TODO plugin_build_date: TODO Raises: @@ -137,7 +135,41 @@ def generate_core_data( cppython_data = resolve_cppython(pyproject.tool.cppython, global_configuration, project_data, plugin_build_date) - return CoreData(project_data=project_data, pep621_data=pep621_data, cppython_data=cppython_data) + return CoreData(project_data=project_data, cppython_data=cppython_data) + + def resolve_global_config() -> CPPythonGlobalConfiguration: + """_summary_ + + Returns: + _description_ + """ + + return CPPythonGlobalConfiguration() + + def resolve_core_data( + project_data: ProjectData, + pyproject: PyProject, + plugin_build_date: PluginBuildData, + ) -> CoreData: + """Parses and returns resolved data from all configuration sources + + Args: + project_data: Project data + pyproject: TODO + plugin_build_date: TODO + + Raises: + ConfigError: Raised if data cannot be parsed + + Returns: + The resolved core object + """ + + global_configuration = resolve_global_config() + + cppython_data = resolve_cppython(pyproject.tool.cppython, global_configuration, project_data, plugin_build_date) + + return CoreData(project_data=project_data, cppython_data=cppython_data) def find_generators(self) -> list[type[Generator]]: """_summary_ @@ -341,7 +373,6 @@ def create_generator( The constructed generator """ - generator_data = resolve_generator(core_data.project_data) cppython_plugin_data = resolve_cppython_plugin(core_data.cppython_data, generator_type) core_plugin_data = CorePluginData( @@ -350,6 +381,8 @@ def create_generator( cppython_data=cppython_plugin_data, ) + generator_data = resolve_generator(core_plugin_data) + if not generator_configuration: self.logger.error( "The pyproject.toml table 'tool.cppython.generator' does not exist. Sending generator empty data", @@ -374,7 +407,6 @@ def create_provider( A constructed provider plugins """ - provider_data = resolve_provider(core_data.project_data) cppython_plugin_data = resolve_cppython_plugin(core_data.cppython_data, provider_type) core_plugin_data = CorePluginData( @@ -383,6 +415,8 @@ def create_provider( cppython_data=cppython_plugin_data, ) + provider_data = resolve_provider(core_plugin_data) + if not provider_configuration: self.logger.error( "The pyproject.toml table 'tool.cppython.provider' does not exist. Sending provider empty data", diff --git a/cppython/project.py b/cppython/project.py index b018abf..3b4e6ed 100644 --- a/cppython/project.py +++ b/cppython/project.py @@ -40,11 +40,10 @@ def __init__( # Once the plugins are resolved, the core data is complete and can be generated - pep621_data = builder.generate_pep621_data(pyproject, project_configuration, self._scm) + pep621_data = builder.generate_pep621_data(pyproject, project_configuration, self.scm) self._core_data = builder.generate_core_data( project_data, pyproject, - pep621_data, plugin_build_data, ) diff --git a/pdm.lock b/pdm.lock index c4f1532..5d3ff1f 100644 --- a/pdm.lock +++ b/pdm.lock @@ -63,7 +63,7 @@ dependencies = [ [[package]] name = "cppython-core" -version = "0.6.1.dev70" +version = "0.7.0" requires_python = ">=3.11" summary = "Data definitions for CPPython" dependencies = [ @@ -130,7 +130,7 @@ summary = "Utility library for gitignore style pattern matching of file paths." [[package]] name = "platformdirs" -version = "3.5.3" +version = "3.6.0" requires_python = ">=3.7" summary = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." @@ -142,18 +142,18 @@ summary = "plugin and hook calling mechanisms for python" [[package]] name = "pydantic" -version = "2.0b2" +version = "2.0b3" requires_python = ">=3.7" summary = "Data validation using Python type hints" dependencies = [ "annotated-types>=0.4.0", - "pydantic-core==0.38.0", + "pydantic-core==0.39.0", "typing-extensions>=4.6.1", ] [[package]] name = "pydantic-core" -version = "0.38.0" +version = "0.39.0" requires_python = ">=3.7" summary = "" @@ -205,7 +205,7 @@ dependencies = [ [[package]] name = "pytest-cppython" -version = "0.3.1.dev44" +version = "0.3.1.dev45" requires_python = ">=3.11" summary = "A pytest plugin that imports CPPython testing types" dependencies = [ @@ -215,7 +215,7 @@ dependencies = [ [[package]] name = "pytest-mock" -version = "3.10.0" +version = "3.11.1" requires_python = ">=3.7" summary = "Thin-wrapper around the mock package for easier use with pytest" dependencies = [ @@ -352,9 +352,9 @@ content_hash = "sha256:773ab8aa79c3209ee9a05956dc5808f351d35914c4c996301b024b71c {url = "https://files.pythonhosted.org/packages/fe/57/e4f8ad64d84ca9e759d783a052795f62a9f9111585e46068845b1cb52c2b/coverage-7.2.7-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6f48351d66575f535669306aa7d6d6f71bc43372473b54a832222803eb956fd1"}, {url = "https://files.pythonhosted.org/packages/ff/d5/52fa1891d1802ab2e1b346d37d349cb41cdd4fd03f724ebbf94e80577687/coverage-7.2.7-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f2f67fe12b22cd130d34d0ef79206061bfb5eda52feb6ce0dba0644e20a03cf4"}, ] -"cppython-core 0.6.1.dev70" = [ - {url = "https://files.pythonhosted.org/packages/82/44/6b22f00a9590ac4edba724f891f05ac4936b441456ab26bf90dbf80e6d07/cppython_core-0.6.1.dev70-py3-none-any.whl", hash = "sha256:c2761c1b9f20d5da53f52d2273be9dced812f56d2f8186786ccd662505da14fc"}, - {url = "https://files.pythonhosted.org/packages/b9/a7/cdad28d35ac41701ebf868f238abd9ac8eecb89283bfafdedbcbe644d4aa/cppython-core-0.6.1.dev70.tar.gz", hash = "sha256:55dc44f3570c67a63ca9d88848a543d71eff476fe13f77948f11ea5f579822b9"}, +"cppython-core 0.7.0" = [ + {url = "https://files.pythonhosted.org/packages/59/9d/cc4dfc428a02f0c1e4de24e97dcb234e371a8c4769b78ffd42ba5a4cdb3f/cppython-core-0.7.0.tar.gz", hash = "sha256:e7c6194a1c4c7cfad0ee201d0130e6567e2014c518e5c96a2bfbf9a8fd6d304a"}, + {url = "https://files.pythonhosted.org/packages/9b/b2/dae29c30ceab55386f88b96ae08824b7f9871dcc54dd89fa6c898579987c/cppython_core-0.7.0-py3-none-any.whl", hash = "sha256:f95965d33373f4dbcd59764c46704cfa6cf0373384d15b9a80c5925a27155633"}, ] "dill 0.3.6" = [ {url = "https://files.pythonhosted.org/packages/7c/e7/364a09134e1062d4d5ff69b853a56cf61c223e0afcc6906b6832bcd51ea8/dill-0.3.6.tar.gz", hash = "sha256:e5db55f3687856d8fbdab002ed78544e1c4559a130302693d839dfe8f93f2373"}, @@ -450,100 +450,100 @@ content_hash = "sha256:773ab8aa79c3209ee9a05956dc5808f351d35914c4c996301b024b71c {url = "https://files.pythonhosted.org/packages/95/60/d93628975242cc515ab2b8f5b2fc831d8be2eff32f5a1be4776d49305d13/pathspec-0.11.1.tar.gz", hash = "sha256:2798de800fa92780e33acca925945e9a19a133b715067cf165b8866c15a31687"}, {url = "https://files.pythonhosted.org/packages/be/c8/551a803a6ebb174ec1c124e68b449b98a0961f0b737def601e3c1fbb4cfd/pathspec-0.11.1-py3-none-any.whl", hash = "sha256:d8af70af76652554bd134c22b3e8a1cc46ed7d91edcdd721ef1a0c51a84a5293"}, ] -"platformdirs 3.5.3" = [ - {url = "https://files.pythonhosted.org/packages/6d/1a/96efea7b36835ce89911d7813fe68f5b1db7ecae4023bf209a7aeba93017/platformdirs-3.5.3-py3-none-any.whl", hash = "sha256:0ade98a4895e87dc51d47151f7d2ec290365a585151d97b4d8d6312ed6132fed"}, - {url = "https://files.pythonhosted.org/packages/d2/5d/29eed8861e07378ef46e956650615a9677f8f48df7911674f923236ced2b/platformdirs-3.5.3.tar.gz", hash = "sha256:e48fabd87db8f3a7df7150a4a5ea22c546ee8bc39bc2473244730d4b56d2cc4e"}, +"platformdirs 3.6.0" = [ + {url = "https://files.pythonhosted.org/packages/05/31/793923615e85deef0c25abf5d044b3f99f1348b620122ab184b7d3f70f21/platformdirs-3.6.0.tar.gz", hash = "sha256:57e28820ca8094678b807ff529196506d7a21e17156cb1cddb3e74cebce54640"}, + {url = "https://files.pythonhosted.org/packages/a7/4d/00f9fe4bbb3459da0d6c790b1526e5edebaeff2a80166eabb0a42f9e0a05/platformdirs-3.6.0-py3-none-any.whl", hash = "sha256:ffa199e3fbab8365778c4a10e1fbf1b9cd50707de826eb304b50e57ec0cc8d38"}, ] "pluggy 1.0.0" = [ {url = "https://files.pythonhosted.org/packages/9e/01/f38e2ff29715251cf25532b9082a1589ab7e4f571ced434f98d0139336dc/pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, {url = "https://files.pythonhosted.org/packages/a1/16/db2d7de3474b6e37cbb9c008965ee63835bba517e22cdb8c35b5116b5ce1/pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, ] -"pydantic 2.0b2" = [ - {url = "https://files.pythonhosted.org/packages/05/6f/504e94dcda88a5ec8c680864d188bf3501090536f0bbd3e72c8cb22446bf/pydantic-2.0b2.tar.gz", hash = "sha256:3491863cd9be6608f9cae6796a4fd151d38df1872242c1d5e992dcceb27697fe"}, - {url = "https://files.pythonhosted.org/packages/ad/87/2cc0ffb4493da08e2b76296f380a5e912abbcb95d2f460a08a67259f6151/pydantic-2.0b2-py3-none-any.whl", hash = "sha256:a07edf22ceb91790a4954db62b82dfc0360034e2ab30c1a23d4a65024bc66eb9"}, -] -"pydantic-core 0.38.0" = [ - {url = "https://files.pythonhosted.org/packages/00/16/21726a8e6d18512f6d604934adc82e6a326cccaa1b6b3b7a29fbfe0f8f12/pydantic_core-0.38.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:16aa493f005447bf6528734432ecf571c7c4dcf54712154a6e3fe70d0576b9d0"}, - {url = "https://files.pythonhosted.org/packages/01/63/9f7e1515b7984dfcc9542a9654113a3f84055c74d2416766eab6490779e2/pydantic_core-0.38.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:936e127cca7e108db179cccb7e0918408d125d9e1b62aaa74cd2fe1730626e4d"}, - {url = "https://files.pythonhosted.org/packages/03/19/e3e8a4b75754b85b67ab2a91429dac56a12d07ef2d997115f2d5d8021204/pydantic_core-0.38.0-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:ee661c6d648ad35c790b14a6444e399e508e779e18130b2e603c8f8fd30e584f"}, - {url = "https://files.pythonhosted.org/packages/03/22/d5a96fb2b6a606a49f455c9ae1ab233450d0bc77415619ce985e8ce85143/pydantic_core-0.38.0-cp311-cp311-manylinux_2_24_s390x.whl", hash = "sha256:9a00c1de2f3ead6becf379a61bebc444561a8542eeb140b126482113d4a6a146"}, - {url = "https://files.pythonhosted.org/packages/04/e7/b1d488453e5da908fb8397c24a2b6f210f3c4dc8c7404accea35e7432f55/pydantic_core-0.38.0-cp38-none-win_amd64.whl", hash = "sha256:4affbf8e1722d33c6611870e93142eceda5cdbcbbc9712dae98c6cef3916d7c8"}, - {url = "https://files.pythonhosted.org/packages/06/78/a0fe6c7e3cc5de6c4fa2e13c1b0eaf36f65b21b8e0a78fc16f625d480830/pydantic_core-0.38.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f7e91caff0aadc8682e58c0f4d78c78cade1ab4da0ffbc83d8d609c3ddc35124"}, - {url = "https://files.pythonhosted.org/packages/0a/91/5ddc2a2709afb0a5f34329578a2d2923befd20a555cbce227c98c2400292/pydantic_core-0.38.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:af9e40fc42b5e9ba2d1aebbcd28376f3dc1fea779804b53cba5116f2412b54aa"}, - {url = "https://files.pythonhosted.org/packages/11/0e/e58bbc600e68f524f016d03f0d38a2360d6fa10c15fa3381bcefa035c348/pydantic_core-0.38.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8cfac969e1614217629183e8b37f2ce21f366341f6923cccf1d522914a5d1ae6"}, - {url = "https://files.pythonhosted.org/packages/11/f4/4bd5272cfa98a2b69f603fe13312ff2934790c22e5810ae3937401e2fe9e/pydantic_core-0.38.0-cp310-cp310-manylinux_2_24_ppc64le.whl", hash = "sha256:46e6a14096525eff39e453daa0a636cdb9d8cc1e16b7585dd8bc424bf7f87cba"}, - {url = "https://files.pythonhosted.org/packages/17/78/7e1cf85519d5cf2bcae065bcb0d6887f8e76393125354d295bc2020accfd/pydantic_core-0.38.0-pp38-pypy38_pp73-macosx_10_7_x86_64.whl", hash = "sha256:778d84e366d67ad6afc0e0201040968e27d9c16c3749025348cdd777eda7b66b"}, - {url = "https://files.pythonhosted.org/packages/19/43/90676fda19b88c24b88c2d13ddbbddc9fa72743521b72be35b30e070263d/pydantic_core-0.38.0-cp37-none-win32.whl", hash = "sha256:aa02be03ccbb60ed85b1be36d68e1354194f78da74311d6e1d4187045a596edd"}, - {url = "https://files.pythonhosted.org/packages/1b/60/c1f8f287c83fa015f861dddc148ff36fdf07d1e3ef1af0aa2aade243d5cc/pydantic_core-0.38.0-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:accb236fa98c1a66e5270f2a4e60aee6911e977f016ef40a0cc32115047075ac"}, - {url = "https://files.pythonhosted.org/packages/20/c9/59fedbd6a406092a9966ecd2fa94e47431f86eea14f674af4b1524cf3f10/pydantic_core-0.38.0-pp37-pypy37_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:1a442e40dc11bbc6f9ab1a740d20c5ab3997214f97b7dd465c11c9055032d90e"}, - {url = "https://files.pythonhosted.org/packages/22/e7/35d913327b3702b801e6984c1ed241012ca86d24d8e4e0c1203dd9d8aeda/pydantic_core-0.38.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1e616c427665c7ef7e747d2824d481c96d283df72bfbf97f1f1925917af2fe3b"}, - {url = "https://files.pythonhosted.org/packages/23/30/fc83bc887559e5859f73d3f0e91606b32e57360222dd84ed4c9af4743053/pydantic_core-0.38.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:17596cded1e8f635b797e5bb0139543fb7fabbcfc920b5d243365f490978a989"}, - {url = "https://files.pythonhosted.org/packages/26/8e/a8523dfdb2e59cc5cccbab75aaa32295431043d90c44737e2487e104b59c/pydantic_core-0.38.0-pp37-pypy37_pp73-macosx_10_7_x86_64.whl", hash = "sha256:8616a7a6fe69b9751b53ba45821138bda0bd815d55616172e7ab6fb1b891ecd9"}, - {url = "https://files.pythonhosted.org/packages/2a/d4/9204871e8ab7db2467e9b0e95f297125aab66c44db5a8ca9d6882cde820e/pydantic_core-0.38.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:03b05b91ed73699cde6749c74c59dae16d076b5fff008e9388859b44bf573918"}, - {url = "https://files.pythonhosted.org/packages/2d/ce/b60b7431a48c1f9239855fd6959f5f620630e750a728ec67516720e29630/pydantic_core-0.38.0-cp39-cp39-manylinux_2_24_armv7l.whl", hash = "sha256:559ab8165b6b3c48c75d0b4941ded8d35800192eabfea15388591a69ddecec5c"}, - {url = "https://files.pythonhosted.org/packages/30/8e/3a8b2eb11ab3b571f6fa8e59267318d41042cab3b9c972607bd561af2637/pydantic_core-0.38.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:a30e3aeb02d5326084e8917420f74f56797f1ebce08685fc1ee8b69e86a34917"}, - {url = "https://files.pythonhosted.org/packages/33/19/5c85e046dad099b269ed36cf2233437f044a48fc4895b1974fdf3c865b98/pydantic_core-0.38.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:24475cf8055ab19f91f5a874f5e5434a64f8086a76e2bfd39a820bde80a077de"}, - {url = "https://files.pythonhosted.org/packages/35/2d/156e831677e4cfbf8b1db6dbfb97fb891fd71e7e1a43de4e5c9265299c2a/pydantic_core-0.38.0-cp311-cp311-manylinux_2_24_ppc64le.whl", hash = "sha256:2e773acaefe9b0f9d87544725e6e59a9d10dfe035729cf1ea154c85390f4a8f1"}, - {url = "https://files.pythonhosted.org/packages/37/e6/6e3c2b1ab72c79185aef5f969ad11e92c0b4d989891c2e004e196b384551/pydantic_core-0.38.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4a7297db3a7249253602f121fd1186b32c850dbe4cee7e2f4ed411d7447e1469"}, - {url = "https://files.pythonhosted.org/packages/37/fd/15c2e64d7952d6e1bf3f11e9b826c2deb4bb919208cf7bc77a8bc6cde69e/pydantic_core-0.38.0-cp38-none-win32.whl", hash = "sha256:bcb73e4b971de5c7d6b6af4f0878bae99a72be5bd1fbb0333c3d2741b1f9c04c"}, - {url = "https://files.pythonhosted.org/packages/38/17/f854e7c8e006254cfe322154e491c4cbb09e1a254e38a6e6e8f820ef92ce/pydantic_core-0.38.0-cp310-none-win_amd64.whl", hash = "sha256:bcb79118d68063b6ce54fb0aa3ce350027588cbad7ef6880317158a0e005b747"}, - {url = "https://files.pythonhosted.org/packages/3a/c3/1724e27344f3b78bdb4aadecc77443cd242108f72182f89ec5672864dc46/pydantic_core-0.38.0-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:bda2b18ba047e8b16fc022ce9c36825c7a6175b821b6b718ff4520c27f8b04e6"}, - {url = "https://files.pythonhosted.org/packages/3c/f0/8c57b488b89ecc5576a8a129c9738e5d4a03c328453bf5b3c2c608226d58/pydantic_core-0.38.0-cp310-cp310-manylinux_2_24_s390x.whl", hash = "sha256:ea751034409470b3bfeef9a154bc3653ecbe4e6bc539ad4fa7789344a9ff4e2d"}, - {url = "https://files.pythonhosted.org/packages/3e/74/b907721d484044740741b8557bddba9727106590cd070c69b2c53b6f4211/pydantic_core-0.38.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:59ea7fb6470d6c8c106b22649470ec322f5289d721dc3ce26c7bd9e1beee0110"}, - {url = "https://files.pythonhosted.org/packages/40/93/4b29a099983bb118bd7c3533981b75eacfb193b8142fc5be8e99a0a134ab/pydantic_core-0.38.0-cp310-cp310-manylinux_2_24_armv7l.whl", hash = "sha256:2e1cd60a1310b0abc8a3ac2871536734e4c7692df85dc5b4b91fb2976005d5dc"}, - {url = "https://files.pythonhosted.org/packages/40/dc/34e260d6edf90f705870db0a94486eb104255bf843323fc3697d7d65f765/pydantic_core-0.38.0-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:488de557c2544f084bd72cd96fd7adcc88b0d31d5f27b2d658f13107fee75642"}, - {url = "https://files.pythonhosted.org/packages/42/93/a38edeaf76a5aa1cc6321b274cdec52a3c7019f64572a006e5b2df8164b3/pydantic_core-0.38.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:064010574757a7fea60dc2be63c047ace8a653f3d5c601b33603099d811a53b0"}, - {url = "https://files.pythonhosted.org/packages/44/d8/80c2c2de8928914580edb1d61543d378d4f1ef9359d82f0890d3684609bc/pydantic_core-0.38.0-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:eccb197288f28fd773562df33742b5347658211d2679e7e2639dcdbf6ba32389"}, - {url = "https://files.pythonhosted.org/packages/45/4a/8eb3e1983abcc6bb7c63dfd2f69702ce7d860d7a021e11d7395ab1038ff4/pydantic_core-0.38.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2bf57bf395b9f9435ee0a3c7017592d64eb4e702da2c6dbc1da0d9369b733ce9"}, - {url = "https://files.pythonhosted.org/packages/48/d5/f4e8096247ea8f3bb95537c6a3fa51e73855c764332961bfbbb41b70b345/pydantic_core-0.38.0-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:c8adb85fca667013e373e6df23743fce72e6730dde9ffbcd1451669b037d29a3"}, - {url = "https://files.pythonhosted.org/packages/4b/8e/766165fd99090a77eab75856afdba04aabde28a58f0678ed71e802605a4e/pydantic_core-0.38.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d9991c294b73b39f88fab055bdc03f3f890d1d7e3abb8c6f2d8bb4fd4185e407"}, - {url = "https://files.pythonhosted.org/packages/4e/1f/18e4801818d42359a707778b2f6540752e11f765d82542c5b11c5cd33529/pydantic_core-0.38.0-cp39-cp39-manylinux_2_24_s390x.whl", hash = "sha256:e3d97b9858ea4d8b1ede28eb07d5ffd39b104e0491f125b12010be183390e3ed"}, - {url = "https://files.pythonhosted.org/packages/55/65/c155d9f8e5d808a641b4fb741fa3a92c7d856b3c78a39ac87ea6677cc4aa/pydantic_core-0.38.0-cp37-none-win_amd64.whl", hash = "sha256:f93ae751fe034a890d59c37a95eaf4ce5dfcbe7e3bedd49a32a45367671cdb80"}, - {url = "https://files.pythonhosted.org/packages/56/da/5e42753d89d57a5bdf87ecc13fe7f49e717988b38a50c5e45e0497c10e0a/pydantic_core-0.38.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:05daac88565ab9fe343c8469d6606a122288c2ade74a073d0e0df52a0f701dbe"}, - {url = "https://files.pythonhosted.org/packages/57/fa/887a5a70998399f993cb625ad6553a00dbe7d08fa8d44ed7dbe247edcd77/pydantic_core-0.38.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c458635159543b85d6f40cf492d9462e92ba2a347d5458daaeccf6dea335275c"}, - {url = "https://files.pythonhosted.org/packages/5e/02/28fb814b4d76d54c8ebe90448d64f07c908a2209f11052055aba088ca7cc/pydantic_core-0.38.0-cp37-cp37m-macosx_11_0_arm64.whl", hash = "sha256:f4f862c699c6184e0926173cf845a9a6e0937d346cee2f29aa21fffff616e3e1"}, - {url = "https://files.pythonhosted.org/packages/5e/77/6d6c0b22f1c22c5211566787ec5c7f0ebb2cb5c977c82d2710c547774676/pydantic_core-0.38.0-pp38-pypy38_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:35f737da50781be050aa675fd371c67561bba9119aec552dbbc85b7abb60390c"}, - {url = "https://files.pythonhosted.org/packages/61/93/d3bd13b300247296963df0fa038991fa7e8015ddd968beef5ed293561e8e/pydantic_core-0.38.0-pp38-pypy38_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:ca37ae371e5a66325509926b3e86ff59486da1046696000f4f3e7c7183054abc"}, - {url = "https://files.pythonhosted.org/packages/69/06/99dbd542cc7c25a3a46e678d9470248a5a5f073b5d657cd89e4430131de1/pydantic_core-0.38.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f9fbaf14d32c3afa6159ca87f2d7fcf07b36a7579b78bdf80b14ada0068c164e"}, - {url = "https://files.pythonhosted.org/packages/69/ae/861438940cf1d4002a188c5a59343a2c1fe7f5f71c4fb1bd39d9244a6d34/pydantic_core-0.38.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ed1f15613f0a067edc373a31c45f80c55454389806894b101a12620b6f0e68d7"}, - {url = "https://files.pythonhosted.org/packages/6c/2b/a56267e6856143c6e79d641919945b6f21070c3842b60f0d83575edec566/pydantic_core-0.38.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ef093c90c95f4747f5eca63f5bc7f345e05996137a86a4131587a3a90a6dd208"}, - {url = "https://files.pythonhosted.org/packages/71/4c/7abf99c1e48e5153288aa677d19f4085fb50604e5fd67f22c9a9a9ee17a8/pydantic_core-0.38.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b59cf0d1a362a1e451398b61f0f03fb63acf138c73c03195a2d439ebb5e75b17"}, - {url = "https://files.pythonhosted.org/packages/71/69/e8c0767ba4bf322d3518a5c31b126659e3043aa918cbc6be03fb86c807d4/pydantic_core-0.38.0-cp39-cp39-manylinux_2_24_ppc64le.whl", hash = "sha256:56929a9ed009c799c6a25af5a45a70ee929cc87cf8d6dfb48c7e7b80c5749eef"}, - {url = "https://files.pythonhosted.org/packages/71/75/287c8ff1f811f8697543df71607dd8ebcfe75aa399538766ea43289e4002/pydantic_core-0.38.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4bc7add8c0ca9385dedec86671899ff47d08b1054e1719f335470e2d8460f09a"}, - {url = "https://files.pythonhosted.org/packages/71/96/81e811ea942c01fb1224bd58942b2d59cbce134452c10a6d9133213b7783/pydantic_core-0.38.0-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:3397fc9fdcce07c7018a5f627da1b42150896f4face9860d89a46c8b9fa3c96f"}, - {url = "https://files.pythonhosted.org/packages/72/d0/e7bfd070dc814968ef7c82130ca5f879710be0246cb13e7fb7edf24968fe/pydantic_core-0.38.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:0ba5ea4ddee0b721fd0e1f25caefd5bea4ab43d99bbf20b4b0b5b4c98af97a86"}, - {url = "https://files.pythonhosted.org/packages/72/e1/a5259c6ecbdbb09fbb91d4a12312be6e38f8936974e10caa84f5d9529b50/pydantic_core-0.38.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1d4affc151ec02510dd6973582a21193880ffb3960c5032368643fc86e26e495"}, - {url = "https://files.pythonhosted.org/packages/75/b1/0c7656942730687f062cdb2c800d2c6cecde147d2bd4727d9395d58a80dd/pydantic_core-0.38.0-cp311-none-win32.whl", hash = "sha256:8c8ac6d074cd4308afc4bc002171e8f6f1d684a518baa5f339b838a8b5d3173b"}, - {url = "https://files.pythonhosted.org/packages/78/11/f97c852a3c3c1bea21fc55690c1afffd74f55544026d279cd6661c7dfac2/pydantic_core-0.38.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9c2c5afc146acd7f98252a02812563a8eacb5e07e5d5d890899c519fb5c890fb"}, - {url = "https://files.pythonhosted.org/packages/78/e6/3373e50cc9c990d4c12a774f980634c3eda94a243af16fd7a6fb92f43dfe/pydantic_core-0.38.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:552d4613436d3a485f579137a9a64069be1695922f704dbe9908f195e49b58cb"}, - {url = "https://files.pythonhosted.org/packages/7c/c7/bee2a9d9d6d830c11668ef7df7c5b30e400b79bc04702e3357d805640ffa/pydantic_core-0.38.0-cp311-cp311-manylinux_2_24_armv7l.whl", hash = "sha256:c8083e1c82f0d816ddfb07698c4c1ea126624114ddbe2d78659a54f3cc2749f7"}, - {url = "https://files.pythonhosted.org/packages/7f/b0/8b67a37379b7d2c879ffe1a88be9b7789bd42f54d402e0c70ad4881b4ecd/pydantic_core-0.38.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:09a65a3375ef6da47266106f10894452ccacf3c12c5645f813bf511abfff5020"}, - {url = "https://files.pythonhosted.org/packages/82/62/e3fde091e45d9c0b342081a81be5d8204bc00d9be5acf840ea871d6e5e6c/pydantic_core-0.38.0-cp39-none-win32.whl", hash = "sha256:d9b6070774035969b0b48d8b8d15274965dc3155b88eb08e27ba193f73dc979c"}, - {url = "https://files.pythonhosted.org/packages/87/df/0d0dcd91298046805c5da96e26c5df91401e34bdebc43592165ffba49b93/pydantic_core-0.38.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:db673aab3e55f21bdcc4d8d420080593437c795bd4d8fcc4718ba664bead3e7d"}, - {url = "https://files.pythonhosted.org/packages/93/9e/9101083efac1e71c24ea4262583efea253c6af3af5eab4dbd5b337398608/pydantic_core-0.38.0-cp310-none-win32.whl", hash = "sha256:1e4475d319feadcc05ff0b8a8b3509dfdcac21b852667323bb7862ec8ec061c0"}, - {url = "https://files.pythonhosted.org/packages/9a/58/aef09b70f98b4f60d7c6f4728ea9cc82b2ba5ba20451d28b41baec0ccb37/pydantic_core-0.38.0-cp37-cp37m-manylinux_2_24_ppc64le.whl", hash = "sha256:a84c9d20bc8f3473ef5e4d5177a91438b87650615da05ba5045e8378594673be"}, - {url = "https://files.pythonhosted.org/packages/9b/34/b0fa47dd42f60873d4ab9730645e5460adb107a982c40dd62fd607e3af41/pydantic_core-0.38.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:752a6f0bd20dca278f1e28a0b94e9654a7c2151e1a8d3fff8d5f247555a4c213"}, - {url = "https://files.pythonhosted.org/packages/a1/d0/bd0298f328d83b4a731bea83e13510bcd7d6bc321b71222888d73a446824/pydantic_core-0.38.0-cp38-cp38-manylinux_2_24_armv7l.whl", hash = "sha256:bb862c3ddccbd86470557ce2b780a750ed29d8e6636c3be2399e02bf76b5b4d7"}, - {url = "https://files.pythonhosted.org/packages/a2/d9/8c9998ad174e8267e0c629fc419034be75bda7d41fe85d69acbe59566da8/pydantic_core-0.38.0-cp39-none-win_amd64.whl", hash = "sha256:33bfe0ffa5584d3521a68674f3bfb034a1f6aa27dbba43f28731614f23df595d"}, - {url = "https://files.pythonhosted.org/packages/a4/71/aefa588cd6425660ec300e3c6fd96c4dcad77a0cc82a69729bdd68e1331c/pydantic_core-0.38.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c6a1ddda8eb7f774516701ecefe02d8d2c9ee0d6a924ed5abe46cbade0c294d9"}, - {url = "https://files.pythonhosted.org/packages/ae/a4/b34ce844bb791ca0c4734ee455f591104e9e45d1a527107f00d61a1a6d76/pydantic_core-0.38.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5e744f72b33abf292c0526188f9d0b8614e072dbf3712ed32b2a6f1f769869e"}, - {url = "https://files.pythonhosted.org/packages/b2/12/ebd9b8664dd73f85bca77c8102f970a4848b482e267c052e15e76b777ab8/pydantic_core-0.38.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3dda6549462b9fdbf07ca8531c07450fd99def8be5676ade3a6809effb567922"}, - {url = "https://files.pythonhosted.org/packages/b2/b9/c082de0d8ae2ed32ae2ea0335065c80ca3dc31827694f1d1c999095173fb/pydantic_core-0.38.0-cp38-cp38-manylinux_2_24_s390x.whl", hash = "sha256:8eccf9a9a7b861214a2cb16939b8d54e8b00c4e4a94c1c57dec9e253c46b77fa"}, - {url = "https://files.pythonhosted.org/packages/b4/5c/87da54a6e9a4e2463d936c6140ff444b928a5f11a225d541143e049baf19/pydantic_core-0.38.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:0fab1ef6d7c241e06fdd2fce41826f961ea415b044869381909e463eca1d5461"}, - {url = "https://files.pythonhosted.org/packages/b5/7d/2176efd6d731c61e88a491104987f9144d3e6ce413b7923886c2542c2228/pydantic_core-0.38.0-cp311-none-win_amd64.whl", hash = "sha256:766916b2456ea7101919ac6bbd3f5f2d48041a3bee994916cff476aaafd3b3f5"}, - {url = "https://files.pythonhosted.org/packages/b8/25/a2fc5e99171f3dfed42a6e701c25978b33a0d8c2580fb3e07edf61890414/pydantic_core-0.38.0-pp37-pypy37_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:3e11dba101c6ad15def6de7d651a97d2bf4f9cebcbb35b73af759a24c22a6409"}, - {url = "https://files.pythonhosted.org/packages/bb/5c/287a6a342e6712d8ecb1365211a09621160c3220727964f1daeb2062754e/pydantic_core-0.38.0-pp39-pypy39_pp73-macosx_10_7_x86_64.whl", hash = "sha256:07987d16882bbb70880223dce838cf6ded0a962dae1ee045c2ba91e2368062ca"}, - {url = "https://files.pythonhosted.org/packages/bb/cd/0276a61723b8c46d59a21fa80e7d139b7d333e21bc280d1305d20dabb7eb/pydantic_core-0.38.0-cp37-cp37m-manylinux_2_24_s390x.whl", hash = "sha256:d3ae5a8cc8d0f95bf2ac9469822c5deadd78fcbe3bcee7d0522c77e84ec03243"}, - {url = "https://files.pythonhosted.org/packages/c2/8a/427fa0e6dbf64ef4fdac352c1b175352d97469219f3b470f2a14ff7ecdfc/pydantic_core-0.38.0-cp37-cp37m-manylinux_2_24_armv7l.whl", hash = "sha256:deefd57033824e41cfbe984e71f4cc2be8be2b3a9d44890ce29b0db774c20790"}, - {url = "https://files.pythonhosted.org/packages/c6/5c/9553ab75c60df17a49ceabc412db57d16f4b22548f45e9d9362adce44fa7/pydantic_core-0.38.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9de9165653127f2d06ab3b375b0f330ea8bbc6f935b9a61f32e08b6011569076"}, - {url = "https://files.pythonhosted.org/packages/c9/8e/bb78aa76ebd117e6b531e8f7f4105ad1e15e77fb3ae7eef8974eae8458dc/pydantic_core-0.38.0-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:c6857e05c3437943e2b1abf6dc99b61fd059b60fcb0bb1487f687c5a86b10ec6"}, - {url = "https://files.pythonhosted.org/packages/cb/27/e2b153cc34d6bd98f06b7326b502329e950100f73a79bb5b02ec04444a41/pydantic_core-0.38.0-cp38-cp38-manylinux_2_24_ppc64le.whl", hash = "sha256:0ea7cca3ec85e1926a2b9d0511c3b3565515af350704e285c8e2d915f75b2aaf"}, - {url = "https://files.pythonhosted.org/packages/cd/5e/1d7c432522ad22750a3967bfe660f7182d801e1398a7bd98cc75456d68e9/pydantic_core-0.38.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:fdd0c847ddc51c6419d2f22934c089fcdd63e3e7f7c1d6bde3490eebe37eeab2"}, - {url = "https://files.pythonhosted.org/packages/d2/5a/c0112e9a251d5bec4ecb832f94b3220e7de6c52621f36a654650f4eaec05/pydantic_core-0.38.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0410d2aba8d7f82e00691b6a4d3b12b52e0dbb0006278b414db48d0ee5524baa"}, - {url = "https://files.pythonhosted.org/packages/dd/71/bbc65baaccb7d71d4da761a3773ea2cf225966bc0a470a7bbe725a5e83c4/pydantic_core-0.38.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:60bd9f221b434619d50d78793a376efc6e515233f5cb694f9688f4f458c3d99f"}, - {url = "https://files.pythonhosted.org/packages/f7/f2/6d0222111802b678235d742e8a831df2412ed39541f31b46618c9da04a90/pydantic_core-0.38.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e60dba35a3b7e295d239887497ee44e086ddcd1e3b5a5aac94940172dd9a9c62"}, - {url = "https://files.pythonhosted.org/packages/f8/cf/f90e20287cb4697d440aeed435e4fa5587bb9a84082dce1bb19411a9176d/pydantic_core-0.38.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e1b5fb341fb0fc065d1d13d669f11ed03c1c39901debcd637b36a0380fa42a6b"}, - {url = "https://files.pythonhosted.org/packages/fc/7f/8b5c2323fa7f2d4ae8ca5e1d95451b9e8f38dce3f4248b521243b1598bba/pydantic_core-0.38.0.tar.gz", hash = "sha256:b94a00b52ccc368720d4fe6929a818e368901091b36bca049f89b600923d6c45"}, +"pydantic 2.0b3" = [ + {url = "https://files.pythonhosted.org/packages/85/13/e96e6dda5cf3fb8f8df959d1bfaa819869328ffb0d8ed7d27eb36659093e/pydantic-2.0b3.tar.gz", hash = "sha256:057fb3050b8d3952153a0df45188882096ac53fe087b196fd0d877442b0c029b"}, + {url = "https://files.pythonhosted.org/packages/af/ce/dabc6cd90abaf903d84a329f29a5ce34643fd66ac2a78f3eb1c668bd4fb3/pydantic-2.0b3-py3-none-any.whl", hash = "sha256:dd6a8f835aceef1a399329478c355c91985f582afda7027055834d6822aa0ce2"}, +] +"pydantic-core 0.39.0" = [ + {url = "https://files.pythonhosted.org/packages/02/28/05cf18d0f511ba56e7257027ae24f524d6845ec47c70ad893a165f475b27/pydantic_core-0.39.0-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:99de1fe8dcb3dc6e853ff6b96da4faa54384bbc4e73dbeb7dc8473f7e9d84243"}, + {url = "https://files.pythonhosted.org/packages/02/e6/fdf028114408f727b7767106509664a4d560198c40abe5eb4a7e7d6650ba/pydantic_core-0.39.0-cp37-cp37m-macosx_11_0_arm64.whl", hash = "sha256:bd5f3e98d112c6eab8c41cf2baf3dab8006c3223d5f2c9695b1cba7ab87bbfb5"}, + {url = "https://files.pythonhosted.org/packages/03/34/5bdb0bc053b1c848bbe696cb75007a9b5b1351136de4e7a79d6aea1ae7c6/pydantic_core-0.39.0-pp39-pypy39_pp73-macosx_10_7_x86_64.whl", hash = "sha256:96100fb53a7384a99c6121ea90f01aa1cb6100af8dd25f227a5132f38b9199df"}, + {url = "https://files.pythonhosted.org/packages/03/5f/e72f736d303d695be4d45b00cd9a26063575058d57b49c2962cfae75a43c/pydantic_core-0.39.0-cp37-none-win32.whl", hash = "sha256:2bfe35d886d93c7911b4d56ab3a6725a7866b35f09aceaf3d0d64babed701b73"}, + {url = "https://files.pythonhosted.org/packages/06/59/4117e5ac138bca096879d07f446fd24a9b198755d344e0f640fb1f2b23bf/pydantic_core-0.39.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:351a34da43f44a52bbd52380322bfb364f2efe423275c4917c8c26100c1b8ced"}, + {url = "https://files.pythonhosted.org/packages/07/b4/9c10f031fa975fde14f97d4be8c58c3be669b0cd2ff20242b405312c86a8/pydantic_core-0.39.0-cp38-cp38-manylinux_2_24_armv7l.whl", hash = "sha256:b749a22e311e235974516a4bca00afdf4f2e67dd7773d3850c1b17f1da1131b1"}, + {url = "https://files.pythonhosted.org/packages/0a/5e/5c089f8b5633c304b82cfbde3fee9c4e6d0897fa9ab0c5a09e01469d24dc/pydantic_core-0.39.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f8178dc88a246c60fb8264a8422587abc209cac1d9160329af8a6f5f89797cb3"}, + {url = "https://files.pythonhosted.org/packages/10/13/f6b741c1118001be9fbfd469eeee2b415d004fa6ddafbfd355e4ff9db634/pydantic_core-0.39.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c9c16fc80e2612b0121eb425890e2e29f03e3038bbd53e5b637cd72aad2c5339"}, + {url = "https://files.pythonhosted.org/packages/10/15/82a7866bd5660dd4251c87ca23b01b8ba495ea0b7013bb8ee884dfce0311/pydantic_core-0.39.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f9e18e91b5f4172ea5ebc8fe0461acf6f2de73d4b85b47aee26924dcd304141a"}, + {url = "https://files.pythonhosted.org/packages/10/5b/3ae9f4f1e5299c9c2ba7a578b852f0a40c54f9c1a83f3de5d08b90826281/pydantic_core-0.39.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:9602b61c85d9c12b0e66792eebc85152b565c24431a69c47f3cba811b1507389"}, + {url = "https://files.pythonhosted.org/packages/18/a0/0b22604892e136e7429c17b6bf0d05ef788759b8633c4d94f638740ad779/pydantic_core-0.39.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9d32b45650e5bb8670b73d0f9acdae184197308f5a5ecf8e714849c76fd0a6ed"}, + {url = "https://files.pythonhosted.org/packages/1b/7b/b9ccbcd5392b02270ee14e1121672bc102b903bb3eb2d528347c08ee6fa8/pydantic_core-0.39.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:1f89064cf78b57bf2930a14b41aa4b4240bd2993a57efb56b5ad8be02f4048b3"}, + {url = "https://files.pythonhosted.org/packages/1b/fb/760b5481281b9615e55f4c7a3363feaef05f8441cbc93925a4621148f70a/pydantic_core-0.39.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bf55dc04bb037c06d256e22254401b10fbc3a478835837987435e3c77ec929f9"}, + {url = "https://files.pythonhosted.org/packages/1e/82/3b5a71e50b570b041e402469ae21b8242081504e4c50ba6bc40a51440308/pydantic_core-0.39.0-cp38-cp38-manylinux_2_24_s390x.whl", hash = "sha256:e77a053384a29c4ffdad2a717809e347b864c582c407ab88eb9ff3fa3bce22a7"}, + {url = "https://files.pythonhosted.org/packages/21/15/7cc4530aaa6800fa91ed70464a79593865159f629ce22675d1f7e5a90e7b/pydantic_core-0.39.0-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:9aba06c25f356c0fb11f1dd2d0317a5599f223a3b283ebbc1aa3a1100a6920f7"}, + {url = "https://files.pythonhosted.org/packages/28/ac/cda6b041201ccb695f2eded45bf0b834eaa60beebe616973f1f3f1e782c2/pydantic_core-0.39.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2c7b5e09e5e6c7cf2ed0ccb5a1ddf1f6d12131315ff70d100fc197711df4a37e"}, + {url = "https://files.pythonhosted.org/packages/2e/39/87420354aaedf26df93f26a6c6a36fb6e77a32d97a608fa2ee3bb086bf45/pydantic_core-0.39.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:30ad66243a64818e8afb584596cc9f7f8738406ffe1b4ab0be00e23375753b7c"}, + {url = "https://files.pythonhosted.org/packages/2e/4a/71cd253c40cd57fafe76d3701c4deab358799e6f72a63bac4356d8cba806/pydantic_core-0.39.0-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:361135e456636aecad3c15ceabc206fe93b4f86778ca24eefd707952954b7e70"}, + {url = "https://files.pythonhosted.org/packages/30/ad/86af97225b000bdaae55672d1bae9cc2c8dc9149c57cd37e2116ed8699a5/pydantic_core-0.39.0-cp38-none-win32.whl", hash = "sha256:3a5795a0521ce88adbffd16796e85cdd06546805ff869fed0cac1a9c297d9445"}, + {url = "https://files.pythonhosted.org/packages/30/be/207b81da280ba0c4111d12bc5dc9667a584280a8f7c94c79b6a0ec485652/pydantic_core-0.39.0-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:abbcbc69868ad7f642caa319a7b5f829e6f9b6db5194b6b82b7a9561ac992663"}, + {url = "https://files.pythonhosted.org/packages/32/48/df3cd4a5256f3832b5ce0bc45e8d97081db80860870d3522c5d524e27fe4/pydantic_core-0.39.0-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:c2fb59f98fd0f9f3ee1b77b2c44f282ed8b1cc52d332c2d2a34b6364f63dbfa1"}, + {url = "https://files.pythonhosted.org/packages/38/31/b6d08564f771ce87b5a9dec32746b33b90ae35ddbbc3b06e1cc49e1d6110/pydantic_core-0.39.0-pp37-pypy37_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:a5a377d9bf58a99e55d74167c658cb1f170cc1c008b849f5a8ec31b7b0eb65e7"}, + {url = "https://files.pythonhosted.org/packages/3d/b2/8d38bd801be8244e0c97d6a83ac898fae172e918dc63afd016cb67e958f8/pydantic_core-0.39.0-cp38-none-win_amd64.whl", hash = "sha256:dc8234bd4325341eb660a86dba3688a5287789309a84261b3dbe76d4dd0472e8"}, + {url = "https://files.pythonhosted.org/packages/3f/bf/0271744df2c60a000ade36ac42ef34aaf9dcde7cfa246f4e20e2f9ba51f3/pydantic_core-0.39.0-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:b2352ef56d0a5157dea6d39f3342980523673ac7f08967e39a68e06c168b94a4"}, + {url = "https://files.pythonhosted.org/packages/49/d4/06ca9f1732fe981f3ae7c749a0ceb3b9e0848896eac610afeaf413ae7d38/pydantic_core-0.39.0-cp38-cp38-manylinux_2_24_ppc64le.whl", hash = "sha256:749c0a2038ca7fb3a29ff7f9ce7d3248d8bb9f42d2ef609b4e4c158e74368145"}, + {url = "https://files.pythonhosted.org/packages/4a/c9/e3aede8a6e8e2b552cd12a7a8b5488686d6a6534060ff7d6da2867022fa3/pydantic_core-0.39.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d1f187d852ca78b9e23a0155be5f759f65f5e5c7dc4b29b7ea7aa5df48537ba1"}, + {url = "https://files.pythonhosted.org/packages/4c/29/49eea949174ad30c23a1f42fb5d105d194d98d7c9b96b1c8fda7d88cc57b/pydantic_core-0.39.0.tar.gz", hash = "sha256:8368d0510d0020d1bbb4124b31fb663e17e5661b5cc85c48e2b9d9bb0a378d9f"}, + {url = "https://files.pythonhosted.org/packages/4c/d1/5254c030dadeb88a063ac7135f443ccd50a1033681980016a3976a655d0f/pydantic_core-0.39.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0203bc58c551d018bff3ce3bc863cd2c88504dbb96f79357fdaa22955db64ffe"}, + {url = "https://files.pythonhosted.org/packages/52/e9/377b6997e222288a723fc99bcf76d6b68216ef6269f7733a82b408d74e5a/pydantic_core-0.39.0-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5570c884284a5e69278c4bb259c1694d64a5d9bc9a28674d088134246ad73358"}, + {url = "https://files.pythonhosted.org/packages/5b/0e/6b3aaf8e73eab3846e0f0898dc9c5611e3c30c80fa1f567f1160881738ef/pydantic_core-0.39.0-cp39-cp39-manylinux_2_24_s390x.whl", hash = "sha256:5438ffb320ad430de40de405078b0770beb1eec00e54de18a63c842d114d86b9"}, + {url = "https://files.pythonhosted.org/packages/61/e3/48b6fd9589f9d04efd16604b384aa6cf662513041794155f30ca2dc76ec2/pydantic_core-0.39.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3cb0cdc1c5c036aa7caccf6a28e9a2ce3058ae18aceb143870a6a379235b075d"}, + {url = "https://files.pythonhosted.org/packages/62/2f/090ba715ed3e6211f9fd5e8a0c3ff29ebd0e0c01eb69971cec46493923e4/pydantic_core-0.39.0-cp37-cp37m-manylinux_2_24_ppc64le.whl", hash = "sha256:549a0940b7164b23d52df4d6bd73637e989688d28dbeb9e24d87a27da48f23bc"}, + {url = "https://files.pythonhosted.org/packages/63/03/81dce913aef3ff28a5c1c3938590d9ad3336d4bb35e39ffffd7f5450dbbe/pydantic_core-0.39.0-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:9f1ddc997865f29eee3fea397885595d361a76df80356fec8c47f45b987b7490"}, + {url = "https://files.pythonhosted.org/packages/65/cb/a5fb2d0d9ddedb109af8104445843059173d036e53be720e257fa51c035f/pydantic_core-0.39.0-cp37-cp37m-manylinux_2_24_armv7l.whl", hash = "sha256:45926ab2adef2deff4fc89e12bf5ba015ad297efefcd0f84b8689123a6c3b126"}, + {url = "https://files.pythonhosted.org/packages/68/e1/4e1553a3ecdd375845f320d386f3149e122ea44c1781e8d923a3186a1dbf/pydantic_core-0.39.0-cp311-none-win32.whl", hash = "sha256:3696a567b7517c09ed7dae942fa5b38cd552af5160d0905b76e9607b87e31d01"}, + {url = "https://files.pythonhosted.org/packages/6a/2e/81ce629273eac5daabcbc47c0e68c2f5e3e7926275726b635b9de50a73c9/pydantic_core-0.39.0-pp38-pypy38_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:711d3a4c9ed8cce84dd55284ff9f4494b825930154a52a37cd02ac4e3a5fd62d"}, + {url = "https://files.pythonhosted.org/packages/6c/55/ecbf0c01c8196ca6d3ef37ee03c965a15e4e2fe15748ba4119d102ed8584/pydantic_core-0.39.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f29f3197b1b50550c299ad8700918fbe383412df6f864fe02190a958b60a3c29"}, + {url = "https://files.pythonhosted.org/packages/6d/c4/a7e33420c947fb90e84686db7e156d212931405c453f71d6237489eb78d6/pydantic_core-0.39.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:6e9f98a9df2cea76b1a8bd70d00b4ee3b7597887281c2e85c8ad690ed881ef34"}, + {url = "https://files.pythonhosted.org/packages/6e/66/017c518c8aef90beee755c2236fee4657c9f2004da1b0457454283e1ec6a/pydantic_core-0.39.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4908e1bbafa91dcbcc8778bfe11ede713ef18dafac4a7f66b7108d348d46e5ea"}, + {url = "https://files.pythonhosted.org/packages/77/b7/ee023ab701dc89b9509a1f435d73316b9ef6789396a7655601a7e3816710/pydantic_core-0.39.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e7ad056aeb02a474957fa950ff169549e214cec5f0b5c18dae683b0d21227def"}, + {url = "https://files.pythonhosted.org/packages/78/8b/d1bfbd837d46dc150e7f90cbf8129077c9464f755aa78d92356cc298c1bf/pydantic_core-0.39.0-cp310-none-win_amd64.whl", hash = "sha256:ddf0177f2324200cf9ea3100d4232be275c8986a4cb9b1892e1f53d2584f6b17"}, + {url = "https://files.pythonhosted.org/packages/7a/a4/e0b1cb44397c99fd3737224bf32af94cf596bef80715c0e26732a8e71a1f/pydantic_core-0.39.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:00c3a5ab18f355a0b082019fdc4af41b61c4a2e33d97af44c69b611d818bdfe2"}, + {url = "https://files.pythonhosted.org/packages/7c/cd/128d387f0acc2e008eb1d1869648c0358ac89637d067fffde77440ef9548/pydantic_core-0.39.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5ccb4a21713a831f888c0bf22be4888df475650f699cc35a675cb91cc55e780b"}, + {url = "https://files.pythonhosted.org/packages/82/58/54cda4561c6e099fc41c37ee9cd6752caad6d3cc17a83a1c24b6cd596754/pydantic_core-0.39.0-cp311-none-win_amd64.whl", hash = "sha256:c9b4909e971e8745af251cecd92aa55f9239bbc9a9630811dd53a00a2b5285f8"}, + {url = "https://files.pythonhosted.org/packages/83/fc/3e212b137c5f53564ed8228509700dde0c8dd17f110a097225bd988af0eb/pydantic_core-0.39.0-cp39-none-win32.whl", hash = "sha256:579c69e5a7bf2fd3dedd3c51e91b1beb0c89782ea6c0d1ffd8e48259b70f9d61"}, + {url = "https://files.pythonhosted.org/packages/86/5d/c1d7ad0f076292d5a473585c36e30eb51229d72749ab1306fa0a4ec33b76/pydantic_core-0.39.0-cp310-cp310-manylinux_2_24_s390x.whl", hash = "sha256:f8992a135442959269d2c013bd9913c837d5ea215b0e480cda1820c7310df55b"}, + {url = "https://files.pythonhosted.org/packages/88/59/8feb158be87ba69547bf471709a84acd8e3b671729cabcb691697bcfb1b4/pydantic_core-0.39.0-cp311-cp311-manylinux_2_24_ppc64le.whl", hash = "sha256:87e4d828c0cc28e8ec1abad2e83110e0cca175b3799fc3eeab22e615cefc551f"}, + {url = "https://files.pythonhosted.org/packages/8a/7c/55f6824b2966b5a13fdddc8cf67ed2a830ab2a3d1e428c3f1b84c868f52d/pydantic_core-0.39.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9595444868ece2e67b5e64a583eab10756491d9bf4e6d3876410299297d4adb3"}, + {url = "https://files.pythonhosted.org/packages/8d/1c/119f34be34bd9f2078f5e6225cb4dd9af4748612becb46a8541c4ee8f05c/pydantic_core-0.39.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c3b42892739cd3e27c2efbab6682fa91ec07c76381db1ca66da2d889c21e1c8a"}, + {url = "https://files.pythonhosted.org/packages/91/c4/ecae440c8c627ae810544257294b78a52f5eaff2c6c1b2005fda386e0d3f/pydantic_core-0.39.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:126db921ac7c72cb5d8d1b46540d594d559c25e243b3515aed040a0cd0eafac8"}, + {url = "https://files.pythonhosted.org/packages/95/37/8045af516750341f434ea7f414774b37fdf023f3249c5036e1b51a07cc0a/pydantic_core-0.39.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:058ea15957753eeb0547bbcb9aca1dca1f11969f0517a6f988d708110c4717e4"}, + {url = "https://files.pythonhosted.org/packages/96/3f/7f99a99e3efedddfe04750ab20c38ceb9cf82da8035116367e051143c908/pydantic_core-0.39.0-pp38-pypy38_pp73-macosx_10_7_x86_64.whl", hash = "sha256:e7d2a139d384911ee97ad2e9472ae4e79e9fedf278fa8c31b3e391c0279c0207"}, + {url = "https://files.pythonhosted.org/packages/96/5b/09027349536a371da3bdc413e129824778ea25fe036d8270ed038bb17cde/pydantic_core-0.39.0-cp39-cp39-manylinux_2_24_armv7l.whl", hash = "sha256:bb4cea3c63defa0fe891af206ad04c8b167852feb6bfba7c1cc4f26a4a2eb39e"}, + {url = "https://files.pythonhosted.org/packages/9c/df/2140080b89404fe58c49cd13b87ff9fea0006c375ee6db526f665c6e1ed9/pydantic_core-0.39.0-cp311-cp311-manylinux_2_24_armv7l.whl", hash = "sha256:d3a8d0734b1e82df4a725fa39a1b78625c407b8cf31ae1652382a2f4c8c757b4"}, + {url = "https://files.pythonhosted.org/packages/9d/f1/49aa2eed0fb5c4593ff7e6b682b55227ccff446e5968de4244858aa153a4/pydantic_core-0.39.0-cp39-none-win_amd64.whl", hash = "sha256:3a4d4d87dc988d9c52d4e7e31b77d6036b4cab36109826b57cd293ae3179440d"}, + {url = "https://files.pythonhosted.org/packages/a0/bb/6e4744e06e503aab065cc1a1c30b048e0d7cdc915e7aaec4e90f5dfeb920/pydantic_core-0.39.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4ee34d942a3ab3d55db4945b42ce000c5ca2fd749ab9bbc3fb4ddab41742cbbd"}, + {url = "https://files.pythonhosted.org/packages/a8/a0/1a8775109cb96cf2814b2e4672ce8077639ea8fea9a763855961f962a08a/pydantic_core-0.39.0-cp37-cp37m-manylinux_2_24_s390x.whl", hash = "sha256:a0f7d1454f86865cd2ec47e36ebe2e20cca5be71eaa5c2e422adf1e0355ae705"}, + {url = "https://files.pythonhosted.org/packages/af/13/a2263078a389ae865416ebd11b7e1ea6857ba17a3fe824247443dc8094dc/pydantic_core-0.39.0-cp310-cp310-manylinux_2_24_ppc64le.whl", hash = "sha256:8ac4ba34ac3977fa5c6cef5921564133e1295b9d202fed2d6e62187f61651f3c"}, + {url = "https://files.pythonhosted.org/packages/b6/cf/7e4c78ea6dd20fae6fcc40d080ea0cc0d243c455bd7f2876f4358083e734/pydantic_core-0.39.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:73f785920e974f86d2e37a7fc44a5fdd3e9b6d40fba94137da7a1e02c4dd7c11"}, + {url = "https://files.pythonhosted.org/packages/b9/6e/33ce81ab5b6216551c79a0de33d0561870ef8ce7044ad19d1bdcbbf7ac4c/pydantic_core-0.39.0-pp38-pypy38_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:5cf2849e22925411a15d955c03197f71c6507fcdfcaeee110a7202f6e436b5fa"}, + {url = "https://files.pythonhosted.org/packages/ba/5d/8da971a0738ba60e4b5fa4017edfc8b2ea7c33b497ff36c47579aaf8b2f7/pydantic_core-0.39.0-cp310-none-win32.whl", hash = "sha256:dc12b16753591143bdd0c117d74fbe46fda84b4a8eb0383931811819d8679c89"}, + {url = "https://files.pythonhosted.org/packages/bd/10/eae179a0e14dafdb99d8daad2214fbd4ce37ec930d5f4d6d5a76c53fb9b4/pydantic_core-0.39.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a5ca573f261ea525c5bb10e03d41dd9ce76aea93b75f9ca2dc5dc4ef147ea2a3"}, + {url = "https://files.pythonhosted.org/packages/c0/d0/be263343068f7b3add37590ada5aae3e6e9ef9d71fde57bbf5af1c77fd61/pydantic_core-0.39.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:71e12169625eb4b6939617333dd1aa671c156a44c44880db207c47a2e4c9fe81"}, + {url = "https://files.pythonhosted.org/packages/c1/3b/dfbf0b7528a391cc9f5f0ece71384d80a462a3ea29629d04d0077c60e2a6/pydantic_core-0.39.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d0ef384f3b4aa5ef4c66d47f4446ca9dc8adbfbc7bf74d1b31b19cc2e2bdf9e8"}, + {url = "https://files.pythonhosted.org/packages/cb/72/aa3d34b34ce6efe00fd1f3cf91e26d5df3fe17fec6233d411117f1fd1afc/pydantic_core-0.39.0-cp310-cp310-manylinux_2_24_armv7l.whl", hash = "sha256:ac8756c26cbfc57e89ff52817a2802e97376948de002ffe39adb238fbb12c8db"}, + {url = "https://files.pythonhosted.org/packages/cf/af/2c3098c684b769aa23e8cd52aeb6f9f1f57bd29001de4d504bffd971d061/pydantic_core-0.39.0-cp39-cp39-manylinux_2_24_ppc64le.whl", hash = "sha256:17a08e9af181097759362182bffa5614cd8c1278f12bab529e6e3bdc4b2d3860"}, + {url = "https://files.pythonhosted.org/packages/d1/49/665fa0ab78fb9d64737f9244611112ed2dd62294da07abbec5ff621e78cb/pydantic_core-0.39.0-cp37-none-win_amd64.whl", hash = "sha256:84675545b74ce4ea53f0e2413f182db1501b1684d6359f7c2cb4d37d24a9afec"}, + {url = "https://files.pythonhosted.org/packages/d1/57/09cf964c2fc35b47d720328e0cfc6db9541a253ff6cc252caea948dbbd9f/pydantic_core-0.39.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:103179d734dafb5da5f74065d1a18274709684a9dc01c61f119c5e39dea4d2df"}, + {url = "https://files.pythonhosted.org/packages/d9/59/b88cfad8e4d286c06eb8b2179b65d81e9f0e8a43b0501a10c5f6e7223059/pydantic_core-0.39.0-cp311-cp311-manylinux_2_24_s390x.whl", hash = "sha256:472049006abb4070750d530c96d76122497aec86b99c618d583e596fe986ad0a"}, + {url = "https://files.pythonhosted.org/packages/e1/05/0e5fc693d422d8fc385af604dedbbf7989fd5ec0d48b18f2eb8c5cd215a3/pydantic_core-0.39.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ef212fafe222ae7fdf38ba16b5c7bb7eddf1b44cc901bc3056569eefcf54da94"}, + {url = "https://files.pythonhosted.org/packages/e3/d2/03bfd28dbe7b88c0c3dc6d972eaa1893174802c11375ebafff3b5047374e/pydantic_core-0.39.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:38ac25daeb3ea45ecd4e8580f7375e6434daf02c6ca185f246f2e682de554ab5"}, + {url = "https://files.pythonhosted.org/packages/e7/94/7400beb368dda61e6f77777f8a708faa001f4aec20a537fe56c4d067dc9d/pydantic_core-0.39.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:cf6cff67dcf885f36e9f8a8771225df6b9cd76f308d0c7af66bfd2776f471c7c"}, + {url = "https://files.pythonhosted.org/packages/e9/22/a393b654f9e74c37f5ace2739d521430ce8944c2ceb5eec9c1b0576c47f1/pydantic_core-0.39.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8849794ae4da5d244d215ee582e83e169120c475a7e05f1adf227035b9edbde3"}, + {url = "https://files.pythonhosted.org/packages/eb/95/ff4b8fdfdc07645854fe141d684ada721eafe182482bcb08d2bac7531ca5/pydantic_core-0.39.0-pp37-pypy37_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:45f55076c3844ccf1a9f912d5bef61282baae203b30a7b0158add0b4a2141036"}, + {url = "https://files.pythonhosted.org/packages/ef/d6/11fdc62864ce49bbab385bb06de6b717b2e9447884fe723e1c7f4ff376e2/pydantic_core-0.39.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bed383476707e6aeb8d9d6fc83a9b9a6b4f0a00ae440ca3f1cc17686ae3e45ab"}, + {url = "https://files.pythonhosted.org/packages/f2/68/df76ad84b7ed61ef388eeaab89bc9669fb709127c01abafe8009d51329a4/pydantic_core-0.39.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:7cdcd13b84411d6194de988044b21c2859fcc7c673e0f6dd92e854489c21ae2f"}, + {url = "https://files.pythonhosted.org/packages/f3/d9/9b7391a49be7ccbd721026c4dd660f1452526a7812b6588d7a41c657c175/pydantic_core-0.39.0-pp37-pypy37_pp73-macosx_10_7_x86_64.whl", hash = "sha256:d3240340147504a1d6a3c86f43b644469f8c61992e0d88287701ee8f6b1b0b2d"}, + {url = "https://files.pythonhosted.org/packages/f8/64/20fd09945907199d0a0f516bd4589e31a04e25fce9775ffc3514016444bf/pydantic_core-0.39.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:7bf7470f621285303a5aa6b3e4fb148c5b69f8ee485a920ee9cc1472fd282d2e"}, + {url = "https://files.pythonhosted.org/packages/f8/ac/b53b69b8dc48f26a3c4176960e5d488772c6912cf1bfb998e8ca57498f10/pydantic_core-0.39.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d2c52a9269c302b75265e45f72e1c3a3d4e473c90f11d3c5671ddfa7ba891eae"}, + {url = "https://files.pythonhosted.org/packages/fd/e4/62a993fd668c679373487a9f4eb89bcda1d44a7d75c532872cf549cabc93/pydantic_core-0.39.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4060e765690727095969f7038e8e1c7251d4bd518e151174b5cb54dae0163c68"}, + {url = "https://files.pythonhosted.org/packages/ff/89/1c2c8c2f9631dcce456e7f116e3af5c049795336ae6bcd8631154ead29d0/pydantic_core-0.39.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8e86833a13a4f00f264d04f3f36048ce3fea0a92a730db6c9c9c0bf33e277bc2"}, ] "pylint 2.17.4" = [ {url = "https://files.pythonhosted.org/packages/04/4c/3f7d42a1378c40813772bc5f25184144da09f00ffbe3f60ae985ffa7e10f/pylint-2.17.4-py3-none-any.whl", hash = "sha256:7a1145fb08c251bdb5cca11739722ce64a63db479283d10ce718b2460e54123c"}, @@ -561,13 +561,13 @@ content_hash = "sha256:773ab8aa79c3209ee9a05956dc5808f351d35914c4c996301b024b71c {url = "https://files.pythonhosted.org/packages/7a/15/da3df99fd551507694a9b01f512a2f6cf1254f33601605843c3775f39460/pytest-cov-4.1.0.tar.gz", hash = "sha256:3904b13dfbfec47f003b8e77fd5b589cd11904a21ddf1ab38a64f204d6a10ef6"}, {url = "https://files.pythonhosted.org/packages/a7/4b/8b78d126e275efa2379b1c2e09dc52cf70df16fc3b90613ef82531499d73/pytest_cov-4.1.0-py3-none-any.whl", hash = "sha256:6ba70b9e97e69fcc3fb45bfeab2d0a138fb65c4d0d6a41ef33983ad114be8c3a"}, ] -"pytest-cppython 0.3.1.dev44" = [ - {url = "https://files.pythonhosted.org/packages/36/46/87da70abaf4cd3fb4b63418c2da15d81cdbdc9286883a9c51b98b3285772/pytest_cppython-0.3.1.dev44-py3-none-any.whl", hash = "sha256:ef033a44691a950bae1ef083bd7efad145818b6b697fa2588e17a1e36bbc5bca"}, - {url = "https://files.pythonhosted.org/packages/dc/3f/1149db4cdfbe2759626e631377fd8c119c8293a0d9fcfa807665c1cdd5bb/pytest-cppython-0.3.1.dev44.tar.gz", hash = "sha256:690bacb37be24c68ab7ce7bfc3c967768fa8824c452f86f31e1b6729bfd77f1f"}, +"pytest-cppython 0.3.1.dev45" = [ + {url = "https://files.pythonhosted.org/packages/5f/73/cd09e0ab2240398b7cdb8055f5bc218c2ba46e4f01c2feddce52838cafc7/pytest-cppython-0.3.1.dev45.tar.gz", hash = "sha256:e71f4ecbfb9e0d1e0c2f6d48b71cd119df554d0c68c2ba7c7e0a33ce66e00fe0"}, + {url = "https://files.pythonhosted.org/packages/a4/d7/926420c6e86280c37b1d4b02aea02f86820b5c7656da21a923d7055b8c14/pytest_cppython-0.3.1.dev45-py3-none-any.whl", hash = "sha256:b1a4bd299cf70000563a7317b2717e7168d03f2f6a84cdd3a507e3e0d2fe9736"}, ] -"pytest-mock 3.10.0" = [ - {url = "https://files.pythonhosted.org/packages/91/84/c951790e199cd54ddbf1021965b62a5415b81193ebdb4f4af2659fd06a73/pytest_mock-3.10.0-py3-none-any.whl", hash = "sha256:f4c973eeae0282963eb293eb173ce91b091a79c1334455acfac9ddee8a1c784b"}, - {url = "https://files.pythonhosted.org/packages/f6/2b/137a7db414aeaf3d753d415a2bc3b90aba8c5f61dff7a7a736d84b2ec60d/pytest-mock-3.10.0.tar.gz", hash = "sha256:fbbdb085ef7c252a326fd8cdcac0aa3b1333d8811f131bdcc701002e1be7ed4f"}, +"pytest-mock 3.11.1" = [ + {url = "https://files.pythonhosted.org/packages/d8/2d/b3a811ec4fa24190a9ec5013e23c89421a7916167c6240c31fdc445f850c/pytest-mock-3.11.1.tar.gz", hash = "sha256:7f6b125602ac6d743e523ae0bfa71e1a697a2f5534064528c6ff84c2f7c2fc7f"}, + {url = "https://files.pythonhosted.org/packages/da/85/80ae98e019a429445bfb74e153d4cb47c3695e3e908515e95e95c18237e5/pytest_mock-3.11.1-py3-none-any.whl", hash = "sha256:21c279fff83d70763b05f8874cc9cfb3fcacd6d354247a976f9529d19f9acf39"}, ] "tomlkit 0.11.8" = [ {url = "https://files.pythonhosted.org/packages/10/37/dd53019ccb72ef7d73fff0bee9e20b16faff9658b47913a35d79e89978af/tomlkit-0.11.8.tar.gz", hash = "sha256:9330fc7faa1db67b541b28e62018c17d20be733177d290a13b24c62d1614e0c3"}, From 39d10af5fda06483e886311bfce23060f1fba6b2 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Mon, 19 Jun 2023 19:58:47 -0400 Subject: [PATCH 03/68] Steps --- cppython/builder.py | 6 ++++-- cppython/project.py | 5 ++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cppython/builder.py b/cppython/builder.py index e163f01..cf286dd 100644 --- a/cppython/builder.py +++ b/cppython/builder.py @@ -67,7 +67,7 @@ def generate_project_data(self, project_configuration: ProjectConfiguration) -> return resolve_project_configuration(project_configuration) - def generate_data_plugins(self, pyproject: PyProject) -> PluginBuildData: + def generate_plugins(self, pyproject: PyProject) -> PluginBuildData: """_summary_ Args: @@ -91,10 +91,12 @@ def generate_data_plugins(self, pyproject: PyProject) -> PluginBuildData: "Provider", ) + self._scm = builder.create_scm(project_data) + # Solve the messy interactions between plugins generator_type, provider_type = self.solve(generator_plugins, provider_plugins) - return PluginBuildData(generator_type=generator_type, provider_type=provider_type) + return PluginBuildData(generator_type=generator_type, provider_type=provider_type, scm_type=scm_type) def generate_pep621_data( self, pyproject: PyProject, project_configuration: ProjectConfiguration, scm: SCM | None diff --git a/cppython/project.py b/cppython/project.py index 3b4e6ed..b66949e 100644 --- a/cppython/project.py +++ b/cppython/project.py @@ -32,13 +32,12 @@ def __init__( self.logger.info("Initializing project") project_data = builder.generate_project_data(project_configuration) - self._scm = builder.create_scm(project_data) - pyproject = PyProject(**pyproject_data) - plugin_build_data = builder.generate_data_plugins(pyproject) + plugin_build_data = builder.generate_plugins(pyproject) # Once the plugins are resolved, the core data is complete and can be generated + self.scm = plugin_build_data.scm_type() pep621_data = builder.generate_pep621_data(pyproject, project_configuration, self.scm) self._core_data = builder.generate_core_data( From ab9b73b4706c0d4d74dc3e3ddf54dfbfd61d5f41 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Tue, 27 Jun 2023 05:14:23 -0400 Subject: [PATCH 04/68] Update pyproject.toml --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4c84938..d15a6b8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,6 @@ paths = ["LICENSE.md"] homepage = "https://github.com/Synodic-Software/CPPython" repository = "https://github.com/Synodic-Software/CPPython" -[project.optional-dependencies] [tool.pdm] version = {use_scm = true} From b3708930d3d0341855b859c9537fbefb56b06755 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Mon, 17 Jul 2023 20:16:59 -0400 Subject: [PATCH 05/68] Update pyproject.toml --- pyproject.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d15a6b8..993ed7b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -104,5 +104,6 @@ default-docstring-type = "google" skip_empty = true [build-system] -build-backend = "pdm.pep517.api" -requires = ["pdm-pep517"] +build-backend = "pdm.backend" +requires = ["pdm.backend"] + From 4cd84d52f68daeafbdf39b83aba4e43cf4e691c0 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Wed, 30 Aug 2023 23:14:36 -0400 Subject: [PATCH 06/68] Update Extensions Recs --- .vscode/extensions.json | 7 +++++++ .vscode/settings.json | 6 ------ 2 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 .vscode/extensions.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..2a98eef --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,7 @@ +{ + "recommendations": [ + "ms-python.mypy-type-checker", + "ms-python.pylint", + "ms-python.black-formatter" + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 71959b3..cafb1c1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,17 +1,11 @@ { - "python.linting.enabled": true, - "python.linting.flake8Enabled": false, - "python.linting.pylintEnabled": true, "python.testing.pytestArgs": [ "tests" ], - "python.formatting.provider": "black", "python.testing.unittestEnabled": false, "python.testing.pytestEnabled": true, "editor.formatOnSave": true, "editor.codeActionsOnSave": { "source.organizeImports": true }, - "python.linting.mypyEnabled": true, - "mypy.runUsingActiveInterpreter": true } \ No newline at end of file From 24a8e31b5f0aa80eea9aa9c46bdc7c2263e26d1d Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Wed, 13 Mar 2024 16:33:15 -0400 Subject: [PATCH 07/68] Builder Simplification --- .vscode/settings.json | 2 +- cppython/builder.py | 296 ++++++++------ cppython/console/interface.py | 6 +- cppython/project.py | 77 +--- pdm.lock | 734 ++++++++++++---------------------- pyproject.toml | 28 +- tests/unit/test_project.py | 71 +++- 7 files changed, 538 insertions(+), 676 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index cafb1c1..33312c0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,6 +6,6 @@ "python.testing.pytestEnabled": true, "editor.formatOnSave": true, "editor.codeActionsOnSave": { - "source.organizeImports": true + "source.organizeImports": "explicit" }, } \ No newline at end of file diff --git a/cppython/builder.py b/cppython/builder.py index cf286dd..c4ed91c 100644 --- a/cppython/builder.py +++ b/cppython/builder.py @@ -1,7 +1,7 @@ -"""Everything needed to build a CPPython project -""" +"""Everything needed to build a CPPython project""" import logging +from dataclasses import dataclass from importlib import metadata from inspect import getmodule from logging import Logger @@ -13,10 +13,10 @@ from cppython_core.plugin_schema.scm import SCM from cppython_core.resolution import ( PluginBuildData, + PluginCPPythonData, resolve_cppython, resolve_cppython_plugin, resolve_generator, - resolve_name, resolve_pep621, resolve_project_configuration, resolve_provider, @@ -26,26 +26,31 @@ CoreData, CorePluginData, CPPythonGlobalConfiguration, - DataPluginT, + CPPythonLocalConfiguration, + DataPlugin, + PEP621Configuration, PEP621Data, ProjectConfiguration, ProjectData, - PyProject, ) +@dataclass +class Plugins: + """The plugin data for CPPython""" + + generator: Generator + provider: Provider + scm: SCM + + class Builder: """Helper class for building CPPython projects""" - def __init__(self, logger: Logger) -> None: + def __init__(self, project_configuration: ProjectConfiguration, logger: Logger) -> None: + self.project_configuration = project_configuration self.logger = logger - def setup_logger(self, project_configuration: ProjectConfiguration) -> None: - """_summary_ - - Args: - project_configuration: _description_ - """ # Default logging levels levels = [logging.WARNING, logging.INFO, logging.DEBUG] @@ -67,11 +72,14 @@ def generate_project_data(self, project_configuration: ProjectConfiguration) -> return resolve_project_configuration(project_configuration) - def generate_plugins(self, pyproject: PyProject) -> PluginBuildData: + def generate_plugins( + self, local_configuration: CPPythonLocalConfiguration, project_data: ProjectData + ) -> PluginBuildData: """_summary_ Args: - pyproject: _description_ + local_configuration: _description_ + project_data: _description_ Returns: _description_ @@ -80,51 +88,69 @@ def generate_plugins(self, pyproject: PyProject) -> PluginBuildData: raw_generator_plugins = self.find_generators() generator_plugins = self.filter_plugins( raw_generator_plugins, - pyproject.tool.cppython.generator_name, + local_configuration.generator_name, "Generator", ) raw_provider_plugins = self.find_providers() provider_plugins = self.filter_plugins( raw_provider_plugins, - pyproject.tool.cppython.provider_name, + local_configuration.provider_name, "Provider", ) - self._scm = builder.create_scm(project_data) + scm_plugins = self.find_source_managers() + + scm_type = self.select_scm(scm_plugins, project_data) # Solve the messy interactions between plugins generator_type, provider_type = self.solve(generator_plugins, provider_plugins) return PluginBuildData(generator_type=generator_type, provider_type=provider_type, scm_type=scm_type) + def generate_cppython_plugin_data(self, plugin_build_data: PluginBuildData) -> PluginCPPythonData: + """Generates the CPPython plugin data from the resolved plugins + + Args: + plugin_build_data: The resolved plugin data + + Returns: + The plugin data used by CPPython + """ + + return PluginCPPythonData( + generator_name=plugin_build_data.generator_type.name(), + provider_name=plugin_build_data.provider_type.name(), + scm_name=plugin_build_data.scm_type.name(), + ) + def generate_pep621_data( - self, pyproject: PyProject, project_configuration: ProjectConfiguration, scm: SCM | None + self, pep621_configuration: PEP621Configuration, project_configuration: ProjectConfiguration, scm: SCM | None ) -> PEP621Data: """_summary_ Args: - pyproject: _description_ + pep621_configuration: _description_ project_configuration: _description_ scm: _description_ Returns: _description_ """ - return resolve_pep621(pyproject.project, project_configuration, scm) + return resolve_pep621(pep621_configuration, project_configuration, scm) def generate_core_data( self, project_data: ProjectData, - pyproject: PyProject, - plugin_build_date: PluginBuildData, + local_configuration: CPPythonLocalConfiguration, + plugin_cppython_date: PluginCPPythonData, ) -> CoreData: """Parses and returns resolved data from all configuration sources Args: project_data: Project data - pyproject: TODO - plugin_build_date: TODO + local_configuration: TODO + plugin_cppython_date: TODO Raises: ConfigError: Raised if data cannot be parsed @@ -135,44 +161,19 @@ def generate_core_data( global_configuration = CPPythonGlobalConfiguration() - cppython_data = resolve_cppython(pyproject.tool.cppython, global_configuration, project_data, plugin_build_date) + cppython_data = resolve_cppython(local_configuration, global_configuration, project_data, plugin_cppython_date) return CoreData(project_data=project_data, cppython_data=cppython_data) - def resolve_global_config() -> CPPythonGlobalConfiguration: - """_summary_ + def resolve_global_config(self) -> CPPythonGlobalConfiguration: + """Generates the global configuration object Returns: - _description_ + The global configuration object """ return CPPythonGlobalConfiguration() - def resolve_core_data( - project_data: ProjectData, - pyproject: PyProject, - plugin_build_date: PluginBuildData, - ) -> CoreData: - """Parses and returns resolved data from all configuration sources - - Args: - project_data: Project data - pyproject: TODO - plugin_build_date: TODO - - Raises: - ConfigError: Raised if data cannot be parsed - - Returns: - The resolved core object - """ - - global_configuration = resolve_global_config() - - cppython_data = resolve_cppython(pyproject.tool.cppython, global_configuration, project_data, plugin_build_date) - - return CoreData(project_data=project_data, cppython_data=cppython_data) - def find_generators(self) -> list[type[Generator]]: """_summary_ @@ -191,13 +192,11 @@ def find_generators(self) -> list[type[Generator]]: loaded_type = entry_point.load() if not issubclass(loaded_type, Generator): self.logger.warning( - f"Found incompatible plugin. The '{resolve_name(loaded_type)}' plugin must be an instance of" + f"Found incompatible plugin. The '{loaded_type.name()}' plugin must be an instance of" f" '{group_name}'" ) else: - self.logger.warning( - f"{group_name} plugin found: {resolve_name(loaded_type)} from {getmodule(loaded_type)}" - ) + self.logger.warning(f"{group_name} plugin found: {loaded_type.name()} from {getmodule(loaded_type)}") plugin_types.append(loaded_type) if not plugin_types: @@ -223,13 +222,41 @@ def find_providers(self) -> list[type[Provider]]: loaded_type = entry_point.load() if not issubclass(loaded_type, Provider): self.logger.warning( - f"Found incompatible plugin. The '{resolve_name(loaded_type)}' plugin must be an instance of" + f"Found incompatible plugin. The '{loaded_type.name()}' plugin must be an instance of" f" '{group_name}'" ) else: + self.logger.warning(f"{group_name} plugin found: {loaded_type.name()} from {getmodule(loaded_type)}") + plugin_types.append(loaded_type) + + if not plugin_types: + raise PluginError(f"No {group_name} plugin was found") + + return plugin_types + + def find_source_managers(self) -> list[type[SCM]]: + """_summary_ + + Raises: + PluginError: _description_ + + Returns: + _description_ + """ + + group_name = "scm" + plugin_types: list[type[SCM]] = [] + + # Filter entries by type + for entry_point in list(metadata.entry_points(group=f"cppython.{group_name}")): + loaded_type = entry_point.load() + if not issubclass(loaded_type, SCM): self.logger.warning( - f"{group_name} plugin found: {resolve_name(loaded_type)} from {getmodule(loaded_type)}" + f"Found incompatible plugin. The '{loaded_type.name()}' plugin must be an instance of" + f" '{group_name}'" ) + else: + self.logger.warning(f"{group_name} plugin found: {loaded_type.name()} from {getmodule(loaded_type)}") plugin_types.append(loaded_type) if not plugin_types: @@ -237,9 +264,9 @@ def find_providers(self) -> list[type[Provider]]: return plugin_types - def filter_plugins( - self, plugin_types: list[type[DataPluginT]], pinned_name: str | None, group_name: str - ) -> list[type[DataPluginT]]: + def filter_plugins[ + T: DataPlugin + ](self, plugin_types: list[type[T]], pinned_name: str | None, group_name: str) -> list[type[T]]: """Finds and filters data plugins Args: @@ -257,20 +284,20 @@ def filter_plugins( # Lookup the requested plugin if given if pinned_name is not None: for loaded_type in plugin_types: - if resolve_name(loaded_type) == pinned_name: + if loaded_type.name() == pinned_name: self.logger.warning( - f"Using {group_name} plugin: {resolve_name(loaded_type)} from {getmodule(loaded_type)}" + f"Using {group_name} plugin: {loaded_type.name()} from {getmodule(loaded_type)}" ) return [loaded_type] self.logger.warning(f"'{group_name}_name' was empty. Trying to deduce {group_name}s") - supported_types: list[type[DataPluginT]] = [] + supported_types: list[type[T]] = [] # Deduce types for loaded_type in plugin_types: self.logger.warning( - f"A {group_name} plugin is supported: {resolve_name(loaded_type)} from {getmodule(loaded_type)}" + f"A {group_name} plugin is supported: {loaded_type.name()} from {getmodule(loaded_type)}" ) supported_types.append(loaded_type) @@ -280,6 +307,26 @@ def filter_plugins( return supported_types + def select_scm(self, scm_plugins: list[type[SCM]], project_data: ProjectData) -> type[SCM]: + """_summary_ + + Args: + scm_plugins: _description_ + project_data: _description_ + + Raises: + PluginError: _description_ + + Returns: + _description_ + """ + + for scm_type in scm_plugins: + if scm_type.features(project_data.pyproject_file.parent).repository: + return scm_type + + raise PluginError("No SCM plugin was found that supports the given path") + def solve( self, generator_types: list[type[Generator]], provider_types: list[type[Provider]] ) -> tuple[type[Generator], type[Provider]]: @@ -313,12 +360,13 @@ def solve( def create_scm( self, - project_data: ProjectData, - ) -> SCM | None: + core_data: CoreData, + scm_type: type[SCM], + ) -> SCM: """_summary_ Args: - project_data: _description_ + core_data: _description_ Raises: PluginError: Ya @@ -326,45 +374,26 @@ def create_scm( Returns: _description_ """ - group = "scm" - path = project_data.pyproject_file.parent - scm_types: list[type[SCM]] = [] + cppython_plugin_data = resolve_cppython_plugin(core_data.cppython_data, scm_type) + scm_data = resolve_scm(core_data.project_data, cppython_plugin_data) - if not (entries := list(metadata.entry_points(group=f"cppython.{group}"))): - raise PluginError("No SCM plugin found") - - # Filter entries - for entry_point in entries: - plugin_type = entry_point.load() - if not issubclass(plugin_type, SCM): - self.logger.warning( - f"Found incompatible plugin. The '{resolve_name(plugin_type)}' plugin must be an instance of" - f" '{group}'" - ) - else: - scm_types.append(plugin_type) - - # Deduce the SCM repository - plugin = None - for scm_type in scm_types: - if scm_type.features(path).repository: - scm_data = resolve_scm(project_data) - plugin = scm_type(scm_data) - break - - if not plugin: - self.logger.error("No applicable SCM plugin found for the given path") + plugin = scm_type(scm_data) return plugin def create_generator( - self, core_data: CoreData, generator_configuration: dict[str, Any], generator_type: type[Generator] + self, + core_data: CoreData, + pep621_data: PEP621Data, + generator_configuration: dict[str, Any], + generator_type: type[Generator], ) -> Generator: """Creates a generator from input configuration Args: core_data: The resolved configuration data + pep621_data: The PEP621 data generator_configuration: The generator table of the CPPython configuration data generator_type: The plugin type @@ -377,28 +406,33 @@ def create_generator( cppython_plugin_data = resolve_cppython_plugin(core_data.cppython_data, generator_type) - core_plugin_data = CorePluginData( - project_data=core_data.project_data, - pep621_data=core_data.pep621_data, - cppython_data=cppython_plugin_data, - ) - - generator_data = resolve_generator(core_plugin_data) + generator_data = resolve_generator(core_data.project_data, cppython_plugin_data) if not generator_configuration: self.logger.error( "The pyproject.toml table 'tool.cppython.generator' does not exist. Sending generator empty data", ) + core_plugin_data = CorePluginData( + project_data=core_data.project_data, + pep621_data=pep621_data, + cppython_data=cppython_plugin_data, + ) + return generator_type(generator_data, core_plugin_data, generator_configuration) def create_provider( - self, core_data: CoreData, provider_configuration: dict[str, Any], provider_type: type[Provider] + self, + core_data: CoreData, + pep621_data: PEP621Data, + provider_configuration: dict[str, Any], + provider_type: type[Provider], ) -> Provider: """Creates Providers from input data Args: core_data: The resolved configuration data + pep621_data: The PEP621 data provider_configuration: The provider data table provider_type: The type to instantiate @@ -411,17 +445,55 @@ def create_provider( cppython_plugin_data = resolve_cppython_plugin(core_data.cppython_data, provider_type) - core_plugin_data = CorePluginData( - project_data=core_data.project_data, - pep621_data=core_data.pep621_data, - cppython_data=cppython_plugin_data, - ) - - provider_data = resolve_provider(core_plugin_data) + provider_data = resolve_provider(core_data.project_data, cppython_plugin_data) if not provider_configuration: self.logger.error( "The pyproject.toml table 'tool.cppython.provider' does not exist. Sending provider empty data", ) + core_plugin_data = CorePluginData( + project_data=core_data.project_data, + pep621_data=pep621_data, + cppython_data=cppython_plugin_data, + ) + return provider_type(provider_data, core_plugin_data, provider_configuration) + + def build( + self, pep621_configuration: PEP621Configuration, local_configuration: CPPythonLocalConfiguration + ) -> Plugins: + """_summary_ + + Args: + pep621_configuration: _description_ + local_configuration: _description_ + + Returns: + _description_ + """ + + project_data = self.generate_project_data(self.project_configuration) + + plugin_build_data = self.generate_plugins(local_configuration, project_data) + plugin_cppython_data = self.generate_cppython_plugin_data(plugin_build_data) + + _core_data = self.generate_core_data( + project_data, + local_configuration, + plugin_cppython_data, + ) + + scm = self.create_scm(_core_data, plugin_build_data.scm_type) + + pep621_data = self.generate_pep621_data(pep621_configuration, self.project_configuration, scm) + + # Create the chosen plugins + generator = self.create_generator( + _core_data, pep621_data, local_configuration.generator, plugin_build_data.generator_type + ) + provider = self.create_provider( + _core_data, pep621_data, local_configuration.provider, plugin_build_data.provider_type + ) + + return Plugins(generator=generator, provider=provider, scm=scm) diff --git a/cppython/console/interface.py b/cppython/console/interface.py index 53f5b03..1a5e49b 100644 --- a/cppython/console/interface.py +++ b/cppython/console/interface.py @@ -1,5 +1,4 @@ -"""A click CLI for CPPython interfacing -""" +"""A click CLI for CPPython interfacing""" from logging import getLogger from pathlib import Path @@ -61,7 +60,8 @@ def generate_project(self) -> Project: The constructed Project """ - pyproject_data = tomlkit.loads(self.configuration.pyproject_file.read_text(encoding="utf-8")) + path: Path = self.configuration.pyproject_file + pyproject_data = tomlkit.loads(path.read_text(encoding="utf-8")) return Project(self.configuration, self.interface, pyproject_data) diff --git a/cppython/project.py b/cppython/project.py index b66949e..a85acff 100644 --- a/cppython/project.py +++ b/cppython/project.py @@ -1,22 +1,19 @@ -"""Manages data flow to and from plugins -""" +"""Manages data flow to and from plugins""" import asyncio import logging from typing import Any -from cppython_core.exceptions import ConfigError, PluginError -from cppython_core.plugin_schema.scm import SCM -from cppython_core.resolution import resolve_name +from cppython_core.exceptions import ConfigException, PluginError +from cppython_core.resolution import resolve_model from cppython_core.schema import CoreData, Interface, ProjectConfiguration, PyProject -from pydantic import ValidationError from cppython.builder import Builder from cppython.schema import API class Project(API): - """The object constructed at each entry_point""" + """The object that should be constructed at each entry_point""" def __init__( self, project_configuration: ProjectConfiguration, interface: Interface, pyproject_data: dict[str, Any] @@ -25,42 +22,22 @@ def __init__( self._interface = interface self.logger = logging.getLogger("cppython") - try: - builder = Builder(self.logger) - builder.setup_logger(project_configuration) - - self.logger.info("Initializing project") - - project_data = builder.generate_project_data(project_configuration) - pyproject = PyProject(**pyproject_data) - - plugin_build_data = builder.generate_plugins(pyproject) + builder = Builder(project_configuration, self.logger) - # Once the plugins are resolved, the core data is complete and can be generated - self.scm = plugin_build_data.scm_type() + self.logger.info("Initializing project") - pep621_data = builder.generate_pep621_data(pyproject, project_configuration, self.scm) - self._core_data = builder.generate_core_data( - project_data, - pyproject, - plugin_build_data, - ) - - # Create the chosen plugins - self._generator = builder.create_generator( - self._core_data, pyproject.tool.cppython.generator, plugin_build_data.generator_type - ) - self._provider = builder.create_provider( - self._core_data, pyproject.tool.cppython.provider, plugin_build_data.provider_type - ) - - except ConfigError: - logging.exception("Unhandled configuration. CPPython will process no further") + try: + pyproject = resolve_model(PyProject, pyproject_data) + except ConfigException as error: + self.logger.error(error, exc_info=True) return - except ValidationError as error: - logging.error(error) + + if not pyproject.tool or not pyproject.tool.cppython: + self.logger.warning("The pyproject.toml file doesn't contain the `tool.cppython` table") return + self._plugins = builder.build(pyproject.project, pyproject.tool.cppython) + self._enabled = True self.logger.info("Initialized project successfully") @@ -83,29 +60,19 @@ def core_data(self) -> CoreData | None: """ return self._core_data if self._enabled else None - @property - def scm(self) -> SCM | None: - """SCM - - Returns: - SCM, if enabled - """ - return self._scm if self._enabled else None - async def download_provider_tools(self) -> None: """Download the provider tooling if required""" if not self._enabled: self.logger.info("Skipping 'download_provider_tools' because the project is not enabled") return - name = resolve_name(type(self._provider)) base_path = self._core_data.cppython_data.install_path - path = base_path / name + path = base_path / self._provider.name() path.mkdir(parents=True, exist_ok=True) - self.logger.warning("Downloading the %s requirements to %s", name, path) + self.logger.warning("Downloading the %s requirements to %s", self._provider.name(), path) await self._provider.download_tooling(path) def sync(self) -> None: @@ -135,13 +102,12 @@ def install(self) -> None: asyncio.run(self.download_provider_tools()) self.logger.info("Installing project") - name = resolve_name(type(self._provider)) - self.logger.info("Installing %s provider", name) + self.logger.info("Installing %s provider", self._provider.name()) try: self._provider.install() except Exception as exception: - self.logger.error("Provider %s failed to install", name) + self.logger.error("Provider %s failed to install", self._provider.name()) raise exception self.sync() @@ -160,13 +126,12 @@ def update(self) -> None: asyncio.run(self.download_provider_tools()) self.logger.info("Updating project") - name = resolve_name(type(self._provider)) - self.logger.info("Updating %s provider", name) + self.logger.info("Updating %s provider", self._provider.name()) try: self._provider.update() except Exception as exception: - self.logger.error("Provider %s failed to update", name) + self.logger.error("Provider %s failed to update", self._provider.name()) raise exception self.sync() diff --git a/pdm.lock b/pdm.lock index 5d3ff1f..6e8466d 100644 --- a/pdm.lock +++ b/pdm.lock @@ -1,26 +1,36 @@ # This file is @generated by PDM. # It is not intended for manual editing. +[metadata] +groups = ["default", "lint", "test"] +strategy = ["cross_platform"] +lock_version = "4.4.1" +content_hash = "sha256:017552fe0fbb7c28de2016f00448dcb31947be6084adb54e69b470ee2eed83ba" + [[package]] name = "annotated-types" -version = "0.5.0" -requires_python = ">=3.7" +version = "0.6.0" +requires_python = ">=3.8" summary = "Reusable constraint types to use with typing.Annotated" +files = [ + {file = "annotated_types-0.6.0-py3-none-any.whl", hash = "sha256:0641064de18ba7a25dee8f96403ebc39113d0cb953a01429249d5c7564666a43"}, + {file = "annotated_types-0.6.0.tar.gz", hash = "sha256:563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d"}, +] [[package]] name = "astroid" -version = "2.15.5" -requires_python = ">=3.7.2" +version = "3.1.0" +requires_python = ">=3.8.0" summary = "An abstract syntax tree for Python with inference support." -dependencies = [ - "lazy-object-proxy>=1.4.0", - "wrapt<2,>=1.14; python_version >= \"3.11\"", +files = [ + {file = "astroid-3.1.0-py3-none-any.whl", hash = "sha256:951798f922990137ac090c53af473db7ab4e70c770e6d7fae0cec59f74411819"}, + {file = "astroid-3.1.0.tar.gz", hash = "sha256:ac248253bfa4bd924a0de213707e7ebeeb3138abeb48d798784ead1e56d419d4"}, ] [[package]] name = "black" -version = "23.3.0" -requires_python = ">=3.7" +version = "24.2.0" +requires_python = ">=3.8" summary = "The uncompromising code formatter." dependencies = [ "click>=8.0.0", @@ -29,85 +39,153 @@ dependencies = [ "pathspec>=0.9.0", "platformdirs>=2", ] +files = [ + {file = "black-24.2.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:d84f29eb3ee44859052073b7636533ec995bd0f64e2fb43aeceefc70090e752b"}, + {file = "black-24.2.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1e08fb9a15c914b81dd734ddd7fb10513016e5ce7e6704bdd5e1251ceee51ac9"}, + {file = "black-24.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:810d445ae6069ce64030c78ff6127cd9cd178a9ac3361435708b907d8a04c693"}, + {file = "black-24.2.0-cp312-cp312-win_amd64.whl", hash = "sha256:ba15742a13de85e9b8f3239c8f807723991fbfae24bad92d34a2b12e81904982"}, + {file = "black-24.2.0-py3-none-any.whl", hash = "sha256:e8a6ae970537e67830776488bca52000eaa37fa63b9988e8c487458d9cd5ace6"}, + {file = "black-24.2.0.tar.gz", hash = "sha256:bce4f25c27c3435e4dace4815bcb2008b87e167e3bf4ee47ccdc5ce906eb4894"}, +] [[package]] name = "click" -version = "8.1.3" +version = "8.1.7" requires_python = ">=3.7" summary = "Composable command line interface toolkit" dependencies = [ "colorama; platform_system == \"Windows\"", ] +files = [ + {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, + {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, +] [[package]] name = "colorama" version = "0.4.6" requires_python = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" summary = "Cross-platform colored terminal text." +files = [ + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] [[package]] name = "coverage" -version = "7.2.7" -requires_python = ">=3.7" +version = "7.4.3" +requires_python = ">=3.8" summary = "Code coverage measurement for Python" +files = [ + {file = "coverage-7.4.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:b51bfc348925e92a9bd9b2e48dad13431b57011fd1038f08316e6bf1df107d10"}, + {file = "coverage-7.4.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d6cdecaedea1ea9e033d8adf6a0ab11107b49571bbb9737175444cea6eb72328"}, + {file = "coverage-7.4.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3b2eccb883368f9e972e216c7b4c7c06cabda925b5f06dde0650281cb7666a30"}, + {file = "coverage-7.4.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6c00cdc8fa4e50e1cc1f941a7f2e3e0f26cb2a1233c9696f26963ff58445bac7"}, + {file = "coverage-7.4.3-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b9a4a8dd3dcf4cbd3165737358e4d7dfbd9d59902ad11e3b15eebb6393b0446e"}, + {file = "coverage-7.4.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:062b0a75d9261e2f9c6d071753f7eef0fc9caf3a2c82d36d76667ba7b6470003"}, + {file = "coverage-7.4.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:ebe7c9e67a2d15fa97b77ea6571ce5e1e1f6b0db71d1d5e96f8d2bf134303c1d"}, + {file = "coverage-7.4.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:c0a120238dd71c68484f02562f6d446d736adcc6ca0993712289b102705a9a3a"}, + {file = "coverage-7.4.3-cp312-cp312-win32.whl", hash = "sha256:37389611ba54fd6d278fde86eb2c013c8e50232e38f5c68235d09d0a3f8aa352"}, + {file = "coverage-7.4.3-cp312-cp312-win_amd64.whl", hash = "sha256:d25b937a5d9ffa857d41be042b4238dd61db888533b53bc76dc082cb5a15e914"}, + {file = "coverage-7.4.3-pp38.pp39.pp310-none-any.whl", hash = "sha256:7cbde573904625509a3f37b6fecea974e363460b556a627c60dc2f47e2fffa51"}, + {file = "coverage-7.4.3.tar.gz", hash = "sha256:276f6077a5c61447a48d133ed13e759c09e62aff0dc84274a68dc18660104d52"}, +] [[package]] name = "coverage" -version = "7.2.7" +version = "7.4.3" extras = ["toml"] -requires_python = ">=3.7" +requires_python = ">=3.8" summary = "Code coverage measurement for Python" dependencies = [ - "coverage==7.2.7", + "coverage==7.4.3", +] +files = [ + {file = "coverage-7.4.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:b51bfc348925e92a9bd9b2e48dad13431b57011fd1038f08316e6bf1df107d10"}, + {file = "coverage-7.4.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d6cdecaedea1ea9e033d8adf6a0ab11107b49571bbb9737175444cea6eb72328"}, + {file = "coverage-7.4.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3b2eccb883368f9e972e216c7b4c7c06cabda925b5f06dde0650281cb7666a30"}, + {file = "coverage-7.4.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6c00cdc8fa4e50e1cc1f941a7f2e3e0f26cb2a1233c9696f26963ff58445bac7"}, + {file = "coverage-7.4.3-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b9a4a8dd3dcf4cbd3165737358e4d7dfbd9d59902ad11e3b15eebb6393b0446e"}, + {file = "coverage-7.4.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:062b0a75d9261e2f9c6d071753f7eef0fc9caf3a2c82d36d76667ba7b6470003"}, + {file = "coverage-7.4.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:ebe7c9e67a2d15fa97b77ea6571ce5e1e1f6b0db71d1d5e96f8d2bf134303c1d"}, + {file = "coverage-7.4.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:c0a120238dd71c68484f02562f6d446d736adcc6ca0993712289b102705a9a3a"}, + {file = "coverage-7.4.3-cp312-cp312-win32.whl", hash = "sha256:37389611ba54fd6d278fde86eb2c013c8e50232e38f5c68235d09d0a3f8aa352"}, + {file = "coverage-7.4.3-cp312-cp312-win_amd64.whl", hash = "sha256:d25b937a5d9ffa857d41be042b4238dd61db888533b53bc76dc082cb5a15e914"}, + {file = "coverage-7.4.3-pp38.pp39.pp310-none-any.whl", hash = "sha256:7cbde573904625509a3f37b6fecea974e363460b556a627c60dc2f47e2fffa51"}, + {file = "coverage-7.4.3.tar.gz", hash = "sha256:276f6077a5c61447a48d133ed13e759c09e62aff0dc84274a68dc18660104d52"}, ] [[package]] name = "cppython-core" -version = "0.7.0" -requires_python = ">=3.11" +version = "0.7.1.dev12" +requires_python = ">=3.12" summary = "Data definitions for CPPython" dependencies = [ - "pydantic>=2.0b1", + "pydantic>=2.6.3", + "synodic-utilities>=0.1.1.dev3", +] +files = [ + {file = "cppython_core-0.7.1.dev12-py3-none-any.whl", hash = "sha256:3b6e047874f3c7294c215b344a89147445bda4aecfa81564260cd944ee147551"}, + {file = "cppython_core-0.7.1.dev12.tar.gz", hash = "sha256:1bd3cc2c6bbcadd71dd565a27713f4ff38b3d3c790485ce424b14d4d18081e53"}, ] [[package]] name = "dill" -version = "0.3.6" -requires_python = ">=3.7" -summary = "serialize all of python" +version = "0.3.8" +requires_python = ">=3.8" +summary = "serialize all of Python" +files = [ + {file = "dill-0.3.8-py3-none-any.whl", hash = "sha256:c36ca9ffb54365bdd2f8eb3eff7d2a21237f8452b57ace88b1ac615b7e815bd7"}, + {file = "dill-0.3.8.tar.gz", hash = "sha256:3ebe3c479ad625c4553aca177444d89b486b1d84982eeacded644afc0cf797ca"}, +] [[package]] name = "iniconfig" version = "2.0.0" requires_python = ">=3.7" summary = "brain-dead simple config-ini parsing" +files = [ + {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, + {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, +] [[package]] name = "isort" -version = "5.12.0" +version = "5.13.2" requires_python = ">=3.8.0" summary = "A Python utility / library to sort Python imports." - -[[package]] -name = "lazy-object-proxy" -version = "1.9.0" -requires_python = ">=3.7" -summary = "A fast and thorough lazy object proxy." +files = [ + {file = "isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6"}, + {file = "isort-5.13.2.tar.gz", hash = "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109"}, +] [[package]] name = "mccabe" version = "0.7.0" requires_python = ">=3.6" summary = "McCabe checker, plugin for flake8" +files = [ + {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, + {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, +] [[package]] name = "mypy" -version = "1.3.0" -requires_python = ">=3.7" +version = "1.9.0" +requires_python = ">=3.8" summary = "Optional static typing for Python" dependencies = [ "mypy-extensions>=1.0.0", - "typing-extensions>=3.10", + "typing-extensions>=4.1.0", +] +files = [ + {file = "mypy-1.9.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:aceb1db093b04db5cd390821464504111b8ec3e351eb85afd1433490163d60cd"}, + {file = "mypy-1.9.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0235391f1c6f6ce487b23b9dbd1327b4ec33bb93934aa986efe8a9563d9349e6"}, + {file = "mypy-1.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d4d5ddc13421ba3e2e082a6c2d74c2ddb3979c39b582dacd53dd5d9431237185"}, + {file = "mypy-1.9.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:190da1ee69b427d7efa8aa0d5e5ccd67a4fb04038c380237a0d96829cb157913"}, + {file = "mypy-1.9.0-cp312-cp312-win_amd64.whl", hash = "sha256:fe28657de3bfec596bbeef01cb219833ad9d38dd5393fc649f4b366840baefe6"}, + {file = "mypy-1.9.0-py3-none-any.whl", hash = "sha256:a260627a570559181a9ea5de61ac6297aa5af202f06fd7ab093ce74e7181e43e"}, + {file = "mypy-1.9.0.tar.gz", hash = "sha256:3cc5da0127e6a478cddd906068496a97a7618a21ce9b54bde5bf7e539c7af974"}, ] [[package]] @@ -115,73 +193,141 @@ name = "mypy-extensions" version = "1.0.0" requires_python = ">=3.5" summary = "Type system extensions for programs checked with the mypy type checker." +files = [ + {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, + {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, +] [[package]] name = "packaging" -version = "23.1" +version = "24.0" requires_python = ">=3.7" summary = "Core utilities for Python packages" +files = [ + {file = "packaging-24.0-py3-none-any.whl", hash = "sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5"}, + {file = "packaging-24.0.tar.gz", hash = "sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9"}, +] [[package]] name = "pathspec" -version = "0.11.1" -requires_python = ">=3.7" +version = "0.12.1" +requires_python = ">=3.8" summary = "Utility library for gitignore style pattern matching of file paths." +files = [ + {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, + {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, +] [[package]] name = "platformdirs" -version = "3.6.0" -requires_python = ">=3.7" +version = "4.2.0" +requires_python = ">=3.8" summary = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +files = [ + {file = "platformdirs-4.2.0-py3-none-any.whl", hash = "sha256:0614df2a2f37e1a662acbd8e2b25b92ccf8632929bc6d43467e17fe89c75e068"}, + {file = "platformdirs-4.2.0.tar.gz", hash = "sha256:ef0cc731df711022c174543cb70a9b5bd22e5a9337c8624ef2c2ceb8ddad8768"}, +] [[package]] name = "pluggy" -version = "1.0.0" -requires_python = ">=3.6" +version = "1.4.0" +requires_python = ">=3.8" summary = "plugin and hook calling mechanisms for python" +files = [ + {file = "pluggy-1.4.0-py3-none-any.whl", hash = "sha256:7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981"}, + {file = "pluggy-1.4.0.tar.gz", hash = "sha256:8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be"}, +] [[package]] name = "pydantic" -version = "2.0b3" -requires_python = ">=3.7" +version = "2.6.4" +requires_python = ">=3.8" summary = "Data validation using Python type hints" dependencies = [ "annotated-types>=0.4.0", - "pydantic-core==0.39.0", + "pydantic-core==2.16.3", "typing-extensions>=4.6.1", ] +files = [ + {file = "pydantic-2.6.4-py3-none-any.whl", hash = "sha256:cc46fce86607580867bdc3361ad462bab9c222ef042d3da86f2fb333e1d916c5"}, + {file = "pydantic-2.6.4.tar.gz", hash = "sha256:b1704e0847db01817624a6b86766967f552dd9dbf3afba4004409f908dcc84e6"}, +] [[package]] name = "pydantic-core" -version = "0.39.0" -requires_python = ">=3.7" +version = "2.16.3" +requires_python = ">=3.8" summary = "" +dependencies = [ + "typing-extensions!=4.7.0,>=4.6.0", +] +files = [ + {file = "pydantic_core-2.16.3-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:0f56ae86b60ea987ae8bcd6654a887238fd53d1384f9b222ac457070b7ac4cff"}, + {file = "pydantic_core-2.16.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c9bd22a2a639e26171068f8ebb5400ce2c1bc7d17959f60a3b753ae13c632975"}, + {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4204e773b4b408062960e65468d5346bdfe139247ee5f1ca2a378983e11388a2"}, + {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f651dd19363c632f4abe3480a7c87a9773be27cfe1341aef06e8759599454120"}, + {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aaf09e615a0bf98d406657e0008e4a8701b11481840be7d31755dc9f97c44053"}, + {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8e47755d8152c1ab5b55928ab422a76e2e7b22b5ed8e90a7d584268dd49e9c6b"}, + {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:500960cb3a0543a724a81ba859da816e8cf01b0e6aaeedf2c3775d12ee49cade"}, + {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:cf6204fe865da605285c34cf1172879d0314ff267b1c35ff59de7154f35fdc2e"}, + {file = "pydantic_core-2.16.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d33dd21f572545649f90c38c227cc8631268ba25c460b5569abebdd0ec5974ca"}, + {file = "pydantic_core-2.16.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:49d5d58abd4b83fb8ce763be7794d09b2f50f10aa65c0f0c1696c677edeb7cbf"}, + {file = "pydantic_core-2.16.3-cp312-none-win32.whl", hash = "sha256:f53aace168a2a10582e570b7736cc5bef12cae9cf21775e3eafac597e8551fbe"}, + {file = "pydantic_core-2.16.3-cp312-none-win_amd64.whl", hash = "sha256:0d32576b1de5a30d9a97f300cc6a3f4694c428d956adbc7e6e2f9cad279e45ed"}, + {file = "pydantic_core-2.16.3-cp312-none-win_arm64.whl", hash = "sha256:ec08be75bb268473677edb83ba71e7e74b43c008e4a7b1907c6d57e940bf34b6"}, + {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:36fa178aacbc277bc6b62a2c3da95226520da4f4e9e206fdf076484363895d2c"}, + {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:dcca5d2bf65c6fb591fff92da03f94cd4f315972f97c21975398bd4bd046854a"}, + {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2a72fb9963cba4cd5793854fd12f4cfee731e86df140f59ff52a49b3552db241"}, + {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b60cc1a081f80a2105a59385b92d82278b15d80ebb3adb200542ae165cd7d183"}, + {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:cbcc558401de90a746d02ef330c528f2e668c83350f045833543cd57ecead1ad"}, + {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:fee427241c2d9fb7192b658190f9f5fd6dfe41e02f3c1489d2ec1e6a5ab1e04a"}, + {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f4cb85f693044e0f71f394ff76c98ddc1bc0953e48c061725e540396d5c8a2e1"}, + {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:b29eeb887aa931c2fcef5aa515d9d176d25006794610c264ddc114c053bf96fe"}, + {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:a425479ee40ff021f8216c9d07a6a3b54b31c8267c6e17aa88b70d7ebd0e5e5b"}, + {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:5c5cbc703168d1b7a838668998308018a2718c2130595e8e190220238addc96f"}, + {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99b6add4c0b39a513d323d3b93bc173dac663c27b99860dd5bf491b240d26137"}, + {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75f76ee558751746d6a38f89d60b6228fa174e5172d143886af0f85aa306fd89"}, + {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:00ee1c97b5364b84cb0bd82e9bbf645d5e2871fb8c58059d158412fee2d33d8a"}, + {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:287073c66748f624be4cef893ef9174e3eb88fe0b8a78dc22e88eca4bc357ca6"}, + {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:ed25e1835c00a332cb10c683cd39da96a719ab1dfc08427d476bce41b92531fc"}, + {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:86b3d0033580bd6bbe07590152007275bd7af95f98eaa5bd36f3da219dcd93da"}, + {file = "pydantic_core-2.16.3.tar.gz", hash = "sha256:1cac689f80a3abab2d3c0048b29eea5751114054f032a941a32de4c852c59cad"}, +] [[package]] name = "pylint" -version = "2.17.4" -requires_python = ">=3.7.2" +version = "3.1.0" +requires_python = ">=3.8.0" summary = "python code static checker" dependencies = [ - "astroid<=2.17.0-dev0,>=2.15.4", + "astroid<=3.2.0-dev0,>=3.1.0", "colorama>=0.4.5; sys_platform == \"win32\"", "dill>=0.3.6; python_version >= \"3.11\"", - "isort<6,>=4.2.5", + "dill>=0.3.7; python_version >= \"3.12\"", + "isort!=5.13.0,<6,>=4.2.5", "mccabe<0.8,>=0.6", "platformdirs>=2.2.0", "tomlkit>=0.10.1", ] +files = [ + {file = "pylint-3.1.0-py3-none-any.whl", hash = "sha256:507a5b60953874766d8a366e8e8c7af63e058b26345cfcb5f91f89d987fd6b74"}, + {file = "pylint-3.1.0.tar.gz", hash = "sha256:6a69beb4a6f63debebaab0a3477ecd0f559aa726af4954fc948c51f7a2549e23"}, +] [[package]] name = "pytest" -version = "7.3.2" -requires_python = ">=3.7" +version = "8.1.1" +requires_python = ">=3.8" summary = "pytest: simple powerful testing with Python" dependencies = [ "colorama; sys_platform == \"win32\"", "iniconfig", "packaging", - "pluggy<2.0,>=0.12", + "pluggy<2.0,>=1.4", +] +files = [ + {file = "pytest-8.1.1-py3-none-any.whl", hash = "sha256:2a8386cfc11fa9d2c50ee7b2a57e7d898ef90470a7a34c4b949ff59662bb78b7"}, + {file = "pytest-8.1.1.tar.gz", hash = "sha256:ac978141a75948948817d360297b7aae0fcb9d6ff6bc9ec6d514b85d5a65c044"}, ] [[package]] @@ -192,6 +338,10 @@ dependencies = [ "click>=6.0", "pytest>=5.0", ] +files = [ + {file = "pytest_click-1.1.0-py3-none-any.whl", hash = "sha256:eade4742c2f02c345e78a32534a43e8db04acf98d415090539dacc880b7cd0e9"}, + {file = "pytest_click-1.1.0.tar.gz", hash = "sha256:fdd9f6721f877dda021e7c5dc73e70aecd37e5ed23ec6820f8a7b3fd7b4f8d30"}, +] [[package]] name = "pytest-cov" @@ -202,455 +352,81 @@ dependencies = [ "coverage[toml]>=5.2.1", "pytest>=4.6", ] +files = [ + {file = "pytest-cov-4.1.0.tar.gz", hash = "sha256:3904b13dfbfec47f003b8e77fd5b589cd11904a21ddf1ab38a64f204d6a10ef6"}, + {file = "pytest_cov-4.1.0-py3-none-any.whl", hash = "sha256:6ba70b9e97e69fcc3fb45bfeab2d0a138fb65c4d0d6a41ef33983ad114be8c3a"}, +] [[package]] name = "pytest-cppython" -version = "0.3.1.dev45" -requires_python = ">=3.11" +version = "0.3.1.dev49" +requires_python = ">=3.12" summary = "A pytest plugin that imports CPPython testing types" dependencies = [ "cppython-core>=0.4.1.dev13", - "pydantic>=2.0a4", + "pydantic>=2.6.3", + "pytest-mock>=3.12.0", + "pytest-synodic>=0.0.0", + "pytest>=8.0.0", +] +files = [ + {file = "pytest_cppython-0.3.1.dev49-py3-none-any.whl", hash = "sha256:99e61318c4af078d86529b8f7e16da24de8b31ea1eb2df4cf99a9c667ad88000"}, + {file = "pytest_cppython-0.3.1.dev49.tar.gz", hash = "sha256:d1a685c6cbfedcf9c6c17516c201026c7449918978b08afa935db38d0df28707"}, ] [[package]] name = "pytest-mock" -version = "3.11.1" -requires_python = ">=3.7" +version = "3.12.0" +requires_python = ">=3.8" summary = "Thin-wrapper around the mock package for easier use with pytest" dependencies = [ "pytest>=5.0", ] +files = [ + {file = "pytest-mock-3.12.0.tar.gz", hash = "sha256:31a40f038c22cad32287bb43932054451ff5583ff094bca6f675df2f8bc1a6e9"}, + {file = "pytest_mock-3.12.0-py3-none-any.whl", hash = "sha256:0972719a7263072da3a21c7f4773069bcc7486027d7e8e1f81d98a47e701bc4f"}, +] + +[[package]] +name = "pytest-synodic" +version = "0.1.1.dev6" +requires_python = ">=3.12" +summary = "Synodic Pytest utilities" +dependencies = [ + "pytest>=8.0.2", + "synodic-utilities>=0.1.1.dev5", +] +files = [ + {file = "pytest_synodic-0.1.1.dev6-py3-none-any.whl", hash = "sha256:9c4e0a450379c54bcb4d2f3875fe8db1ffe3c58ea90ce5a41df5e79fe3a01d46"}, + {file = "pytest_synodic-0.1.1.dev6.tar.gz", hash = "sha256:16739c0021a778dc69ea5d57b264118e68ef7cc5429312a1a389bd5c1a784239"}, +] + +[[package]] +name = "synodic-utilities" +version = "0.1.1.dev8" +requires_python = ">=3.12" +summary = "Synodic python utility library" +files = [ + {file = "synodic_utilities-0.1.1.dev8-py3-none-any.whl", hash = "sha256:3034f10f780629ef5eea2078fcf82875f7aedee3b0e3fe2c04759bac4a55662a"}, + {file = "synodic_utilities-0.1.1.dev8.tar.gz", hash = "sha256:e25a9dbd0cdd77bd555705ef3d13489591d43cd8bd93ac211cf9bead4e476c68"}, +] [[package]] name = "tomlkit" -version = "0.11.8" +version = "0.12.4" requires_python = ">=3.7" summary = "Style preserving TOML library" +files = [ + {file = "tomlkit-0.12.4-py3-none-any.whl", hash = "sha256:5cd82d48a3dd89dee1f9d64420aa20ae65cfbd00668d6f094d7578a78efbb77b"}, + {file = "tomlkit-0.12.4.tar.gz", hash = "sha256:7ca1cfc12232806517a8515047ba66a19369e71edf2439d0f5824f91032b6cc3"}, +] [[package]] name = "typing-extensions" -version = "4.6.3" -requires_python = ">=3.7" -summary = "Backported and Experimental Type Hints for Python 3.7+" - -[[package]] -name = "wrapt" -version = "1.15.0" -requires_python = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" -summary = "Module for decorators, wrappers and monkey patching." - -[metadata] -lock_version = "4.2" -cross_platform = true -groups = ["default", "lint", "test"] -content_hash = "sha256:773ab8aa79c3209ee9a05956dc5808f351d35914c4c996301b024b71ce69f2a9" - -[metadata.files] -"annotated-types 0.5.0" = [ - {url = "https://files.pythonhosted.org/packages/42/97/41ccb6acac36fdd13592a686a21b311418f786f519e5794b957afbcea938/annotated_types-0.5.0.tar.gz", hash = "sha256:47cdc3490d9ac1506ce92c7aaa76c579dc3509ff11e098fc867e5130ab7be802"}, - {url = "https://files.pythonhosted.org/packages/d8/f0/a2ee543a96cc624c35a9086f39b1ed2aa403c6d355dfe47a11ee5c64a164/annotated_types-0.5.0-py3-none-any.whl", hash = "sha256:58da39888f92c276ad970249761ebea80ba544b77acddaa1a4d6cf78287d45fd"}, -] -"astroid 2.15.5" = [ - {url = "https://files.pythonhosted.org/packages/6f/51/868921f570a1ad2ddefd04594e1f95aacd6208c85f6b0ab75401acf65cfb/astroid-2.15.5-py3-none-any.whl", hash = "sha256:078e5212f9885fa85fbb0cf0101978a336190aadea6e13305409d099f71b2324"}, - {url = "https://files.pythonhosted.org/packages/e9/8d/338debdfc65383c2e1a0eaf336810ced0e8bc58a3f64d8f957cfb7b19e84/astroid-2.15.5.tar.gz", hash = "sha256:1039262575027b441137ab4a62a793a9b43defb42c32d5670f38686207cd780f"}, -] -"black 23.3.0" = [ - {url = "https://files.pythonhosted.org/packages/06/1e/273d610249f0335afb1ddb03664a03223f4826e3d1a95170a0142cb19fb4/black-23.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:6b39abdfb402002b8a7d030ccc85cf5afff64ee90fa4c5aebc531e3ad0175ddb"}, - {url = "https://files.pythonhosted.org/packages/12/4b/99c71d1cf1353edd5aff2700b8960f92e9b805c9dab72639b67dbb449d3a/black-23.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:562bd3a70495facf56814293149e51aa1be9931567474993c7942ff7d3533961"}, - {url = "https://files.pythonhosted.org/packages/13/0a/ed8b66c299e896780e4528eed4018f5b084da3b9ba4ee48328550567d866/black-23.3.0-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:064101748afa12ad2291c2b91c960be28b817c0c7eaa35bec09cc63aa56493c5"}, - {url = "https://files.pythonhosted.org/packages/13/25/cfa06788d0a936f2445af88f13604b5bcd5c9d050db618c718e6ebe66f74/black-23.3.0-cp39-cp39-macosx_10_16_arm64.whl", hash = "sha256:3238f2aacf827d18d26db07524e44741233ae09a584273aa059066d644ca7b30"}, - {url = "https://files.pythonhosted.org/packages/21/14/d5a2bec5fb15f9118baab7123d344646fac0b1c6939d51c2b05259cd2d9c/black-23.3.0-cp38-cp38-macosx_10_16_universal2.whl", hash = "sha256:714290490c18fb0126baa0fca0a54ee795f7502b44177e1ce7624ba1c00f2331"}, - {url = "https://files.pythonhosted.org/packages/24/eb/2d2d2c27cb64cfd073896f62a952a802cd83cf943a692a2f278525b57ca9/black-23.3.0-cp37-cp37m-macosx_10_16_x86_64.whl", hash = "sha256:1d06691f1eb8de91cd1b322f21e3bfc9efe0c7ca1f0e1eb1db44ea367dff656b"}, - {url = "https://files.pythonhosted.org/packages/27/70/07aab2623cfd3789786f17e051487a41d5657258c7b1ef8f780512ffea9c/black-23.3.0-cp310-cp310-macosx_10_16_universal2.whl", hash = "sha256:67de8d0c209eb5b330cce2469503de11bca4085880d62f1628bd9972cc3366b9"}, - {url = "https://files.pythonhosted.org/packages/29/b1/b584fc863c155653963039664a592b3327b002405043b7e761b9b0212337/black-23.3.0-cp310-cp310-macosx_10_16_x86_64.whl", hash = "sha256:7c3eb7cea23904399866c55826b31c1f55bbcd3890ce22ff70466b907b6775c2"}, - {url = "https://files.pythonhosted.org/packages/3c/d7/85f3d79f9e543402de2244c4d117793f262149e404ea0168841613c33e07/black-23.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3a150542a204124ed00683f0db1f5cf1c2aaaa9cc3495b7a3b5976fb136090ab"}, - {url = "https://files.pythonhosted.org/packages/3f/0d/81dd4194ce7057c199d4f28e4c2a885082d9d929e7a55c514b23784f7787/black-23.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:11c410f71b876f961d1de77b9699ad19f939094c3a677323f43d7a29855fe326"}, - {url = "https://files.pythonhosted.org/packages/49/36/15d2122f90ff1cd70f06892ebda777b650218cf84b56b5916a993dc1359a/black-23.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:50cb33cac881766a5cd9913e10ff75b1e8eb71babf4c7104f2e9c52da1fb7de2"}, - {url = "https://files.pythonhosted.org/packages/49/d7/f3b7da6c772800f5375aeb050a3dcf682f0bbeb41d313c9c2820d0156e4e/black-23.3.0-cp39-cp39-macosx_10_16_x86_64.whl", hash = "sha256:92c543f6854c28a3c7f39f4d9b7694f9a6eb9d3c5e2ece488c327b6e7ea9b266"}, - {url = "https://files.pythonhosted.org/packages/69/49/7e1f0cf585b0d607aad3f971f95982cc4208fc77f92363d632d23021ee57/black-23.3.0-cp311-cp311-macosx_10_16_x86_64.whl", hash = "sha256:a6f6886c9869d4daae2d1715ce34a19bbc4b95006d20ed785ca00fa03cba312d"}, - {url = "https://files.pythonhosted.org/packages/6d/b4/0f13ab7f5e364795ff82b76b0f9a4c9c50afda6f1e2feeb8b03fdd7ec57d/black-23.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:32daa9783106c28815d05b724238e30718f34155653d4d6e125dc7daec8e260c"}, - {url = "https://files.pythonhosted.org/packages/ad/e7/4642b7f462381799393fbad894ba4b32db00870a797f0616c197b07129a9/black-23.3.0-py3-none-any.whl", hash = "sha256:ec751418022185b0c1bb7d7736e6933d40bbb14c14a0abcf9123d1b159f98dd4"}, - {url = "https://files.pythonhosted.org/packages/c0/53/42e312c17cfda5c8fc4b6b396a508218807a3fcbb963b318e49d3ddd11d5/black-23.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6f3c333ea1dd6771b2d3777482429864f8e258899f6ff05826c3a4fcc5ce3f70"}, - {url = "https://files.pythonhosted.org/packages/ca/44/eb41edd3f558a6139f09eee052dead4a7a464e563b822ddf236f5a8ee286/black-23.3.0-cp37-cp37m-win_amd64.whl", hash = "sha256:e114420bf26b90d4b9daa597351337762b63039752bdf72bf361364c1aa05925"}, - {url = "https://files.pythonhosted.org/packages/ce/f4/2b0c6ac9e1f8584296747f66dd511898b4ebd51d6510dba118279bff53b6/black-23.3.0-cp38-cp38-macosx_10_16_arm64.whl", hash = "sha256:48f9d345675bb7fbc3dd85821b12487e1b9a75242028adad0333ce36ed2a6d27"}, - {url = "https://files.pythonhosted.org/packages/d1/6e/5810b6992ed70403124c67e8b3f62858a32b35405177553f1a78ed6b6e31/black-23.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:e198cf27888ad6f4ff331ca1c48ffc038848ea9f031a3b40ba36aced7e22f2c8"}, - {url = "https://files.pythonhosted.org/packages/d6/36/66370f5017b100225ec4950a60caeef60201a10080da57ddb24124453fba/black-23.3.0.tar.gz", hash = "sha256:1c7b8d606e728a41ea1ccbd7264677e494e87cf630e399262ced92d4a8dac940"}, - {url = "https://files.pythonhosted.org/packages/d7/6f/d3832960a3b646b333b7f0d80d336a3c123012e9d9d5dba4a622b2b6181d/black-23.3.0-cp311-cp311-macosx_10_16_arm64.whl", hash = "sha256:a8a968125d0a6a404842fa1bf0b349a568634f856aa08ffaff40ae0dfa52e7c6"}, - {url = "https://files.pythonhosted.org/packages/db/f4/7908f71cc71da08df1317a3619f002cbf91927fb5d3ffc7723905a2113f7/black-23.3.0-cp310-cp310-macosx_10_16_arm64.whl", hash = "sha256:0945e13506be58bf7db93ee5853243eb368ace1c08a24c65ce108986eac65915"}, - {url = "https://files.pythonhosted.org/packages/de/b4/76f152c5eb0be5471c22cd18380d31d188930377a1a57969073b89d6615d/black-23.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:35d1381d7a22cc5b2be2f72c7dfdae4072a3336060635718cc7e1ede24221d6c"}, - {url = "https://files.pythonhosted.org/packages/eb/a5/17b40bfd9b607b69fa726b0b3a473d14b093dcd5191ea1a1dd664eccfee3/black-23.3.0-cp311-cp311-macosx_10_16_universal2.whl", hash = "sha256:c7ab5790333c448903c4b721b59c0d80b11fe5e9803d8703e84dcb8da56fec1b"}, - {url = "https://files.pythonhosted.org/packages/fd/5b/fc2d7922c1a6bb49458d424b5be71d251f2d0dc97be9534e35d171bdc653/black-23.3.0-cp39-cp39-macosx_10_16_universal2.whl", hash = "sha256:f0bd2f4a58d6666500542b26354978218a9babcdc972722f4bf90779524515f3"}, -] -"click 8.1.3" = [ - {url = "https://files.pythonhosted.org/packages/59/87/84326af34517fca8c58418d148f2403df25303e02736832403587318e9e8/click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, - {url = "https://files.pythonhosted.org/packages/c2/f1/df59e28c642d583f7dacffb1e0965d0e00b218e0186d7858ac5233dce840/click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, -] -"colorama 0.4.6" = [ - {url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, - {url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, -] -"coverage 7.2.7" = [ - {url = "https://files.pythonhosted.org/packages/01/24/be01e62a7bce89bcffe04729c540382caa5a06bee45ae42136c93e2499f5/coverage-7.2.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d39b5b4f2a66ccae8b7263ac3c8170994b65266797fb96cbbfd3fb5b23921db8"}, - {url = "https://files.pythonhosted.org/packages/03/ec/6f30b4e0c96ce03b0e64aec46b4af2a8c49b70d1b5d0d69577add757b946/coverage-7.2.7-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:0a5f9e1dbd7fbe30196578ca36f3fba75376fb99888c395c5880b355e2875f8a"}, - {url = "https://files.pythonhosted.org/packages/04/d6/8cba3bf346e8b1a4fb3f084df7d8cea25a6b6c56aaca1f2e53829be17e9e/coverage-7.2.7-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:b46517c02ccd08092f4fa99f24c3b83d8f92f739b4657b0f146246a0ca6a831d"}, - {url = "https://files.pythonhosted.org/packages/04/fa/43b55101f75a5e9115259e8be70ff9279921cb6b17f04c34a5702ff9b1f7/coverage-7.2.7-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:48c19d2159d433ccc99e729ceae7d5293fbffa0bdb94952d3579983d1c8c9d97"}, - {url = "https://files.pythonhosted.org/packages/0d/31/340428c238eb506feb96d4fb5c9ea614db1149517f22cc7ab8c6035ef6d9/coverage-7.2.7-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:b7aa5f8a41217360e600da646004f878250a0d6738bcdc11a0a39928d7dc2050"}, - {url = "https://files.pythonhosted.org/packages/0e/bc/7e3a31534fabb043269f14fb64e2bb2733f85d4cf39e5bbc71357c57553a/coverage-7.2.7-cp37-cp37m-win_amd64.whl", hash = "sha256:b1c546aca0ca4d028901d825015dc8e4d56aac4b541877690eb76490f1dc8ed0"}, - {url = "https://files.pythonhosted.org/packages/15/81/b108a60bc758b448c151e5abceed027ed77a9523ecbc6b8a390938301841/coverage-7.2.7-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:171717c7cb6b453aebac9a2ef603699da237f341b38eebfee9be75d27dc38e01"}, - {url = "https://files.pythonhosted.org/packages/1f/e9/d6730247d8dec2a3dddc520ebe11e2e860f0f98cee3639e23de6cf920255/coverage-7.2.7-cp310-cp310-win_amd64.whl", hash = "sha256:f75f7168ab25dd93110c8a8117a22450c19976afbc44234cbf71481094c1b850"}, - {url = "https://files.pythonhosted.org/packages/22/c1/2f6c1b6f01a0996c9e067a9c780e1824351dbe17faae54388a4477e6d86f/coverage-7.2.7-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:419bfd2caae268623dd469eff96d510a920c90928b60f2073d79f8fe2bbc5959"}, - {url = "https://files.pythonhosted.org/packages/24/df/6765898d54ea20e3197a26d26bb65b084deefadd77ce7de946b9c96dfdc5/coverage-7.2.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a342242fe22407f3c17f4b499276a02b01e80f861f1682ad1d95b04018e0c0d4"}, - {url = "https://files.pythonhosted.org/packages/28/d7/9a8de57d87f4bbc6f9a6a5ded1eaac88a89bf71369bb935dac3c0cf2893e/coverage-7.2.7-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:3d376df58cc111dc8e21e3b6e24606b5bb5dee6024f46a5abca99124b2229ef5"}, - {url = "https://files.pythonhosted.org/packages/29/8f/4fad1c2ba98104425009efd7eaa19af9a7c797e92d40cd2ec026fa1f58cb/coverage-7.2.7-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d62a5c7dad11015c66fbb9d881bc4caa5b12f16292f857842d9d1871595f4495"}, - {url = "https://files.pythonhosted.org/packages/2b/86/3dbf9be43f8bf6a5ca28790a713e18902b2d884bc5fa9512823a81dff601/coverage-7.2.7-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:ebba1cd308ef115925421d3e6a586e655ca5a77b5bf41e02eb0e4562a111f2d1"}, - {url = "https://files.pythonhosted.org/packages/3d/80/7060a445e1d2c9744b683dc935248613355657809d6c6b2716cdf4ca4766/coverage-7.2.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6d040ef7c9859bb11dfeb056ff5b3872436e3b5e401817d87a31e1750b9ae2fb"}, - {url = "https://files.pythonhosted.org/packages/44/55/49f65ccdd4dfd6d5528e966b28c37caec64170c725af32ab312889d2f857/coverage-7.2.7-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d13c64ee2d33eccf7437961b6ea7ad8673e2be040b4f7fd4fd4d4d28d9ccb1e"}, - {url = "https://files.pythonhosted.org/packages/45/8b/421f30467e69ac0e414214856798d4bc32da1336df745e49e49ae5c1e2a8/coverage-7.2.7.tar.gz", hash = "sha256:924d94291ca674905fe9481f12294eb11f2d3d3fd1adb20314ba89e94f44ed59"}, - {url = "https://files.pythonhosted.org/packages/4a/fb/78986d3022e5ccf2d4370bc43a5fef8374f092b3c21d32499dee8e30b7b6/coverage-7.2.7-cp38-cp38-win32.whl", hash = "sha256:d2c2db7fd82e9b72937969bceac4d6ca89660db0a0967614ce2481e81a0b771e"}, - {url = "https://files.pythonhosted.org/packages/61/90/c76b9462f39897ebd8714faf21bc985b65c4e1ea6dff428ea9dc711ed0dd/coverage-7.2.7-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:49969a9f7ffa086d973d91cec8d2e31080436ef0fb4a359cae927e742abfaaa6"}, - {url = "https://files.pythonhosted.org/packages/61/af/5964b8d7d9a5c767785644d9a5a63cacba9a9c45cc42ba06d25895ec87be/coverage-7.2.7-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:201e7389591af40950a6480bd9edfa8ed04346ff80002cec1a66cac4549c1ad7"}, - {url = "https://files.pythonhosted.org/packages/66/2e/c99fe1f6396d93551aa352c75410686e726cd4ea104479b9af1af22367ce/coverage-7.2.7-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:81c13a1fc7468c40f13420732805a4c38a105d89848b7c10af65a90beff25250"}, - {url = "https://files.pythonhosted.org/packages/67/a2/6fa66a50e6e894286d79a3564f42bd54a9bd27049dc0a63b26d9924f0aa3/coverage-7.2.7-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a895fcc7b15c3fc72beb43cdcbdf0ddb7d2ebc959edac9cef390b0d14f39f8a9"}, - {url = "https://files.pythonhosted.org/packages/67/d7/cd8fe689b5743fffac516597a1222834c42b80686b99f5b44ef43ccc2a43/coverage-7.2.7-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5baa06420f837184130752b7c5ea0808762083bf3487b5038d68b012e5937dbe"}, - {url = "https://files.pythonhosted.org/packages/67/fb/b3b1d7887e1ea25a9608b0776e480e4bbc303ca95a31fd585555ec4fff5a/coverage-7.2.7-pp37.pp38.pp39-none-any.whl", hash = "sha256:b7b4c971f05e6ae490fef852c218b0e79d4e52f79ef0c8475566584a8fb3e01d"}, - {url = "https://files.pythonhosted.org/packages/68/5f/d2bd0f02aa3c3e0311986e625ccf97fdc511b52f4f1a063e4f37b624772f/coverage-7.2.7-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:0e1f928eaf5469c11e886fe0885ad2bf1ec606434e79842a879277895a50942a"}, - {url = "https://files.pythonhosted.org/packages/69/8c/26a95b08059db1cbb01e4b0e6d40f2e9debb628c6ca86b78f625ceaf9bab/coverage-7.2.7-cp312-cp312-win32.whl", hash = "sha256:8de8bb0e5ad103888d65abef8bca41ab93721647590a3f740100cd65c3b00511"}, - {url = "https://files.pythonhosted.org/packages/6e/ea/4a252dc77ca0605b23d477729d139915e753ee89e4c9507630e12ad64a80/coverage-7.2.7-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:a3d33a6b3eae87ceaefa91ffdc130b5e8536182cd6dfdbfc1aa56b46ff8c86de"}, - {url = "https://files.pythonhosted.org/packages/7a/05/084864fa4bbf8106f44fb72a56e67e0cd372d3bf9d893be818338c81af5d/coverage-7.2.7-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d22656368f0e6189e24722214ed8d66b8022db19d182927b9a248a2a8a2f67eb"}, - {url = "https://files.pythonhosted.org/packages/7b/e3/f552d5871943f747165b92a924055c5d6daa164ae659a13f9018e22f3990/coverage-7.2.7-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e9d683426464e4a252bf70c3498756055016f99ddaec3774bf368e76bbe02b6"}, - {url = "https://files.pythonhosted.org/packages/80/d7/67937c80b8fd4c909fdac29292bc8b35d9505312cff6bcab41c53c5b1df6/coverage-7.2.7-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:58c2ccc2f00ecb51253cbe5d8d7122a34590fac9646a960d1430d5b15321d95f"}, - {url = "https://files.pythonhosted.org/packages/88/8b/b0d9fe727acae907fa7f1c8194ccb6fe9d02e1c3e9001ecf74c741f86110/coverage-7.2.7-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b29019c76039dc3c0fd815c41392a044ce555d9bcdd38b0fb60fb4cd8e475ba9"}, - {url = "https://files.pythonhosted.org/packages/88/da/495944ebf0ad246235a6bd523810d9f81981f9b81c6059ba1f56e943abe0/coverage-7.2.7-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:537891ae8ce59ef63d0123f7ac9e2ae0fc8b72c7ccbe5296fec45fd68967b6c9"}, - {url = "https://files.pythonhosted.org/packages/8c/95/16eed713202406ca0a37f8ac259bbf144c9d24f9b8097a8e6ead61da2dbb/coverage-7.2.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fdec9e8cbf13a5bf63290fc6013d216a4c7232efb51548594ca3631a7f13c3a3"}, - {url = "https://files.pythonhosted.org/packages/8d/d6/53e999ec1bf7498ca4bc5f3b8227eb61db39068d2de5dcc359dec5601b5a/coverage-7.2.7-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:2aee274c46590717f38ae5e4650988d1af340fe06167546cc32fe2f58ed05b02"}, - {url = "https://files.pythonhosted.org/packages/8f/a8/12cc7b261f3082cc299ab61f677f7e48d93e35ca5c3c2f7241ed5525ccea/coverage-7.2.7-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:afb17f84d56068a7c29f5fa37bfd38d5aba69e3304af08ee94da8ed5b0865833"}, - {url = "https://files.pythonhosted.org/packages/91/e8/469ed808a782b9e8305a08bad8c6fa5f8e73e093bda6546c5aec68275bff/coverage-7.2.7-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:cb017fd1b2603ef59e374ba2063f593abe0fc45f2ad9abdde5b4d83bd922a353"}, - {url = "https://files.pythonhosted.org/packages/94/4e/d4e46a214ae857be3d7dc5de248ba43765f60daeb1ab077cb6c1536c7fba/coverage-7.2.7-cp310-cp310-win32.whl", hash = "sha256:ee57190f24fba796e36bb6d3aa8a8783c643d8fa9760c89f7a98ab5455fbf818"}, - {url = "https://files.pythonhosted.org/packages/9f/5c/d9760ac497c41f9c4841f5972d0edf05d50cad7814e86ee7d133ec4a0ac8/coverage-7.2.7-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:976b9c42fb2a43ebf304fa7d4a310e5f16cc99992f33eced91ef6f908bd8f33d"}, - {url = "https://files.pythonhosted.org/packages/a7/cd/3ce94ad9d407a052dc2a74fbeb1c7947f442155b28264eb467ee78dea812/coverage-7.2.7-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:63426706118b7f5cf6bb6c895dc215d8a418d5952544042c8a2d9fe87fcf09cb"}, - {url = "https://files.pythonhosted.org/packages/a9/0c/4a848ae663b47f1195abcb09a951751dd61f80b503303b9b9d768e0fd321/coverage-7.2.7-cp39-cp39-win_amd64.whl", hash = "sha256:eb393e5ebc85245347950143969b241d08b52b88a3dc39479822e073a1a8eb27"}, - {url = "https://files.pythonhosted.org/packages/b1/96/c12ed0dfd4ec587f3739f53eb677b9007853fd486ccb0e7d5512a27bab2e/coverage-7.2.7-cp311-cp311-win_amd64.whl", hash = "sha256:5b7540161790b2f28143191f5f8ec02fb132660ff175b7747b95dcb77ac26562"}, - {url = "https://files.pythonhosted.org/packages/b1/d5/a8e276bc005e42114468d4fe03e0a9555786bc51cbfe0d20827a46c1565a/coverage-7.2.7-cp39-cp39-win32.whl", hash = "sha256:7ee7d9d4822c8acc74a5e26c50604dff824710bc8de424904c0982e25c39c6cb"}, - {url = "https://files.pythonhosted.org/packages/b4/bd/1b2331e3a04f4cc9b7b332b1dd0f3a1261dfc4114f8479bebfcc2afee9e8/coverage-7.2.7-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:31563e97dae5598556600466ad9beea39fb04e0229e61c12eaa206e0aa202063"}, - {url = "https://files.pythonhosted.org/packages/b7/00/14b00a0748e9eda26e97be07a63cc911108844004687321ddcc213be956c/coverage-7.2.7-cp312-cp312-win_amd64.whl", hash = "sha256:9e31cb64d7de6b6f09702bb27c02d1904b3aebfca610c12772452c4e6c21a0d3"}, - {url = "https://files.pythonhosted.org/packages/b8/9d/926fce7e03dbfc653104c2d981c0fa71f0572a9ebd344d24c573bd6f7c4f/coverage-7.2.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ba90a9563ba44a72fda2e85302c3abc71c5589cea608ca16c22b9804262aaeb6"}, - {url = "https://files.pythonhosted.org/packages/ba/92/69c0722882643df4257ecc5437b83f4c17ba9e67f15dc6b77bad89b6982e/coverage-7.2.7-cp311-cp311-win32.whl", hash = "sha256:33d6d3ea29d5b3a1a632b3c4e4f4ecae24ef170b0b9ee493883f2df10039959a"}, - {url = "https://files.pythonhosted.org/packages/bb/e9/88747b40c8fb4a783b40222510ce6d66170217eb05d7f46462c36b4fa8cc/coverage-7.2.7-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:975d70ab7e3c80a3fe86001d8751f6778905ec723f5b110aed1e450da9d4b7f2"}, - {url = "https://files.pythonhosted.org/packages/c1/49/4d487e2ad5d54ed82ac1101e467e8994c09d6123c91b2a962145f3d262c2/coverage-7.2.7-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:52edc1a60c0d34afa421c9c37078817b2e67a392cab17d97283b64c5833f427f"}, - {url = "https://files.pythonhosted.org/packages/c3/1c/6b3c9c363fb1433c79128e0d692863deb761b1b78162494abb9e5c328bc0/coverage-7.2.7-cp38-cp38-win_amd64.whl", hash = "sha256:2e07b54284e381531c87f785f613b833569c14ecacdcb85d56b25c4622c16c3c"}, - {url = "https://files.pythonhosted.org/packages/c6/fa/529f55c9a1029c840bcc9109d5a15ff00478b7ff550a1ae361f8745f8ad5/coverage-7.2.7-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:06a9a2be0b5b576c3f18f1a241f0473575c4a26021b52b2a85263a00f034d51f"}, - {url = "https://files.pythonhosted.org/packages/c6/fc/be19131010930a6cf271da48202c8cc1d3f971f68c02fb2d3a78247f43dc/coverage-7.2.7-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:54b896376ab563bd38453cecb813c295cf347cf5906e8b41d340b0321a5433e5"}, - {url = "https://files.pythonhosted.org/packages/c8/e4/e6182e4697665fb594a7f4e4f27cb3a4dd00c2e3d35c5c706765de8c7866/coverage-7.2.7-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5e330fc79bd7207e46c7d7fd2bb4af2963f5f635703925543a70b99574b0fea9"}, - {url = "https://files.pythonhosted.org/packages/ca/0c/3dfeeb1006c44b911ee0ed915350db30325d01808525ae7cc8d57643a2ce/coverage-7.2.7-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:06fb182e69f33f6cd1d39a6c597294cff3143554b64b9825d1dc69d18cc2fff2"}, - {url = "https://files.pythonhosted.org/packages/d1/3a/67f5d18f911abf96857f6f7e4df37ca840e38179e2cc9ab6c0b9c3380f19/coverage-7.2.7-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e7d9405291c6928619403db1d10bd07888888ec1abcbd9748fdaa971d7d661b2"}, - {url = "https://files.pythonhosted.org/packages/d9/1d/cd467fceb62c371f9adb1d739c92a05d4e550246daa90412e711226bd320/coverage-7.2.7-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f6951407391b639504e3b3be51b7ba5f3528adbf1a8ac3302b687ecababf929e"}, - {url = "https://files.pythonhosted.org/packages/dd/ce/97c1dd6592c908425622fe7f31c017d11cf0421729b09101d4de75bcadc8/coverage-7.2.7-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:8fa03bce9bfbeeef9f3b160a8bed39a221d82308b4152b27d82d8daa7041fee5"}, - {url = "https://files.pythonhosted.org/packages/de/a3/5a98dc9e239d0dc5f243ef5053d5b1bdcaa1dee27a691dfc12befeccf878/coverage-7.2.7-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:245167dd26180ab4c91d5e1496a30be4cd721a5cf2abf52974f965f10f11419f"}, - {url = "https://files.pythonhosted.org/packages/e2/c0/73f139794c742840b9ab88e2e17fe14a3d4668a166ff95d812ac66c0829d/coverage-7.2.7-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e84606b74eb7de6ff581a7915e2dab7a28a0517fbe1c9239eb227e1354064dcd"}, - {url = "https://files.pythonhosted.org/packages/e9/40/383305500d24122dbed73e505a4d6828f8f3356d1f68ab6d32c781754b81/coverage-7.2.7-cp37-cp37m-win32.whl", hash = "sha256:61b9a528fb348373c433e8966535074b802c7a5d7f23c4f421e6c6e2f1697a6f"}, - {url = "https://files.pythonhosted.org/packages/fe/57/e4f8ad64d84ca9e759d783a052795f62a9f9111585e46068845b1cb52c2b/coverage-7.2.7-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6f48351d66575f535669306aa7d6d6f71bc43372473b54a832222803eb956fd1"}, - {url = "https://files.pythonhosted.org/packages/ff/d5/52fa1891d1802ab2e1b346d37d349cb41cdd4fd03f724ebbf94e80577687/coverage-7.2.7-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f2f67fe12b22cd130d34d0ef79206061bfb5eda52feb6ce0dba0644e20a03cf4"}, -] -"cppython-core 0.7.0" = [ - {url = "https://files.pythonhosted.org/packages/59/9d/cc4dfc428a02f0c1e4de24e97dcb234e371a8c4769b78ffd42ba5a4cdb3f/cppython-core-0.7.0.tar.gz", hash = "sha256:e7c6194a1c4c7cfad0ee201d0130e6567e2014c518e5c96a2bfbf9a8fd6d304a"}, - {url = "https://files.pythonhosted.org/packages/9b/b2/dae29c30ceab55386f88b96ae08824b7f9871dcc54dd89fa6c898579987c/cppython_core-0.7.0-py3-none-any.whl", hash = "sha256:f95965d33373f4dbcd59764c46704cfa6cf0373384d15b9a80c5925a27155633"}, -] -"dill 0.3.6" = [ - {url = "https://files.pythonhosted.org/packages/7c/e7/364a09134e1062d4d5ff69b853a56cf61c223e0afcc6906b6832bcd51ea8/dill-0.3.6.tar.gz", hash = "sha256:e5db55f3687856d8fbdab002ed78544e1c4559a130302693d839dfe8f93f2373"}, - {url = "https://files.pythonhosted.org/packages/be/e3/a84bf2e561beed15813080d693b4b27573262433fced9c1d1fea59e60553/dill-0.3.6-py3-none-any.whl", hash = "sha256:a07ffd2351b8c678dfc4a856a3005f8067aea51d6ba6c700796a4d9e280f39f0"}, -] -"iniconfig 2.0.0" = [ - {url = "https://files.pythonhosted.org/packages/d7/4b/cbd8e699e64a6f16ca3a8220661b5f83792b3017d0f79807cb8708d33913/iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, - {url = "https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, -] -"isort 5.12.0" = [ - {url = "https://files.pythonhosted.org/packages/0a/63/4036ae70eea279c63e2304b91ee0ac182f467f24f86394ecfe726092340b/isort-5.12.0-py3-none-any.whl", hash = "sha256:f84c2818376e66cf843d497486ea8fed8700b340f308f076c6fb1229dff318b6"}, - {url = "https://files.pythonhosted.org/packages/a9/c4/dc00e42c158fc4dda2afebe57d2e948805c06d5169007f1724f0683010a9/isort-5.12.0.tar.gz", hash = "sha256:8bef7dde241278824a6d83f44a544709b065191b95b6e50894bdc722fcba0504"}, -] -"lazy-object-proxy 1.9.0" = [ - {url = "https://files.pythonhosted.org/packages/00/74/46a68f51457639c0cd79e385e2f49c0fa7324470997ac096108669c1e182/lazy_object_proxy-1.9.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:946d27deaff6cf8452ed0dba83ba38839a87f4f7a9732e8f9fd4107b21e6ff07"}, - {url = "https://files.pythonhosted.org/packages/11/04/fa820296cb937b378d801cdc81c19de06624cfed481c1b8a6b439255a188/lazy_object_proxy-1.9.0-cp37-cp37m-win32.whl", hash = "sha256:f12ad7126ae0c98d601a7ee504c1122bcef553d1d5e0c3bfa77b16b3968d2734"}, - {url = "https://files.pythonhosted.org/packages/11/fe/be1eb76d83f1b5242c492b410ce86c59db629c0b0f0f8e75018dfd955c30/lazy_object_proxy-1.9.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9f5fa4a61ce2438267163891961cfd5e32ec97a2c444e5b842d574251ade27d2"}, - {url = "https://files.pythonhosted.org/packages/16/f2/e74981dedeb1a858cd5db9bcec81c4107da374249bc6894613472e01996f/lazy_object_proxy-1.9.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:f0117049dd1d5635bbff65444496c90e0baa48ea405125c088e93d9cf4525b11"}, - {url = "https://files.pythonhosted.org/packages/18/1b/04ac4490a62ae1916f88e629e74192ada97d74afc927453d005f003e5a8f/lazy_object_proxy-1.9.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f83ac4d83ef0ab017683d715ed356e30dd48a93746309c8f3517e1287523ef4"}, - {url = "https://files.pythonhosted.org/packages/1d/5d/25b9007c65f45805e711b56beac50ba395214e9e556cc8ee57f0882f88a9/lazy_object_proxy-1.9.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e8c6cfb338b133fbdbc5cfaa10fe3c6aeea827db80c978dbd13bc9dd8526b7d4"}, - {url = "https://files.pythonhosted.org/packages/20/c0/8bab72a73607d186edad50d0168ca85bd2743cfc55560c9d721a94654b20/lazy-object-proxy-1.9.0.tar.gz", hash = "sha256:659fb5809fa4629b8a1ac5106f669cfc7bef26fbb389dda53b3e010d1ac4ebae"}, - {url = "https://files.pythonhosted.org/packages/27/a1/7cc10ca831679c5875c18ae6e0a468f7787ecd31fdd53598f91ea50df58d/lazy_object_proxy-1.9.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:721532711daa7db0d8b779b0bb0318fa87af1c10d7fe5e52ef30f8eff254d0cd"}, - {url = "https://files.pythonhosted.org/packages/31/ad/e8605300f51061284cc57ca0f4ef582047c7f309bda1bb1c3c19b64af5c9/lazy_object_proxy-1.9.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:66a3de4a3ec06cd8af3f61b8e1ec67614fbb7c995d02fa224813cb7afefee701"}, - {url = "https://files.pythonhosted.org/packages/4c/a4/cdd6f41a675a89ab584c78019a24adc533829764bcc85b0e24ed2678020c/lazy_object_proxy-1.9.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7322c3d6f1766d4ef1e51a465f47955f1e8123caee67dd641e67d539a534d006"}, - {url = "https://files.pythonhosted.org/packages/4d/7b/a959ff734bd3d8df7b761bfeaec6428549b77267072676a337b774f3b3ef/lazy_object_proxy-1.9.0-cp310-cp310-win32.whl", hash = "sha256:f0705c376533ed2a9e5e97aacdbfe04cecd71e0aa84c7c0595d02ef93b6e4455"}, - {url = "https://files.pythonhosted.org/packages/4e/cb/aca3f4d89d3efbed724fd9504a96dafbe2d903ea908355a335acb110a5cd/lazy_object_proxy-1.9.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:660c94ea760b3ce47d1855a30984c78327500493d396eac4dfd8bd82041b22be"}, - {url = "https://files.pythonhosted.org/packages/51/28/5c6dfb51df2cbb6d771a3b0d009f1edeab01f5cb16303ce32764b01636c0/lazy_object_proxy-1.9.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:bfb38f9ffb53b942f2b5954e0f610f1e721ccebe9cce9025a38c8ccf4a5183a4"}, - {url = "https://files.pythonhosted.org/packages/5b/a6/3c0a8b2ad6ce7af133ed54321b0ead5509303be3a80f98506af198e50cb7/lazy_object_proxy-1.9.0-cp38-cp38-win32.whl", hash = "sha256:0a891e4e41b54fd5b8313b96399f8b0e173bbbfc03c7631f01efbe29bb0bcf82"}, - {url = "https://files.pythonhosted.org/packages/5c/76/0b16dc53e9ee5b24c621d808f46cca11e5e86c602b6bcd6dc27f9504af5b/lazy_object_proxy-1.9.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:09763491ce220c0299688940f8dc2c5d05fd1f45af1e42e636b2e8b2303e4382"}, - {url = "https://files.pythonhosted.org/packages/69/1f/51657d681711476287c9ff643428be0f9663addc1d341d4be1bad89290bd/lazy_object_proxy-1.9.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e7c21c95cae3c05c14aafffe2865bbd5e377cfc1348c4f7751d9dc9a48ca4bda"}, - {url = "https://files.pythonhosted.org/packages/69/da/58391196d8a41fa8fa69b47e8a7893f279d369939e4994b3bc8648ff0433/lazy_object_proxy-1.9.0-cp39-cp39-win32.whl", hash = "sha256:9090d8e53235aa280fc9239a86ae3ea8ac58eff66a705fa6aa2ec4968b95c821"}, - {url = "https://files.pythonhosted.org/packages/70/e7/f3735f8e47cb29a207568c5b8d28d9f5673228789b66cb0c48d488a37f94/lazy_object_proxy-1.9.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:212774e4dfa851e74d393a2370871e174d7ff0ebc980907723bb67d25c8a7c30"}, - {url = "https://files.pythonhosted.org/packages/82/ac/d079d3ad377ba72e29d16ac077f8626ad4d3f55369c93168d0b81153d9a2/lazy_object_proxy-1.9.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:18b78ec83edbbeb69efdc0e9c1cb41a3b1b1ed11ddd8ded602464c3fc6020494"}, - {url = "https://files.pythonhosted.org/packages/86/93/e921f7a795e252df7248e0d220dc69a9443ad507fe258dea51a32e5435ca/lazy_object_proxy-1.9.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b40387277b0ed2d0602b8293b94d7257e17d1479e257b4de114ea11a8cb7f2d7"}, - {url = "https://files.pythonhosted.org/packages/8d/6d/10420823a979366bf43ca5e69433c0c588865883566b96b6e3ed5b51c1f8/lazy_object_proxy-1.9.0-cp311-cp311-win_amd64.whl", hash = "sha256:f2457189d8257dd41ae9b434ba33298aec198e30adf2dcdaaa3a28b9994f6adb"}, - {url = "https://files.pythonhosted.org/packages/9d/d7/81d466f2e69784bd416797824a2b8794aaf0b864a2390062ea197f06f0fc/lazy_object_proxy-1.9.0-cp311-cp311-win32.whl", hash = "sha256:81fc4d08b062b535d95c9ea70dbe8a335c45c04029878e62d744bdced5141586"}, - {url = "https://files.pythonhosted.org/packages/a7/51/6626c133e966698d53d65bcd90e34ad4986c5f0968c2328b3e9de51dbcf1/lazy_object_proxy-1.9.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:d9e25ef10a39e8afe59a5c348a4dbf29b4868ab76269f81ce1674494e2565a6e"}, - {url = "https://files.pythonhosted.org/packages/a8/32/c1a67f76ec6923a8a8b1bc006b7cb3d195e386e03fe56e20fe38fce0321e/lazy_object_proxy-1.9.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9e7551208b2aded9c1447453ee366f1c4070602b3d932ace044715d89666899b"}, - {url = "https://files.pythonhosted.org/packages/b0/78/78962cb6f6d31a952acbc54e7838a5a85d952144973bd6e7ad24323dd466/lazy_object_proxy-1.9.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:189bbd5d41ae7a498397287c408617fe5c48633e7755287b21d741f7db2706a9"}, - {url = "https://files.pythonhosted.org/packages/b1/80/2d9583fa8e5ac47ef183d811d26d833477b7ed02b64c17dd2ede68a3f9cf/lazy_object_proxy-1.9.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cbf9b082426036e19c6924a9ce90c740a9861e2bdc27a4834fd0a910742ac1e8"}, - {url = "https://files.pythonhosted.org/packages/c9/8f/c8aab72c72634de0c726a98a1e4c84a93ef20049ee0427c871214f6a58d5/lazy_object_proxy-1.9.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f699ac1c768270c9e384e4cbd268d6e67aebcfae6cd623b4d7c3bfde5a35db59"}, - {url = "https://files.pythonhosted.org/packages/cd/b6/84efe6e878e94f20cf9564ac3ede5e98d37c692b07080aef50cc4341052e/lazy_object_proxy-1.9.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2d0daa332786cf3bb49e10dc6a17a52f6a8f9601b4cf5c295a4f85854d61de63"}, - {url = "https://files.pythonhosted.org/packages/d0/f4/95999792ce5f9223bac10cb31b1724723ecd0ba13e081c5fb806d7f5b9c4/lazy_object_proxy-1.9.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:1aa3de4088c89a1b69f8ec0dcc169aa725b0ff017899ac568fe44ddc1396df46"}, - {url = "https://files.pythonhosted.org/packages/db/92/284ab10a6d0f82da36a20d9c1464c30bb318d1a6dd0ae476de9f890e7abd/lazy_object_proxy-1.9.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:8fa02eaab317b1e9e03f69aab1f91e120e7899b392c4fc19807a8278a07a97e8"}, - {url = "https://files.pythonhosted.org/packages/e7/86/ec93d495197f1006d7c9535e168fe763b3cc21928fb35c8f9ce08944b614/lazy_object_proxy-1.9.0-cp310-cp310-win_amd64.whl", hash = "sha256:ea806fd4c37bf7e7ad82537b0757999264d5f70c45468447bb2b91afdbe73a6e"}, - {url = "https://files.pythonhosted.org/packages/ed/9b/44c370c8bbba32fd0217b4f15ca99f750d669d653c7f1eefa051627710e8/lazy_object_proxy-1.9.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9cd077f3d04a58e83d04b20e334f678c2b0ff9879b9375ed107d5d07ff160171"}, - {url = "https://files.pythonhosted.org/packages/f5/4f/9ad496dc26a10ed9ab8f088732f08dc1f88488897d6c9ac5e3432a254c30/lazy_object_proxy-1.9.0-cp37-cp37m-win_amd64.whl", hash = "sha256:edd20c5a55acb67c7ed471fa2b5fb66cb17f61430b7a6b9c3b4a1e40293b1671"}, - {url = "https://files.pythonhosted.org/packages/fb/f4/c5d6d771e70ec7a9483a98054e8a5f386eda5b18b6c96544d251558c6c92/lazy_object_proxy-1.9.0-cp38-cp38-win_amd64.whl", hash = "sha256:9990d8e71b9f6488e91ad25f322898c136b008d87bf852ff65391b004da5e17b"}, - {url = "https://files.pythonhosted.org/packages/fc/8d/8e0fbfeec6e51184326e0886443e44142ce22d89fa9e9c3152900e654fa0/lazy_object_proxy-1.9.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:79a31b086e7e68b24b99b23d57723ef7e2c6d81ed21007b6281ebcd1688acb0a"}, - {url = "https://files.pythonhosted.org/packages/fe/bb/0fcc8585ffb7285df94382e20b54d54ca62a1bcf594f6f18d8feb3fc3b98/lazy_object_proxy-1.9.0-cp39-cp39-win_amd64.whl", hash = "sha256:db1c1722726f47e10e0b5fdbf15ac3b8adb58c091d12b3ab713965795036985f"}, -] -"mccabe 0.7.0" = [ - {url = "https://files.pythonhosted.org/packages/27/1a/1f68f9ba0c207934b35b86a8ca3aad8395a3d6dd7921c0686e23853ff5a9/mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, - {url = "https://files.pythonhosted.org/packages/e7/ff/0ffefdcac38932a54d2b5eed4e0ba8a408f215002cd178ad1df0f2806ff8/mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, -] -"mypy 1.3.0" = [ - {url = "https://files.pythonhosted.org/packages/09/7b/8eb0d648352c61b08cb364d278b5c12c3f1c5841724fdd2929d7172b7eaf/mypy-1.3.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f9dca1e257d4cc129517779226753dbefb4f2266c4eaad610fc15c6a7e14283e"}, - {url = "https://files.pythonhosted.org/packages/11/41/d24f93eefc89c650782bf1f9acfdb02a32f327b841058a5b0ce5857b60af/mypy-1.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4c99c3ecf223cf2952638da9cd82793d8f3c0c5fa8b6ae2b2d9ed1e1ff51ba85"}, - {url = "https://files.pythonhosted.org/packages/25/c7/4735f81858a727e170279144600881fe3299aa7589ed585af6b788ea4556/mypy-1.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6e33bb8b2613614a33dff70565f4c803f889ebd2f859466e42b46e1df76018dd"}, - {url = "https://files.pythonhosted.org/packages/2b/27/4a26f91301804969194ee0dc9393843f10566d7fdf192ce11fc0218a989d/mypy-1.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c1eb485cea53f4f5284e5baf92902cd0088b24984f4209e25981cc359d64448d"}, - {url = "https://files.pythonhosted.org/packages/3c/5d/b87339c1fdfec7d13899cd7ad2ee992801695114c1cf9e1645da264cd437/mypy-1.3.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:74bc9b6e0e79808bf8678d7678b2ae3736ea72d56eede3820bd3849823e7f305"}, - {url = "https://files.pythonhosted.org/packages/47/f6/25c154bb1c479f2047093f0580c2c35ffc1ff007d52b7e50020cca60c010/mypy-1.3.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:76ec771e2342f1b558c36d49900dfe81d140361dd0d2df6cd71b3db1be155409"}, - {url = "https://files.pythonhosted.org/packages/4c/10/530d2df4d57f46f77b8211cf9bbe090baacff02e7076f21f1bf08148d541/mypy-1.3.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ddae0f39ca146972ff6bb4399f3b2943884a774b8771ea0a8f50e971f5ea5ba8"}, - {url = "https://files.pythonhosted.org/packages/55/e1/90487a3ea5a88b8f5c9d7fbf6f5fa7fcc8633d0132ce8364810a1da901c9/mypy-1.3.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:cbc07246253b9e3d7d74c9ff948cd0fd7a71afcc2b77c7f0a59c26e9395cb152"}, - {url = "https://files.pythonhosted.org/packages/5b/fb/0b1c90c635319b98dd65c6d6d6347413e42397e94057993011eeedeffbd9/mypy-1.3.0-cp37-cp37m-win_amd64.whl", hash = "sha256:8c5979d0deb27e0f4479bee18ea0f83732a893e81b78e62e2dda3e7e518c92ee"}, - {url = "https://files.pythonhosted.org/packages/6a/d0/4681d84878cecfd911752016ab30566366f6de7296fdc977b746eb68bf45/mypy-1.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7d23370d2a6b7a71dc65d1266f9a34e4cde9e8e21511322415db4b26f46f6b8c"}, - {url = "https://files.pythonhosted.org/packages/6a/d9/48de5203f4b6287a98fadcc47072b1bc69e3faaa39cba59a3a600b05a42c/mypy-1.3.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:6e42d29e324cdda61daaec2336c42512e59c7c375340bd202efa1fe0f7b8f8ca"}, - {url = "https://files.pythonhosted.org/packages/7e/75/021af7f0683ea19b9ad6a436e1b5c7cb39899c0f7b31040fa69b2395421e/mypy-1.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:a22435632710a4fcf8acf86cbd0d69f68ac389a3892cb23fbad176d1cddaf228"}, - {url = "https://files.pythonhosted.org/packages/86/56/08c5ff6b2139f301d9aa56cb8e7b2a24d4faa6fc3e94234dfe7eeecc9c44/mypy-1.3.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:faff86aa10c1aa4a10e1a301de160f3d8fc8703b88c7e98de46b531ff1276a9a"}, - {url = "https://files.pythonhosted.org/packages/88/0e/646696eb8fe7658b752009a495054a0214ae8e659e9cbcde8181f16ae999/mypy-1.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:658fe7b674769a0770d4b26cb4d6f005e88a442fe82446f020be8e5f5efb2fae"}, - {url = "https://files.pythonhosted.org/packages/8d/c8/681f4a19c62aa71bdc9ad3a4bc9a0fb8846bd0b5a8bc1b29d261c8025f80/mypy-1.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:550a8b3a19bb6589679a7c3c31f64312e7ff482a816c96e0cecec9ad3a7564dd"}, - {url = "https://files.pythonhosted.org/packages/90/b6/a2d2ba604982af6034e3fcad17a464a66127be47f07b4587beec76e8f80b/mypy-1.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:44797d031a41516fcf5cbfa652265bb994e53e51994c1bd649ffcd0c3a7eccbf"}, - {url = "https://files.pythonhosted.org/packages/b1/ce/8d87f684bb7e2a520cfa9cd17b8dc686a83143bb12a3e1ac4ad6d8d4825c/mypy-1.3.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:c5d2cc54175bab47011b09688b418db71403aefad07cbcd62d44010543fc143f"}, - {url = "https://files.pythonhosted.org/packages/b1/e1/399e3dfeb2842e4a2634866e4ef8b69151d465b7a5ceb648d7f1296f17d0/mypy-1.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:95d8d31a7713510685b05fbb18d6ac287a56c8f6554d88c19e73f724a445448a"}, - {url = "https://files.pythonhosted.org/packages/b8/36/6628916f94bb0816e1719117e1962750413ab408f83673ce7d571caf3960/mypy-1.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1c4c42c60a8103ead4c1c060ac3cdd3ff01e18fddce6f1016e08939647a0e703"}, - {url = "https://files.pythonhosted.org/packages/ba/ac/1c280246fc0c5239409f31e1a321f178ba11a9c6e5eaaf6d56f9ff627cdf/mypy-1.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e86c2c6852f62f8f2b24cb7a613ebe8e0c7dc1402c61d36a609174f63e0ff017"}, - {url = "https://files.pythonhosted.org/packages/c9/c5/f3e4ed59e08e3a728a15da198317edfcd13b7dc2215d52b5d85fce716285/mypy-1.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:87df44954c31d86df96c8bd6e80dfcd773473e877ac6176a8e29898bfb3501cb"}, - {url = "https://files.pythonhosted.org/packages/cd/b9/6abe1cd8ac8e70f12f43eebe6427814f9d36142d331eae5cc5bba77585a2/mypy-1.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:d0b6c62206e04061e27009481cb0ec966f7d6172b5b936f3ead3d74f29fe3dcf"}, - {url = "https://files.pythonhosted.org/packages/d8/c6/de2e214a42b63d7ea0abef9f02a6da69cad6d532165bb7a8cc8291099a0c/mypy-1.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:473117e310febe632ddf10e745a355714e771ffe534f06db40702775056614c4"}, - {url = "https://files.pythonhosted.org/packages/d9/79/82d452b409d7610944ba3a1a6079987d3ed6062cb8fe5c8850f26dafb6e0/mypy-1.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ebc95f8386314272bbc817026f8ce8f4f0d2ef7ae44f947c4664efac9adec929"}, - {url = "https://files.pythonhosted.org/packages/e3/f7/1fed3b24abb75f244fa6bc60ea03cd9d3d8ad225a4cfda7533042fe6d831/mypy-1.3.0-py3-none-any.whl", hash = "sha256:a8763e72d5d9574d45ce5881962bc8e9046bf7b375b0abf031f3e6811732a897"}, - {url = "https://files.pythonhosted.org/packages/f9/88/3bfe07521fb9e74b449cbc4367434067ec70bfd8a24c652fa3e0f9597389/mypy-1.3.0.tar.gz", hash = "sha256:e1f4d16e296f5135624b34e8fb741eb0eadedca90862405b1f1fde2040b9bd11"}, -] -"mypy-extensions 1.0.0" = [ - {url = "https://files.pythonhosted.org/packages/2a/e2/5d3f6ada4297caebe1a2add3b126fe800c96f56dbe5d1988a2cbe0b267aa/mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, - {url = "https://files.pythonhosted.org/packages/98/a4/1ab47638b92648243faf97a5aeb6ea83059cc3624972ab6b8d2316078d3f/mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, -] -"packaging 23.1" = [ - {url = "https://files.pythonhosted.org/packages/ab/c3/57f0601a2d4fe15de7a553c00adbc901425661bf048f2a22dfc500caf121/packaging-23.1-py3-none-any.whl", hash = "sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61"}, - {url = "https://files.pythonhosted.org/packages/b9/6c/7c6658d258d7971c5eb0d9b69fa9265879ec9a9158031206d47800ae2213/packaging-23.1.tar.gz", hash = "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f"}, -] -"pathspec 0.11.1" = [ - {url = "https://files.pythonhosted.org/packages/95/60/d93628975242cc515ab2b8f5b2fc831d8be2eff32f5a1be4776d49305d13/pathspec-0.11.1.tar.gz", hash = "sha256:2798de800fa92780e33acca925945e9a19a133b715067cf165b8866c15a31687"}, - {url = "https://files.pythonhosted.org/packages/be/c8/551a803a6ebb174ec1c124e68b449b98a0961f0b737def601e3c1fbb4cfd/pathspec-0.11.1-py3-none-any.whl", hash = "sha256:d8af70af76652554bd134c22b3e8a1cc46ed7d91edcdd721ef1a0c51a84a5293"}, -] -"platformdirs 3.6.0" = [ - {url = "https://files.pythonhosted.org/packages/05/31/793923615e85deef0c25abf5d044b3f99f1348b620122ab184b7d3f70f21/platformdirs-3.6.0.tar.gz", hash = "sha256:57e28820ca8094678b807ff529196506d7a21e17156cb1cddb3e74cebce54640"}, - {url = "https://files.pythonhosted.org/packages/a7/4d/00f9fe4bbb3459da0d6c790b1526e5edebaeff2a80166eabb0a42f9e0a05/platformdirs-3.6.0-py3-none-any.whl", hash = "sha256:ffa199e3fbab8365778c4a10e1fbf1b9cd50707de826eb304b50e57ec0cc8d38"}, -] -"pluggy 1.0.0" = [ - {url = "https://files.pythonhosted.org/packages/9e/01/f38e2ff29715251cf25532b9082a1589ab7e4f571ced434f98d0139336dc/pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, - {url = "https://files.pythonhosted.org/packages/a1/16/db2d7de3474b6e37cbb9c008965ee63835bba517e22cdb8c35b5116b5ce1/pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, -] -"pydantic 2.0b3" = [ - {url = "https://files.pythonhosted.org/packages/85/13/e96e6dda5cf3fb8f8df959d1bfaa819869328ffb0d8ed7d27eb36659093e/pydantic-2.0b3.tar.gz", hash = "sha256:057fb3050b8d3952153a0df45188882096ac53fe087b196fd0d877442b0c029b"}, - {url = "https://files.pythonhosted.org/packages/af/ce/dabc6cd90abaf903d84a329f29a5ce34643fd66ac2a78f3eb1c668bd4fb3/pydantic-2.0b3-py3-none-any.whl", hash = "sha256:dd6a8f835aceef1a399329478c355c91985f582afda7027055834d6822aa0ce2"}, -] -"pydantic-core 0.39.0" = [ - {url = "https://files.pythonhosted.org/packages/02/28/05cf18d0f511ba56e7257027ae24f524d6845ec47c70ad893a165f475b27/pydantic_core-0.39.0-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:99de1fe8dcb3dc6e853ff6b96da4faa54384bbc4e73dbeb7dc8473f7e9d84243"}, - {url = "https://files.pythonhosted.org/packages/02/e6/fdf028114408f727b7767106509664a4d560198c40abe5eb4a7e7d6650ba/pydantic_core-0.39.0-cp37-cp37m-macosx_11_0_arm64.whl", hash = "sha256:bd5f3e98d112c6eab8c41cf2baf3dab8006c3223d5f2c9695b1cba7ab87bbfb5"}, - {url = "https://files.pythonhosted.org/packages/03/34/5bdb0bc053b1c848bbe696cb75007a9b5b1351136de4e7a79d6aea1ae7c6/pydantic_core-0.39.0-pp39-pypy39_pp73-macosx_10_7_x86_64.whl", hash = "sha256:96100fb53a7384a99c6121ea90f01aa1cb6100af8dd25f227a5132f38b9199df"}, - {url = "https://files.pythonhosted.org/packages/03/5f/e72f736d303d695be4d45b00cd9a26063575058d57b49c2962cfae75a43c/pydantic_core-0.39.0-cp37-none-win32.whl", hash = "sha256:2bfe35d886d93c7911b4d56ab3a6725a7866b35f09aceaf3d0d64babed701b73"}, - {url = "https://files.pythonhosted.org/packages/06/59/4117e5ac138bca096879d07f446fd24a9b198755d344e0f640fb1f2b23bf/pydantic_core-0.39.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:351a34da43f44a52bbd52380322bfb364f2efe423275c4917c8c26100c1b8ced"}, - {url = "https://files.pythonhosted.org/packages/07/b4/9c10f031fa975fde14f97d4be8c58c3be669b0cd2ff20242b405312c86a8/pydantic_core-0.39.0-cp38-cp38-manylinux_2_24_armv7l.whl", hash = "sha256:b749a22e311e235974516a4bca00afdf4f2e67dd7773d3850c1b17f1da1131b1"}, - {url = "https://files.pythonhosted.org/packages/0a/5e/5c089f8b5633c304b82cfbde3fee9c4e6d0897fa9ab0c5a09e01469d24dc/pydantic_core-0.39.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f8178dc88a246c60fb8264a8422587abc209cac1d9160329af8a6f5f89797cb3"}, - {url = "https://files.pythonhosted.org/packages/10/13/f6b741c1118001be9fbfd469eeee2b415d004fa6ddafbfd355e4ff9db634/pydantic_core-0.39.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c9c16fc80e2612b0121eb425890e2e29f03e3038bbd53e5b637cd72aad2c5339"}, - {url = "https://files.pythonhosted.org/packages/10/15/82a7866bd5660dd4251c87ca23b01b8ba495ea0b7013bb8ee884dfce0311/pydantic_core-0.39.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f9e18e91b5f4172ea5ebc8fe0461acf6f2de73d4b85b47aee26924dcd304141a"}, - {url = "https://files.pythonhosted.org/packages/10/5b/3ae9f4f1e5299c9c2ba7a578b852f0a40c54f9c1a83f3de5d08b90826281/pydantic_core-0.39.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:9602b61c85d9c12b0e66792eebc85152b565c24431a69c47f3cba811b1507389"}, - {url = "https://files.pythonhosted.org/packages/18/a0/0b22604892e136e7429c17b6bf0d05ef788759b8633c4d94f638740ad779/pydantic_core-0.39.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9d32b45650e5bb8670b73d0f9acdae184197308f5a5ecf8e714849c76fd0a6ed"}, - {url = "https://files.pythonhosted.org/packages/1b/7b/b9ccbcd5392b02270ee14e1121672bc102b903bb3eb2d528347c08ee6fa8/pydantic_core-0.39.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:1f89064cf78b57bf2930a14b41aa4b4240bd2993a57efb56b5ad8be02f4048b3"}, - {url = "https://files.pythonhosted.org/packages/1b/fb/760b5481281b9615e55f4c7a3363feaef05f8441cbc93925a4621148f70a/pydantic_core-0.39.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bf55dc04bb037c06d256e22254401b10fbc3a478835837987435e3c77ec929f9"}, - {url = "https://files.pythonhosted.org/packages/1e/82/3b5a71e50b570b041e402469ae21b8242081504e4c50ba6bc40a51440308/pydantic_core-0.39.0-cp38-cp38-manylinux_2_24_s390x.whl", hash = "sha256:e77a053384a29c4ffdad2a717809e347b864c582c407ab88eb9ff3fa3bce22a7"}, - {url = "https://files.pythonhosted.org/packages/21/15/7cc4530aaa6800fa91ed70464a79593865159f629ce22675d1f7e5a90e7b/pydantic_core-0.39.0-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:9aba06c25f356c0fb11f1dd2d0317a5599f223a3b283ebbc1aa3a1100a6920f7"}, - {url = "https://files.pythonhosted.org/packages/28/ac/cda6b041201ccb695f2eded45bf0b834eaa60beebe616973f1f3f1e782c2/pydantic_core-0.39.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2c7b5e09e5e6c7cf2ed0ccb5a1ddf1f6d12131315ff70d100fc197711df4a37e"}, - {url = "https://files.pythonhosted.org/packages/2e/39/87420354aaedf26df93f26a6c6a36fb6e77a32d97a608fa2ee3bb086bf45/pydantic_core-0.39.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:30ad66243a64818e8afb584596cc9f7f8738406ffe1b4ab0be00e23375753b7c"}, - {url = "https://files.pythonhosted.org/packages/2e/4a/71cd253c40cd57fafe76d3701c4deab358799e6f72a63bac4356d8cba806/pydantic_core-0.39.0-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:361135e456636aecad3c15ceabc206fe93b4f86778ca24eefd707952954b7e70"}, - {url = "https://files.pythonhosted.org/packages/30/ad/86af97225b000bdaae55672d1bae9cc2c8dc9149c57cd37e2116ed8699a5/pydantic_core-0.39.0-cp38-none-win32.whl", hash = "sha256:3a5795a0521ce88adbffd16796e85cdd06546805ff869fed0cac1a9c297d9445"}, - {url = "https://files.pythonhosted.org/packages/30/be/207b81da280ba0c4111d12bc5dc9667a584280a8f7c94c79b6a0ec485652/pydantic_core-0.39.0-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:abbcbc69868ad7f642caa319a7b5f829e6f9b6db5194b6b82b7a9561ac992663"}, - {url = "https://files.pythonhosted.org/packages/32/48/df3cd4a5256f3832b5ce0bc45e8d97081db80860870d3522c5d524e27fe4/pydantic_core-0.39.0-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:c2fb59f98fd0f9f3ee1b77b2c44f282ed8b1cc52d332c2d2a34b6364f63dbfa1"}, - {url = "https://files.pythonhosted.org/packages/38/31/b6d08564f771ce87b5a9dec32746b33b90ae35ddbbc3b06e1cc49e1d6110/pydantic_core-0.39.0-pp37-pypy37_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:a5a377d9bf58a99e55d74167c658cb1f170cc1c008b849f5a8ec31b7b0eb65e7"}, - {url = "https://files.pythonhosted.org/packages/3d/b2/8d38bd801be8244e0c97d6a83ac898fae172e918dc63afd016cb67e958f8/pydantic_core-0.39.0-cp38-none-win_amd64.whl", hash = "sha256:dc8234bd4325341eb660a86dba3688a5287789309a84261b3dbe76d4dd0472e8"}, - {url = "https://files.pythonhosted.org/packages/3f/bf/0271744df2c60a000ade36ac42ef34aaf9dcde7cfa246f4e20e2f9ba51f3/pydantic_core-0.39.0-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:b2352ef56d0a5157dea6d39f3342980523673ac7f08967e39a68e06c168b94a4"}, - {url = "https://files.pythonhosted.org/packages/49/d4/06ca9f1732fe981f3ae7c749a0ceb3b9e0848896eac610afeaf413ae7d38/pydantic_core-0.39.0-cp38-cp38-manylinux_2_24_ppc64le.whl", hash = "sha256:749c0a2038ca7fb3a29ff7f9ce7d3248d8bb9f42d2ef609b4e4c158e74368145"}, - {url = "https://files.pythonhosted.org/packages/4a/c9/e3aede8a6e8e2b552cd12a7a8b5488686d6a6534060ff7d6da2867022fa3/pydantic_core-0.39.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d1f187d852ca78b9e23a0155be5f759f65f5e5c7dc4b29b7ea7aa5df48537ba1"}, - {url = "https://files.pythonhosted.org/packages/4c/29/49eea949174ad30c23a1f42fb5d105d194d98d7c9b96b1c8fda7d88cc57b/pydantic_core-0.39.0.tar.gz", hash = "sha256:8368d0510d0020d1bbb4124b31fb663e17e5661b5cc85c48e2b9d9bb0a378d9f"}, - {url = "https://files.pythonhosted.org/packages/4c/d1/5254c030dadeb88a063ac7135f443ccd50a1033681980016a3976a655d0f/pydantic_core-0.39.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0203bc58c551d018bff3ce3bc863cd2c88504dbb96f79357fdaa22955db64ffe"}, - {url = "https://files.pythonhosted.org/packages/52/e9/377b6997e222288a723fc99bcf76d6b68216ef6269f7733a82b408d74e5a/pydantic_core-0.39.0-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5570c884284a5e69278c4bb259c1694d64a5d9bc9a28674d088134246ad73358"}, - {url = "https://files.pythonhosted.org/packages/5b/0e/6b3aaf8e73eab3846e0f0898dc9c5611e3c30c80fa1f567f1160881738ef/pydantic_core-0.39.0-cp39-cp39-manylinux_2_24_s390x.whl", hash = "sha256:5438ffb320ad430de40de405078b0770beb1eec00e54de18a63c842d114d86b9"}, - {url = "https://files.pythonhosted.org/packages/61/e3/48b6fd9589f9d04efd16604b384aa6cf662513041794155f30ca2dc76ec2/pydantic_core-0.39.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3cb0cdc1c5c036aa7caccf6a28e9a2ce3058ae18aceb143870a6a379235b075d"}, - {url = "https://files.pythonhosted.org/packages/62/2f/090ba715ed3e6211f9fd5e8a0c3ff29ebd0e0c01eb69971cec46493923e4/pydantic_core-0.39.0-cp37-cp37m-manylinux_2_24_ppc64le.whl", hash = "sha256:549a0940b7164b23d52df4d6bd73637e989688d28dbeb9e24d87a27da48f23bc"}, - {url = "https://files.pythonhosted.org/packages/63/03/81dce913aef3ff28a5c1c3938590d9ad3336d4bb35e39ffffd7f5450dbbe/pydantic_core-0.39.0-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:9f1ddc997865f29eee3fea397885595d361a76df80356fec8c47f45b987b7490"}, - {url = "https://files.pythonhosted.org/packages/65/cb/a5fb2d0d9ddedb109af8104445843059173d036e53be720e257fa51c035f/pydantic_core-0.39.0-cp37-cp37m-manylinux_2_24_armv7l.whl", hash = "sha256:45926ab2adef2deff4fc89e12bf5ba015ad297efefcd0f84b8689123a6c3b126"}, - {url = "https://files.pythonhosted.org/packages/68/e1/4e1553a3ecdd375845f320d386f3149e122ea44c1781e8d923a3186a1dbf/pydantic_core-0.39.0-cp311-none-win32.whl", hash = "sha256:3696a567b7517c09ed7dae942fa5b38cd552af5160d0905b76e9607b87e31d01"}, - {url = "https://files.pythonhosted.org/packages/6a/2e/81ce629273eac5daabcbc47c0e68c2f5e3e7926275726b635b9de50a73c9/pydantic_core-0.39.0-pp38-pypy38_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:711d3a4c9ed8cce84dd55284ff9f4494b825930154a52a37cd02ac4e3a5fd62d"}, - {url = "https://files.pythonhosted.org/packages/6c/55/ecbf0c01c8196ca6d3ef37ee03c965a15e4e2fe15748ba4119d102ed8584/pydantic_core-0.39.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f29f3197b1b50550c299ad8700918fbe383412df6f864fe02190a958b60a3c29"}, - {url = "https://files.pythonhosted.org/packages/6d/c4/a7e33420c947fb90e84686db7e156d212931405c453f71d6237489eb78d6/pydantic_core-0.39.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:6e9f98a9df2cea76b1a8bd70d00b4ee3b7597887281c2e85c8ad690ed881ef34"}, - {url = "https://files.pythonhosted.org/packages/6e/66/017c518c8aef90beee755c2236fee4657c9f2004da1b0457454283e1ec6a/pydantic_core-0.39.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4908e1bbafa91dcbcc8778bfe11ede713ef18dafac4a7f66b7108d348d46e5ea"}, - {url = "https://files.pythonhosted.org/packages/77/b7/ee023ab701dc89b9509a1f435d73316b9ef6789396a7655601a7e3816710/pydantic_core-0.39.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e7ad056aeb02a474957fa950ff169549e214cec5f0b5c18dae683b0d21227def"}, - {url = "https://files.pythonhosted.org/packages/78/8b/d1bfbd837d46dc150e7f90cbf8129077c9464f755aa78d92356cc298c1bf/pydantic_core-0.39.0-cp310-none-win_amd64.whl", hash = "sha256:ddf0177f2324200cf9ea3100d4232be275c8986a4cb9b1892e1f53d2584f6b17"}, - {url = "https://files.pythonhosted.org/packages/7a/a4/e0b1cb44397c99fd3737224bf32af94cf596bef80715c0e26732a8e71a1f/pydantic_core-0.39.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:00c3a5ab18f355a0b082019fdc4af41b61c4a2e33d97af44c69b611d818bdfe2"}, - {url = "https://files.pythonhosted.org/packages/7c/cd/128d387f0acc2e008eb1d1869648c0358ac89637d067fffde77440ef9548/pydantic_core-0.39.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5ccb4a21713a831f888c0bf22be4888df475650f699cc35a675cb91cc55e780b"}, - {url = "https://files.pythonhosted.org/packages/82/58/54cda4561c6e099fc41c37ee9cd6752caad6d3cc17a83a1c24b6cd596754/pydantic_core-0.39.0-cp311-none-win_amd64.whl", hash = "sha256:c9b4909e971e8745af251cecd92aa55f9239bbc9a9630811dd53a00a2b5285f8"}, - {url = "https://files.pythonhosted.org/packages/83/fc/3e212b137c5f53564ed8228509700dde0c8dd17f110a097225bd988af0eb/pydantic_core-0.39.0-cp39-none-win32.whl", hash = "sha256:579c69e5a7bf2fd3dedd3c51e91b1beb0c89782ea6c0d1ffd8e48259b70f9d61"}, - {url = "https://files.pythonhosted.org/packages/86/5d/c1d7ad0f076292d5a473585c36e30eb51229d72749ab1306fa0a4ec33b76/pydantic_core-0.39.0-cp310-cp310-manylinux_2_24_s390x.whl", hash = "sha256:f8992a135442959269d2c013bd9913c837d5ea215b0e480cda1820c7310df55b"}, - {url = "https://files.pythonhosted.org/packages/88/59/8feb158be87ba69547bf471709a84acd8e3b671729cabcb691697bcfb1b4/pydantic_core-0.39.0-cp311-cp311-manylinux_2_24_ppc64le.whl", hash = "sha256:87e4d828c0cc28e8ec1abad2e83110e0cca175b3799fc3eeab22e615cefc551f"}, - {url = "https://files.pythonhosted.org/packages/8a/7c/55f6824b2966b5a13fdddc8cf67ed2a830ab2a3d1e428c3f1b84c868f52d/pydantic_core-0.39.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9595444868ece2e67b5e64a583eab10756491d9bf4e6d3876410299297d4adb3"}, - {url = "https://files.pythonhosted.org/packages/8d/1c/119f34be34bd9f2078f5e6225cb4dd9af4748612becb46a8541c4ee8f05c/pydantic_core-0.39.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c3b42892739cd3e27c2efbab6682fa91ec07c76381db1ca66da2d889c21e1c8a"}, - {url = "https://files.pythonhosted.org/packages/91/c4/ecae440c8c627ae810544257294b78a52f5eaff2c6c1b2005fda386e0d3f/pydantic_core-0.39.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:126db921ac7c72cb5d8d1b46540d594d559c25e243b3515aed040a0cd0eafac8"}, - {url = "https://files.pythonhosted.org/packages/95/37/8045af516750341f434ea7f414774b37fdf023f3249c5036e1b51a07cc0a/pydantic_core-0.39.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:058ea15957753eeb0547bbcb9aca1dca1f11969f0517a6f988d708110c4717e4"}, - {url = "https://files.pythonhosted.org/packages/96/3f/7f99a99e3efedddfe04750ab20c38ceb9cf82da8035116367e051143c908/pydantic_core-0.39.0-pp38-pypy38_pp73-macosx_10_7_x86_64.whl", hash = "sha256:e7d2a139d384911ee97ad2e9472ae4e79e9fedf278fa8c31b3e391c0279c0207"}, - {url = "https://files.pythonhosted.org/packages/96/5b/09027349536a371da3bdc413e129824778ea25fe036d8270ed038bb17cde/pydantic_core-0.39.0-cp39-cp39-manylinux_2_24_armv7l.whl", hash = "sha256:bb4cea3c63defa0fe891af206ad04c8b167852feb6bfba7c1cc4f26a4a2eb39e"}, - {url = "https://files.pythonhosted.org/packages/9c/df/2140080b89404fe58c49cd13b87ff9fea0006c375ee6db526f665c6e1ed9/pydantic_core-0.39.0-cp311-cp311-manylinux_2_24_armv7l.whl", hash = "sha256:d3a8d0734b1e82df4a725fa39a1b78625c407b8cf31ae1652382a2f4c8c757b4"}, - {url = "https://files.pythonhosted.org/packages/9d/f1/49aa2eed0fb5c4593ff7e6b682b55227ccff446e5968de4244858aa153a4/pydantic_core-0.39.0-cp39-none-win_amd64.whl", hash = "sha256:3a4d4d87dc988d9c52d4e7e31b77d6036b4cab36109826b57cd293ae3179440d"}, - {url = "https://files.pythonhosted.org/packages/a0/bb/6e4744e06e503aab065cc1a1c30b048e0d7cdc915e7aaec4e90f5dfeb920/pydantic_core-0.39.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4ee34d942a3ab3d55db4945b42ce000c5ca2fd749ab9bbc3fb4ddab41742cbbd"}, - {url = "https://files.pythonhosted.org/packages/a8/a0/1a8775109cb96cf2814b2e4672ce8077639ea8fea9a763855961f962a08a/pydantic_core-0.39.0-cp37-cp37m-manylinux_2_24_s390x.whl", hash = "sha256:a0f7d1454f86865cd2ec47e36ebe2e20cca5be71eaa5c2e422adf1e0355ae705"}, - {url = "https://files.pythonhosted.org/packages/af/13/a2263078a389ae865416ebd11b7e1ea6857ba17a3fe824247443dc8094dc/pydantic_core-0.39.0-cp310-cp310-manylinux_2_24_ppc64le.whl", hash = "sha256:8ac4ba34ac3977fa5c6cef5921564133e1295b9d202fed2d6e62187f61651f3c"}, - {url = "https://files.pythonhosted.org/packages/b6/cf/7e4c78ea6dd20fae6fcc40d080ea0cc0d243c455bd7f2876f4358083e734/pydantic_core-0.39.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:73f785920e974f86d2e37a7fc44a5fdd3e9b6d40fba94137da7a1e02c4dd7c11"}, - {url = "https://files.pythonhosted.org/packages/b9/6e/33ce81ab5b6216551c79a0de33d0561870ef8ce7044ad19d1bdcbbf7ac4c/pydantic_core-0.39.0-pp38-pypy38_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:5cf2849e22925411a15d955c03197f71c6507fcdfcaeee110a7202f6e436b5fa"}, - {url = "https://files.pythonhosted.org/packages/ba/5d/8da971a0738ba60e4b5fa4017edfc8b2ea7c33b497ff36c47579aaf8b2f7/pydantic_core-0.39.0-cp310-none-win32.whl", hash = "sha256:dc12b16753591143bdd0c117d74fbe46fda84b4a8eb0383931811819d8679c89"}, - {url = "https://files.pythonhosted.org/packages/bd/10/eae179a0e14dafdb99d8daad2214fbd4ce37ec930d5f4d6d5a76c53fb9b4/pydantic_core-0.39.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a5ca573f261ea525c5bb10e03d41dd9ce76aea93b75f9ca2dc5dc4ef147ea2a3"}, - {url = "https://files.pythonhosted.org/packages/c0/d0/be263343068f7b3add37590ada5aae3e6e9ef9d71fde57bbf5af1c77fd61/pydantic_core-0.39.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:71e12169625eb4b6939617333dd1aa671c156a44c44880db207c47a2e4c9fe81"}, - {url = "https://files.pythonhosted.org/packages/c1/3b/dfbf0b7528a391cc9f5f0ece71384d80a462a3ea29629d04d0077c60e2a6/pydantic_core-0.39.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d0ef384f3b4aa5ef4c66d47f4446ca9dc8adbfbc7bf74d1b31b19cc2e2bdf9e8"}, - {url = "https://files.pythonhosted.org/packages/cb/72/aa3d34b34ce6efe00fd1f3cf91e26d5df3fe17fec6233d411117f1fd1afc/pydantic_core-0.39.0-cp310-cp310-manylinux_2_24_armv7l.whl", hash = "sha256:ac8756c26cbfc57e89ff52817a2802e97376948de002ffe39adb238fbb12c8db"}, - {url = "https://files.pythonhosted.org/packages/cf/af/2c3098c684b769aa23e8cd52aeb6f9f1f57bd29001de4d504bffd971d061/pydantic_core-0.39.0-cp39-cp39-manylinux_2_24_ppc64le.whl", hash = "sha256:17a08e9af181097759362182bffa5614cd8c1278f12bab529e6e3bdc4b2d3860"}, - {url = "https://files.pythonhosted.org/packages/d1/49/665fa0ab78fb9d64737f9244611112ed2dd62294da07abbec5ff621e78cb/pydantic_core-0.39.0-cp37-none-win_amd64.whl", hash = "sha256:84675545b74ce4ea53f0e2413f182db1501b1684d6359f7c2cb4d37d24a9afec"}, - {url = "https://files.pythonhosted.org/packages/d1/57/09cf964c2fc35b47d720328e0cfc6db9541a253ff6cc252caea948dbbd9f/pydantic_core-0.39.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:103179d734dafb5da5f74065d1a18274709684a9dc01c61f119c5e39dea4d2df"}, - {url = "https://files.pythonhosted.org/packages/d9/59/b88cfad8e4d286c06eb8b2179b65d81e9f0e8a43b0501a10c5f6e7223059/pydantic_core-0.39.0-cp311-cp311-manylinux_2_24_s390x.whl", hash = "sha256:472049006abb4070750d530c96d76122497aec86b99c618d583e596fe986ad0a"}, - {url = "https://files.pythonhosted.org/packages/e1/05/0e5fc693d422d8fc385af604dedbbf7989fd5ec0d48b18f2eb8c5cd215a3/pydantic_core-0.39.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ef212fafe222ae7fdf38ba16b5c7bb7eddf1b44cc901bc3056569eefcf54da94"}, - {url = "https://files.pythonhosted.org/packages/e3/d2/03bfd28dbe7b88c0c3dc6d972eaa1893174802c11375ebafff3b5047374e/pydantic_core-0.39.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:38ac25daeb3ea45ecd4e8580f7375e6434daf02c6ca185f246f2e682de554ab5"}, - {url = "https://files.pythonhosted.org/packages/e7/94/7400beb368dda61e6f77777f8a708faa001f4aec20a537fe56c4d067dc9d/pydantic_core-0.39.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:cf6cff67dcf885f36e9f8a8771225df6b9cd76f308d0c7af66bfd2776f471c7c"}, - {url = "https://files.pythonhosted.org/packages/e9/22/a393b654f9e74c37f5ace2739d521430ce8944c2ceb5eec9c1b0576c47f1/pydantic_core-0.39.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8849794ae4da5d244d215ee582e83e169120c475a7e05f1adf227035b9edbde3"}, - {url = "https://files.pythonhosted.org/packages/eb/95/ff4b8fdfdc07645854fe141d684ada721eafe182482bcb08d2bac7531ca5/pydantic_core-0.39.0-pp37-pypy37_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:45f55076c3844ccf1a9f912d5bef61282baae203b30a7b0158add0b4a2141036"}, - {url = "https://files.pythonhosted.org/packages/ef/d6/11fdc62864ce49bbab385bb06de6b717b2e9447884fe723e1c7f4ff376e2/pydantic_core-0.39.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bed383476707e6aeb8d9d6fc83a9b9a6b4f0a00ae440ca3f1cc17686ae3e45ab"}, - {url = "https://files.pythonhosted.org/packages/f2/68/df76ad84b7ed61ef388eeaab89bc9669fb709127c01abafe8009d51329a4/pydantic_core-0.39.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:7cdcd13b84411d6194de988044b21c2859fcc7c673e0f6dd92e854489c21ae2f"}, - {url = "https://files.pythonhosted.org/packages/f3/d9/9b7391a49be7ccbd721026c4dd660f1452526a7812b6588d7a41c657c175/pydantic_core-0.39.0-pp37-pypy37_pp73-macosx_10_7_x86_64.whl", hash = "sha256:d3240340147504a1d6a3c86f43b644469f8c61992e0d88287701ee8f6b1b0b2d"}, - {url = "https://files.pythonhosted.org/packages/f8/64/20fd09945907199d0a0f516bd4589e31a04e25fce9775ffc3514016444bf/pydantic_core-0.39.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:7bf7470f621285303a5aa6b3e4fb148c5b69f8ee485a920ee9cc1472fd282d2e"}, - {url = "https://files.pythonhosted.org/packages/f8/ac/b53b69b8dc48f26a3c4176960e5d488772c6912cf1bfb998e8ca57498f10/pydantic_core-0.39.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d2c52a9269c302b75265e45f72e1c3a3d4e473c90f11d3c5671ddfa7ba891eae"}, - {url = "https://files.pythonhosted.org/packages/fd/e4/62a993fd668c679373487a9f4eb89bcda1d44a7d75c532872cf549cabc93/pydantic_core-0.39.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4060e765690727095969f7038e8e1c7251d4bd518e151174b5cb54dae0163c68"}, - {url = "https://files.pythonhosted.org/packages/ff/89/1c2c8c2f9631dcce456e7f116e3af5c049795336ae6bcd8631154ead29d0/pydantic_core-0.39.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8e86833a13a4f00f264d04f3f36048ce3fea0a92a730db6c9c9c0bf33e277bc2"}, -] -"pylint 2.17.4" = [ - {url = "https://files.pythonhosted.org/packages/04/4c/3f7d42a1378c40813772bc5f25184144da09f00ffbe3f60ae985ffa7e10f/pylint-2.17.4-py3-none-any.whl", hash = "sha256:7a1145fb08c251bdb5cca11739722ce64a63db479283d10ce718b2460e54123c"}, - {url = "https://files.pythonhosted.org/packages/7e/d4/aba77d10841710fea016422f419dfe501dee05fa0fc3898dc048f7bf3f60/pylint-2.17.4.tar.gz", hash = "sha256:5dcf1d9e19f41f38e4e85d10f511e5b9c35e1aa74251bf95cdd8cb23584e2db1"}, -] -"pytest 7.3.2" = [ - {url = "https://files.pythonhosted.org/packages/58/2a/07c65fdc40846ecb8a9dcda2c38fcb5a06a3e39d08d4a4960916431951cb/pytest-7.3.2.tar.gz", hash = "sha256:ee990a3cc55ba808b80795a79944756f315c67c12b56abd3ac993a7b8c17030b"}, - {url = "https://files.pythonhosted.org/packages/7a/d0/de969198293cdea22b3a6fb99a99aeeddb7b3827f0823b33c5dc0734bbe5/pytest-7.3.2-py3-none-any.whl", hash = "sha256:cdcbd012c9312258922f8cd3f1b62a6580fdced17db6014896053d47cddf9295"}, -] -"pytest-click 1.1.0" = [ - {url = "https://files.pythonhosted.org/packages/72/1a/eb53371999b94b3c995c00117f3a232dbf6f56c7152a52cf3e3777e7d49d/pytest_click-1.1.0-py3-none-any.whl", hash = "sha256:eade4742c2f02c345e78a32534a43e8db04acf98d415090539dacc880b7cd0e9"}, - {url = "https://files.pythonhosted.org/packages/ec/ec/bca3cd29ba2b025ae41666b851f6ff05fb77cb4c13719baaeda6a757772a/pytest_click-1.1.0.tar.gz", hash = "sha256:fdd9f6721f877dda021e7c5dc73e70aecd37e5ed23ec6820f8a7b3fd7b4f8d30"}, -] -"pytest-cov 4.1.0" = [ - {url = "https://files.pythonhosted.org/packages/7a/15/da3df99fd551507694a9b01f512a2f6cf1254f33601605843c3775f39460/pytest-cov-4.1.0.tar.gz", hash = "sha256:3904b13dfbfec47f003b8e77fd5b589cd11904a21ddf1ab38a64f204d6a10ef6"}, - {url = "https://files.pythonhosted.org/packages/a7/4b/8b78d126e275efa2379b1c2e09dc52cf70df16fc3b90613ef82531499d73/pytest_cov-4.1.0-py3-none-any.whl", hash = "sha256:6ba70b9e97e69fcc3fb45bfeab2d0a138fb65c4d0d6a41ef33983ad114be8c3a"}, -] -"pytest-cppython 0.3.1.dev45" = [ - {url = "https://files.pythonhosted.org/packages/5f/73/cd09e0ab2240398b7cdb8055f5bc218c2ba46e4f01c2feddce52838cafc7/pytest-cppython-0.3.1.dev45.tar.gz", hash = "sha256:e71f4ecbfb9e0d1e0c2f6d48b71cd119df554d0c68c2ba7c7e0a33ce66e00fe0"}, - {url = "https://files.pythonhosted.org/packages/a4/d7/926420c6e86280c37b1d4b02aea02f86820b5c7656da21a923d7055b8c14/pytest_cppython-0.3.1.dev45-py3-none-any.whl", hash = "sha256:b1a4bd299cf70000563a7317b2717e7168d03f2f6a84cdd3a507e3e0d2fe9736"}, -] -"pytest-mock 3.11.1" = [ - {url = "https://files.pythonhosted.org/packages/d8/2d/b3a811ec4fa24190a9ec5013e23c89421a7916167c6240c31fdc445f850c/pytest-mock-3.11.1.tar.gz", hash = "sha256:7f6b125602ac6d743e523ae0bfa71e1a697a2f5534064528c6ff84c2f7c2fc7f"}, - {url = "https://files.pythonhosted.org/packages/da/85/80ae98e019a429445bfb74e153d4cb47c3695e3e908515e95e95c18237e5/pytest_mock-3.11.1-py3-none-any.whl", hash = "sha256:21c279fff83d70763b05f8874cc9cfb3fcacd6d354247a976f9529d19f9acf39"}, -] -"tomlkit 0.11.8" = [ - {url = "https://files.pythonhosted.org/packages/10/37/dd53019ccb72ef7d73fff0bee9e20b16faff9658b47913a35d79e89978af/tomlkit-0.11.8.tar.gz", hash = "sha256:9330fc7faa1db67b541b28e62018c17d20be733177d290a13b24c62d1614e0c3"}, - {url = "https://files.pythonhosted.org/packages/ef/a8/b1c193be753c02e2a94af6e37ee45d3378a74d44fe778c2434a63af92731/tomlkit-0.11.8-py3-none-any.whl", hash = "sha256:8c726c4c202bdb148667835f68d68780b9a003a9ec34167b6c673b38eff2a171"}, -] -"typing-extensions 4.6.3" = [ - {url = "https://files.pythonhosted.org/packages/42/56/cfaa7a5281734dadc842f3a22e50447c675a1c5a5b9f6ad8a07b467bffe7/typing_extensions-4.6.3.tar.gz", hash = "sha256:d91d5919357fe7f681a9f2b5b4cb2a5f1ef0a1e9f59c4d8ff0d3491e05c0ffd5"}, - {url = "https://files.pythonhosted.org/packages/5f/86/d9b1518d8e75b346a33eb59fa31bdbbee11459a7e2cc5be502fa779e96c5/typing_extensions-4.6.3-py3-none-any.whl", hash = "sha256:88a4153d8505aabbb4e13aacb7c486c2b4a33ca3b3f807914a9b4c844c471c26"}, -] -"wrapt 1.15.0" = [ - {url = "https://files.pythonhosted.org/packages/0c/6e/f80c23efc625c10460240e31dcb18dd2b34b8df417bc98521fbfd5bc2e9a/wrapt-1.15.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:21f6d9a0d5b3a207cdf7acf8e58d7d13d463e639f0c7e01d82cdb671e6cb7923"}, - {url = "https://files.pythonhosted.org/packages/0f/9a/179018bb3f20071f39597cd38fc65d6285d7b89d57f6c51f502048ed28d9/wrapt-1.15.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76407ab327158c510f44ded207e2f76b657303e17cb7a572ffe2f5a8a48aa04d"}, - {url = "https://files.pythonhosted.org/packages/12/5a/fae60a8bc9b07a3a156989b79e14c58af05ab18375749ee7c12b2f0dddbd/wrapt-1.15.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:ca1cccf838cd28d5a0883b342474c630ac48cac5df0ee6eacc9c7290f76b11c1"}, - {url = "https://files.pythonhosted.org/packages/18/f6/659d7c431a57da9c9a86945834ab2bf512f1d9ebefacea49135a0135ef1a/wrapt-1.15.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:f2e69b3ed24544b0d3dbe2c5c0ba5153ce50dcebb576fdc4696d52aa22db6034"}, - {url = "https://files.pythonhosted.org/packages/1e/3c/cb96dbcafbf3a27413fb15e0a1997c4610283f895dc01aca955cd2fda8b9/wrapt-1.15.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0970ddb69bba00670e58955f8019bec4a42d1785db3faa043c33d81de2bf843c"}, - {url = "https://files.pythonhosted.org/packages/20/01/baec2650208284603961d61f53ee6ae8e3eff63489c7230dff899376a6f6/wrapt-1.15.0-cp35-cp35m-win_amd64.whl", hash = "sha256:fd69666217b62fa5d7c6aa88e507493a34dec4fa20c5bd925e4bc12fce586639"}, - {url = "https://files.pythonhosted.org/packages/21/42/36c98e9c024978f52c218f22eba1addd199a356ab16548af143d3a72ac0d/wrapt-1.15.0-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:f87ec75864c37c4c6cb908d282e1969e79763e0d9becdfe9fe5473b7bb1e5f09"}, - {url = "https://files.pythonhosted.org/packages/23/0a/9964d7141b8c5e31c32425d3412662a7873aaf0c0964166f4b37b7db51b6/wrapt-1.15.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:b67b819628e3b748fd3c2192c15fb951f549d0f47c0449af0764d7647302fda3"}, - {url = "https://files.pythonhosted.org/packages/29/41/f05bf85417473cf6fe4eec7396c63762e5a457a42102bd1b8af059af6586/wrapt-1.15.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63424c681923b9f3bfbc5e3205aafe790904053d42ddcc08542181a30a7a51bd"}, - {url = "https://files.pythonhosted.org/packages/2b/fb/c31489631bb94ac225677c1090f787a4ae367614b5277f13dbfde24b2b69/wrapt-1.15.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a74d56552ddbde46c246b5b89199cb3fd182f9c346c784e1a93e4dc3f5ec9975"}, - {url = "https://files.pythonhosted.org/packages/2d/47/16303c59a890696e1a6fd82ba055fc4e0f793fb4815b5003f1f85f7202ce/wrapt-1.15.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d5fe3e099cf07d0fb5a1e23d399e5d4d1ca3e6dfcbe5c8570ccff3e9208274f7"}, - {url = "https://files.pythonhosted.org/packages/2e/ce/90dcde9ff9238689f111f07b46da2db570252445a781ea147ff668f651b0/wrapt-1.15.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:b56d5519e470d3f2fe4aa7585f0632b060d532d0696c5bdfb5e8319e1d0f69a2"}, - {url = "https://files.pythonhosted.org/packages/31/e6/6ac59c5570a7b9aaecb10de39f70dacd0290620330277e60b29edcf8bc9a/wrapt-1.15.0-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:5fc8e02f5984a55d2c653f5fea93531e9836abbd84342c1d1e17abc4a15084c2"}, - {url = "https://files.pythonhosted.org/packages/39/ee/2b8d608f2bcf86242daadf5b0b746c11d3657b09892345f10f171b5ca3ac/wrapt-1.15.0-cp35-cp35m-win32.whl", hash = "sha256:fbec11614dba0424ca72f4e8ba3c420dba07b4a7c206c8c8e4e73f2e98f4c559"}, - {url = "https://files.pythonhosted.org/packages/44/a1/40379212a0b678f995fdb4f4f28aeae5724f3212cdfbf97bee8e6fba3f1b/wrapt-1.15.0-cp36-cp36m-win_amd64.whl", hash = "sha256:077ff0d1f9d9e4ce6476c1a924a3332452c1406e59d90a2cf24aeb29eeac9420"}, - {url = "https://files.pythonhosted.org/packages/45/90/a959fa50084d7acc2e628f093c9c2679dd25085aa5085a22592e028b3e06/wrapt-1.15.0-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:96e25c8603a155559231c19c0349245eeb4ac0096fe3c1d0be5c47e075bd4f46"}, - {url = "https://files.pythonhosted.org/packages/47/dd/bee4d33058656c0b2e045530224fcddd9492c354af5d20499e5261148dcb/wrapt-1.15.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5c5aa28df055697d7c37d2099a7bc09f559d5053c3349b1ad0c39000e611d317"}, - {url = "https://files.pythonhosted.org/packages/48/65/0061e7432ca4b635e96e60e27e03a60ddaca3aeccc30e7415fed0325c3c2/wrapt-1.15.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:76e9c727a874b4856d11a32fb0b389afc61ce8aaf281ada613713ddeadd1cfec"}, - {url = "https://files.pythonhosted.org/packages/4a/7b/c63103817bd2f3b0145608ef642ce90d8b6d1e5780d218bce92e93045e06/wrapt-1.15.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d787272ed958a05b2c86311d3a4135d3c2aeea4fc655705f074130aa57d71653"}, - {url = "https://files.pythonhosted.org/packages/50/eb/af864a01300878f69b4949f8381ad57d5519c1791307e9fd0bc7f5ab50a5/wrapt-1.15.0-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:e826aadda3cae59295b95343db8f3d965fb31059da7de01ee8d1c40a60398b29"}, - {url = "https://files.pythonhosted.org/packages/54/21/282abeb456f22d93533b2d373eeb393298a30b0cb0683fa8a4ed77654273/wrapt-1.15.0-cp38-cp38-win_amd64.whl", hash = "sha256:b06fa97478a5f478fb05e1980980a7cdf2712015493b44d0c87606c1513ed5b1"}, - {url = "https://files.pythonhosted.org/packages/55/20/90f5affc2c879db408124ce14b9443b504f961e47a517dff4f24a00df439/wrapt-1.15.0-cp38-cp38-win32.whl", hash = "sha256:abd8f36c99512755b8456047b7be10372fca271bf1467a1caa88db991e7c421b"}, - {url = "https://files.pythonhosted.org/packages/5d/c4/3cc25541ec0404dd1d178e7697a34814d77be1e489cd6f8cb055ac688314/wrapt-1.15.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:74934ebd71950e3db69960a7da29204f89624dde411afbfb3b4858c1409b1e98"}, - {url = "https://files.pythonhosted.org/packages/65/be/3ae5afe9d78d97595b28914fa7e375ebc6329549d98f02768d5a08f34937/wrapt-1.15.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:780c82a41dc493b62fc5884fb1d3a3b81106642c5c5c78d6a0d4cbe96d62ba7e"}, - {url = "https://files.pythonhosted.org/packages/6b/b0/bde5400fdf6d18cb7ef527831de0f86ac206c4da1670b67633e5a547b05f/wrapt-1.15.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:56374914b132c702aa9aa9959c550004b8847148f95e1b824772d453ac204a72"}, - {url = "https://files.pythonhosted.org/packages/78/f2/106d90140a93690eab240fae76759d62dae639fcec1bd098eccdb83aa38f/wrapt-1.15.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:078e2a1a86544e644a68422f881c48b84fef6d18f8c7a957ffd3f2e0a74a0d4a"}, - {url = "https://files.pythonhosted.org/packages/7f/b6/6dc0ddacd20337b4ce6ab0d6b0edc7da3898f85c4f97df7f30267e57509e/wrapt-1.15.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2fbfbca668dd15b744418265a9607baa970c347eefd0db6a518aaf0cfbd153c0"}, - {url = "https://files.pythonhosted.org/packages/81/1e/0bb8f01c6ac5baba66ef1ab65f4644bede856c3c7aede18c896be222151c/wrapt-1.15.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:b0724f05c396b0a4c36a3226c31648385deb6a65d8992644c12a4963c70326ba"}, - {url = "https://files.pythonhosted.org/packages/88/f1/4dfaa1ad111d2a48429dca133e46249922ee2f279e9fdd4ab5b149cd6c71/wrapt-1.15.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e20076a211cd6f9b44a6be58f7eeafa7ab5720eb796975d0c03f05b47d89eb90"}, - {url = "https://files.pythonhosted.org/packages/8a/1c/740c3ad1b7754dd7213f4df09ccdaf6b19e36da5ff3a269444ba9e103f1b/wrapt-1.15.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:7dc0713bf81287a00516ef43137273b23ee414fe41a3c14be10dd95ed98a2df9"}, - {url = "https://files.pythonhosted.org/packages/8f/87/ba6dc86e8edb28fd1e314446301802751bd3157e9780385c9eef633994b9/wrapt-1.15.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3bbe623731d03b186b3d6b0d6f51865bf598587c38d6f7b0be2e27414f7f214e"}, - {url = "https://files.pythonhosted.org/packages/94/55/91dd3a7efbc1db2b07bbfc490d48e8484852c355d55e61e8b1565d7725f6/wrapt-1.15.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:54accd4b8bc202966bafafd16e69da9d5640ff92389d33d28555c5fd4f25ccb7"}, - {url = "https://files.pythonhosted.org/packages/96/37/a33c1220e8a298ab18eb070b6a59e4ccc3f7344b434a7ac4bd5d4bdccc97/wrapt-1.15.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ce42618f67741d4697684e501ef02f29e758a123aa2d669e2d964ff734ee00ee"}, - {url = "https://files.pythonhosted.org/packages/9b/50/383c155a05e3e0361d209e3f55ec823f3736c7a46b29923ea33ab85e8d70/wrapt-1.15.0-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:4ff0d20f2e670800d3ed2b220d40984162089a6e2c9646fdb09b85e6f9a8fc29"}, - {url = "https://files.pythonhosted.org/packages/9d/40/fee1288d654c80fe1bc5ecee1c8d58f761a39bb30c73f1ce106701dd8b0a/wrapt-1.15.0-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:493d389a2b63c88ad56cdc35d0fa5752daac56ca755805b1b0c530f785767d5e"}, - {url = "https://files.pythonhosted.org/packages/a2/3e/ee671ac60945154dfa3a406b8cb5cef2e3b4fa31c7d04edeb92716342026/wrapt-1.15.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e169e957c33576f47e21864cf3fc9ff47c223a4ebca8960079b8bd36cb014fd0"}, - {url = "https://files.pythonhosted.org/packages/a4/af/8552671e4e7674fcae14bd3976dd9dc6a2b7294730e4a9a94597ac292a21/wrapt-1.15.0-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:75669d77bb2c071333417617a235324a1618dba66f82a750362eccbe5b61d248"}, - {url = "https://files.pythonhosted.org/packages/a6/32/f4868adc994648fac4cfe347bcc1381c9afcb1602c8ba0910f36b96c5449/wrapt-1.15.0-cp310-cp310-win_amd64.whl", hash = "sha256:75760a47c06b5974aa5e01949bf7e66d2af4d08cb8c1d6516af5e39595397f5e"}, - {url = "https://files.pythonhosted.org/packages/a7/da/04883b14284c437eac98c7ad2959197f02acbabd57d5ea8ff4893a7c3920/wrapt-1.15.0-cp37-cp37m-win32.whl", hash = "sha256:02fce1852f755f44f95af51f69d22e45080102e9d00258053b79367d07af39c0"}, - {url = "https://files.pythonhosted.org/packages/a9/64/886e512f438f12424b48a3ab23ae2583ec633be6e13eb97b0ccdff8e328a/wrapt-1.15.0-cp310-cp310-win32.whl", hash = "sha256:26458da5653aa5b3d8dc8b24192f574a58984c749401f98fff994d41d3f08da1"}, - {url = "https://files.pythonhosted.org/packages/aa/24/bbd64ee4e1db9c75ec2a9677c538866f81800bcd2a8abd1a383369369cf5/wrapt-1.15.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:40737a081d7497efea35ab9304b829b857f21558acfc7b3272f908d33b0d9d4c"}, - {url = "https://files.pythonhosted.org/packages/af/23/cf5dbfd676480fa8fc6eecc4c413183cd8e14369321c5111fec5c12550e9/wrapt-1.15.0-cp39-cp39-win32.whl", hash = "sha256:46ed616d5fb42f98630ed70c3529541408166c22cdfd4540b88d5f21006b0eff"}, - {url = "https://files.pythonhosted.org/packages/af/7f/25913aacbe0c2c68e7354222bdefe4e840489725eb835e311c581396f91f/wrapt-1.15.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c99f4309f5145b93eca6e35ac1a988f0dc0a7ccf9ccdcd78d3c0adf57224e62f"}, - {url = "https://files.pythonhosted.org/packages/b1/8b/f4c02cf1f841dede987f93c37d42256dc4a82cd07173ad8a5458eee1c412/wrapt-1.15.0-cp37-cp37m-win_amd64.whl", hash = "sha256:abd52a09d03adf9c763d706df707c343293d5d106aea53483e0ec8d9e310ad5e"}, - {url = "https://files.pythonhosted.org/packages/b2/b0/a56b129822568d9946e009e8efd53439b9dd38cc1c4af085aa44b2485b40/wrapt-1.15.0-cp36-cp36m-win32.whl", hash = "sha256:77d4c1b881076c3ba173484dfa53d3582c1c8ff1f914c6461ab70c8428b796c1"}, - {url = "https://files.pythonhosted.org/packages/b6/0c/435198dbe6961c2343ca725be26b99c8aee615e32c45bc1cb2a960b06183/wrapt-1.15.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:38adf7198f8f154502883242f9fe7333ab05a5b02de7d83aa2d88ea621f13364"}, - {url = "https://files.pythonhosted.org/packages/b7/3d/9d3cd75f7fc283b6e627c9b0e904189c41ca144185fd8113a1a094dec8ca/wrapt-1.15.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2e51de54d4fb8fb50d6ee8327f9828306a959ae394d3e01a1ba8b2f937747d86"}, - {url = "https://files.pythonhosted.org/packages/b9/40/975fbb1ab03fa987900bacc365645c4cbead22baddd273b4f5db7f9843d2/wrapt-1.15.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3abbe948c3cbde2689370a262a8d04e32ec2dd4f27103669a45c6929bcdbfe7c"}, - {url = "https://files.pythonhosted.org/packages/bd/47/57ffe222af59fae1eb56bca7d458b704a9b59380c47f0921efb94dc4786a/wrapt-1.15.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:b130fe77361d6771ecf5a219d8e0817d61b236b7d8b37cc045172e574ed219e6"}, - {url = "https://files.pythonhosted.org/packages/c3/12/5fabf0014a0f30eb3975b7199ac2731215a40bc8273083f6a89bd6cadec6/wrapt-1.15.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cd525e0e52a5ff16653a3fc9e3dd827981917d34996600bbc34c05d048ca35cc"}, - {url = "https://files.pythonhosted.org/packages/c4/e3/01f879f8e7c1221c72dbd4bfa106624ee3d01cb8cbc82ef57fbb95880cac/wrapt-1.15.0-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:896689fddba4f23ef7c718279e42f8834041a21342d95e56922e1c10c0cc7afb"}, - {url = "https://files.pythonhosted.org/packages/c7/cd/18d95465323f29e3f3fd3ff84f7acb402a6a61e6caf994dced7140d78f85/wrapt-1.15.0-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:9ed6aa0726b9b60911f4aed8ec5b8dd7bf3491476015819f56473ffaef8959bd"}, - {url = "https://files.pythonhosted.org/packages/ca/1c/5caf61431705b3076ca1152abfd6da6304697d7d4fe48bb3448a6decab40/wrapt-1.15.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a89ce3fd220ff144bd9d54da333ec0de0399b52c9ac3d2ce34b569cf1a5748fb"}, - {url = "https://files.pythonhosted.org/packages/cd/a0/84b8fe24af8d7f7374d15e0da1cd5502fff59964bbbf34982df0ca2c9047/wrapt-1.15.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:230ae493696a371f1dbffaad3dafbb742a4d27a0afd2b1aecebe52b740167e7f"}, - {url = "https://files.pythonhosted.org/packages/cd/f0/060add4fcb035024f84fb3b5523fb2b119ac08608af3f61dbdda38477900/wrapt-1.15.0-cp39-cp39-win_amd64.whl", hash = "sha256:eef4d64c650f33347c1f9266fa5ae001440b232ad9b98f1f43dfe7a79435c0a6"}, - {url = "https://files.pythonhosted.org/packages/cf/b1/3c24fc0f6b589ad8c99cfd1cd3e586ef144e16aaf9381ed952d047a7ee54/wrapt-1.15.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:578383d740457fa790fdf85e6d346fda1416a40549fe8db08e5e9bd281c6a475"}, - {url = "https://files.pythonhosted.org/packages/d1/74/3c99ce16947f7af901f6203ab4a3d0908c4db06e800571dabfe8525fa925/wrapt-1.15.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bbeccb1aa40ab88cd29e6c7d8585582c99548f55f9b2581dfc5ba68c59a85752"}, - {url = "https://files.pythonhosted.org/packages/d2/60/9fe25f4cd910ae94e75a1fd4772b058545e107a82629a5ca0f2cd7cc34d5/wrapt-1.15.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3a8564f283394634a7a7054b7983e47dbf39c07712d7b177b37e03f2467a024e"}, - {url = "https://files.pythonhosted.org/packages/d7/4b/1bd4837362d31d402b9bc1a27cdd405baf994dbf9942696f291d2f7eeb73/wrapt-1.15.0-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:a4cbb9ff5795cd66f0066bdf5947f170f5d63a9274f99bdbca02fd973adcf2a8"}, - {url = "https://files.pythonhosted.org/packages/dd/42/9eedee19435dfc0478cdb8bdc71800aab15a297d1074f1aae0d9489adbc3/wrapt-1.15.0-cp311-cp311-win_amd64.whl", hash = "sha256:a487f72a25904e2b4bbc0817ce7a8de94363bd7e79890510174da9d901c38705"}, - {url = "https://files.pythonhosted.org/packages/dd/e9/85e780a6b70191114b13b129867cec2fab84279f6beb788e130a26e4ca58/wrapt-1.15.0-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:1286eb30261894e4c70d124d44b7fd07825340869945c79d05bda53a40caa079"}, - {url = "https://files.pythonhosted.org/packages/dd/eb/389f9975a6be31ddd19d29128a11f1288d07b624e464598a4b450f8d007e/wrapt-1.15.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9d37ac69edc5614b90516807de32d08cb8e7b12260a285ee330955604ed9dd29"}, - {url = "https://files.pythonhosted.org/packages/de/77/e2ebfa2f46c19094888a364fdb59aeab9d3336a3ad7ccdf542de572d2a35/wrapt-1.15.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:96177eb5645b1c6985f5c11d03fc2dbda9ad24ec0f3a46dcce91445747e15094"}, - {url = "https://files.pythonhosted.org/packages/e8/86/fc38e58843159bdda745258d872b1187ad916087369ec57ef93f5e832fa8/wrapt-1.15.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ba1711cda2d30634a7e452fc79eabcadaffedf241ff206db2ee93dd2c89a60e7"}, - {url = "https://files.pythonhosted.org/packages/ec/f4/f84538a367105f0a7e507f0c6766d3b15b848fd753647bbf0c206399b322/wrapt-1.15.0-cp311-cp311-win32.whl", hash = "sha256:bd84395aab8e4d36263cd1b9308cd504f6cf713b7d6d3ce25ea55670baec5416"}, - {url = "https://files.pythonhosted.org/packages/ee/25/83f5dcd9f96606521da2d0e7a03a18800264eafb59b569ff109c4d2fea67/wrapt-1.15.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:7eebcdbe3677e58dd4c0e03b4f2cfa346ed4049687d839adad68cc38bb559c92"}, - {url = "https://files.pythonhosted.org/packages/f6/89/bf77b063c594795aaa056cac7b467463702f346d124d46d7f06e76e8cd97/wrapt-1.15.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:2cf56d0e237280baed46f0b5316661da892565ff58309d4d2ed7dba763d984b8"}, - {url = "https://files.pythonhosted.org/packages/f6/d3/3c6bd4db883537c40eb9d41d738d329d983d049904f708267f3828a60048/wrapt-1.15.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:58d7a75d731e8c63614222bcb21dd992b4ab01a399f1f09dd82af17bbfc2368a"}, - {url = "https://files.pythonhosted.org/packages/f8/49/10013abe31f6892ae57c5cc260f71b7e08f1cc00f0d7b2bcfa482ea74349/wrapt-1.15.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d6bcbfc99f55655c3d93feb7ef3800bd5bbe963a755687cbf1f490a71fb7794b"}, - {url = "https://files.pythonhosted.org/packages/f8/7d/73e4e3cdb2c780e13f9d87dc10488d7566d8fd77f8d68f0e416bfbd144c7/wrapt-1.15.0.tar.gz", hash = "sha256:d06730c6aed78cee4126234cf2d071e01b44b915e725a6cb439a879ec9754a3a"}, - {url = "https://files.pythonhosted.org/packages/f8/f8/e068dafbb844c1447c55b23c921f3d338cddaba4ea53187a7dd0058452d9/wrapt-1.15.0-py3-none-any.whl", hash = "sha256:64b1df0f83706b4ef4cfb4fb0e4c2669100fd7ecacfb59e091fad300d4e04640"}, - {url = "https://files.pythonhosted.org/packages/fb/2d/b6fd53b7dbf94d542866cbf1021b9a62595177fc8405fd75e0a5bf3fa3b8/wrapt-1.15.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:af5bd9ccb188f6a5fdda9f1f09d9f4c86cc8a539bd48a0bfdc97723970348418"}, - {url = "https://files.pythonhosted.org/packages/fb/bd/ca7fd05a45e7022f3b780a709bbdb081a6138d828ecdb5b7df113a3ad3be/wrapt-1.15.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:41d07d029dd4157ae27beab04d22b8e261eddfc6ecd64ff7000b10dc8b3a5727"}, - {url = "https://files.pythonhosted.org/packages/fd/8a/db55250ad0b536901173d737781e3b5a7cc7063c46b232c2e3a82a33c032/wrapt-1.15.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cdb4f085756c96a3af04e6eca7f08b1345e94b53af8921b25c72f096e704e145"}, - {url = "https://files.pythonhosted.org/packages/ff/f6/c044dec6bec4ce64fbc92614c5238dd432780b06293d2efbcab1a349629c/wrapt-1.15.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:b02f21c1e2074943312d03d243ac4388319f2456576b2c6023041c4d57cd7019"}, +version = "4.10.0" +requires_python = ">=3.8" +summary = "Backported and Experimental Type Hints for Python 3.8+" +files = [ + {file = "typing_extensions-4.10.0-py3-none-any.whl", hash = "sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475"}, + {file = "typing_extensions-4.10.0.tar.gz", hash = "sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb"}, ] diff --git a/pyproject.toml b/pyproject.toml index 993ed7b..c1855d7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ description = "A Python management solution for C++ dependencies" name = "cppython" -license = "MIT" +license = {text = "MIT"} authors = [ {name = "Synodic Software", email = "contact@synodic.software"}, @@ -11,13 +11,13 @@ readme = "README.md" dynamic = ["version"] -requires-python = ">=3.11" +requires-python = ">=3.12" dependencies = [ "click>=8.1.3", - "tomlkit>=0.11.4", + "tomlkit>=0.12.4", "cppython-core>=0.4.1.dev19", - "pydantic>=2.0a4", + "pydantic>=2.6.3", "packaging>=21.3", ] @@ -28,18 +28,21 @@ paths = ["LICENSE.md"] homepage = "https://github.com/Synodic-Software/CPPython" repository = "https://github.com/Synodic-Software/CPPython" -[tool.pdm] -version = {use_scm = true} +[tool.pdm.options] +update = ["--update-all"] + +[tool.pdm.version] +source = "scm" [tool.pdm.dev-dependencies] lint = [ - "black>=22.6.0", - "pylint>=2.14.5", + "black>=24.2.0", + "pylint>=3.0.0", "isort>=5.10.1", - "mypy>=1.2", + "mypy>=1.9", ] test = [ - "pytest>=7.1.2", + "pytest>=8.0.2", "pytest-cov>=3.0.0", "pytest-click>=1.1", "pytest-mock>=3.8.2", @@ -74,7 +77,6 @@ skip_gitignore = true [tool.mypy] exclude = "__pypackages__" plugins = ["pydantic.mypy"] -show_error_codes = true strict = true [tool.pylint.MAIN] @@ -87,9 +89,6 @@ load-plugins = [ "pylint.extensions.bad_builtin", ] -[tool.pylint.typecheck] -ignored-classes = "FieldInfo" - [tool.pylint.format] max-line-length = "120" @@ -106,4 +105,3 @@ skip_empty = true [build-system] build-backend = "pdm.backend" requires = ["pdm.backend"] - diff --git a/tests/unit/test_project.py b/tests/unit/test_project.py index e505f18..73c4e56 100644 --- a/tests/unit/test_project.py +++ b/tests/unit/test_project.py @@ -1,22 +1,28 @@ """Tests the Project type""" - from pathlib import Path import tomlkit -from cppython_core.schema import ProjectConfiguration +from cppython_core.schema import ( + CPPythonLocalConfiguration, + PEP621Configuration, + ProjectConfiguration, + PyProject, + ToolData, +) from pytest import FixtureRequest from pytest_cppython.mock.interface import MockInterface from cppython.project import Project +pep621 = PEP621Configuration(name="test-project", version="0.1.0") + class TestProject: """Various tests for the project object""" - def test_default_construction(self, request: FixtureRequest) -> None: - """The project type should be constructable without pyproject.toml support. - The CPPython project uses a working pyproject.toml file, and this file is used as the test data + def test_self_construction(self, request: FixtureRequest) -> None: + """The project type should be constructable with this projects configuration Args: request: The pytest request fixture @@ -30,10 +36,52 @@ def test_default_construction(self, request: FixtureRequest) -> None: pyproject_data = tomlkit.loads(file.read_text(encoding="utf-8")) project = Project(project_configuration, interface, pyproject_data) - assert project + # Doesn't have the cppython table + assert not project.enabled + + def test_missing_tool_table(self, tmp_path: Path) -> None: + """The project type should be constructable without the tool table + + Args: + tmp_path: Temporary directory for dummy data + """ + + file_path = tmp_path / "pyproject.toml" + + with open(file_path, "a", encoding="utf8") as file: + file.write("") + + project_configuration = ProjectConfiguration(pyproject_file=file_path, version=None) + interface = MockInterface() + + pyproject = PyProject(project=pep621) + project = Project(project_configuration, interface, pyproject.model_dump(by_alias=True)) + + assert not project.enabled + + def test_missing_cppython_table(self, tmp_path: Path) -> None: + """The project type should be constructable without the cppython table + + Args: + tmp_path: Temporary directory for dummy data + """ + + file_path = tmp_path / "pyproject.toml" + + with open(file_path, "a", encoding="utf8") as file: + file.write("") + + project_configuration = ProjectConfiguration(pyproject_file=file_path, version=None) + interface = MockInterface() + + tool_data = ToolData() + pyproject = PyProject(project=pep621, tool=tool_data) + project = Project(project_configuration, interface, pyproject.model_dump(by_alias=True)) + + assert not project.enabled - def test_missing_project_table(self, tmp_path: Path) -> None: - """The project type should be constructable without the top level table + def test_default_cppython_table(self, tmp_path: Path) -> None: + """The project type should be constructable with the default cppython table Args: tmp_path: Temporary directory for dummy data @@ -47,6 +95,9 @@ def test_missing_project_table(self, tmp_path: Path) -> None: project_configuration = ProjectConfiguration(pyproject_file=file_path, version=None) interface = MockInterface() - project = Project(project_configuration, interface, {}) + cppython_config = CPPythonLocalConfiguration() + tool_data = ToolData(cppython=cppython_config) + pyproject = PyProject(project=pep621, tool=tool_data) + project = Project(project_configuration, interface, pyproject.model_dump(by_alias=True)) - assert project + assert project.enabled From f028bf58ba93c80cdb60031832818d273b32c6db Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Wed, 13 Mar 2024 17:39:34 -0400 Subject: [PATCH 08/68] Data Object After initialization, supports data queries and management --- cppython/builder.py | 102 ++++++++++++++++---------------------------- cppython/data.py | 56 ++++++++++++++++++++++++ cppython/project.py | 63 ++++++--------------------- 3 files changed, 106 insertions(+), 115 deletions(-) create mode 100644 cppython/data.py diff --git a/cppython/builder.py b/cppython/builder.py index c4ed91c..72a5394 100644 --- a/cppython/builder.py +++ b/cppython/builder.py @@ -1,7 +1,6 @@ """Everything needed to build a CPPython project""" import logging -from dataclasses import dataclass from importlib import metadata from inspect import getmodule from logging import Logger @@ -34,14 +33,7 @@ ProjectData, ) - -@dataclass -class Plugins: - """The plugin data for CPPython""" - - generator: Generator - provider: Provider - scm: SCM +from cppython.data import Data, Plugins class Builder: @@ -60,19 +52,7 @@ def __init__(self, project_configuration: ProjectConfiguration, logger: Logger) self.logger.info("Logging setup complete") - def generate_project_data(self, project_configuration: ProjectConfiguration) -> ProjectData: - """_summary_ - - Args: - project_configuration: _description_ - - Returns: - _description_ - """ - - return resolve_project_configuration(project_configuration) - - def generate_plugins( + def _generate_plugins( self, local_configuration: CPPythonLocalConfiguration, project_data: ProjectData ) -> PluginBuildData: """_summary_ @@ -85,30 +65,30 @@ def generate_plugins( _description_ """ - raw_generator_plugins = self.find_generators() - generator_plugins = self.filter_plugins( + raw_generator_plugins = self._find_generators() + generator_plugins = self._filter_plugins( raw_generator_plugins, local_configuration.generator_name, "Generator", ) - raw_provider_plugins = self.find_providers() - provider_plugins = self.filter_plugins( + raw_provider_plugins = self._find_providers() + provider_plugins = self._filter_plugins( raw_provider_plugins, local_configuration.provider_name, "Provider", ) - scm_plugins = self.find_source_managers() + scm_plugins = self._find_source_managers() - scm_type = self.select_scm(scm_plugins, project_data) + scm_type = self._select_scm(scm_plugins, project_data) # Solve the messy interactions between plugins - generator_type, provider_type = self.solve(generator_plugins, provider_plugins) + generator_type, provider_type = self._solve(generator_plugins, provider_plugins) return PluginBuildData(generator_type=generator_type, provider_type=provider_type, scm_type=scm_type) - def generate_cppython_plugin_data(self, plugin_build_data: PluginBuildData) -> PluginCPPythonData: + def _generate_cppython_plugin_data(self, plugin_build_data: PluginBuildData) -> PluginCPPythonData: """Generates the CPPython plugin data from the resolved plugins Args: @@ -124,7 +104,7 @@ def generate_cppython_plugin_data(self, plugin_build_data: PluginBuildData) -> P scm_name=plugin_build_data.scm_type.name(), ) - def generate_pep621_data( + def _generate_pep621_data( self, pep621_configuration: PEP621Configuration, project_configuration: ProjectConfiguration, scm: SCM | None ) -> PEP621Data: """_summary_ @@ -139,7 +119,7 @@ def generate_pep621_data( """ return resolve_pep621(pep621_configuration, project_configuration, scm) - def generate_core_data( + def _generate_core_data( self, project_data: ProjectData, local_configuration: CPPythonLocalConfiguration, @@ -165,7 +145,7 @@ def generate_core_data( return CoreData(project_data=project_data, cppython_data=cppython_data) - def resolve_global_config(self) -> CPPythonGlobalConfiguration: + def _resolve_global_config(self) -> CPPythonGlobalConfiguration: """Generates the global configuration object Returns: @@ -174,7 +154,7 @@ def resolve_global_config(self) -> CPPythonGlobalConfiguration: return CPPythonGlobalConfiguration() - def find_generators(self) -> list[type[Generator]]: + def _find_generators(self) -> list[type[Generator]]: """_summary_ Raises: @@ -204,7 +184,7 @@ def find_generators(self) -> list[type[Generator]]: return plugin_types - def find_providers(self) -> list[type[Provider]]: + def _find_providers(self) -> list[type[Provider]]: """_summary_ Raises: @@ -234,7 +214,7 @@ def find_providers(self) -> list[type[Provider]]: return plugin_types - def find_source_managers(self) -> list[type[SCM]]: + def _find_source_managers(self) -> list[type[SCM]]: """_summary_ Raises: @@ -264,7 +244,7 @@ def find_source_managers(self) -> list[type[SCM]]: return plugin_types - def filter_plugins[ + def _filter_plugins[ T: DataPlugin ](self, plugin_types: list[type[T]], pinned_name: str | None, group_name: str) -> list[type[T]]: """Finds and filters data plugins @@ -307,7 +287,7 @@ def filter_plugins[ return supported_types - def select_scm(self, scm_plugins: list[type[SCM]], project_data: ProjectData) -> type[SCM]: + def _select_scm(self, scm_plugins: list[type[SCM]], project_data: ProjectData) -> type[SCM]: """_summary_ Args: @@ -327,7 +307,7 @@ def select_scm(self, scm_plugins: list[type[SCM]], project_data: ProjectData) -> raise PluginError("No SCM plugin was found that supports the given path") - def solve( + def _solve( self, generator_types: list[type[Generator]], provider_types: list[type[Provider]] ) -> tuple[type[Generator], type[Provider]]: """_summary_ @@ -358,7 +338,7 @@ def solve( return combos[0] - def create_scm( + def _create_scm( self, core_data: CoreData, scm_type: type[SCM], @@ -367,9 +347,7 @@ def create_scm( Args: core_data: _description_ - - Raises: - PluginError: Ya + scm_type: _description_ Returns: _description_ @@ -382,7 +360,7 @@ def create_scm( return plugin - def create_generator( + def _create_generator( self, core_data: CoreData, pep621_data: PEP621Data, @@ -397,9 +375,6 @@ def create_generator( generator_configuration: The generator table of the CPPython configuration data generator_type: The plugin type - Raises: - PluginError: Raised if no viable generator plugin was found - Returns: The constructed generator """ @@ -421,7 +396,7 @@ def create_generator( return generator_type(generator_data, core_plugin_data, generator_configuration) - def create_provider( + def _create_provider( self, core_data: CoreData, pep621_data: PEP621Data, @@ -436,9 +411,6 @@ def create_provider( provider_configuration: The provider data table provider_type: The type to instantiate - Raises: - PluginError: Raised if no viable provider plugin was found - Returns: A constructed provider plugins """ @@ -460,9 +432,7 @@ def create_provider( return provider_type(provider_data, core_plugin_data, provider_configuration) - def build( - self, pep621_configuration: PEP621Configuration, local_configuration: CPPythonLocalConfiguration - ) -> Plugins: + def build(self, pep621_configuration: PEP621Configuration, local_configuration: CPPythonLocalConfiguration) -> Data: """_summary_ Args: @@ -473,27 +443,29 @@ def build( _description_ """ - project_data = self.generate_project_data(self.project_configuration) + project_data = resolve_project_configuration(self.project_configuration) - plugin_build_data = self.generate_plugins(local_configuration, project_data) - plugin_cppython_data = self.generate_cppython_plugin_data(plugin_build_data) + plugin_build_data = self._generate_plugins(local_configuration, project_data) + plugin_cppython_data = self._generate_cppython_plugin_data(plugin_build_data) - _core_data = self.generate_core_data( + core_data = self._generate_core_data( project_data, local_configuration, plugin_cppython_data, ) - scm = self.create_scm(_core_data, plugin_build_data.scm_type) + scm = self._create_scm(core_data, plugin_build_data.scm_type) - pep621_data = self.generate_pep621_data(pep621_configuration, self.project_configuration, scm) + pep621_data = self._generate_pep621_data(pep621_configuration, self.project_configuration, scm) # Create the chosen plugins - generator = self.create_generator( - _core_data, pep621_data, local_configuration.generator, plugin_build_data.generator_type + generator = self._create_generator( + core_data, pep621_data, local_configuration.generator, plugin_build_data.generator_type ) - provider = self.create_provider( - _core_data, pep621_data, local_configuration.provider, plugin_build_data.provider_type + provider = self._create_provider( + core_data, pep621_data, local_configuration.provider, plugin_build_data.provider_type ) - return Plugins(generator=generator, provider=provider, scm=scm) + plugins = Plugins(generator=generator, provider=provider, scm=scm) + + return Data(core_data, plugins, self.logger) diff --git a/cppython/data.py b/cppython/data.py new file mode 100644 index 0000000..41ea771 --- /dev/null +++ b/cppython/data.py @@ -0,0 +1,56 @@ +"""Contains and manages the project data""" + +from dataclasses import dataclass +from logging import Logger + +from cppython_core.exceptions import PluginError +from cppython_core.plugin_schema.generator import Generator +from cppython_core.plugin_schema.provider import Provider +from cppython_core.plugin_schema.scm import SCM +from cppython_core.schema import CoreData + + +@dataclass +class Plugins: + """The plugin data for CPPython""" + + generator: Generator + provider: Provider + scm: SCM + + +class Data: + """_summary_""" + + def __init__(self, core_data: CoreData, plugins: Plugins, logger: Logger) -> None: + self._core_data = core_data + self._plugins = plugins + self.logger = logger + + @property + def plugins(self) -> Plugins: + """The plugin data for CPPython""" + return self._plugins + + def sync(self) -> None: + """Gathers sync information from providers and passes it to the generator + + Raises: + PluginError: Plugin error + """ + + if (sync_data := self.plugins.provider.sync_data(self.plugins.generator)) is None: + raise PluginError("The provider doesn't support the generator") + + self.plugins.generator.sync(sync_data) + + async def download_provider_tools(self) -> None: + """Download the provider tooling if required""" + base_path = self._core_data.cppython_data.install_path + + path = base_path / self.plugins.provider.name() + + path.mkdir(parents=True, exist_ok=True) + + self.logger.warning("Downloading the %s requirements to %s", self.plugins.provider.name(), path) + await self.plugins.provider.download_tooling(path) diff --git a/cppython/project.py b/cppython/project.py index a85acff..f4e7d3a 100644 --- a/cppython/project.py +++ b/cppython/project.py @@ -4,9 +4,9 @@ import logging from typing import Any -from cppython_core.exceptions import ConfigException, PluginError +from cppython_core.exceptions import ConfigException from cppython_core.resolution import resolve_model -from cppython_core.schema import CoreData, Interface, ProjectConfiguration, PyProject +from cppython_core.schema import Interface, ProjectConfiguration, PyProject from cppython.builder import Builder from cppython.schema import API @@ -36,7 +36,7 @@ def __init__( self.logger.warning("The pyproject.toml file doesn't contain the `tool.cppython` table") return - self._plugins = builder.build(pyproject.project, pyproject.tool.cppython) + self._data = builder.build(pyproject.project, pyproject.tool.cppython) self._enabled = True @@ -51,43 +51,6 @@ def enabled(self) -> bool: """ return self._enabled - @property - def core_data(self) -> CoreData | None: - """Core data - - Returns: - Core data, if enabled - """ - return self._core_data if self._enabled else None - - async def download_provider_tools(self) -> None: - """Download the provider tooling if required""" - if not self._enabled: - self.logger.info("Skipping 'download_provider_tools' because the project is not enabled") - return - - base_path = self._core_data.cppython_data.install_path - - path = base_path / self._provider.name() - - path.mkdir(parents=True, exist_ok=True) - - self.logger.warning("Downloading the %s requirements to %s", self._provider.name(), path) - await self._provider.download_tooling(path) - - def sync(self) -> None: - """Gathers sync information from providers and passes it to the generator - - Raises: - PluginError: Plugin error - """ - - if (sync_data := self._provider.sync_data(self._generator)) is None: - raise PluginError("The provider doesn't support the generator") - - self._generator.sync(sync_data) - - # API Contract def install(self) -> None: """Installs project dependencies @@ -99,18 +62,18 @@ def install(self) -> None: return self.logger.info("Installing tools") - asyncio.run(self.download_provider_tools()) + asyncio.run(self._data.download_provider_tools()) self.logger.info("Installing project") - self.logger.info("Installing %s provider", self._provider.name()) + self.logger.info("Installing %s provider", self._data.plugins.provider.name()) try: - self._provider.install() + self._data.plugins.provider.install() except Exception as exception: - self.logger.error("Provider %s failed to install", self._provider.name()) + self.logger.error("Provider %s failed to install", self._data.plugins.provider.name()) raise exception - self.sync() + self._data.sync() def update(self) -> None: """Updates project dependencies @@ -123,15 +86,15 @@ def update(self) -> None: return self.logger.info("Updating tools") - asyncio.run(self.download_provider_tools()) + asyncio.run(self._data.download_provider_tools()) self.logger.info("Updating project") - self.logger.info("Updating %s provider", self._provider.name()) + self.logger.info("Updating %s provider", self._data.plugins.provider.name()) try: - self._provider.update() + self._data.plugins.provider.update() except Exception as exception: - self.logger.error("Provider %s failed to update", self._provider.name()) + self.logger.error("Provider %s failed to update", self._data.plugins.provider.name()) raise exception - self.sync() + self._data.sync() From 86810a84e0e400c0eb483fe5f29e1cdf827da63f Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Wed, 13 Mar 2024 17:39:47 -0400 Subject: [PATCH 09/68] Add Builder and Data Tests --- tests/unit/test_builder.py | 0 tests/unit/test_data.py | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/unit/test_builder.py create mode 100644 tests/unit/test_data.py diff --git a/tests/unit/test_builder.py b/tests/unit/test_builder.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/unit/test_data.py b/tests/unit/test_data.py new file mode 100644 index 0000000..e69de29 From e5e93eb7f46775edfb6557466c417292a1bb813e Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Wed, 13 Mar 2024 17:50:37 -0400 Subject: [PATCH 10/68] Resolver Object --- cppython/builder.py | 119 ++++++++++++++++++++++++-------------------- 1 file changed, 65 insertions(+), 54 deletions(-) diff --git a/cppython/builder.py b/cppython/builder.py index 72a5394..7f4a4a6 100644 --- a/cppython/builder.py +++ b/cppython/builder.py @@ -36,23 +36,15 @@ from cppython.data import Data, Plugins -class Builder: - """Helper class for building CPPython projects""" +class Resolver: + """The resolution of data sources for the builder""" def __init__(self, project_configuration: ProjectConfiguration, logger: Logger) -> None: - self.project_configuration = project_configuration - self.logger = logger - - # Default logging levels - levels = [logging.WARNING, logging.INFO, logging.DEBUG] - # Add default output stream - self.logger.addHandler(logging.StreamHandler()) - self.logger.setLevel(levels[project_configuration.verbosity]) - - self.logger.info("Logging setup complete") + self._project_configuration = project_configuration + self._logger = logger - def _generate_plugins( + def generate_plugins( self, local_configuration: CPPythonLocalConfiguration, project_data: ProjectData ) -> PluginBuildData: """_summary_ @@ -65,30 +57,30 @@ def _generate_plugins( _description_ """ - raw_generator_plugins = self._find_generators() - generator_plugins = self._filter_plugins( + raw_generator_plugins = self.find_generators() + generator_plugins = self.filter_plugins( raw_generator_plugins, local_configuration.generator_name, "Generator", ) - raw_provider_plugins = self._find_providers() - provider_plugins = self._filter_plugins( + raw_provider_plugins = self.find_providers() + provider_plugins = self.filter_plugins( raw_provider_plugins, local_configuration.provider_name, "Provider", ) - scm_plugins = self._find_source_managers() + scm_plugins = self.find_source_managers() - scm_type = self._select_scm(scm_plugins, project_data) + scm_type = self.select_scm(scm_plugins, project_data) # Solve the messy interactions between plugins - generator_type, provider_type = self._solve(generator_plugins, provider_plugins) + generator_type, provider_type = self.solve(generator_plugins, provider_plugins) return PluginBuildData(generator_type=generator_type, provider_type=provider_type, scm_type=scm_type) - def _generate_cppython_plugin_data(self, plugin_build_data: PluginBuildData) -> PluginCPPythonData: + def generate_cppython_plugin_data(self, plugin_build_data: PluginBuildData) -> PluginCPPythonData: """Generates the CPPython plugin data from the resolved plugins Args: @@ -104,7 +96,7 @@ def _generate_cppython_plugin_data(self, plugin_build_data: PluginBuildData) -> scm_name=plugin_build_data.scm_type.name(), ) - def _generate_pep621_data( + def generate_pep621_data( self, pep621_configuration: PEP621Configuration, project_configuration: ProjectConfiguration, scm: SCM | None ) -> PEP621Data: """_summary_ @@ -119,7 +111,7 @@ def _generate_pep621_data( """ return resolve_pep621(pep621_configuration, project_configuration, scm) - def _generate_core_data( + def generate_core_data( self, project_data: ProjectData, local_configuration: CPPythonLocalConfiguration, @@ -139,13 +131,13 @@ def _generate_core_data( The resolved core object """ - global_configuration = CPPythonGlobalConfiguration() + global_configuration = self.resolve_global_config() cppython_data = resolve_cppython(local_configuration, global_configuration, project_data, plugin_cppython_date) return CoreData(project_data=project_data, cppython_data=cppython_data) - def _resolve_global_config(self) -> CPPythonGlobalConfiguration: + def resolve_global_config(self) -> CPPythonGlobalConfiguration: """Generates the global configuration object Returns: @@ -154,7 +146,7 @@ def _resolve_global_config(self) -> CPPythonGlobalConfiguration: return CPPythonGlobalConfiguration() - def _find_generators(self) -> list[type[Generator]]: + def find_generators(self) -> list[type[Generator]]: """_summary_ Raises: @@ -171,12 +163,12 @@ def _find_generators(self) -> list[type[Generator]]: for entry_point in list(metadata.entry_points(group=f"cppython.{group_name}")): loaded_type = entry_point.load() if not issubclass(loaded_type, Generator): - self.logger.warning( + self._logger.warning( f"Found incompatible plugin. The '{loaded_type.name()}' plugin must be an instance of" f" '{group_name}'" ) else: - self.logger.warning(f"{group_name} plugin found: {loaded_type.name()} from {getmodule(loaded_type)}") + self._logger.warning(f"{group_name} plugin found: {loaded_type.name()} from {getmodule(loaded_type)}") plugin_types.append(loaded_type) if not plugin_types: @@ -184,7 +176,7 @@ def _find_generators(self) -> list[type[Generator]]: return plugin_types - def _find_providers(self) -> list[type[Provider]]: + def find_providers(self) -> list[type[Provider]]: """_summary_ Raises: @@ -201,12 +193,12 @@ def _find_providers(self) -> list[type[Provider]]: for entry_point in list(metadata.entry_points(group=f"cppython.{group_name}")): loaded_type = entry_point.load() if not issubclass(loaded_type, Provider): - self.logger.warning( + self._logger.warning( f"Found incompatible plugin. The '{loaded_type.name()}' plugin must be an instance of" f" '{group_name}'" ) else: - self.logger.warning(f"{group_name} plugin found: {loaded_type.name()} from {getmodule(loaded_type)}") + self._logger.warning(f"{group_name} plugin found: {loaded_type.name()} from {getmodule(loaded_type)}") plugin_types.append(loaded_type) if not plugin_types: @@ -214,7 +206,7 @@ def _find_providers(self) -> list[type[Provider]]: return plugin_types - def _find_source_managers(self) -> list[type[SCM]]: + def find_source_managers(self) -> list[type[SCM]]: """_summary_ Raises: @@ -231,12 +223,12 @@ def _find_source_managers(self) -> list[type[SCM]]: for entry_point in list(metadata.entry_points(group=f"cppython.{group_name}")): loaded_type = entry_point.load() if not issubclass(loaded_type, SCM): - self.logger.warning( + self._logger.warning( f"Found incompatible plugin. The '{loaded_type.name()}' plugin must be an instance of" f" '{group_name}'" ) else: - self.logger.warning(f"{group_name} plugin found: {loaded_type.name()} from {getmodule(loaded_type)}") + self._logger.warning(f"{group_name} plugin found: {loaded_type.name()} from {getmodule(loaded_type)}") plugin_types.append(loaded_type) if not plugin_types: @@ -244,7 +236,7 @@ def _find_source_managers(self) -> list[type[SCM]]: return plugin_types - def _filter_plugins[ + def filter_plugins[ T: DataPlugin ](self, plugin_types: list[type[T]], pinned_name: str | None, group_name: str) -> list[type[T]]: """Finds and filters data plugins @@ -265,18 +257,18 @@ def _filter_plugins[ if pinned_name is not None: for loaded_type in plugin_types: if loaded_type.name() == pinned_name: - self.logger.warning( + self._logger.warning( f"Using {group_name} plugin: {loaded_type.name()} from {getmodule(loaded_type)}" ) return [loaded_type] - self.logger.warning(f"'{group_name}_name' was empty. Trying to deduce {group_name}s") + self._logger.warning(f"'{group_name}_name' was empty. Trying to deduce {group_name}s") supported_types: list[type[T]] = [] # Deduce types for loaded_type in plugin_types: - self.logger.warning( + self._logger.warning( f"A {group_name} plugin is supported: {loaded_type.name()} from {getmodule(loaded_type)}" ) supported_types.append(loaded_type) @@ -287,7 +279,7 @@ def _filter_plugins[ return supported_types - def _select_scm(self, scm_plugins: list[type[SCM]], project_data: ProjectData) -> type[SCM]: + def select_scm(self, scm_plugins: list[type[SCM]], project_data: ProjectData) -> type[SCM]: """_summary_ Args: @@ -307,7 +299,7 @@ def _select_scm(self, scm_plugins: list[type[SCM]], project_data: ProjectData) - raise PluginError("No SCM plugin was found that supports the given path") - def _solve( + def solve( self, generator_types: list[type[Generator]], provider_types: list[type[Provider]] ) -> tuple[type[Generator], type[Provider]]: """_summary_ @@ -338,7 +330,7 @@ def _solve( return combos[0] - def _create_scm( + def create_scm( self, core_data: CoreData, scm_type: type[SCM], @@ -360,7 +352,7 @@ def _create_scm( return plugin - def _create_generator( + def create_generator( self, core_data: CoreData, pep621_data: PEP621Data, @@ -384,7 +376,7 @@ def _create_generator( generator_data = resolve_generator(core_data.project_data, cppython_plugin_data) if not generator_configuration: - self.logger.error( + self._logger.error( "The pyproject.toml table 'tool.cppython.generator' does not exist. Sending generator empty data", ) @@ -396,7 +388,7 @@ def _create_generator( return generator_type(generator_data, core_plugin_data, generator_configuration) - def _create_provider( + def create_provider( self, core_data: CoreData, pep621_data: PEP621Data, @@ -420,7 +412,7 @@ def _create_provider( provider_data = resolve_provider(core_data.project_data, cppython_plugin_data) if not provider_configuration: - self.logger.error( + self._logger.error( "The pyproject.toml table 'tool.cppython.provider' does not exist. Sending provider empty data", ) @@ -432,6 +424,25 @@ def _create_provider( return provider_type(provider_data, core_plugin_data, provider_configuration) + +class Builder: + """Helper class for building CPPython projects""" + + def __init__(self, project_configuration: ProjectConfiguration, logger: Logger) -> None: + self._project_configuration = project_configuration + self._logger = logger + + # Default logging levels + levels = [logging.WARNING, logging.INFO, logging.DEBUG] + + # Add default output stream + self._logger.addHandler(logging.StreamHandler()) + self._logger.setLevel(levels[project_configuration.verbosity]) + + self._logger.info("Logging setup complete") + + self._resolver = Resolver(self._project_configuration, self._logger) + def build(self, pep621_configuration: PEP621Configuration, local_configuration: CPPythonLocalConfiguration) -> Data: """_summary_ @@ -443,29 +454,29 @@ def build(self, pep621_configuration: PEP621Configuration, local_configuration: _description_ """ - project_data = resolve_project_configuration(self.project_configuration) + project_data = resolve_project_configuration(self._project_configuration) - plugin_build_data = self._generate_plugins(local_configuration, project_data) - plugin_cppython_data = self._generate_cppython_plugin_data(plugin_build_data) + plugin_build_data = self._resolver.generate_plugins(local_configuration, project_data) + plugin_cppython_data = self._resolver.generate_cppython_plugin_data(plugin_build_data) - core_data = self._generate_core_data( + core_data = self._resolver.generate_core_data( project_data, local_configuration, plugin_cppython_data, ) - scm = self._create_scm(core_data, plugin_build_data.scm_type) + scm = self._resolver.create_scm(core_data, plugin_build_data.scm_type) - pep621_data = self._generate_pep621_data(pep621_configuration, self.project_configuration, scm) + pep621_data = self._resolver.generate_pep621_data(pep621_configuration, self._project_configuration, scm) # Create the chosen plugins - generator = self._create_generator( + generator = self._resolver.create_generator( core_data, pep621_data, local_configuration.generator, plugin_build_data.generator_type ) - provider = self._create_provider( + provider = self._resolver.create_provider( core_data, pep621_data, local_configuration.provider, plugin_build_data.provider_type ) plugins = Plugins(generator=generator, provider=provider, scm=scm) - return Data(core_data, plugins, self.logger) + return Data(core_data, plugins, self._logger) From 0151142777004e182a98a4eebb79f6e5d63aca0c Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Wed, 13 Mar 2024 17:57:13 -0400 Subject: [PATCH 11/68] Update schema.py --- cppython/schema.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cppython/schema.py b/cppython/schema.py index 061b06e..2f43a0c 100644 --- a/cppython/schema.py +++ b/cppython/schema.py @@ -1,10 +1,10 @@ -"""Project schema specifications -""" +"""Project schema specifications""" from abc import abstractmethod +from typing import Protocol -class API: +class API(Protocol): """Project API specification""" @abstractmethod From 0a09ce0fa06f33b1aed9fbb228e99664fe2421a8 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Wed, 13 Mar 2024 18:07:00 -0400 Subject: [PATCH 12/68] Add Tests --- tests/unit/test_builder.py | 21 +++++++++++++++++++++ tests/unit/test_data.py | 11 +++++++++++ 2 files changed, 32 insertions(+) diff --git a/tests/unit/test_builder.py b/tests/unit/test_builder.py index e69de29..896c719 100644 --- a/tests/unit/test_builder.py +++ b/tests/unit/test_builder.py @@ -0,0 +1,21 @@ +"""Tests the Builder and Resolver types""" + +import pytest + +from cppython.builder import Builder, Resolver + + +class TestBuilder: + """Various tests for the Builder type""" + + def test_build(self) -> None: + """Verifies that the builder can build a project""" + pytest.fail("Test not implemented") + + +class TestResolver: + """Various tests for the Resolver type""" + + def test_generate_plugins(self) -> None: + """Verifies that the resolver can generate plugins""" + pytest.fail("Test not implemented") diff --git a/tests/unit/test_data.py b/tests/unit/test_data.py index e69de29..40b92fe 100644 --- a/tests/unit/test_data.py +++ b/tests/unit/test_data.py @@ -0,0 +1,11 @@ +"""Tests the Data type""" + +import pytest + + +class TestData: + """Various tests for the Data type""" + + def test_sync(self) -> None: + """Verifies that the data can be synchronized""" + pytest.fail("Test not implemented") From c2c5a172ab370d19dbd30a2fd180682b0487a9e2 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Thu, 14 Mar 2024 02:33:02 -0400 Subject: [PATCH 13/68] Remove Scaffolding Function --- cppython/builder.py | 36 +++++------------------------------- pdm.lock | 6 +++--- 2 files changed, 8 insertions(+), 34 deletions(-) diff --git a/cppython/builder.py b/cppython/builder.py index 7f4a4a6..271f241 100644 --- a/cppython/builder.py +++ b/cppython/builder.py @@ -111,32 +111,6 @@ def generate_pep621_data( """ return resolve_pep621(pep621_configuration, project_configuration, scm) - def generate_core_data( - self, - project_data: ProjectData, - local_configuration: CPPythonLocalConfiguration, - plugin_cppython_date: PluginCPPythonData, - ) -> CoreData: - """Parses and returns resolved data from all configuration sources - - Args: - project_data: Project data - local_configuration: TODO - plugin_cppython_date: TODO - - Raises: - ConfigError: Raised if data cannot be parsed - - Returns: - The resolved core object - """ - - global_configuration = self.resolve_global_config() - - cppython_data = resolve_cppython(local_configuration, global_configuration, project_data, plugin_cppython_date) - - return CoreData(project_data=project_data, cppython_data=cppython_data) - def resolve_global_config(self) -> CPPythonGlobalConfiguration: """Generates the global configuration object @@ -459,11 +433,11 @@ def build(self, pep621_configuration: PEP621Configuration, local_configuration: plugin_build_data = self._resolver.generate_plugins(local_configuration, project_data) plugin_cppython_data = self._resolver.generate_cppython_plugin_data(plugin_build_data) - core_data = self._resolver.generate_core_data( - project_data, - local_configuration, - plugin_cppython_data, - ) + global_configuration = self._resolver.resolve_global_config() + + cppython_data = resolve_cppython(local_configuration, global_configuration, project_data, plugin_cppython_data) + + core_data = CoreData(project_data=project_data, cppython_data=cppython_data) scm = self._resolver.create_scm(core_data, plugin_build_data.scm_type) diff --git a/pdm.lock b/pdm.lock index 6e8466d..1da143f 100644 --- a/pdm.lock +++ b/pdm.lock @@ -117,7 +117,7 @@ files = [ [[package]] name = "cppython-core" -version = "0.7.1.dev12" +version = "0.7.1.dev14" requires_python = ">=3.12" summary = "Data definitions for CPPython" dependencies = [ @@ -125,8 +125,8 @@ dependencies = [ "synodic-utilities>=0.1.1.dev3", ] files = [ - {file = "cppython_core-0.7.1.dev12-py3-none-any.whl", hash = "sha256:3b6e047874f3c7294c215b344a89147445bda4aecfa81564260cd944ee147551"}, - {file = "cppython_core-0.7.1.dev12.tar.gz", hash = "sha256:1bd3cc2c6bbcadd71dd565a27713f4ff38b3d3c790485ce424b14d4d18081e53"}, + {file = "cppython_core-0.7.1.dev14-py3-none-any.whl", hash = "sha256:dc3f8a27b9f02ef3c11a113ed5f1d836c744170863cdaf62721b99ed65366307"}, + {file = "cppython_core-0.7.1.dev14.tar.gz", hash = "sha256:87673de19b7998480aceee5ef7a4bc112dfaf5c349a4d76b0ac547b8b9a925af"}, ] [[package]] From c02f5df909118f8a67f8f2b3a1ae9246e8ac31c4 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Thu, 14 Mar 2024 04:07:17 -0400 Subject: [PATCH 14/68] Implement Data And Builder Tests --- cppython/builder.py | 30 ++++++++++++++------- tests/unit/test_builder.py | 50 ++++++++++++++++++++++++++++++----- tests/unit/test_data.py | 53 +++++++++++++++++++++++++++++++++++--- 3 files changed, 113 insertions(+), 20 deletions(-) diff --git a/cppython/builder.py b/cppython/builder.py index 271f241..59e8c17 100644 --- a/cppython/builder.py +++ b/cppython/builder.py @@ -45,12 +45,12 @@ def __init__(self, project_configuration: ProjectConfiguration, logger: Logger) self._logger = logger def generate_plugins( - self, local_configuration: CPPythonLocalConfiguration, project_data: ProjectData + self, cppython_local_configuration: CPPythonLocalConfiguration, project_data: ProjectData ) -> PluginBuildData: """_summary_ Args: - local_configuration: _description_ + cppython_local_configuration: _description_ project_data: _description_ Returns: @@ -60,14 +60,14 @@ def generate_plugins( raw_generator_plugins = self.find_generators() generator_plugins = self.filter_plugins( raw_generator_plugins, - local_configuration.generator_name, + cppython_local_configuration.generator_name, "Generator", ) raw_provider_plugins = self.find_providers() provider_plugins = self.filter_plugins( raw_provider_plugins, - local_configuration.provider_name, + cppython_local_configuration.provider_name, "Provider", ) @@ -417,12 +417,18 @@ def __init__(self, project_configuration: ProjectConfiguration, logger: Logger) self._resolver = Resolver(self._project_configuration, self._logger) - def build(self, pep621_configuration: PEP621Configuration, local_configuration: CPPythonLocalConfiguration) -> Data: + def build( + self, + pep621_configuration: PEP621Configuration, + cppython_local_configuration: CPPythonLocalConfiguration, + plugin_build_data: PluginBuildData | None = None, + ) -> Data: """_summary_ Args: pep621_configuration: _description_ - local_configuration: _description_ + cppython_local_configuration: _description_ + plugin_build_data: _description_ Returns: _description_ @@ -430,12 +436,16 @@ def build(self, pep621_configuration: PEP621Configuration, local_configuration: project_data = resolve_project_configuration(self._project_configuration) - plugin_build_data = self._resolver.generate_plugins(local_configuration, project_data) + if plugin_build_data is None: + plugin_build_data = self._resolver.generate_plugins(cppython_local_configuration, project_data) + plugin_cppython_data = self._resolver.generate_cppython_plugin_data(plugin_build_data) global_configuration = self._resolver.resolve_global_config() - cppython_data = resolve_cppython(local_configuration, global_configuration, project_data, plugin_cppython_data) + cppython_data = resolve_cppython( + cppython_local_configuration, global_configuration, project_data, plugin_cppython_data + ) core_data = CoreData(project_data=project_data, cppython_data=cppython_data) @@ -445,10 +455,10 @@ def build(self, pep621_configuration: PEP621Configuration, local_configuration: # Create the chosen plugins generator = self._resolver.create_generator( - core_data, pep621_data, local_configuration.generator, plugin_build_data.generator_type + core_data, pep621_data, cppython_local_configuration.generator, plugin_build_data.generator_type ) provider = self._resolver.create_provider( - core_data, pep621_data, local_configuration.provider, plugin_build_data.provider_type + core_data, pep621_data, cppython_local_configuration.provider, plugin_build_data.provider_type ) plugins = Plugins(generator=generator, provider=provider, scm=scm) diff --git a/tests/unit/test_builder.py b/tests/unit/test_builder.py index 896c719..2b4e4b8 100644 --- a/tests/unit/test_builder.py +++ b/tests/unit/test_builder.py @@ -1,6 +1,14 @@ """Tests the Builder and Resolver types""" -import pytest +import logging + +import pytest_cppython +from cppython_core.schema import ( + CPPythonLocalConfiguration, + PEP621Configuration, + ProjectConfiguration, + ProjectData, +) from cppython.builder import Builder, Resolver @@ -8,14 +16,42 @@ class TestBuilder: """Various tests for the Builder type""" - def test_build(self) -> None: - """Verifies that the builder can build a project""" - pytest.fail("Test not implemented") + def test_build( + self, + project_configuration: ProjectConfiguration, + pep621_configuration: PEP621Configuration, + cppython_local_configuration: CPPythonLocalConfiguration, + ) -> None: + """Verifies that the builder can build a project with all test variants + + Args: + project_configuration: Variant fixture for the project configuration + pep621_configuration: Variant fixture for PEP 621 configuration + cppython_local_configuration: Variant fixture for cppython configuration + """ + logger = logging.getLogger() + builder = Builder(project_configuration, logger) + + assert builder.build(pep621_configuration, cppython_local_configuration) class TestResolver: """Various tests for the Resolver type""" - def test_generate_plugins(self) -> None: - """Verifies that the resolver can generate plugins""" - pytest.fail("Test not implemented") + def test_generate_plugins( + self, + project_configuration: ProjectConfiguration, + cppython_local_configuration: CPPythonLocalConfiguration, + project_data: ProjectData, + ) -> None: + """Verifies that the resolver can generate plugins + + Args: + project_configuration: Variant fixture for the project configuration + cppython_local_configuration: Variant fixture for cppython configuration + project_data: Variant fixture for the project data + """ + logger = logging.getLogger() + resolver = Resolver(project_configuration, logger) + + assert resolver.generate_plugins(cppython_local_configuration, project_data) diff --git a/tests/unit/test_data.py b/tests/unit/test_data.py index 40b92fe..8539e9d 100644 --- a/tests/unit/test_data.py +++ b/tests/unit/test_data.py @@ -1,11 +1,58 @@ """Tests the Data type""" +import logging + import pytest +import pytest_cppython +from cppython_core.resolution import PluginBuildData +from cppython_core.schema import ( + CPPythonLocalConfiguration, + PEP621Configuration, + ProjectConfiguration, +) +from pytest_cppython.mock.generator import MockGenerator +from pytest_cppython.mock.provider import MockProvider +from pytest_cppython.mock.scm import MockSCM + +from cppython.builder import Builder +from cppython.data import Data class TestData: """Various tests for the Data type""" - def test_sync(self) -> None: - """Verifies that the data can be synchronized""" - pytest.fail("Test not implemented") + @pytest.fixture( + name="data", + scope="session", + ) + def fixture_data( + self, + project_configuration: ProjectConfiguration, + pep621_configuration: PEP621Configuration, + cppython_local_configuration: CPPythonLocalConfiguration, + ) -> Data: + """Creates a mock plugins fixture. We want all the plugins to use the same data variants at the same time, so we have to resolve data inside the fixture instead of using other data fixtures + + Args: + project_configuration: Variant fixture for the project configuration + pep621_configuration: Variant fixture for PEP 621 configuration + cppython_local_configuration: Variant fixture for cppython configuration + + Returns: + The mock plugins fixture + """ + + logger = logging.getLogger() + builder = Builder(project_configuration, logger) + + plugin_build_data = PluginBuildData(generator_type=MockGenerator, provider_type=MockProvider, scm_type=MockSCM) + + return builder.build(pep621_configuration, cppython_local_configuration, plugin_build_data) + + def test_sync(self, data: Data) -> None: + """Verifies that the sync method executes without error + + Args: + data: Fixture for the mocked data class + """ + data.sync() From 188b50d0377914a15e0c5d0b72d9b8f6ce12a17a Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Thu, 14 Mar 2024 04:42:03 -0400 Subject: [PATCH 15/68] Update pdm.lock --- pdm.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pdm.lock b/pdm.lock index 1da143f..ef06942 100644 --- a/pdm.lock +++ b/pdm.lock @@ -359,7 +359,7 @@ files = [ [[package]] name = "pytest-cppython" -version = "0.3.1.dev49" +version = "0.3.1.dev50" requires_python = ">=3.12" summary = "A pytest plugin that imports CPPython testing types" dependencies = [ @@ -370,8 +370,8 @@ dependencies = [ "pytest>=8.0.0", ] files = [ - {file = "pytest_cppython-0.3.1.dev49-py3-none-any.whl", hash = "sha256:99e61318c4af078d86529b8f7e16da24de8b31ea1eb2df4cf99a9c667ad88000"}, - {file = "pytest_cppython-0.3.1.dev49.tar.gz", hash = "sha256:d1a685c6cbfedcf9c6c17516c201026c7449918978b08afa935db38d0df28707"}, + {file = "pytest_cppython-0.3.1.dev50-py3-none-any.whl", hash = "sha256:1b22cce6af81dbd6e6c1e6f8e15654ad6b0149c3d38e1312e8be36324b17f88a"}, + {file = "pytest_cppython-0.3.1.dev50.tar.gz", hash = "sha256:c39ff9ee013af4c7e8b500d95eeb4e8dabc33099a9a8a9ab15139e328d8782c2"}, ] [[package]] From 2b93d6e8bd0643bd926f3b79602ad90e947d8205 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Thu, 14 Mar 2024 04:50:53 -0400 Subject: [PATCH 16/68] Comments --- cppython/builder.py | 76 ++++++++++++++++++++++----------------------- cppython/data.py | 4 +-- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/cppython/builder.py b/cppython/builder.py index 59e8c17..9b5bdb8 100644 --- a/cppython/builder.py +++ b/cppython/builder.py @@ -1,4 +1,4 @@ -"""Everything needed to build a CPPython project""" +"""Defines the data and routines for building a CPPython project type""" import logging from importlib import metadata @@ -47,14 +47,14 @@ def __init__(self, project_configuration: ProjectConfiguration, logger: Logger) def generate_plugins( self, cppython_local_configuration: CPPythonLocalConfiguration, project_data: ProjectData ) -> PluginBuildData: - """_summary_ + """Generates the plugin data from the local configuration and project data Args: - cppython_local_configuration: _description_ - project_data: _description_ + cppython_local_configuration: The local configuration + project_data: The project data Returns: - _description_ + The resolved plugin data """ raw_generator_plugins = self.find_generators() @@ -99,15 +99,15 @@ def generate_cppython_plugin_data(self, plugin_build_data: PluginBuildData) -> P def generate_pep621_data( self, pep621_configuration: PEP621Configuration, project_configuration: ProjectConfiguration, scm: SCM | None ) -> PEP621Data: - """_summary_ + """Generates the PEP621 data from configuration sources Args: - pep621_configuration: _description_ - project_configuration: _description_ - scm: _description_ + pep621_configuration: The PEP621 configuration + project_configuration: The project configuration + scm: The source control manager, if any Returns: - _description_ + The resolved PEP621 data """ return resolve_pep621(pep621_configuration, project_configuration, scm) @@ -121,13 +121,13 @@ def resolve_global_config(self) -> CPPythonGlobalConfiguration: return CPPythonGlobalConfiguration() def find_generators(self) -> list[type[Generator]]: - """_summary_ + """Extracts the generator plugins from the package's entry points Raises: - PluginError: _description_ + PluginError: Raised if no plugins can be found Returns: - _description_ + The list of generator plugin types """ group_name = "generator" @@ -151,13 +151,13 @@ def find_generators(self) -> list[type[Generator]]: return plugin_types def find_providers(self) -> list[type[Provider]]: - """_summary_ + """Extracts the provider plugins from the package's entry points Raises: - PluginError: _description_ + PluginError: Raised if no plugins can be found Returns: - _description_ + The list of provider plugin types """ group_name = "provider" @@ -181,13 +181,13 @@ def find_providers(self) -> list[type[Provider]]: return plugin_types def find_source_managers(self) -> list[type[SCM]]: - """_summary_ + """Extracts the source control manager plugins from the package's entry points Raises: - PluginError: _description_ + PluginError: Raised if no plugins can be found Returns: - _description_ + The list of source control manager plugin types """ group_name = "scm" @@ -254,17 +254,17 @@ def filter_plugins[ return supported_types def select_scm(self, scm_plugins: list[type[SCM]], project_data: ProjectData) -> type[SCM]: - """_summary_ + """Given data constraints, selects the SCM plugin to use Args: - scm_plugins: _description_ - project_data: _description_ + scm_plugins: The list of SCM plugin types + project_data: The project data Raises: - PluginError: _description_ + PluginError: Raised if no SCM plugin was found that supports the given data Returns: - _description_ + The selected SCM plugin type """ for scm_type in scm_plugins: @@ -276,17 +276,17 @@ def select_scm(self, scm_plugins: list[type[SCM]], project_data: ProjectData) -> def solve( self, generator_types: list[type[Generator]], provider_types: list[type[Provider]] ) -> tuple[type[Generator], type[Provider]]: - """_summary_ + """Selects the first generator and provider that can work together Args: - generator_types: _description_ - provider_types: _description_ + generator_types: The list of generator plugin types + provider_types: The list of provider plugin types Raises: - PluginError: _description_ + PluginError: Raised if no provider that supports a given generator could be deduced Returns: - _description_ + A tuple of the selected generator and provider plugin types """ combos: list[tuple[type[Generator], type[Provider]]] = [] @@ -309,14 +309,14 @@ def create_scm( core_data: CoreData, scm_type: type[SCM], ) -> SCM: - """_summary_ + """Creates a source control manager from input configuration Args: - core_data: _description_ - scm_type: _description_ + core_data: The resolved configuration data + scm_type: The plugin type Returns: - _description_ + The constructed source control manager """ cppython_plugin_data = resolve_cppython_plugin(core_data.cppython_data, scm_type) @@ -423,15 +423,15 @@ def build( cppython_local_configuration: CPPythonLocalConfiguration, plugin_build_data: PluginBuildData | None = None, ) -> Data: - """_summary_ + """Builds the project data Args: - pep621_configuration: _description_ - cppython_local_configuration: _description_ - plugin_build_data: _description_ + pep621_configuration: The PEP621 configuration + cppython_local_configuration: The local configuration + plugin_build_data: Plugin override data. If it exists, the build will use the given types instead of resolving them Returns: - _description_ + The built data object """ project_data = resolve_project_configuration(self._project_configuration) diff --git a/cppython/data.py b/cppython/data.py index 41ea771..ad24718 100644 --- a/cppython/data.py +++ b/cppython/data.py @@ -1,4 +1,4 @@ -"""Contains and manages the project data""" +"""Defines the post-construction data management for CPPython""" from dataclasses import dataclass from logging import Logger @@ -20,7 +20,7 @@ class Plugins: class Data: - """_summary_""" + """Contains and manages the project data""" def __init__(self, core_data: CoreData, plugins: Plugins, logger: Logger) -> None: self._core_data = core_data From 794da47134f0647513181396b1e1c80bfb864841 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Sat, 17 Aug 2024 15:44:13 -0400 Subject: [PATCH 17/68] Lotso Stuff --- cppython/core/__init__.py | 1 + cppython/core/exceptions.py | 64 ++ cppython/core/plugin_schema/__init__.py | 1 + cppython/core/plugin_schema/generator.py | 69 ++ cppython/core/plugin_schema/provider.py | 87 ++ cppython/core/plugin_schema/scm.py | 59 ++ cppython/core/resolution.py | 279 +++++ cppython/core/schema.py | 336 ++++++ cppython/core/utility.py | 46 + cppython/utility/__init__.py | 0 cppython/utility/exception.py | 37 + cppython/utility/plugin.py | 36 + cppython/utility/py.typed | 0 cppython/utility/subprocess.py | 41 + cppython/utility/utility.py | 45 + pdm.lock | 970 ++++++++++-------- pyproject.toml | 225 ++-- tests/build/test_build/build.txt | 0 tests/data/test_folder/requirement.txt | 0 tests/integration/plugin_helper/__init__.py | 1 + .../plugin_helper/test_generator.py | 31 + .../plugin_helper/test_provider.py | 31 + tests/integration/plugin_helper/test_scm.py | 31 + tests/plugin_helper/__init__.py | 0 .../plugin_helper/data/default/pyproject.toml | 1 + tests/plugin_helper/mock/__init__.py | 0 tests/plugin_helper/mock/generator.py | 68 ++ tests/plugin_helper/mock/interface.py | 13 + tests/plugin_helper/mock/provider.py | 94 ++ tests/plugin_helper/mock/scm.py | 49 + tests/plugin_helper/plugin.py | 332 ++++++ tests/plugin_helper/py.typed | 0 tests/plugin_helper/shared.py | 455 ++++++++ tests/plugin_helper/tests.py | 99 ++ tests/plugin_helper/variants.py | 132 +++ tests/unit/core/__init__.py | 1 + tests/unit/core/test_plugin_schema.py | 115 +++ tests/unit/core/test_resolution.py | 164 +++ tests/unit/core/test_schema.py | 60 ++ tests/unit/plugin_helper/__init__.py | 1 + tests/unit/plugin_helper/test_fixtures.py | 42 + tests/unit/plugin_helper/test_generator.py | 31 + tests/unit/plugin_helper/test_provider.py | 46 + tests/unit/plugin_helper/test_scm.py | 31 + tests/unit/utility/__init__.py | 0 tests/unit/utility/test_plugin.py | 20 + tests/unit/utility/test_utility.py | 210 ++++ 47 files changed, 3815 insertions(+), 539 deletions(-) create mode 100644 cppython/core/__init__.py create mode 100644 cppython/core/exceptions.py create mode 100644 cppython/core/plugin_schema/__init__.py create mode 100644 cppython/core/plugin_schema/generator.py create mode 100644 cppython/core/plugin_schema/provider.py create mode 100644 cppython/core/plugin_schema/scm.py create mode 100644 cppython/core/resolution.py create mode 100644 cppython/core/schema.py create mode 100644 cppython/core/utility.py create mode 100644 cppython/utility/__init__.py create mode 100644 cppython/utility/exception.py create mode 100644 cppython/utility/plugin.py create mode 100644 cppython/utility/py.typed create mode 100644 cppython/utility/subprocess.py create mode 100644 cppython/utility/utility.py create mode 100644 tests/build/test_build/build.txt create mode 100644 tests/data/test_folder/requirement.txt create mode 100644 tests/integration/plugin_helper/__init__.py create mode 100644 tests/integration/plugin_helper/test_generator.py create mode 100644 tests/integration/plugin_helper/test_provider.py create mode 100644 tests/integration/plugin_helper/test_scm.py create mode 100644 tests/plugin_helper/__init__.py create mode 100644 tests/plugin_helper/data/default/pyproject.toml create mode 100644 tests/plugin_helper/mock/__init__.py create mode 100644 tests/plugin_helper/mock/generator.py create mode 100644 tests/plugin_helper/mock/interface.py create mode 100644 tests/plugin_helper/mock/provider.py create mode 100644 tests/plugin_helper/mock/scm.py create mode 100644 tests/plugin_helper/plugin.py create mode 100644 tests/plugin_helper/py.typed create mode 100644 tests/plugin_helper/shared.py create mode 100644 tests/plugin_helper/tests.py create mode 100644 tests/plugin_helper/variants.py create mode 100644 tests/unit/core/__init__.py create mode 100644 tests/unit/core/test_plugin_schema.py create mode 100644 tests/unit/core/test_resolution.py create mode 100644 tests/unit/core/test_schema.py create mode 100644 tests/unit/plugin_helper/__init__.py create mode 100644 tests/unit/plugin_helper/test_fixtures.py create mode 100644 tests/unit/plugin_helper/test_generator.py create mode 100644 tests/unit/plugin_helper/test_provider.py create mode 100644 tests/unit/plugin_helper/test_scm.py create mode 100644 tests/unit/utility/__init__.py create mode 100644 tests/unit/utility/test_plugin.py create mode 100644 tests/unit/utility/test_utility.py diff --git a/cppython/core/__init__.py b/cppython/core/__init__.py new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/cppython/core/__init__.py @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/cppython/core/exceptions.py b/cppython/core/exceptions.py new file mode 100644 index 0000000..cd88e2b --- /dev/null +++ b/cppython/core/exceptions.py @@ -0,0 +1,64 @@ +"""Custom exceptions used by CPPython""" + +from pydantic import BaseModel + + +class ConfigError(BaseModel): + """Data for ConfigError""" + + message: str + + +class ConfigException(ValueError): + """Raised when there is a configuration error""" + + def __init__(self, message: str, errors: list[ConfigError]): + + super().__init__(message) + self._errors = errors + + @property + def error_count(self) -> int: + """The number of configuration errors associated with this exception""" + return len(self._errors) + + @property + def errors(self) -> list[ConfigError]: + """The list of configuration errors""" + return self._errors + + +class PluginError(Exception): + """Raised when there is a plugin error""" + + def __init__(self, error: str) -> None: + self._error = error + + super().__init__(error) + + @property + def error(self) -> str: + """Returns the underlying error + + Returns: + str -- The underlying error + """ + return self._error + + +class NotSupportedError(Exception): + """Raised when something is not supported""" + + def __init__(self, error: str) -> None: + self._error = error + + super().__init__(error) + + @property + def error(self) -> str: + """Returns the underlying error + + Returns: + str -- The underlying error + """ + return self._error diff --git a/cppython/core/plugin_schema/__init__.py b/cppython/core/plugin_schema/__init__.py new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/cppython/core/plugin_schema/__init__.py @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/cppython/core/plugin_schema/generator.py b/cppython/core/plugin_schema/generator.py new file mode 100644 index 0000000..1f6f293 --- /dev/null +++ b/cppython/core/plugin_schema/generator.py @@ -0,0 +1,69 @@ +"""Generator data plugin definitions""" + +from abc import abstractmethod +from typing import Any, Protocol, runtime_checkable + +from pydantic.types import DirectoryPath + +from cppython_core.schema import ( + CorePluginData, + DataPlugin, + DataPluginGroupData, + SupportedDataFeatures, + SyncData, +) + + +class GeneratorPluginGroupData(DataPluginGroupData): + """Base class for the configuration data that is set by the project for the generator""" + + +class SupportedGeneratorFeatures(SupportedDataFeatures): + """Generator plugin feature support""" + + +class SyncConsumer(Protocol): + """Interface for consuming synchronization data from providers""" + + @staticmethod + @abstractmethod + def sync_types() -> list[type[SyncData]]: + """Broadcasts supported types + + Returns: + A list of synchronization types that are supported + """ + raise NotImplementedError + + @abstractmethod + def sync(self, sync_data: SyncData) -> None: + """Synchronizes generator files and state with the providers input + + Args: + sync_data: The input data to sync with + """ + raise NotImplementedError + + +@runtime_checkable +class Generator(DataPlugin, SyncConsumer, Protocol): + """Abstract type to be inherited by CPPython Generator plugins""" + + @abstractmethod + def __init__( + self, group_data: GeneratorPluginGroupData, core_data: CorePluginData, configuration_data: dict[str, Any] + ) -> None: + raise NotImplementedError + + @staticmethod + @abstractmethod + def features(directory: DirectoryPath) -> SupportedGeneratorFeatures: + """Broadcasts the shared features of the generator plugin to CPPython + + Args: + directory: The root directory where features are evaluated + + Returns: + The supported features + """ + raise NotImplementedError diff --git a/cppython/core/plugin_schema/provider.py b/cppython/core/plugin_schema/provider.py new file mode 100644 index 0000000..7da2aa0 --- /dev/null +++ b/cppython/core/plugin_schema/provider.py @@ -0,0 +1,87 @@ +"""Provider data plugin definitions""" + +from abc import abstractmethod +from typing import Any, Protocol, runtime_checkable + +from pydantic.types import DirectoryPath + +from cppython_core.plugin_schema.generator import SyncConsumer +from cppython_core.schema import ( + CorePluginData, + DataPlugin, + DataPluginGroupData, + SupportedDataFeatures, + SyncData, +) + + +class ProviderPluginGroupData(DataPluginGroupData): + """Base class for the configuration data that is set by the project for the provider""" + + +class SupportedProviderFeatures(SupportedDataFeatures): + """Provider plugin feature support""" + + +class SyncProducer(Protocol): + """Interface for producing synchronization data with generators""" + + @staticmethod + @abstractmethod + def supported_sync_type(sync_type: type[SyncData]) -> bool: + """Queries for support for a given synchronization type + + Args: + sync_type: The type to query support for + + Returns: + Support + """ + raise NotImplementedError + + @abstractmethod + def sync_data(self, consumer: SyncConsumer) -> SyncData | None: + """Requests generator information from the provider. The generator is either defined by a provider specific file + or the CPPython configuration table + + Args: + consumer: The consumer + + Returns: + An instantiated data type, or None if no instantiation is made + """ + raise NotImplementedError + + +@runtime_checkable +class Provider(DataPlugin, SyncProducer, Protocol): + """Abstract type to be inherited by CPPython Provider plugins""" + + @abstractmethod + def __init__( + self, group_data: ProviderPluginGroupData, core_data: CorePluginData, configuration_data: dict[str, Any] + ) -> None: + raise NotImplementedError + + @staticmethod + @abstractmethod + def features(directory: DirectoryPath) -> SupportedProviderFeatures: + """Broadcasts the shared features of the Provider plugin to CPPython + + Args: + directory: The root directory where features are evaluated + + Returns: + The supported features + """ + raise NotImplementedError + + @abstractmethod + def install(self) -> None: + """Called when dependencies need to be installed from a lock file.""" + raise NotImplementedError + + @abstractmethod + def update(self) -> None: + """Called when dependencies need to be updated and written to the lock file.""" + raise NotImplementedError diff --git a/cppython/core/plugin_schema/scm.py b/cppython/core/plugin_schema/scm.py new file mode 100644 index 0000000..503e0f1 --- /dev/null +++ b/cppython/core/plugin_schema/scm.py @@ -0,0 +1,59 @@ +"""Version control data plugin definitions""" + +from abc import abstractmethod +from typing import Protocol, runtime_checkable + +from pydantic import DirectoryPath, Field + +from cppython_core.schema import Plugin, PluginGroupData, SupportedFeatures + + +class SCMPluginGroupData(PluginGroupData): + """SCM plugin input data""" + + +class SupportedSCMFeatures(SupportedFeatures): + """SCM plugin feature support""" + + repository: bool = Field(description="True if the directory is a repository for the SCM. False, otherwise") + + +@runtime_checkable +class SCM(Plugin, Protocol): + """Base class for version control systems""" + + @abstractmethod + def __init__(self, group_data: SCMPluginGroupData) -> None: + raise NotImplementedError + + @staticmethod + @abstractmethod + def features(directory: DirectoryPath) -> SupportedSCMFeatures: + """Broadcasts the shared features of the SCM plugin to CPPython + + Args: + directory: The root directory where features are evaluated + + Returns: + The supported features + """ + raise NotImplementedError + + @abstractmethod + def version(self, directory: DirectoryPath) -> str: + """Extracts the system's version metadata + + Args: + directory: The input directory + + Returns: + A version string + """ + raise NotImplementedError + + def description(self) -> str | None: + """Requests extraction of the project description + + Returns: + Returns the project description, or none if unavailable + """ diff --git a/cppython/core/resolution.py b/cppython/core/resolution.py new file mode 100644 index 0000000..f2c7c4c --- /dev/null +++ b/cppython/core/resolution.py @@ -0,0 +1,279 @@ +"""Data conversion routines""" + +from pathlib import Path +from typing import Any, cast + +from pydantic import BaseModel, DirectoryPath, ValidationError +from synodic_utilities.utility import TypeName + +from cppython_core.exceptions import ConfigError, ConfigException +from cppython_core.plugin_schema.generator import Generator, GeneratorPluginGroupData +from cppython_core.plugin_schema.provider import Provider, ProviderPluginGroupData +from cppython_core.plugin_schema.scm import SCM, SCMPluginGroupData +from cppython_core.schema import ( + CoreData, + CPPythonData, + CPPythonGlobalConfiguration, + CPPythonLocalConfiguration, + CPPythonModel, + CPPythonPluginData, + PEP621Configuration, + PEP621Data, + Plugin, + ProjectConfiguration, + ProjectData, +) + + +def resolve_project_configuration(project_configuration: ProjectConfiguration) -> ProjectData: + """Creates a resolved type + + Args: + project_configuration: Input configuration + + Returns: + The resolved data + """ + return ProjectData(pyproject_file=project_configuration.pyproject_file, verbosity=project_configuration.verbosity) + + +def resolve_pep621( + pep621_configuration: PEP621Configuration, project_configuration: ProjectConfiguration, scm: SCM | None +) -> PEP621Data: + """Creates a resolved type + + Args: + pep621_configuration: Input PEP621 configuration + project_configuration: The input configuration used to aid the resolve + scm: SCM + + Raises: + ConfigError: Raised when the tooling did not satisfy the configuration request + ValueError: Raised if there is a broken schema + + Returns: + The resolved type + """ + + # Update the dynamic version + if "version" in pep621_configuration.dynamic: + if project_configuration.version is not None: + modified_version = project_configuration.version + elif scm is not None: + modified_version = scm.version(project_configuration.pyproject_file.parent) + else: + raise ValueError("Version can't be resolved. No SCM") + + elif pep621_configuration.version is not None: + modified_version = pep621_configuration.version + + else: + raise ValueError("Version can't be resolved. Schema error") + + pep621_data = PEP621Data( + name=pep621_configuration.name, version=modified_version, description=pep621_configuration.description + ) + return pep621_data + + +class PluginBuildData(CPPythonModel): + """Data needed to construct CoreData""" + + generator_type: type[Generator] + provider_type: type[Provider] + scm_type: type[SCM] + + +class PluginCPPythonData(CPPythonModel): + """Plugin data needed to construct CPPythonData""" + + generator_name: TypeName + provider_name: TypeName + scm_name: TypeName + + +def resolve_cppython( + local_configuration: CPPythonLocalConfiguration, + global_configuration: CPPythonGlobalConfiguration, + project_data: ProjectData, + plugin_build_data: PluginCPPythonData, +) -> CPPythonData: + """Creates a copy and resolves dynamic attributes + + Args: + local_configuration: Local project configuration + global_configuration: Shared project configuration + project_data: Project information to aid in the resolution + plugin_build_data: Plugin build data + + Raises: + ConfigError: Raised when the tooling did not satisfy the configuration request + + Returns: + An instance of the resolved type + """ + + root_directory = project_data.pyproject_file.parent.absolute() + + # Add the base path to all relative paths + modified_install_path = local_configuration.install_path + + if not modified_install_path.is_absolute(): + modified_install_path = root_directory / modified_install_path + + modified_tool_path = local_configuration.tool_path + + if not modified_tool_path.is_absolute(): + modified_tool_path = root_directory / modified_tool_path + + modified_build_path = local_configuration.build_path + + if not modified_build_path.is_absolute(): + modified_build_path = root_directory / modified_build_path + + # Create directories if they do not exist + modified_install_path.mkdir(parents=True, exist_ok=True) + modified_tool_path.mkdir(parents=True, exist_ok=True) + modified_build_path.mkdir(parents=True, exist_ok=True) + + modified_provider_name = local_configuration.provider_name + modified_generator_name = local_configuration.generator_name + + if modified_provider_name is None: + modified_provider_name = plugin_build_data.provider_name + + if modified_generator_name is None: + modified_generator_name = plugin_build_data.generator_name + + modified_scm_name = plugin_build_data.scm_name + + cppython_data = CPPythonData( + install_path=modified_install_path, + tool_path=modified_tool_path, + build_path=modified_build_path, + current_check=global_configuration.current_check, + provider_name=modified_provider_name, + generator_name=modified_generator_name, + scm_name=modified_scm_name, + ) + return cppython_data + + +def resolve_cppython_plugin(cppython_data: CPPythonData, plugin_type: type[Plugin]) -> CPPythonPluginData: + """Resolve project configuration for plugins + + Args: + cppython_data: The CPPython data + plugin_type: The plugin type + + Returns: + The resolved type with plugin specific modifications + """ + + # Add plugin specific paths to the base path + modified_install_path = cppython_data.install_path / plugin_type.name() + modified_install_path.mkdir(parents=True, exist_ok=True) + + plugin_data = CPPythonData( + install_path=modified_install_path, + tool_path=cppython_data.tool_path, + build_path=cppython_data.build_path, + current_check=cppython_data.current_check, + provider_name=cppython_data.provider_name, + generator_name=cppython_data.generator_name, + scm_name=cppython_data.scm_name, + ) + + return cast(CPPythonPluginData, plugin_data) + + +def _write_tool_directory(cppython_data: CPPythonData, directory: Path) -> DirectoryPath: + """Creates directories following a certain format + + Args: + core_data: The core data + plugin_path: The relative plugin path to use + + Returns: + The written path + """ + + plugin_directory = cppython_data.tool_path / "cppython" / directory + plugin_directory.mkdir(parents=True, exist_ok=True) + + return plugin_directory + + +def resolve_generator(project_data: ProjectData, cppython_data: CPPythonPluginData) -> GeneratorPluginGroupData: + """Creates an instance from the given project + + Args: + project_data: The input project data + cppython_data: The input cppython data + + Returns: + The plugin specific configuration + """ + + root_directory = project_data.pyproject_file.parent + tool_directory = _write_tool_directory(cppython_data, Path("generators") / cppython_data.generator_name) + configuration = GeneratorPluginGroupData(root_directory=root_directory, tool_directory=tool_directory) + return configuration + + +def resolve_provider(project_data: ProjectData, cppython_data: CPPythonPluginData) -> ProviderPluginGroupData: + """Creates an instance from the given project + + Args: + project_data: The input project data + cppython_data: The input cppython data + + Returns: + The plugin specific configuration + """ + + root_directory = project_data.pyproject_file.parent + tool_directory = _write_tool_directory(cppython_data, Path("providers") / cppython_data.provider_name) + configuration = ProviderPluginGroupData(root_directory=root_directory, tool_directory=tool_directory) + return configuration + + +def resolve_scm(project_data: ProjectData, cppython_data: CPPythonPluginData) -> SCMPluginGroupData: + """Creates an instance from the given project + + Args: + project_data: The input project data + cppython_data: The input cppython data + + Returns: + The plugin specific configuration + """ + + root_directory = project_data.pyproject_file.parent + tool_directory = _write_tool_directory(cppython_data, Path("managers") / cppython_data.scm_name) + configuration = SCMPluginGroupData(root_directory=root_directory, tool_directory=tool_directory) + return configuration + + +def resolve_model[T: BaseModel](model: type[T], data: dict[str, Any]) -> T: + """Wraps the model validation and conversion + + Args: + model: The model to create + data: The input data to create the model from + + Raises: + ConfigException: Raised when the input does not satisfy the given schema + + Returns: + The instance of the model + """ + + try: + # BaseModel is setup to ignore extra fields + return model(**data) + except ValidationError as e: + new_errors: list[ConfigError] = [] + for error in e.errors(): + new_errors.append(ConfigError(message=error["msg"])) + raise ConfigException("The input project failed", new_errors) from e diff --git a/cppython/core/schema.py b/cppython/core/schema.py new file mode 100644 index 0000000..b702645 --- /dev/null +++ b/cppython/core/schema.py @@ -0,0 +1,336 @@ +"""Data types for CPPython that encapsulate the requirements between the plugins and the core library""" + +from abc import abstractmethod +from pathlib import Path +from typing import Any, NewType, Protocol + +from pydantic import BaseModel, Field, field_validator, model_validator +from pydantic.types import DirectoryPath, FilePath +from synodic_utilities.plugin import Plugin as SynodicPlugin +from synodic_utilities.utility import TypeName + + +class CPPythonModel(BaseModel): + """The base model to use for all CPPython models""" + + model_config = {"populate_by_name": False} + + +class ProjectData(CPPythonModel, extra="forbid"): + """Resolved data of 'ProjectConfiguration'""" + + pyproject_file: FilePath = Field(description="The path where the pyproject.toml exists") + verbosity: int = Field(default=0, description="The verbosity level as an integer [0,2]") + + +class ProjectConfiguration(CPPythonModel, extra="forbid"): + """Project-wide configuration""" + + pyproject_file: FilePath = Field(description="The path where the pyproject.toml exists") + version: str | None = Field( + description=( + "The version number a 'dynamic' project version will resolve to. If not provided a CPPython project will" + " initialize its SCM plugins to discover any available version" + ) + ) + verbosity: int = Field(default=0, description="The verbosity level as an integer [0,2]") + debug: bool = Field( + default=False, description="Debug mode. Additional processing will happen to expose more debug information" + ) + + @field_validator("verbosity") + @classmethod + def min_max(cls, value: int) -> int: + """Validator that clamps the input value + + Args: + value: Input to validate + + Returns: + The clamped input value + """ + return min(max(value, 0), 2) + + @field_validator("pyproject_file") + @classmethod + def pyproject_name(cls, value: FilePath) -> FilePath: + """Validator that verifies the name of the file + + Args: + value: Input to validate + + Raises: + ValueError: The given filepath is not named "pyproject.toml" + + Returns: + The file path + """ + + if value.name != "pyproject.toml": + raise ValueError('The given file is not named "pyproject.toml"') + + return value + + +class PEP621Data(CPPythonModel): + """Resolved PEP621Configuration data""" + + name: str + version: str + description: str + + +class PEP621Configuration(CPPythonModel): + """CPPython relevant PEP 621 conforming data + Because only the partial schema is used, we ignore 'extra' attributes + Schema: https://www.python.org/dev/peps/pep-0621/ + """ + + dynamic: list[str] = Field(default=[], description="https://peps.python.org/pep-0621/#dynamic") + name: str = Field(description="https://peps.python.org/pep-0621/#name") + version: str | None = Field(default=None, description="https://peps.python.org/pep-0621/#version") + description: str = Field(default="", description="https://peps.python.org/pep-0621/#description") + + @model_validator(mode="after") # type: ignore + @classmethod + def dynamic_data(cls, model: "PEP621Configuration") -> "PEP621Configuration": + """Validates that dynamic data is represented correctly + + Args: + model: The input model data + + Raises: + ValueError: If dynamic versioning is incorrect + + Returns: + The data + """ + + for field in model.model_fields.keys(): + if field == "dynamic": + continue + value = getattr(model, field) + if field not in model.dynamic: + if value is None: + raise ValueError(f"'{field}' is not a dynamic field. It must be defined") + else: + if value is not None: + raise ValueError(f"'{field}' is a dynamic field. It must not be defined") + + return model + + +def _default_install_location() -> Path: + return Path.home() / ".cppython" + + +class CPPythonData(CPPythonModel, extra="forbid"): + """Resolved CPPython data with local and global configuration""" + + install_path: DirectoryPath + tool_path: DirectoryPath + build_path: DirectoryPath + current_check: bool + provider_name: TypeName + generator_name: TypeName + scm_name: TypeName + + @field_validator("install_path", "tool_path", "build_path") + @classmethod + def validate_absolute_path(cls, value: DirectoryPath) -> DirectoryPath: + """Enforce the input is an absolute path + + Args: + value: The input value + + Raises: + ValueError: Raised if the input is not an absolute path + + Returns: + The validated input value + """ + if not value.is_absolute(): + raise ValueError("Absolute path required") + + return value + + +CPPythonPluginData = NewType("CPPythonPluginData", CPPythonData) + + +class SyncData(CPPythonModel): + """Data that passes in a plugin sync""" + + provider_name: TypeName + + +class SupportedFeatures(CPPythonModel): + """Plugin feature support""" + + initialization: bool = Field( + default=False, description="Whether the plugin supports initialization from an empty state" + ) + + +class Information(CPPythonModel): + """Plugin information that complements the packaged project metadata""" + + +class PluginGroupData(CPPythonModel, extra="forbid"): + """Plugin group data""" + + root_directory: DirectoryPath = Field(description="The directory of the project") + tool_directory: DirectoryPath = Field( + description=( + "Points to the project plugin directory within the tool directory. This directory is for project specific" + " cached data." + ) + ) + + +class Plugin(SynodicPlugin, Protocol): + """CPPython plugin""" + + @abstractmethod + def __init__(self, group_data: PluginGroupData) -> None: + raise NotImplementedError + + @staticmethod + @abstractmethod + def features(directory: DirectoryPath) -> SupportedFeatures: + """Broadcasts the shared features of the plugin to CPPython + + Args: + directory: The root directory where features are evaluated + + Returns: + The supported features + """ + raise NotImplementedError + + @staticmethod + @abstractmethod + def information() -> Information: + """Retrieves plugin information that complements the packaged project metadata + + Returns: + The plugin's information + """ + raise NotImplementedError + + +class DataPluginGroupData(PluginGroupData): + """Data plugin group data""" + + +class CorePluginData(CPPythonModel): + """Core resolved data that will be passed to data plugins""" + + project_data: ProjectData + pep621_data: PEP621Data + cppython_data: CPPythonPluginData + + +class SupportedDataFeatures(SupportedFeatures): + """Data plugin feature support""" + + +class DataPlugin(Plugin, Protocol): + """Abstract plugin type for internal CPPython data""" + + @abstractmethod + def __init__( + self, group_data: DataPluginGroupData, core_data: CorePluginData, configuration_data: dict[str, Any] + ) -> None: + raise NotImplementedError + + @staticmethod + @abstractmethod + def features(directory: DirectoryPath) -> SupportedDataFeatures: + """Broadcasts the shared features of the data plugin to CPPython + + Args: + directory: The root directory where features are evaluated + + Returns: + The supported features + """ + raise NotImplementedError + + @classmethod + async def download_tooling(cls, directory: DirectoryPath) -> None: + """Installs the external tooling required by the plugin. Should be overridden if required + + Args: + directory: The directory to download any extra tooling to + """ + + +class CPPythonGlobalConfiguration(CPPythonModel, extra="forbid"): + """Global data extracted by the tool""" + + current_check: bool = Field(default=True, alias="current-check", description="Checks for a new CPPython version") + + +ProviderData = NewType("ProviderData", dict[str, Any]) +GeneratorData = NewType("GeneratorData", dict[str, Any]) + + +class CPPythonLocalConfiguration(CPPythonModel, extra="forbid"): + """Data required by the tool""" + + install_path: Path = Field( + default=_default_install_location(), alias="install-path", description="The global install path for the project" + ) + tool_path: Path = Field( + default=Path("tool"), alias="tool-path", description="The local tooling path for the project" + ) + build_path: Path = Field( + default=Path("build"), alias="build-path", description="The local build path for the project" + ) + provider: ProviderData = Field( + default=ProviderData({}), description="Provider plugin data associated with 'provider_name" + ) + provider_name: TypeName | None = Field( + default=None, alias="provider-name", description="If empty, the provider will be automatically deduced." + ) + generator: GeneratorData = Field( + default=GeneratorData({}), description="Generator plugin data associated with 'generator_name'" + ) + generator_name: TypeName | None = Field( + default=None, alias="generator-name", description="If empty, the generator will be automatically deduced." + ) + + +class ToolData(CPPythonModel): + """Tool entry of pyproject.toml""" + + cppython: CPPythonLocalConfiguration | None = Field(description="CPPython tool data", default=None) + + +class PyProject(CPPythonModel): + """pyproject.toml schema""" + + project: PEP621Configuration = Field(description="PEP621: https://www.python.org/dev/peps/pep-0621/") + tool: ToolData | None = Field(description="Tool data", default=None) + + +class CoreData(CPPythonModel): + """Core resolved data that will be resolved""" + + project_data: ProjectData + cppython_data: CPPythonData + + +class Interface(Protocol): + """Type for interfaces to allow feedback from CPPython""" + + @abstractmethod + def write_pyproject(self) -> None: + """Called when CPPython requires the interface to write out pyproject.toml changes""" + raise NotImplementedError + + @abstractmethod + def write_configuration(self) -> None: + """Called when CPPython requires the interface to write out configuration changes""" + raise NotImplementedError diff --git a/cppython/core/utility.py b/cppython/core/utility.py new file mode 100644 index 0000000..1a19948 --- /dev/null +++ b/cppython/core/utility.py @@ -0,0 +1,46 @@ +"""Core Utilities""" + +import json +from pathlib import Path +from typing import Any + +from pydantic import BaseModel + + +def read_json(path: Path) -> Any: + """Reading routine + + Args: + path: The json file to read + + Returns: + The json data + """ + + with open(path, "r", encoding="utf-8") as file: + return json.load(file) + + +def write_model_json(path: Path, model: BaseModel) -> None: + """Writing routine. Only writes model data + + Args: + path: The json file to write + model: The model to write into a json + """ + + serialized = json.loads(model.json(exclude_none=True)) + with open(path, "w", encoding="utf8") as file: + json.dump(serialized, file, ensure_ascii=False, indent=4) + + +def write_json(path: Path, data: Any) -> None: + """Writing routine + + Args: + path: The json to write + data: The data to write into json + """ + + with open(path, "w", encoding="utf-8") as file: + json.dump(data, file, ensure_ascii=False, indent=4) diff --git a/cppython/utility/__init__.py b/cppython/utility/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/cppython/utility/exception.py b/cppython/utility/exception.py new file mode 100644 index 0000000..61002eb --- /dev/null +++ b/cppython/utility/exception.py @@ -0,0 +1,37 @@ +"""Exception definitions""" + + +class ProcessError(Exception): + """Raised when there is a configuration error""" + + def __init__(self, error: str) -> None: + self._error = error + + super().__init__(error) + + @property + def error(self) -> str: + """Returns the underlying error + + Returns: + str -- The underlying error + """ + return self._error + + +class PluginError(Exception): + """Raised when there is a plugin error""" + + def __init__(self, error: str) -> None: + self._error = error + + super().__init__(error) + + @property + def error(self) -> str: + """Returns the underlying error + + Returns: + str -- The underlying error + """ + return self._error diff --git a/cppython/utility/plugin.py b/cppython/utility/plugin.py new file mode 100644 index 0000000..26a265e --- /dev/null +++ b/cppython/utility/plugin.py @@ -0,0 +1,36 @@ +"""Defines the base plugin type and related types.""" + +from typing import Protocol + +from synodic_utilities.utility import TypeGroup, TypeID, TypeName, canonicalize_name + + +class Plugin(Protocol): + """A protocol for defining a plugin type""" + + @classmethod + def id(cls) -> TypeID: + """The type identifier for the plugin + + Returns: + The type identifier + """ + return canonicalize_name(cls.__name__) + + @classmethod + def name(cls) -> TypeName: + """The name of the plugin + + Returns: + The name + """ + return cls.id().name + + @classmethod + def group(cls) -> TypeGroup: + """The group of the plugin + + Returns: + The group + """ + return cls.id().group diff --git a/cppython/utility/py.typed b/cppython/utility/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/cppython/utility/subprocess.py b/cppython/utility/subprocess.py new file mode 100644 index 0000000..427c129 --- /dev/null +++ b/cppython/utility/subprocess.py @@ -0,0 +1,41 @@ +"""Subprocess definitions""" + +import logging +import subprocess +from pathlib import Path +from typing import Any + +from synodic_utilities.exception import ProcessError + + +def call( + arguments: list[str | Path], + logger: logging.Logger, + log_level: int = logging.WARNING, + suppress: bool = False, + **kwargs: Any, +) -> None: + """Executes a subprocess call with logger and utility attachments. Captures STDOUT and STDERR + + Args: + arguments: Arguments to pass to Popen + logger: The logger to log the process pipes to + log_level: The level to log to. Defaults to logging.WARNING. + suppress: Mutes logging output. Defaults to False. + kwargs: Keyword arguments to pass to subprocess.Popen + + Raises: + ProcessError: If the underlying process fails + """ + + with subprocess.Popen(arguments, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, **kwargs) as process: + if process.stdout is None: + return + + with process.stdout as pipe: + for line in iter(pipe.readline, ""): + if not suppress: + logger.log(log_level, line.rstrip()) + + if process.returncode != 0: + raise ProcessError("Subprocess task failed") diff --git a/cppython/utility/utility.py b/cppython/utility/utility.py new file mode 100644 index 0000000..a3634a9 --- /dev/null +++ b/cppython/utility/utility.py @@ -0,0 +1,45 @@ +"""Utility definitions""" + +import re +from typing import Any, NamedTuple, NewType + +TypeName = NewType("TypeName", str) +TypeGroup = NewType("TypeGroup", str) + + +class TypeID(NamedTuple): + """Represents a type ID with a name and group.""" + + name: TypeName + group: TypeGroup + + +_canonicalize_regex = re.compile(r"((?<=[a-z])[A-Z]|(? TypeID: + """Extracts the type identifier from an input string + + Args: + name: The string to parse + + Returns: + The type identifier + """ + + sub = re.sub(_canonicalize_regex, r" \1", name) + values = sub.split(" ") + result = "".join(values[:-1]) + return TypeID(TypeName(result.lower()), TypeGroup(values[-1].lower())) + + +def canonicalize_type(input_type: type[Any]) -> TypeID: + """Extracts the plugin identifier from a type + + Args: + input_type: The input type to resolve + + Returns: + The type identifier + """ + return canonicalize_name(input_type.__name__) diff --git a/pdm.lock b/pdm.lock index ef06942..8aa6fc8 100644 --- a/pdm.lock +++ b/pdm.lock @@ -1,432 +1,538 @@ -# This file is @generated by PDM. -# It is not intended for manual editing. - -[metadata] -groups = ["default", "lint", "test"] -strategy = ["cross_platform"] -lock_version = "4.4.1" -content_hash = "sha256:017552fe0fbb7c28de2016f00448dcb31947be6084adb54e69b470ee2eed83ba" - -[[package]] -name = "annotated-types" -version = "0.6.0" -requires_python = ">=3.8" -summary = "Reusable constraint types to use with typing.Annotated" -files = [ - {file = "annotated_types-0.6.0-py3-none-any.whl", hash = "sha256:0641064de18ba7a25dee8f96403ebc39113d0cb953a01429249d5c7564666a43"}, - {file = "annotated_types-0.6.0.tar.gz", hash = "sha256:563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d"}, -] - -[[package]] -name = "astroid" -version = "3.1.0" -requires_python = ">=3.8.0" -summary = "An abstract syntax tree for Python with inference support." -files = [ - {file = "astroid-3.1.0-py3-none-any.whl", hash = "sha256:951798f922990137ac090c53af473db7ab4e70c770e6d7fae0cec59f74411819"}, - {file = "astroid-3.1.0.tar.gz", hash = "sha256:ac248253bfa4bd924a0de213707e7ebeeb3138abeb48d798784ead1e56d419d4"}, -] - -[[package]] -name = "black" -version = "24.2.0" -requires_python = ">=3.8" -summary = "The uncompromising code formatter." -dependencies = [ - "click>=8.0.0", - "mypy-extensions>=0.4.3", - "packaging>=22.0", - "pathspec>=0.9.0", - "platformdirs>=2", -] -files = [ - {file = "black-24.2.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:d84f29eb3ee44859052073b7636533ec995bd0f64e2fb43aeceefc70090e752b"}, - {file = "black-24.2.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1e08fb9a15c914b81dd734ddd7fb10513016e5ce7e6704bdd5e1251ceee51ac9"}, - {file = "black-24.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:810d445ae6069ce64030c78ff6127cd9cd178a9ac3361435708b907d8a04c693"}, - {file = "black-24.2.0-cp312-cp312-win_amd64.whl", hash = "sha256:ba15742a13de85e9b8f3239c8f807723991fbfae24bad92d34a2b12e81904982"}, - {file = "black-24.2.0-py3-none-any.whl", hash = "sha256:e8a6ae970537e67830776488bca52000eaa37fa63b9988e8c487458d9cd5ace6"}, - {file = "black-24.2.0.tar.gz", hash = "sha256:bce4f25c27c3435e4dace4815bcb2008b87e167e3bf4ee47ccdc5ce906eb4894"}, -] - -[[package]] -name = "click" -version = "8.1.7" -requires_python = ">=3.7" -summary = "Composable command line interface toolkit" -dependencies = [ - "colorama; platform_system == \"Windows\"", -] -files = [ - {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, - {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, -] - -[[package]] -name = "colorama" -version = "0.4.6" -requires_python = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" -summary = "Cross-platform colored terminal text." -files = [ - {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, - {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, -] - -[[package]] -name = "coverage" -version = "7.4.3" -requires_python = ">=3.8" -summary = "Code coverage measurement for Python" -files = [ - {file = "coverage-7.4.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:b51bfc348925e92a9bd9b2e48dad13431b57011fd1038f08316e6bf1df107d10"}, - {file = "coverage-7.4.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d6cdecaedea1ea9e033d8adf6a0ab11107b49571bbb9737175444cea6eb72328"}, - {file = "coverage-7.4.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3b2eccb883368f9e972e216c7b4c7c06cabda925b5f06dde0650281cb7666a30"}, - {file = "coverage-7.4.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6c00cdc8fa4e50e1cc1f941a7f2e3e0f26cb2a1233c9696f26963ff58445bac7"}, - {file = "coverage-7.4.3-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b9a4a8dd3dcf4cbd3165737358e4d7dfbd9d59902ad11e3b15eebb6393b0446e"}, - {file = "coverage-7.4.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:062b0a75d9261e2f9c6d071753f7eef0fc9caf3a2c82d36d76667ba7b6470003"}, - {file = "coverage-7.4.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:ebe7c9e67a2d15fa97b77ea6571ce5e1e1f6b0db71d1d5e96f8d2bf134303c1d"}, - {file = "coverage-7.4.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:c0a120238dd71c68484f02562f6d446d736adcc6ca0993712289b102705a9a3a"}, - {file = "coverage-7.4.3-cp312-cp312-win32.whl", hash = "sha256:37389611ba54fd6d278fde86eb2c013c8e50232e38f5c68235d09d0a3f8aa352"}, - {file = "coverage-7.4.3-cp312-cp312-win_amd64.whl", hash = "sha256:d25b937a5d9ffa857d41be042b4238dd61db888533b53bc76dc082cb5a15e914"}, - {file = "coverage-7.4.3-pp38.pp39.pp310-none-any.whl", hash = "sha256:7cbde573904625509a3f37b6fecea974e363460b556a627c60dc2f47e2fffa51"}, - {file = "coverage-7.4.3.tar.gz", hash = "sha256:276f6077a5c61447a48d133ed13e759c09e62aff0dc84274a68dc18660104d52"}, -] - -[[package]] -name = "coverage" -version = "7.4.3" -extras = ["toml"] -requires_python = ">=3.8" -summary = "Code coverage measurement for Python" -dependencies = [ - "coverage==7.4.3", -] -files = [ - {file = "coverage-7.4.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:b51bfc348925e92a9bd9b2e48dad13431b57011fd1038f08316e6bf1df107d10"}, - {file = "coverage-7.4.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d6cdecaedea1ea9e033d8adf6a0ab11107b49571bbb9737175444cea6eb72328"}, - {file = "coverage-7.4.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3b2eccb883368f9e972e216c7b4c7c06cabda925b5f06dde0650281cb7666a30"}, - {file = "coverage-7.4.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6c00cdc8fa4e50e1cc1f941a7f2e3e0f26cb2a1233c9696f26963ff58445bac7"}, - {file = "coverage-7.4.3-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b9a4a8dd3dcf4cbd3165737358e4d7dfbd9d59902ad11e3b15eebb6393b0446e"}, - {file = "coverage-7.4.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:062b0a75d9261e2f9c6d071753f7eef0fc9caf3a2c82d36d76667ba7b6470003"}, - {file = "coverage-7.4.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:ebe7c9e67a2d15fa97b77ea6571ce5e1e1f6b0db71d1d5e96f8d2bf134303c1d"}, - {file = "coverage-7.4.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:c0a120238dd71c68484f02562f6d446d736adcc6ca0993712289b102705a9a3a"}, - {file = "coverage-7.4.3-cp312-cp312-win32.whl", hash = "sha256:37389611ba54fd6d278fde86eb2c013c8e50232e38f5c68235d09d0a3f8aa352"}, - {file = "coverage-7.4.3-cp312-cp312-win_amd64.whl", hash = "sha256:d25b937a5d9ffa857d41be042b4238dd61db888533b53bc76dc082cb5a15e914"}, - {file = "coverage-7.4.3-pp38.pp39.pp310-none-any.whl", hash = "sha256:7cbde573904625509a3f37b6fecea974e363460b556a627c60dc2f47e2fffa51"}, - {file = "coverage-7.4.3.tar.gz", hash = "sha256:276f6077a5c61447a48d133ed13e759c09e62aff0dc84274a68dc18660104d52"}, -] - -[[package]] -name = "cppython-core" -version = "0.7.1.dev14" -requires_python = ">=3.12" -summary = "Data definitions for CPPython" -dependencies = [ - "pydantic>=2.6.3", - "synodic-utilities>=0.1.1.dev3", -] -files = [ - {file = "cppython_core-0.7.1.dev14-py3-none-any.whl", hash = "sha256:dc3f8a27b9f02ef3c11a113ed5f1d836c744170863cdaf62721b99ed65366307"}, - {file = "cppython_core-0.7.1.dev14.tar.gz", hash = "sha256:87673de19b7998480aceee5ef7a4bc112dfaf5c349a4d76b0ac547b8b9a925af"}, -] - -[[package]] -name = "dill" -version = "0.3.8" -requires_python = ">=3.8" -summary = "serialize all of Python" -files = [ - {file = "dill-0.3.8-py3-none-any.whl", hash = "sha256:c36ca9ffb54365bdd2f8eb3eff7d2a21237f8452b57ace88b1ac615b7e815bd7"}, - {file = "dill-0.3.8.tar.gz", hash = "sha256:3ebe3c479ad625c4553aca177444d89b486b1d84982eeacded644afc0cf797ca"}, -] - -[[package]] -name = "iniconfig" -version = "2.0.0" -requires_python = ">=3.7" -summary = "brain-dead simple config-ini parsing" -files = [ - {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, - {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, -] - -[[package]] -name = "isort" -version = "5.13.2" -requires_python = ">=3.8.0" -summary = "A Python utility / library to sort Python imports." -files = [ - {file = "isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6"}, - {file = "isort-5.13.2.tar.gz", hash = "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109"}, -] - -[[package]] -name = "mccabe" -version = "0.7.0" -requires_python = ">=3.6" -summary = "McCabe checker, plugin for flake8" -files = [ - {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, - {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, -] - -[[package]] -name = "mypy" -version = "1.9.0" -requires_python = ">=3.8" -summary = "Optional static typing for Python" -dependencies = [ - "mypy-extensions>=1.0.0", - "typing-extensions>=4.1.0", -] -files = [ - {file = "mypy-1.9.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:aceb1db093b04db5cd390821464504111b8ec3e351eb85afd1433490163d60cd"}, - {file = "mypy-1.9.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0235391f1c6f6ce487b23b9dbd1327b4ec33bb93934aa986efe8a9563d9349e6"}, - {file = "mypy-1.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d4d5ddc13421ba3e2e082a6c2d74c2ddb3979c39b582dacd53dd5d9431237185"}, - {file = "mypy-1.9.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:190da1ee69b427d7efa8aa0d5e5ccd67a4fb04038c380237a0d96829cb157913"}, - {file = "mypy-1.9.0-cp312-cp312-win_amd64.whl", hash = "sha256:fe28657de3bfec596bbeef01cb219833ad9d38dd5393fc649f4b366840baefe6"}, - {file = "mypy-1.9.0-py3-none-any.whl", hash = "sha256:a260627a570559181a9ea5de61ac6297aa5af202f06fd7ab093ce74e7181e43e"}, - {file = "mypy-1.9.0.tar.gz", hash = "sha256:3cc5da0127e6a478cddd906068496a97a7618a21ce9b54bde5bf7e539c7af974"}, -] - -[[package]] -name = "mypy-extensions" -version = "1.0.0" -requires_python = ">=3.5" -summary = "Type system extensions for programs checked with the mypy type checker." -files = [ - {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, - {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, -] - -[[package]] -name = "packaging" -version = "24.0" -requires_python = ">=3.7" -summary = "Core utilities for Python packages" -files = [ - {file = "packaging-24.0-py3-none-any.whl", hash = "sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5"}, - {file = "packaging-24.0.tar.gz", hash = "sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9"}, -] - -[[package]] -name = "pathspec" -version = "0.12.1" -requires_python = ">=3.8" -summary = "Utility library for gitignore style pattern matching of file paths." -files = [ - {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, - {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, -] - -[[package]] -name = "platformdirs" -version = "4.2.0" -requires_python = ">=3.8" -summary = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -files = [ - {file = "platformdirs-4.2.0-py3-none-any.whl", hash = "sha256:0614df2a2f37e1a662acbd8e2b25b92ccf8632929bc6d43467e17fe89c75e068"}, - {file = "platformdirs-4.2.0.tar.gz", hash = "sha256:ef0cc731df711022c174543cb70a9b5bd22e5a9337c8624ef2c2ceb8ddad8768"}, -] - -[[package]] -name = "pluggy" -version = "1.4.0" -requires_python = ">=3.8" -summary = "plugin and hook calling mechanisms for python" -files = [ - {file = "pluggy-1.4.0-py3-none-any.whl", hash = "sha256:7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981"}, - {file = "pluggy-1.4.0.tar.gz", hash = "sha256:8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be"}, -] - -[[package]] -name = "pydantic" -version = "2.6.4" -requires_python = ">=3.8" -summary = "Data validation using Python type hints" -dependencies = [ - "annotated-types>=0.4.0", - "pydantic-core==2.16.3", - "typing-extensions>=4.6.1", -] -files = [ - {file = "pydantic-2.6.4-py3-none-any.whl", hash = "sha256:cc46fce86607580867bdc3361ad462bab9c222ef042d3da86f2fb333e1d916c5"}, - {file = "pydantic-2.6.4.tar.gz", hash = "sha256:b1704e0847db01817624a6b86766967f552dd9dbf3afba4004409f908dcc84e6"}, -] - -[[package]] -name = "pydantic-core" -version = "2.16.3" -requires_python = ">=3.8" -summary = "" -dependencies = [ - "typing-extensions!=4.7.0,>=4.6.0", -] -files = [ - {file = "pydantic_core-2.16.3-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:0f56ae86b60ea987ae8bcd6654a887238fd53d1384f9b222ac457070b7ac4cff"}, - {file = "pydantic_core-2.16.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c9bd22a2a639e26171068f8ebb5400ce2c1bc7d17959f60a3b753ae13c632975"}, - {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4204e773b4b408062960e65468d5346bdfe139247ee5f1ca2a378983e11388a2"}, - {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f651dd19363c632f4abe3480a7c87a9773be27cfe1341aef06e8759599454120"}, - {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aaf09e615a0bf98d406657e0008e4a8701b11481840be7d31755dc9f97c44053"}, - {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8e47755d8152c1ab5b55928ab422a76e2e7b22b5ed8e90a7d584268dd49e9c6b"}, - {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:500960cb3a0543a724a81ba859da816e8cf01b0e6aaeedf2c3775d12ee49cade"}, - {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:cf6204fe865da605285c34cf1172879d0314ff267b1c35ff59de7154f35fdc2e"}, - {file = "pydantic_core-2.16.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d33dd21f572545649f90c38c227cc8631268ba25c460b5569abebdd0ec5974ca"}, - {file = "pydantic_core-2.16.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:49d5d58abd4b83fb8ce763be7794d09b2f50f10aa65c0f0c1696c677edeb7cbf"}, - {file = "pydantic_core-2.16.3-cp312-none-win32.whl", hash = "sha256:f53aace168a2a10582e570b7736cc5bef12cae9cf21775e3eafac597e8551fbe"}, - {file = "pydantic_core-2.16.3-cp312-none-win_amd64.whl", hash = "sha256:0d32576b1de5a30d9a97f300cc6a3f4694c428d956adbc7e6e2f9cad279e45ed"}, - {file = "pydantic_core-2.16.3-cp312-none-win_arm64.whl", hash = "sha256:ec08be75bb268473677edb83ba71e7e74b43c008e4a7b1907c6d57e940bf34b6"}, - {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:36fa178aacbc277bc6b62a2c3da95226520da4f4e9e206fdf076484363895d2c"}, - {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:dcca5d2bf65c6fb591fff92da03f94cd4f315972f97c21975398bd4bd046854a"}, - {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2a72fb9963cba4cd5793854fd12f4cfee731e86df140f59ff52a49b3552db241"}, - {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b60cc1a081f80a2105a59385b92d82278b15d80ebb3adb200542ae165cd7d183"}, - {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:cbcc558401de90a746d02ef330c528f2e668c83350f045833543cd57ecead1ad"}, - {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:fee427241c2d9fb7192b658190f9f5fd6dfe41e02f3c1489d2ec1e6a5ab1e04a"}, - {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f4cb85f693044e0f71f394ff76c98ddc1bc0953e48c061725e540396d5c8a2e1"}, - {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:b29eeb887aa931c2fcef5aa515d9d176d25006794610c264ddc114c053bf96fe"}, - {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:a425479ee40ff021f8216c9d07a6a3b54b31c8267c6e17aa88b70d7ebd0e5e5b"}, - {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:5c5cbc703168d1b7a838668998308018a2718c2130595e8e190220238addc96f"}, - {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99b6add4c0b39a513d323d3b93bc173dac663c27b99860dd5bf491b240d26137"}, - {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75f76ee558751746d6a38f89d60b6228fa174e5172d143886af0f85aa306fd89"}, - {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:00ee1c97b5364b84cb0bd82e9bbf645d5e2871fb8c58059d158412fee2d33d8a"}, - {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:287073c66748f624be4cef893ef9174e3eb88fe0b8a78dc22e88eca4bc357ca6"}, - {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:ed25e1835c00a332cb10c683cd39da96a719ab1dfc08427d476bce41b92531fc"}, - {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:86b3d0033580bd6bbe07590152007275bd7af95f98eaa5bd36f3da219dcd93da"}, - {file = "pydantic_core-2.16.3.tar.gz", hash = "sha256:1cac689f80a3abab2d3c0048b29eea5751114054f032a941a32de4c852c59cad"}, -] - -[[package]] -name = "pylint" -version = "3.1.0" -requires_python = ">=3.8.0" -summary = "python code static checker" -dependencies = [ - "astroid<=3.2.0-dev0,>=3.1.0", - "colorama>=0.4.5; sys_platform == \"win32\"", - "dill>=0.3.6; python_version >= \"3.11\"", - "dill>=0.3.7; python_version >= \"3.12\"", - "isort!=5.13.0,<6,>=4.2.5", - "mccabe<0.8,>=0.6", - "platformdirs>=2.2.0", - "tomlkit>=0.10.1", -] -files = [ - {file = "pylint-3.1.0-py3-none-any.whl", hash = "sha256:507a5b60953874766d8a366e8e8c7af63e058b26345cfcb5f91f89d987fd6b74"}, - {file = "pylint-3.1.0.tar.gz", hash = "sha256:6a69beb4a6f63debebaab0a3477ecd0f559aa726af4954fc948c51f7a2549e23"}, -] - -[[package]] -name = "pytest" -version = "8.1.1" -requires_python = ">=3.8" -summary = "pytest: simple powerful testing with Python" -dependencies = [ - "colorama; sys_platform == \"win32\"", - "iniconfig", - "packaging", - "pluggy<2.0,>=1.4", -] -files = [ - {file = "pytest-8.1.1-py3-none-any.whl", hash = "sha256:2a8386cfc11fa9d2c50ee7b2a57e7d898ef90470a7a34c4b949ff59662bb78b7"}, - {file = "pytest-8.1.1.tar.gz", hash = "sha256:ac978141a75948948817d360297b7aae0fcb9d6ff6bc9ec6d514b85d5a65c044"}, -] - -[[package]] -name = "pytest-click" -version = "1.1.0" -summary = "Pytest plugin for Click" -dependencies = [ - "click>=6.0", - "pytest>=5.0", -] -files = [ - {file = "pytest_click-1.1.0-py3-none-any.whl", hash = "sha256:eade4742c2f02c345e78a32534a43e8db04acf98d415090539dacc880b7cd0e9"}, - {file = "pytest_click-1.1.0.tar.gz", hash = "sha256:fdd9f6721f877dda021e7c5dc73e70aecd37e5ed23ec6820f8a7b3fd7b4f8d30"}, -] - -[[package]] -name = "pytest-cov" -version = "4.1.0" -requires_python = ">=3.7" -summary = "Pytest plugin for measuring coverage." -dependencies = [ - "coverage[toml]>=5.2.1", - "pytest>=4.6", -] -files = [ - {file = "pytest-cov-4.1.0.tar.gz", hash = "sha256:3904b13dfbfec47f003b8e77fd5b589cd11904a21ddf1ab38a64f204d6a10ef6"}, - {file = "pytest_cov-4.1.0-py3-none-any.whl", hash = "sha256:6ba70b9e97e69fcc3fb45bfeab2d0a138fb65c4d0d6a41ef33983ad114be8c3a"}, -] - -[[package]] -name = "pytest-cppython" -version = "0.3.1.dev50" -requires_python = ">=3.12" -summary = "A pytest plugin that imports CPPython testing types" -dependencies = [ - "cppython-core>=0.4.1.dev13", - "pydantic>=2.6.3", - "pytest-mock>=3.12.0", - "pytest-synodic>=0.0.0", - "pytest>=8.0.0", -] -files = [ - {file = "pytest_cppython-0.3.1.dev50-py3-none-any.whl", hash = "sha256:1b22cce6af81dbd6e6c1e6f8e15654ad6b0149c3d38e1312e8be36324b17f88a"}, - {file = "pytest_cppython-0.3.1.dev50.tar.gz", hash = "sha256:c39ff9ee013af4c7e8b500d95eeb4e8dabc33099a9a8a9ab15139e328d8782c2"}, -] - -[[package]] -name = "pytest-mock" -version = "3.12.0" -requires_python = ">=3.8" -summary = "Thin-wrapper around the mock package for easier use with pytest" -dependencies = [ - "pytest>=5.0", -] -files = [ - {file = "pytest-mock-3.12.0.tar.gz", hash = "sha256:31a40f038c22cad32287bb43932054451ff5583ff094bca6f675df2f8bc1a6e9"}, - {file = "pytest_mock-3.12.0-py3-none-any.whl", hash = "sha256:0972719a7263072da3a21c7f4773069bcc7486027d7e8e1f81d98a47e701bc4f"}, -] - -[[package]] -name = "pytest-synodic" -version = "0.1.1.dev6" -requires_python = ">=3.12" -summary = "Synodic Pytest utilities" -dependencies = [ - "pytest>=8.0.2", - "synodic-utilities>=0.1.1.dev5", -] -files = [ - {file = "pytest_synodic-0.1.1.dev6-py3-none-any.whl", hash = "sha256:9c4e0a450379c54bcb4d2f3875fe8db1ffe3c58ea90ce5a41df5e79fe3a01d46"}, - {file = "pytest_synodic-0.1.1.dev6.tar.gz", hash = "sha256:16739c0021a778dc69ea5d57b264118e68ef7cc5429312a1a389bd5c1a784239"}, -] - -[[package]] -name = "synodic-utilities" -version = "0.1.1.dev8" -requires_python = ">=3.12" -summary = "Synodic python utility library" -files = [ - {file = "synodic_utilities-0.1.1.dev8-py3-none-any.whl", hash = "sha256:3034f10f780629ef5eea2078fcf82875f7aedee3b0e3fe2c04759bac4a55662a"}, - {file = "synodic_utilities-0.1.1.dev8.tar.gz", hash = "sha256:e25a9dbd0cdd77bd555705ef3d13489591d43cd8bd93ac211cf9bead4e476c68"}, -] - -[[package]] -name = "tomlkit" -version = "0.12.4" -requires_python = ">=3.7" -summary = "Style preserving TOML library" -files = [ - {file = "tomlkit-0.12.4-py3-none-any.whl", hash = "sha256:5cd82d48a3dd89dee1f9d64420aa20ae65cfbd00668d6f094d7578a78efbb77b"}, - {file = "tomlkit-0.12.4.tar.gz", hash = "sha256:7ca1cfc12232806517a8515047ba66a19369e71edf2439d0f5824f91032b6cc3"}, -] - -[[package]] -name = "typing-extensions" -version = "4.10.0" -requires_python = ">=3.8" -summary = "Backported and Experimental Type Hints for Python 3.8+" -files = [ - {file = "typing_extensions-4.10.0-py3-none-any.whl", hash = "sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475"}, - {file = "typing_extensions-4.10.0.tar.gz", hash = "sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb"}, -] +# This file is @generated by PDM. +# It is not intended for manual editing. + +[metadata] +groups = ["default", "lint", "test"] +strategy = ["inherit_metadata"] +lock_version = "4.5.0" +content_hash = "sha256:54bccf00cb5182813af18ea04ae587d3ee633de3090f8ea2610238f37beb06d6" + +[[metadata.targets]] +requires_python = ">=3.12" + +[[package]] +name = "annotated-types" +version = "0.7.0" +requires_python = ">=3.8" +summary = "Reusable constraint types to use with typing.Annotated" +groups = ["default"] +dependencies = [ + "typing-extensions>=4.0.0; python_version < \"3.9\"", +] +files = [ + {file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"}, + {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, +] + +[[package]] +name = "astroid" +version = "3.2.4" +requires_python = ">=3.8.0" +summary = "An abstract syntax tree for Python with inference support." +groups = ["lint"] +dependencies = [ + "typing-extensions>=4.0.0; python_version < \"3.11\"", +] +files = [ + {file = "astroid-3.2.4-py3-none-any.whl", hash = "sha256:413658a61eeca6202a59231abb473f932038fbcbf1666587f66d482083413a25"}, + {file = "astroid-3.2.4.tar.gz", hash = "sha256:0e14202810b30da1b735827f78f5157be2bbd4a7a59b7707ca0bfc2fb4c0063a"}, +] + +[[package]] +name = "black" +version = "24.8.0" +requires_python = ">=3.8" +summary = "The uncompromising code formatter." +groups = ["lint"] +dependencies = [ + "click>=8.0.0", + "mypy-extensions>=0.4.3", + "packaging>=22.0", + "pathspec>=0.9.0", + "platformdirs>=2", + "tomli>=1.1.0; python_version < \"3.11\"", + "typing-extensions>=4.0.1; python_version < \"3.11\"", +] +files = [ + {file = "black-24.8.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:7c046c1d1eeb7aea9335da62472481d3bbf3fd986e093cffd35f4385c94ae368"}, + {file = "black-24.8.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:649f6d84ccbae73ab767e206772cc2d7a393a001070a4c814a546afd0d423aed"}, + {file = "black-24.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2b59b250fdba5f9a9cd9d0ece6e6d993d91ce877d121d161e4698af3eb9c1018"}, + {file = "black-24.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:6e55d30d44bed36593c3163b9bc63bf58b3b30e4611e4d88a0c3c239930ed5b2"}, + {file = "black-24.8.0-py3-none-any.whl", hash = "sha256:972085c618ee94f402da1af548a4f218c754ea7e5dc70acb168bfaca4c2542ed"}, + {file = "black-24.8.0.tar.gz", hash = "sha256:2500945420b6784c38b9ee885af039f5e7471ef284ab03fa35ecdde4688cd83f"}, +] + +[[package]] +name = "click" +version = "8.1.7" +requires_python = ">=3.7" +summary = "Composable command line interface toolkit" +groups = ["default", "lint", "test"] +dependencies = [ + "colorama; platform_system == \"Windows\"", + "importlib-metadata; python_version < \"3.8\"", +] +files = [ + {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, + {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, +] + +[[package]] +name = "colorama" +version = "0.4.6" +requires_python = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +summary = "Cross-platform colored terminal text." +groups = ["default", "lint", "test"] +marker = "sys_platform == \"win32\" or platform_system == \"Windows\"" +files = [ + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] + +[[package]] +name = "coverage" +version = "7.6.1" +requires_python = ">=3.8" +summary = "Code coverage measurement for Python" +groups = ["test"] +files = [ + {file = "coverage-7.6.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:95cae0efeb032af8458fc27d191f85d1717b1d4e49f7cb226cf526ff28179778"}, + {file = "coverage-7.6.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5621a9175cf9d0b0c84c2ef2b12e9f5f5071357c4d2ea6ca1cf01814f45d2391"}, + {file = "coverage-7.6.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:260933720fdcd75340e7dbe9060655aff3af1f0c5d20f46b57f262ab6c86a5e8"}, + {file = "coverage-7.6.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07e2ca0ad381b91350c0ed49d52699b625aab2b44b65e1b4e02fa9df0e92ad2d"}, + {file = "coverage-7.6.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c44fee9975f04b33331cb8eb272827111efc8930cfd582e0320613263ca849ca"}, + {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:877abb17e6339d96bf08e7a622d05095e72b71f8afd8a9fefc82cf30ed944163"}, + {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3e0cadcf6733c09154b461f1ca72d5416635e5e4ec4e536192180d34ec160f8a"}, + {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c3c02d12f837d9683e5ab2f3d9844dc57655b92c74e286c262e0fc54213c216d"}, + {file = "coverage-7.6.1-cp312-cp312-win32.whl", hash = "sha256:e05882b70b87a18d937ca6768ff33cc3f72847cbc4de4491c8e73880766718e5"}, + {file = "coverage-7.6.1-cp312-cp312-win_amd64.whl", hash = "sha256:b5d7b556859dd85f3a541db6a4e0167b86e7273e1cdc973e5b175166bb634fdb"}, + {file = "coverage-7.6.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a4acd025ecc06185ba2b801f2de85546e0b8ac787cf9d3b06e7e2a69f925b106"}, + {file = "coverage-7.6.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a6d3adcf24b624a7b778533480e32434a39ad8fa30c315208f6d3e5542aeb6e9"}, + {file = "coverage-7.6.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d0c212c49b6c10e6951362f7c6df3329f04c2b1c28499563d4035d964ab8e08c"}, + {file = "coverage-7.6.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6e81d7a3e58882450ec4186ca59a3f20a5d4440f25b1cff6f0902ad890e6748a"}, + {file = "coverage-7.6.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78b260de9790fd81e69401c2dc8b17da47c8038176a79092a89cb2b7d945d060"}, + {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a78d169acd38300060b28d600344a803628c3fd585c912cacc9ea8790fe96862"}, + {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2c09f4ce52cb99dd7505cd0fc8e0e37c77b87f46bc9c1eb03fe3bc9991085388"}, + {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6878ef48d4227aace338d88c48738a4258213cd7b74fd9a3d4d7582bb1d8a155"}, + {file = "coverage-7.6.1-cp313-cp313-win32.whl", hash = "sha256:44df346d5215a8c0e360307d46ffaabe0f5d3502c8a1cefd700b34baf31d411a"}, + {file = "coverage-7.6.1-cp313-cp313-win_amd64.whl", hash = "sha256:8284cf8c0dd272a247bc154eb6c95548722dce90d098c17a883ed36e67cdb129"}, + {file = "coverage-7.6.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:d3296782ca4eab572a1a4eca686d8bfb00226300dcefdf43faa25b5242ab8a3e"}, + {file = "coverage-7.6.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:502753043567491d3ff6d08629270127e0c31d4184c4c8d98f92c26f65019962"}, + {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6a89ecca80709d4076b95f89f308544ec8f7b4727e8a547913a35f16717856cb"}, + {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a318d68e92e80af8b00fa99609796fdbcdfef3629c77c6283566c6f02c6d6704"}, + {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13b0a73a0896988f053e4fbb7de6d93388e6dd292b0d87ee51d106f2c11b465b"}, + {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:4421712dbfc5562150f7554f13dde997a2e932a6b5f352edcce948a815efee6f"}, + {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:166811d20dfea725e2e4baa71fffd6c968a958577848d2131f39b60043400223"}, + {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:225667980479a17db1048cb2bf8bfb39b8e5be8f164b8f6628b64f78a72cf9d3"}, + {file = "coverage-7.6.1-cp313-cp313t-win32.whl", hash = "sha256:170d444ab405852903b7d04ea9ae9b98f98ab6d7e63e1115e82620807519797f"}, + {file = "coverage-7.6.1-cp313-cp313t-win_amd64.whl", hash = "sha256:b9f222de8cded79c49bf184bdbc06630d4c58eec9459b939b4a690c82ed05657"}, + {file = "coverage-7.6.1.tar.gz", hash = "sha256:953510dfb7b12ab69d20135a0662397f077c59b1e6379a768e97c59d852ee51d"}, +] + +[[package]] +name = "coverage" +version = "7.6.1" +extras = ["toml"] +requires_python = ">=3.8" +summary = "Code coverage measurement for Python" +groups = ["test"] +dependencies = [ + "coverage==7.6.1", + "tomli; python_full_version <= \"3.11.0a6\"", +] +files = [ + {file = "coverage-7.6.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:95cae0efeb032af8458fc27d191f85d1717b1d4e49f7cb226cf526ff28179778"}, + {file = "coverage-7.6.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5621a9175cf9d0b0c84c2ef2b12e9f5f5071357c4d2ea6ca1cf01814f45d2391"}, + {file = "coverage-7.6.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:260933720fdcd75340e7dbe9060655aff3af1f0c5d20f46b57f262ab6c86a5e8"}, + {file = "coverage-7.6.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07e2ca0ad381b91350c0ed49d52699b625aab2b44b65e1b4e02fa9df0e92ad2d"}, + {file = "coverage-7.6.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c44fee9975f04b33331cb8eb272827111efc8930cfd582e0320613263ca849ca"}, + {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:877abb17e6339d96bf08e7a622d05095e72b71f8afd8a9fefc82cf30ed944163"}, + {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3e0cadcf6733c09154b461f1ca72d5416635e5e4ec4e536192180d34ec160f8a"}, + {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c3c02d12f837d9683e5ab2f3d9844dc57655b92c74e286c262e0fc54213c216d"}, + {file = "coverage-7.6.1-cp312-cp312-win32.whl", hash = "sha256:e05882b70b87a18d937ca6768ff33cc3f72847cbc4de4491c8e73880766718e5"}, + {file = "coverage-7.6.1-cp312-cp312-win_amd64.whl", hash = "sha256:b5d7b556859dd85f3a541db6a4e0167b86e7273e1cdc973e5b175166bb634fdb"}, + {file = "coverage-7.6.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a4acd025ecc06185ba2b801f2de85546e0b8ac787cf9d3b06e7e2a69f925b106"}, + {file = "coverage-7.6.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a6d3adcf24b624a7b778533480e32434a39ad8fa30c315208f6d3e5542aeb6e9"}, + {file = "coverage-7.6.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d0c212c49b6c10e6951362f7c6df3329f04c2b1c28499563d4035d964ab8e08c"}, + {file = "coverage-7.6.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6e81d7a3e58882450ec4186ca59a3f20a5d4440f25b1cff6f0902ad890e6748a"}, + {file = "coverage-7.6.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78b260de9790fd81e69401c2dc8b17da47c8038176a79092a89cb2b7d945d060"}, + {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a78d169acd38300060b28d600344a803628c3fd585c912cacc9ea8790fe96862"}, + {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2c09f4ce52cb99dd7505cd0fc8e0e37c77b87f46bc9c1eb03fe3bc9991085388"}, + {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6878ef48d4227aace338d88c48738a4258213cd7b74fd9a3d4d7582bb1d8a155"}, + {file = "coverage-7.6.1-cp313-cp313-win32.whl", hash = "sha256:44df346d5215a8c0e360307d46ffaabe0f5d3502c8a1cefd700b34baf31d411a"}, + {file = "coverage-7.6.1-cp313-cp313-win_amd64.whl", hash = "sha256:8284cf8c0dd272a247bc154eb6c95548722dce90d098c17a883ed36e67cdb129"}, + {file = "coverage-7.6.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:d3296782ca4eab572a1a4eca686d8bfb00226300dcefdf43faa25b5242ab8a3e"}, + {file = "coverage-7.6.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:502753043567491d3ff6d08629270127e0c31d4184c4c8d98f92c26f65019962"}, + {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6a89ecca80709d4076b95f89f308544ec8f7b4727e8a547913a35f16717856cb"}, + {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a318d68e92e80af8b00fa99609796fdbcdfef3629c77c6283566c6f02c6d6704"}, + {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13b0a73a0896988f053e4fbb7de6d93388e6dd292b0d87ee51d106f2c11b465b"}, + {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:4421712dbfc5562150f7554f13dde997a2e932a6b5f352edcce948a815efee6f"}, + {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:166811d20dfea725e2e4baa71fffd6c968a958577848d2131f39b60043400223"}, + {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:225667980479a17db1048cb2bf8bfb39b8e5be8f164b8f6628b64f78a72cf9d3"}, + {file = "coverage-7.6.1-cp313-cp313t-win32.whl", hash = "sha256:170d444ab405852903b7d04ea9ae9b98f98ab6d7e63e1115e82620807519797f"}, + {file = "coverage-7.6.1-cp313-cp313t-win_amd64.whl", hash = "sha256:b9f222de8cded79c49bf184bdbc06630d4c58eec9459b939b4a690c82ed05657"}, + {file = "coverage-7.6.1.tar.gz", hash = "sha256:953510dfb7b12ab69d20135a0662397f077c59b1e6379a768e97c59d852ee51d"}, +] + +[[package]] +name = "dill" +version = "0.3.8" +requires_python = ">=3.8" +summary = "serialize all of Python" +groups = ["lint"] +marker = "python_version >= \"3.11\"" +files = [ + {file = "dill-0.3.8-py3-none-any.whl", hash = "sha256:c36ca9ffb54365bdd2f8eb3eff7d2a21237f8452b57ace88b1ac615b7e815bd7"}, + {file = "dill-0.3.8.tar.gz", hash = "sha256:3ebe3c479ad625c4553aca177444d89b486b1d84982eeacded644afc0cf797ca"}, +] + +[[package]] +name = "iniconfig" +version = "2.0.0" +requires_python = ">=3.7" +summary = "brain-dead simple config-ini parsing" +groups = ["test"] +files = [ + {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, + {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, +] + +[[package]] +name = "isort" +version = "5.13.2" +requires_python = ">=3.8.0" +summary = "A Python utility / library to sort Python imports." +groups = ["lint"] +files = [ + {file = "isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6"}, + {file = "isort-5.13.2.tar.gz", hash = "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109"}, +] + +[[package]] +name = "markdown-it-py" +version = "3.0.0" +requires_python = ">=3.8" +summary = "Python port of markdown-it. Markdown parsing, done right!" +groups = ["default"] +dependencies = [ + "mdurl~=0.1", +] +files = [ + {file = "markdown-it-py-3.0.0.tar.gz", hash = "sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb"}, + {file = "markdown_it_py-3.0.0-py3-none-any.whl", hash = "sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1"}, +] + +[[package]] +name = "mccabe" +version = "0.7.0" +requires_python = ">=3.6" +summary = "McCabe checker, plugin for flake8" +groups = ["lint"] +files = [ + {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, + {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, +] + +[[package]] +name = "mdurl" +version = "0.1.2" +requires_python = ">=3.7" +summary = "Markdown URL utilities" +groups = ["default"] +files = [ + {file = "mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8"}, + {file = "mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"}, +] + +[[package]] +name = "mypy" +version = "1.11.1" +requires_python = ">=3.8" +summary = "Optional static typing for Python" +groups = ["lint"] +dependencies = [ + "mypy-extensions>=1.0.0", + "tomli>=1.1.0; python_version < \"3.11\"", + "typing-extensions>=4.6.0", +] +files = [ + {file = "mypy-1.11.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f39918a50f74dc5969807dcfaecafa804fa7f90c9d60506835036cc1bc891dc8"}, + {file = "mypy-1.11.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0bc71d1fb27a428139dd78621953effe0d208aed9857cb08d002280b0422003a"}, + {file = "mypy-1.11.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b868d3bcff720dd7217c383474008ddabaf048fad8d78ed948bb4b624870a417"}, + {file = "mypy-1.11.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a707ec1527ffcdd1c784d0924bf5cb15cd7f22683b919668a04d2b9c34549d2e"}, + {file = "mypy-1.11.1-cp312-cp312-win_amd64.whl", hash = "sha256:64f4a90e3ea07f590c5bcf9029035cf0efeae5ba8be511a8caada1a4893f5525"}, + {file = "mypy-1.11.1-py3-none-any.whl", hash = "sha256:0624bdb940255d2dd24e829d99a13cfeb72e4e9031f9492148f410ed30bcab54"}, + {file = "mypy-1.11.1.tar.gz", hash = "sha256:f404a0b069709f18bbdb702eb3dcfe51910602995de00bd39cea3050b5772d08"}, +] + +[[package]] +name = "mypy-extensions" +version = "1.0.0" +requires_python = ">=3.5" +summary = "Type system extensions for programs checked with the mypy type checker." +groups = ["lint"] +files = [ + {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, + {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, +] + +[[package]] +name = "packaging" +version = "24.1" +requires_python = ">=3.8" +summary = "Core utilities for Python packages" +groups = ["default", "lint", "test"] +files = [ + {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, + {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, +] + +[[package]] +name = "pathspec" +version = "0.12.1" +requires_python = ">=3.8" +summary = "Utility library for gitignore style pattern matching of file paths." +groups = ["lint"] +files = [ + {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, + {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, +] + +[[package]] +name = "platformdirs" +version = "4.2.2" +requires_python = ">=3.8" +summary = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." +groups = ["lint"] +files = [ + {file = "platformdirs-4.2.2-py3-none-any.whl", hash = "sha256:2d7a1657e36a80ea911db832a8a6ece5ee53d8de21edd5cc5879af6530b1bfee"}, + {file = "platformdirs-4.2.2.tar.gz", hash = "sha256:38b7b51f512eed9e84a22788b4bce1de17c0adb134d6becb09836e37d8654cd3"}, +] + +[[package]] +name = "pluggy" +version = "1.5.0" +requires_python = ">=3.8" +summary = "plugin and hook calling mechanisms for python" +groups = ["test"] +files = [ + {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, + {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, +] + +[[package]] +name = "pydantic" +version = "2.8.2" +requires_python = ">=3.8" +summary = "Data validation using Python type hints" +groups = ["default"] +dependencies = [ + "annotated-types>=0.4.0", + "pydantic-core==2.20.1", + "typing-extensions>=4.12.2; python_version >= \"3.13\"", + "typing-extensions>=4.6.1; python_version < \"3.13\"", +] +files = [ + {file = "pydantic-2.8.2-py3-none-any.whl", hash = "sha256:73ee9fddd406dc318b885c7a2eab8a6472b68b8fb5ba8150949fc3db939f23c8"}, + {file = "pydantic-2.8.2.tar.gz", hash = "sha256:6f62c13d067b0755ad1c21a34bdd06c0c12625a22b0fc09c6b149816604f7c2a"}, +] + +[[package]] +name = "pydantic-core" +version = "2.20.1" +requires_python = ">=3.8" +summary = "Core functionality for Pydantic validation and serialization" +groups = ["default"] +dependencies = [ + "typing-extensions!=4.7.0,>=4.6.0", +] +files = [ + {file = "pydantic_core-2.20.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:595ba5be69b35777474fa07f80fc260ea71255656191adb22a8c53aba4479231"}, + {file = "pydantic_core-2.20.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a4f55095ad087474999ee28d3398bae183a66be4823f753cd7d67dd0153427c9"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f9aa05d09ecf4c75157197f27cdc9cfaeb7c5f15021c6373932bf3e124af029f"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e97fdf088d4b31ff4ba35db26d9cc472ac7ef4a2ff2badeabf8d727b3377fc52"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bc633a9fe1eb87e250b5c57d389cf28998e4292336926b0b6cdaee353f89a237"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d573faf8eb7e6b1cbbcb4f5b247c60ca8be39fe2c674495df0eb4318303137fe"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:26dc97754b57d2fd00ac2b24dfa341abffc380b823211994c4efac7f13b9e90e"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:33499e85e739a4b60c9dac710c20a08dc73cb3240c9a0e22325e671b27b70d24"}, + {file = "pydantic_core-2.20.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:bebb4d6715c814597f85297c332297c6ce81e29436125ca59d1159b07f423eb1"}, + {file = "pydantic_core-2.20.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:516d9227919612425c8ef1c9b869bbbee249bc91912c8aaffb66116c0b447ebd"}, + {file = "pydantic_core-2.20.1-cp312-none-win32.whl", hash = "sha256:469f29f9093c9d834432034d33f5fe45699e664f12a13bf38c04967ce233d688"}, + {file = "pydantic_core-2.20.1-cp312-none-win_amd64.whl", hash = "sha256:035ede2e16da7281041f0e626459bcae33ed998cca6a0a007a5ebb73414ac72d"}, + {file = "pydantic_core-2.20.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:0827505a5c87e8aa285dc31e9ec7f4a17c81a813d45f70b1d9164e03a813a686"}, + {file = "pydantic_core-2.20.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:19c0fa39fa154e7e0b7f82f88ef85faa2a4c23cc65aae2f5aea625e3c13c735a"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa223cd1e36b642092c326d694d8bf59b71ddddc94cdb752bbbb1c5c91d833b"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c336a6d235522a62fef872c6295a42ecb0c4e1d0f1a3e500fe949415761b8a19"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7eb6a0587eded33aeefea9f916899d42b1799b7b14b8f8ff2753c0ac1741edac"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:70c8daf4faca8da5a6d655f9af86faf6ec2e1768f4b8b9d0226c02f3d6209703"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e9fa4c9bf273ca41f940bceb86922a7667cd5bf90e95dbb157cbb8441008482c"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:11b71d67b4725e7e2a9f6e9c0ac1239bbc0c48cce3dc59f98635efc57d6dac83"}, + {file = "pydantic_core-2.20.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:270755f15174fb983890c49881e93f8f1b80f0b5e3a3cc1394a255706cabd203"}, + {file = "pydantic_core-2.20.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:c81131869240e3e568916ef4c307f8b99583efaa60a8112ef27a366eefba8ef0"}, + {file = "pydantic_core-2.20.1-cp313-none-win32.whl", hash = "sha256:b91ced227c41aa29c672814f50dbb05ec93536abf8f43cd14ec9521ea09afe4e"}, + {file = "pydantic_core-2.20.1-cp313-none-win_amd64.whl", hash = "sha256:65db0f2eefcaad1a3950f498aabb4875c8890438bc80b19362cf633b87a8ab20"}, + {file = "pydantic_core-2.20.1.tar.gz", hash = "sha256:26ca695eeee5f9f1aeeb211ffc12f10bcb6f71e2989988fda61dabd65db878d4"}, +] + +[[package]] +name = "pygments" +version = "2.18.0" +requires_python = ">=3.8" +summary = "Pygments is a syntax highlighting package written in Python." +groups = ["default"] +files = [ + {file = "pygments-2.18.0-py3-none-any.whl", hash = "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a"}, + {file = "pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199"}, +] + +[[package]] +name = "pylint" +version = "3.2.6" +requires_python = ">=3.8.0" +summary = "python code static checker" +groups = ["lint"] +dependencies = [ + "astroid<=3.3.0-dev0,>=3.2.4", + "colorama>=0.4.5; sys_platform == \"win32\"", + "dill>=0.2; python_version < \"3.11\"", + "dill>=0.3.6; python_version >= \"3.11\"", + "dill>=0.3.7; python_version >= \"3.12\"", + "isort!=5.13.0,<6,>=4.2.5", + "mccabe<0.8,>=0.6", + "platformdirs>=2.2.0", + "tomli>=1.1.0; python_version < \"3.11\"", + "tomlkit>=0.10.1", + "typing-extensions>=3.10.0; python_version < \"3.10\"", +] +files = [ + {file = "pylint-3.2.6-py3-none-any.whl", hash = "sha256:03c8e3baa1d9fb995b12c1dbe00aa6c4bcef210c2a2634374aedeb22fb4a8f8f"}, + {file = "pylint-3.2.6.tar.gz", hash = "sha256:a5d01678349454806cff6d886fb072294f56a58c4761278c97fb557d708e1eb3"}, +] + +[[package]] +name = "pytest" +version = "8.3.2" +requires_python = ">=3.8" +summary = "pytest: simple powerful testing with Python" +groups = ["test"] +dependencies = [ + "colorama; sys_platform == \"win32\"", + "exceptiongroup>=1.0.0rc8; python_version < \"3.11\"", + "iniconfig", + "packaging", + "pluggy<2,>=1.5", + "tomli>=1; python_version < \"3.11\"", +] +files = [ + {file = "pytest-8.3.2-py3-none-any.whl", hash = "sha256:4ba08f9ae7dcf84ded419494d229b48d0903ea6407b030eaec46df5e6a73bba5"}, + {file = "pytest-8.3.2.tar.gz", hash = "sha256:c132345d12ce551242c87269de812483f5bcc87cdbb4722e48487ba194f9fdce"}, +] + +[[package]] +name = "pytest-click" +version = "1.1.0" +summary = "Pytest plugin for Click" +groups = ["test"] +dependencies = [ + "click>=6.0", + "pytest>=5.0", +] +files = [ + {file = "pytest_click-1.1.0-py3-none-any.whl", hash = "sha256:eade4742c2f02c345e78a32534a43e8db04acf98d415090539dacc880b7cd0e9"}, + {file = "pytest_click-1.1.0.tar.gz", hash = "sha256:fdd9f6721f877dda021e7c5dc73e70aecd37e5ed23ec6820f8a7b3fd7b4f8d30"}, +] + +[[package]] +name = "pytest-cov" +version = "5.0.0" +requires_python = ">=3.8" +summary = "Pytest plugin for measuring coverage." +groups = ["test"] +dependencies = [ + "coverage[toml]>=5.2.1", + "pytest>=4.6", +] +files = [ + {file = "pytest-cov-5.0.0.tar.gz", hash = "sha256:5837b58e9f6ebd335b0f8060eecce69b662415b16dc503883a02f45dfeb14857"}, + {file = "pytest_cov-5.0.0-py3-none-any.whl", hash = "sha256:4f0764a1219df53214206bf1feea4633c3b558a2925c8b59f144f682861ce652"}, +] + +[[package]] +name = "pytest-mock" +version = "3.14.0" +requires_python = ">=3.8" +summary = "Thin-wrapper around the mock package for easier use with pytest" +groups = ["test"] +dependencies = [ + "pytest>=6.2.5", +] +files = [ + {file = "pytest-mock-3.14.0.tar.gz", hash = "sha256:2719255a1efeceadbc056d6bf3df3d1c5015530fb40cf347c0f9afac88410bd0"}, + {file = "pytest_mock-3.14.0-py3-none-any.whl", hash = "sha256:0b72c38033392a5f4621342fe11e9219ac11ec9d375f8e2a0c164539e0d70f6f"}, +] + +[[package]] +name = "rich" +version = "13.7.1" +requires_python = ">=3.7.0" +summary = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" +groups = ["default"] +dependencies = [ + "markdown-it-py>=2.2.0", + "pygments<3.0.0,>=2.13.0", + "typing-extensions<5.0,>=4.0.0; python_version < \"3.9\"", +] +files = [ + {file = "rich-13.7.1-py3-none-any.whl", hash = "sha256:4edbae314f59eb482f54e9e30bf00d33350aaa94f4bfcd4e9e3110e64d0d7222"}, + {file = "rich-13.7.1.tar.gz", hash = "sha256:9be308cb1fe2f1f57d67ce99e95af38a1e2bc71ad9813b0e247cf7ffbcc3a432"}, +] + +[[package]] +name = "shellingham" +version = "1.5.4" +requires_python = ">=3.7" +summary = "Tool to Detect Surrounding Shell" +groups = ["default"] +files = [ + {file = "shellingham-1.5.4-py2.py3-none-any.whl", hash = "sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686"}, + {file = "shellingham-1.5.4.tar.gz", hash = "sha256:8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de"}, +] + +[[package]] +name = "tomlkit" +version = "0.13.2" +requires_python = ">=3.8" +summary = "Style preserving TOML library" +groups = ["default", "lint"] +files = [ + {file = "tomlkit-0.13.2-py3-none-any.whl", hash = "sha256:7a974427f6e119197f670fbbbeae7bef749a6c14e793db934baefc1b5f03efde"}, + {file = "tomlkit-0.13.2.tar.gz", hash = "sha256:fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79"}, +] + +[[package]] +name = "typer" +version = "0.12.4" +requires_python = ">=3.7" +summary = "Typer, build great CLIs. Easy to code. Based on Python type hints." +groups = ["default"] +dependencies = [ + "click>=8.0.0", + "rich>=10.11.0", + "shellingham>=1.3.0", + "typing-extensions>=3.7.4.3", +] +files = [ + {file = "typer-0.12.4-py3-none-any.whl", hash = "sha256:819aa03699f438397e876aa12b0d63766864ecba1b579092cc9fe35d886e34b6"}, + {file = "typer-0.12.4.tar.gz", hash = "sha256:c9c1613ed6a166162705b3347b8d10b661ccc5d95692654d0fb628118f2c34e6"}, +] + +[[package]] +name = "typing-extensions" +version = "4.12.2" +requires_python = ">=3.8" +summary = "Backported and Experimental Type Hints for Python 3.8+" +groups = ["default", "lint"] +files = [ + {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, + {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, +] diff --git a/pyproject.toml b/pyproject.toml index c1855d7..eafdc44 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,107 +1,118 @@ -[project] -description = "A Python management solution for C++ dependencies" -name = "cppython" - -license = {text = "MIT"} - -authors = [ - {name = "Synodic Software", email = "contact@synodic.software"}, -] -readme = "README.md" - -dynamic = ["version"] - -requires-python = ">=3.12" - -dependencies = [ - "click>=8.1.3", - "tomlkit>=0.12.4", - "cppython-core>=0.4.1.dev19", - "pydantic>=2.6.3", - "packaging>=21.3", -] - -[project.license-files] -paths = ["LICENSE.md"] - -[project.urls] -homepage = "https://github.com/Synodic-Software/CPPython" -repository = "https://github.com/Synodic-Software/CPPython" - -[tool.pdm.options] -update = ["--update-all"] - -[tool.pdm.version] -source = "scm" - -[tool.pdm.dev-dependencies] -lint = [ - "black>=24.2.0", - "pylint>=3.0.0", - "isort>=5.10.1", - "mypy>=1.9", -] -test = [ - "pytest>=8.0.2", - "pytest-cov>=3.0.0", - "pytest-click>=1.1", - "pytest-mock>=3.8.2", - "pytest-cppython>=0.2.0.dev0", -] - -[project.scripts] -cppython = "cppython.console.interface:cli" - -[tool.pdm.scripts] -analyze = {shell = "pylint --verbose cppython tests"} -format = {shell = "black --check --verbose ."} -lint = {composite = ["analyze", "format", "sort-imports", "type-check"]} -sort-imports = {shell = "isort --check-only --diff --verbose ."} -test = {shell = "pytest --cov=cppython --verbose tests"} -type-check = {shell = "mypy ."} - -[tool.pytest.ini_options] -log_cli = true -testpaths = [ - "tests", -] - -[tool.black] -line-length = 120 -preview = true - -[tool.isort] -profile = "black" -skip_gitignore = true - -[tool.mypy] -exclude = "__pypackages__" -plugins = ["pydantic.mypy"] -strict = true - -[tool.pylint.MAIN] -load-plugins = [ - "pylint.extensions.code_style", - "pylint.extensions.typing", - "pylint.extensions.docstyle", - "pylint.extensions.docparams", - "pylint.extensions.private_import", - "pylint.extensions.bad_builtin", -] - -[tool.pylint.format] -max-line-length = "120" - -[tool.pylint.parameter_documentation] -accept-no-param-doc = false -accept-no-raise-doc = false -accept-no-return-doc = false -accept-no-yields-doc = false -default-docstring-type = "google" - -[tool.coverage.report] -skip_empty = true - -[build-system] -build-backend = "pdm.backend" -requires = ["pdm.backend"] +[project] +description = "A Python management solution for C++ dependencies" +name = "cppython" + +license = {text = "MIT"} + +authors = [ + {name = "Synodic Software", email = "contact@synodic.software"}, +] +readme = "README.md" + +dynamic = ["version"] + +requires-python = ">=3.12" + +dependencies = [ + "typer>=0.12.4", + "tomlkit>=0.13.2", + "pydantic>=2.8.2", + "packaging>=24.1", +] + +[project.license-files] +paths = ["LICENSE.md"] + +[project.urls] +homepage = "https://github.com/Synodic-Software/CPPython" +repository = "https://github.com/Synodic-Software/CPPython" + +# # Plugin registration +# [project.entry-points."cppython.scm"] +# mock = "pytest_cppython.mock.scm:MockSCM" + +# [project.entry-points."cppython.generator"] +# mock = "pytest_cppython.mock.generator:MockGenerator" + +# [project.entry-points."cppython.provider"] +# mock = "pytest_cppython.mock.provider:MockProvider" + +# [project.entry-points.pytest11] +# pytest_cppython = "pytest_cppython.plugin" + +[tool.pdm.options] +update = ["--update-all"] + +[tool.pdm.version] +source = "scm" + +[tool.pdm.dev-dependencies] +lint = [ + "black>=24.2.0", + "pylint>=3.2.4", + "isort>=5.13.2", + "mypy>=1.11", +] +test = [ + "pytest>=8.0.2", + "pytest-cov>=4.1.0", + "pytest-click>=1.1", + "pytest-mock>=3.12.0", +] + +[project.scripts] +cppython = "cppython.console.interface:cli" + +[tool.pdm.scripts] +analyze = {shell = "pylint --verbose cppython tests"} +format = {shell = "black --check --verbose ."} +lint = {composite = ["analyze", "format", "sort-imports", "type-check"]} +sort-imports = {shell = "isort --check-only --diff --verbose ."} +test = {shell = "pytest --cov=cppython --verbose tests"} +type-check = {shell = "mypy ."} + +[tool.pytest.ini_options] +log_cli = true +testpaths = [ + "tests", +] + +[tool.black] +line-length = 120 +preview = true + +[tool.isort] +profile = "black" +skip_gitignore = true + +[tool.mypy] +exclude = "__pypackages__" +plugins = ["pydantic.mypy"] +strict = true + +[tool.pylint.MAIN] +load-plugins = [ + "pylint.extensions.code_style", + "pylint.extensions.typing", + "pylint.extensions.docstyle", + "pylint.extensions.docparams", + "pylint.extensions.private_import", + "pylint.extensions.bad_builtin", +] + +[tool.pylint.format] +max-line-length = "120" + +[tool.pylint.parameter_documentation] +accept-no-param-doc = false +accept-no-raise-doc = false +accept-no-return-doc = false +accept-no-yields-doc = false +default-docstring-type = "google" + +[tool.coverage.report] +skip_empty = true + +[build-system] +build-backend = "pdm.backend" +requires = ["pdm.backend"] diff --git a/tests/build/test_build/build.txt b/tests/build/test_build/build.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/data/test_folder/requirement.txt b/tests/data/test_folder/requirement.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/integration/plugin_helper/__init__.py b/tests/integration/plugin_helper/__init__.py new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/tests/integration/plugin_helper/__init__.py @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/integration/plugin_helper/test_generator.py b/tests/integration/plugin_helper/test_generator.py new file mode 100644 index 0000000..a93667c --- /dev/null +++ b/tests/integration/plugin_helper/test_generator.py @@ -0,0 +1,31 @@ +"""Tests the integration test plugin""" + +from typing import Any + +import pytest + +from pytest_cppython.mock.generator import MockGenerator +from pytest_cppython.tests import GeneratorIntegrationTests + + +class TestCPPythonGenerator(GeneratorIntegrationTests[MockGenerator]): + """The tests for the Mock generator""" + + @pytest.fixture(name="plugin_data", scope="session") + def fixture_plugin_data(self) -> dict[str, Any]: + """Returns mock data + + Returns: + An overridden data instance + """ + + return {} + + @pytest.fixture(name="plugin_type", scope="session") + def fixture_plugin_type(self) -> type[MockGenerator]: + """A required testing hook that allows type generation + + Returns: + An overridden generator type + """ + return MockGenerator diff --git a/tests/integration/plugin_helper/test_provider.py b/tests/integration/plugin_helper/test_provider.py new file mode 100644 index 0000000..012c536 --- /dev/null +++ b/tests/integration/plugin_helper/test_provider.py @@ -0,0 +1,31 @@ +"""Test the integrations related to the internal provider implementation and the 'Provider' interface itself""" + +from typing import Any + +import pytest + +from pytest_cppython.mock.provider import MockProvider +from pytest_cppython.tests import ProviderIntegrationTests + + +class TestMockProvider(ProviderIntegrationTests[MockProvider]): + """The tests for our Mock provider""" + + @pytest.fixture(name="plugin_data", scope="session") + def fixture_plugin_data(self) -> dict[str, Any]: + """Returns mock data + + Returns: + An overridden data instance + """ + + return {} + + @pytest.fixture(name="plugin_type", scope="session") + def fixture_plugin_type(self) -> type[MockProvider]: + """A required testing hook that allows type generation + + Returns: + The overridden provider type + """ + return MockProvider diff --git a/tests/integration/plugin_helper/test_scm.py b/tests/integration/plugin_helper/test_scm.py new file mode 100644 index 0000000..fb39cde --- /dev/null +++ b/tests/integration/plugin_helper/test_scm.py @@ -0,0 +1,31 @@ +"""Tests the integration test plugin""" + +from typing import Any + +import pytest + +from pytest_cppython.mock.scm import MockSCM +from pytest_cppython.tests import SCMIntegrationTests + + +class TestCPPythonSCM(SCMIntegrationTests[MockSCM]): + """The tests for the Mock version control""" + + @pytest.fixture(name="plugin_data", scope="session") + def fixture_plugin_data(self) -> dict[str, Any]: + """Returns mock data + + Returns: + An overridden data instance + """ + + return {} + + @pytest.fixture(name="plugin_type", scope="session") + def fixture_plugin_type(self) -> type[MockSCM]: + """A required testing hook that allows type generation + + Returns: + An overridden version control type + """ + return MockSCM diff --git a/tests/plugin_helper/__init__.py b/tests/plugin_helper/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/plugin_helper/data/default/pyproject.toml b/tests/plugin_helper/data/default/pyproject.toml new file mode 100644 index 0000000..0bd6eae --- /dev/null +++ b/tests/plugin_helper/data/default/pyproject.toml @@ -0,0 +1 @@ +Test Project File diff --git a/tests/plugin_helper/mock/__init__.py b/tests/plugin_helper/mock/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/plugin_helper/mock/generator.py b/tests/plugin_helper/mock/generator.py new file mode 100644 index 0000000..ba6a12c --- /dev/null +++ b/tests/plugin_helper/mock/generator.py @@ -0,0 +1,68 @@ +"""Shared definitions for testing.""" + +from typing import Any + +from cppython_core.plugin_schema.generator import ( + Generator, + GeneratorPluginGroupData, + SupportedGeneratorFeatures, +) +from cppython_core.schema import CorePluginData, CPPythonModel, Information, SyncData +from pydantic import DirectoryPath + + +class MockSyncData(SyncData): + """A Mock data type""" + + +class MockGeneratorData(CPPythonModel): + """Dummy data""" + + +class MockGenerator(Generator): + """A mock generator class for behavior testing""" + + def __init__( + self, group_data: GeneratorPluginGroupData, core_data: CorePluginData, configuration_data: dict[str, Any] + ) -> None: + self.group_data = group_data + self.core_data = core_data + self.configuration_data = MockGeneratorData(**configuration_data) + + @staticmethod + def features(directory: DirectoryPath) -> SupportedGeneratorFeatures: + """Broadcasts the shared features of the generator plugin to CPPython + + Args: + directory: The root directory where features are evaluated + + Returns: + The supported features + """ + return SupportedGeneratorFeatures() + + @staticmethod + def information() -> Information: + """Returns plugin information + + Returns: + The plugin information + """ + return Information() + + @staticmethod + def sync_types() -> list[type[SyncData]]: + """_summary_ + + Returns: + _description_ + """ + + return [MockSyncData] + + def sync(self, sync_data: SyncData) -> None: + """Synchronizes generator files and state with the providers input + + Args: + sync_data: List of information gathered from providers + """ diff --git a/tests/plugin_helper/mock/interface.py b/tests/plugin_helper/mock/interface.py new file mode 100644 index 0000000..656efc2 --- /dev/null +++ b/tests/plugin_helper/mock/interface.py @@ -0,0 +1,13 @@ +"""Mock interface definitions""" + +from cppython_core.schema import Interface + + +class MockInterface(Interface): + """A mock interface class for behavior testing""" + + def write_pyproject(self) -> None: + """Implementation of Interface function""" + + def write_configuration(self) -> None: + """Implementation of Interface function""" diff --git a/tests/plugin_helper/mock/provider.py b/tests/plugin_helper/mock/provider.py new file mode 100644 index 0000000..13c6fe3 --- /dev/null +++ b/tests/plugin_helper/mock/provider.py @@ -0,0 +1,94 @@ +"""Mock provider definitions""" + +from typing import Any + +from cppython_core.plugin_schema.generator import SyncConsumer +from cppython_core.plugin_schema.provider import ( + Provider, + ProviderPluginGroupData, + SupportedProviderFeatures, +) +from cppython_core.schema import CorePluginData, CPPythonModel, Information, SyncData +from pydantic import DirectoryPath + +from pytest_cppython.mock.generator import MockSyncData + + +class MockProviderData(CPPythonModel): + """Dummy data""" + + +class MockProvider(Provider): + """A mock provider class for behavior testing""" + + downloaded: DirectoryPath | None = None + + def __init__( + self, group_data: ProviderPluginGroupData, core_data: CorePluginData, configuration_data: dict[str, Any] + ) -> None: + self.group_data = group_data + self.core_data = core_data + self.configuration_data = MockProviderData(**configuration_data) + + @staticmethod + def features(directory: DirectoryPath) -> SupportedProviderFeatures: + """Broadcasts the shared features of the Provider plugin to CPPython + + Args: + directory: The root directory where features are evaluated + + Returns: + The supported features + """ + + return SupportedProviderFeatures() + + @staticmethod + def information() -> Information: + """Returns plugin information + + Returns: + The plugin information + """ + return Information() + + @staticmethod + def supported_sync_type(sync_type: type[SyncData]) -> bool: + """Broadcasts supported types + + Args: + sync_type: The input type + + Returns: + Support + """ + + return sync_type == MockSyncData + + def sync_data(self, consumer: SyncConsumer) -> SyncData | None: + """Gathers synchronization data + + Args: + consumer: The input consumer + + Returns: + The sync data object + """ + + # This is a mock class, so any generator sync type is OK + for sync_type in consumer.sync_types(): + match sync_type: + case underlying_type if underlying_type is MockSyncData: + return MockSyncData(provider_name=self.name()) + + return None + + @classmethod + async def download_tooling(cls, directory: DirectoryPath) -> None: + cls.downloaded = directory + + def install(self) -> None: + pass + + def update(self) -> None: + pass diff --git a/tests/plugin_helper/mock/scm.py b/tests/plugin_helper/mock/scm.py new file mode 100644 index 0000000..4844abf --- /dev/null +++ b/tests/plugin_helper/mock/scm.py @@ -0,0 +1,49 @@ +"""Mock SCM definitions""" + +from cppython_core.plugin_schema.scm import ( + SCM, + SCMPluginGroupData, + SupportedSCMFeatures, +) +from cppython_core.schema import Information +from pydantic import DirectoryPath + + +class MockSCM(SCM): + """A mock generator class for behavior testing""" + + def __init__(self, group_data: SCMPluginGroupData) -> None: + self.group_data = group_data + + @staticmethod + def features(directory: DirectoryPath) -> SupportedSCMFeatures: + """Broadcasts the shared features of the SCM plugin to CPPython + + Args: + directory: The root directory where features are evaluated + + Returns: + The supported features + """ + + return SupportedSCMFeatures(repository=True) + + @staticmethod + def information() -> Information: + """Returns plugin information + + Returns: + The plugin information + """ + return Information() + + def version(self, directory: DirectoryPath) -> str: + """Extracts the system's version metadata + + Args: + directory: The repository path + + Returns: + A version + """ + return "1.0.0" diff --git a/tests/plugin_helper/plugin.py b/tests/plugin_helper/plugin.py new file mode 100644 index 0000000..c688c2b --- /dev/null +++ b/tests/plugin_helper/plugin.py @@ -0,0 +1,332 @@ +"""Direct Fixtures""" + +import shutil +from pathlib import Path +from typing import cast + +import pytest +from cppython_core.plugin_schema.generator import Generator +from cppython_core.plugin_schema.provider import Provider +from cppython_core.plugin_schema.scm import SCM +from cppython_core.resolution import ( + PluginBuildData, + PluginCPPythonData, + resolve_cppython, + resolve_pep621, + resolve_project_configuration, +) +from cppython_core.schema import ( + CoreData, + CPPythonData, + CPPythonGlobalConfiguration, + CPPythonLocalConfiguration, + PEP621Configuration, + PEP621Data, + ProjectConfiguration, + ProjectData, + PyProject, + ToolData, +) + +from pytest_cppython.variants import ( + cppython_global_variants, + cppython_local_variants, + pep621_variants, + project_variants, +) + + +@pytest.fixture( + name="install_path", + scope="session", +) +def fixture_install_path(tmp_path_factory: pytest.TempPathFactory) -> Path: + """Creates temporary install location + Args: + tmp_path_factory: Factory for centralized temporary directories + Returns: + A temporary directory + """ + path = tmp_path_factory.getbasetemp() + path.mkdir(parents=True, exist_ok=True) + return path + + +@pytest.fixture( + name="pep621_configuration", + scope="session", + params=pep621_variants, +) +def fixture_pep621_configuration(request: pytest.FixtureRequest) -> PEP621Configuration: + """Fixture defining all testable variations of PEP621 + + Args: + request: Parameterization list + + Returns: + PEP621 variant + """ + + return cast(PEP621Configuration, request.param) + + +@pytest.fixture( + name="pep621_data", + scope="session", +) +def fixture_pep621_data( + pep621_configuration: PEP621Configuration, project_configuration: ProjectConfiguration +) -> PEP621Data: + """Resolved project table fixture + + Args: + pep621_configuration: The input configuration to resolve + project_configuration: The project configuration to help with the resolve + + Returns: + The resolved project table + """ + + return resolve_pep621(pep621_configuration, project_configuration, None) + + +@pytest.fixture( + name="cppython_local_configuration", + scope="session", + params=cppython_local_variants, +) +def fixture_cppython_local_configuration( + request: pytest.FixtureRequest, install_path: Path +) -> CPPythonLocalConfiguration: + """Fixture defining all testable variations of CPPythonData + + Args: + request: Parameterization list + install_path: The temporary install directory + + Returns: + Variation of CPPython data + """ + cppython_local_configuration = cast(CPPythonLocalConfiguration, request.param) + + data = cppython_local_configuration.model_dump(by_alias=True) + + # Pin the install location to the base temporary directory + data["install-path"] = install_path + + # Fill the plugin names with mocked values + data["provider-name"] = "mock" + data["generator-name"] = "mock" + + return CPPythonLocalConfiguration(**data) + + +@pytest.fixture( + name="cppython_global_configuration", + scope="session", + params=cppython_global_variants, +) +def fixture_cppython_global_configuration(request: pytest.FixtureRequest) -> CPPythonGlobalConfiguration: + """Fixture defining all testable variations of CPPythonData + + Args: + request: Parameterization list + + Returns: + Variation of CPPython data + """ + cppython_global_configuration = cast(CPPythonGlobalConfiguration, request.param) + + return cppython_global_configuration + + +@pytest.fixture( + name="plugin_build_data", + scope="session", +) +def fixture_plugin_build_data( + provider_type: type[Provider], + generator_type: type[Generator], + scm_type: type[SCM], +) -> PluginBuildData: + """Fixture for constructing resolved CPPython table data + + Args: + provider_type: The provider type + generator_type: The generator type + scm_type: The scm type + + Returns: + The plugin build data + """ + + return PluginBuildData(generator_type=generator_type, provider_type=provider_type, scm_type=scm_type) + + +@pytest.fixture( + name="plugin_cppython_data", + scope="session", +) +def fixture_plugin_cppython_data( + provider_type: type[Provider], + generator_type: type[Generator], + scm_type: type[SCM], +) -> PluginCPPythonData: + """Fixture for constructing resolved CPPython table data + + Args: + provider_type: The provider type + generator_type: The generator type + scm_type: The scm type + + Returns: + The plugin data for CPPython resolution + """ + + return PluginCPPythonData( + generator_name=generator_type.name(), provider_name=provider_type.name(), scm_name=scm_type.name() + ) + + +@pytest.fixture( + name="cppython_data", + scope="session", +) +def fixture_cppython_data( + cppython_local_configuration: CPPythonLocalConfiguration, + cppython_global_configuration: CPPythonGlobalConfiguration, + project_data: ProjectData, + plugin_cppython_data: PluginCPPythonData, +) -> CPPythonData: + """Fixture for constructing resolved CPPython table data + + Args: + cppython_local_configuration: The local configuration to resolve + cppython_global_configuration: The global configuration to resolve + project_data: The project data to help with the resolve + plugin_cppython_data: Plugin data for CPPython resolution + + Returns: + The resolved CPPython table + """ + + return resolve_cppython( + cppython_local_configuration, cppython_global_configuration, project_data, plugin_cppython_data + ) + + +@pytest.fixture( + name="core_data", +) +def fixture_core_data(cppython_data: CPPythonData, project_data: ProjectData) -> CoreData: + """Fixture for creating the wrapper CoreData type + + Args: + cppython_data: CPPython data + project_data: The project data + + Returns: + Wrapper Core Type + """ + + return CoreData(cppython_data=cppython_data, project_data=project_data) + + +@pytest.fixture(name="plugin_data_path", scope="session") +def fixture_plugin_data_path(internal_plugin_data_path: list[Path | None]) -> list[Path | None]: + """Fixture cache of internal_plugin_data_path + + Args: + internal_plugin_data_path: The input meta data + + Returns: + The session scoped data + """ + + return internal_plugin_data_path + + +@pytest.fixture(name="data_path", scope="session") +def fixture_data_path(internal_data_path: list[Path]) -> list[Path]: + """Fixture cache of internal_data_path + + Args: + internal_data_path: The input meta data + + Returns: + The session scoped data + """ + + return internal_data_path + + +@pytest.fixture( + name="project_configuration", + scope="session", + params=project_variants, +) +def fixture_project_configuration( + request: pytest.FixtureRequest, + tmp_path_factory: pytest.TempPathFactory, + data_path: Path, + plugin_data_path: Path | None, +) -> ProjectConfiguration: + """Project configuration fixture + + Args: + request: Parameterized configuration data + tmp_path_factory: Factory for centralized temporary directories + data_path: Project file requirements + plugin_data_path: Parameterized path to a data directory + + Returns: + Configuration with temporary directory capabilities + """ + + tmp_path = tmp_path_factory.mktemp("workspace-") + + shutil.copytree(data_path, tmp_path, dirs_exist_ok=True) + + if plugin_data_path is not None: + shutil.copytree(plugin_data_path, tmp_path, dirs_exist_ok=True) + + configuration = cast(ProjectConfiguration, request.param) + + # Pin the project location + paths = list(tmp_path.rglob("pyproject.toml")) + + # 'paths' length guaranteed to be 1 + configuration.pyproject_file = paths[0].resolve() + + return configuration + + +@pytest.fixture( + name="project_data", + scope="session", +) +def fixture_project_data(project_configuration: ProjectConfiguration) -> ProjectData: + """Fixture that creates a project space at 'workspace/test_project/pyproject.toml' + Args: + project_configuration: Project data + Returns: + A project data object that has populated a function level temporary directory + """ + + return resolve_project_configuration(project_configuration) + + +@pytest.fixture(name="project") +def fixture_project( + cppython_local_configuration: CPPythonLocalConfiguration, pep621_configuration: PEP621Configuration +) -> PyProject: + """Parameterized construction of PyProject data + Args: + cppython_local_configuration: The parameterized cppython table + pep621_configuration: The project table + Returns: + All the data as one object + """ + + tool = ToolData(cppython=cppython_local_configuration) + return PyProject(project=pep621_configuration, tool=tool) diff --git a/tests/plugin_helper/py.typed b/tests/plugin_helper/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/tests/plugin_helper/shared.py b/tests/plugin_helper/shared.py new file mode 100644 index 0000000..cd6248d --- /dev/null +++ b/tests/plugin_helper/shared.py @@ -0,0 +1,455 @@ +"""Composable test types""" + +from abc import ABCMeta +from pathlib import Path +from typing import Any, LiteralString, cast + +import pytest +from cppython_core.plugin_schema.generator import Generator, GeneratorPluginGroupData +from cppython_core.plugin_schema.provider import Provider, ProviderPluginGroupData +from cppython_core.plugin_schema.scm import SCM, SCMPluginGroupData +from cppython_core.resolution import ( + resolve_cppython_plugin, + resolve_generator, + resolve_provider, + resolve_scm, +) +from cppython_core.schema import ( + CorePluginData, + CPPythonData, + CPPythonPluginData, + DataPlugin, + DataPluginGroupData, + PEP621Data, + Plugin, + PluginGroupData, + ProjectConfiguration, + ProjectData, +) +from pytest_synodic.plugin import BaseTests as SynodicBaseTests +from pytest_synodic.plugin import IntegrationTests as SynodicBaseIntegrationTests +from pytest_synodic.plugin import UnitTests as SynodicBaseUnitTests + +from pytest_cppython.variants import generator_variants, provider_variants, scm_variants + + +class BaseTests[T: Plugin](SynodicBaseTests[T], metaclass=ABCMeta): + """Shared testing information for all plugin test classes.""" + + @pytest.fixture(name="plugin_type", scope="session") + def fixture_plugin_type(self) -> type[T]: + """A required testing hook that allows type generation""" + + raise NotImplementedError("Override this fixture") + + @pytest.fixture( + name="cppython_plugin_data", + scope="session", + ) + def fixture_cppython_plugin_data(self, cppython_data: CPPythonData, plugin_type: type[T]) -> CPPythonPluginData: + """Fixture for created the plugin CPPython table + + Args: + cppython_data: The CPPython table to help the resolve + plugin_type: The data plugin type + + Returns: + The plugin specific CPPython table information + """ + + return resolve_cppython_plugin(cppython_data, plugin_type) + + @pytest.fixture( + name="core_plugin_data", + scope="session", + ) + def fixture_core_plugin_data( + self, cppython_plugin_data: CPPythonPluginData, project_data: ProjectData, pep621_data: PEP621Data + ) -> CorePluginData: + """Fixture for creating the wrapper CoreData type + + Args: + cppython_plugin_data: CPPython data + project_data: The project data + pep621_data: Project table data + + Returns: + Wrapper Core Type + """ + + return CorePluginData(cppython_data=cppython_plugin_data, project_data=project_data, pep621_data=pep621_data) + + @pytest.fixture(name="plugin_group_name", scope="session") + def fixture_plugin_group_name(self) -> LiteralString: + """A required testing hook that allows plugin group name generation + + Returns: + The plugin group name + """ + + return "cppython" + + +class BaseIntegrationTests[T: Plugin](SynodicBaseIntegrationTests[T], metaclass=ABCMeta): + """Integration testing information for all plugin test classes""" + + +class BaseUnitTests[T: Plugin](SynodicBaseUnitTests[T], metaclass=ABCMeta): + """Unit testing information for all plugin test classes""" + + def test_feature_extraction(self, plugin_type: type[T], project_configuration: ProjectConfiguration) -> None: + """Test the feature extraction of a plugin. + + This method tests the feature extraction functionality of a plugin by asserting that the features + returned by the plugin are correct for the given project configuration. + + Args: + plugin_type: The type of plugin to test. + project_configuration: The project configuration to use for testing. + """ + assert plugin_type.features(project_configuration.pyproject_file.parent) + + def test_information(self, plugin_type: type[T]) -> None: + """Test the information method of a plugin. + + This method asserts that the `information` method of the given plugin type returns a value. + + Args: + plugin_type: The type of the plugin to test. + """ + assert plugin_type.information() + + +class PluginTests[T: Plugin](BaseTests[T], metaclass=ABCMeta): + """Testing information for basic plugin test classes.""" + + @staticmethod + @pytest.fixture( + name="plugin", + scope="session", + ) + def fixture_plugin( + plugin_type: type[T], + plugin_group_data: PluginGroupData, + ) -> T: + """Overridden plugin generator for creating a populated data plugin type + + Args: + plugin_type: Plugin type + plugin_group_data: The data group configuration + + Returns: + A newly constructed provider + """ + + plugin = plugin_type(plugin_group_data) + + return plugin + + +class PluginIntegrationTests[T: Plugin](BaseIntegrationTests[T], metaclass=ABCMeta): + """Integration testing information for basic plugin test classes""" + + +class PluginUnitTests[T: Plugin](BaseUnitTests[T], metaclass=ABCMeta): + """Unit testing information for basic plugin test classes""" + + +class DataPluginTests[T: DataPlugin](BaseTests[T], metaclass=ABCMeta): + """Shared testing information for all data plugin test classes. + Not inheriting PluginTests to reduce ancestor count + """ + + @staticmethod + @pytest.fixture( + name="plugin", + scope="session", + ) + def fixture_plugin( + plugin_type: type[T], + plugin_group_data: DataPluginGroupData, + core_plugin_data: CorePluginData, + plugin_data: dict[str, Any], + ) -> T: + """Overridden plugin generator for creating a populated data plugin type + + Args: + plugin_type: Plugin type + plugin_group_data: The data group configuration + core_plugin_data: The core metadata + plugin_data: The data table + + Returns: + A newly constructed provider + """ + + plugin = plugin_type(plugin_group_data, core_plugin_data, plugin_data) + + return plugin + + +class DataPluginIntegrationTests[T: DataPlugin](BaseIntegrationTests[T], metaclass=ABCMeta): + """Integration testing information for all data plugin test classes""" + + +class DataPluginUnitTests[T: DataPlugin](BaseUnitTests[T], metaclass=ABCMeta): + """Unit testing information for all data plugin test classes""" + + def test_pyproject_undefined(self, plugin_data_path: Path | None) -> None: + """Verifies that the directory data provided by plugins does not contain a pyproject.toml file + + Args: + plugin_data_path: The plugin's tests/data directory + """ + + if plugin_data_path is not None: + paths = list(plugin_data_path.rglob("pyproject.toml")) + + assert not paths + + +class ProviderTests[T: Provider](DataPluginTests[T], metaclass=ABCMeta): + """Shared functionality between the different Provider testing categories""" + + @pytest.fixture(name="plugin_configuration_type", scope="session") + def fixture_plugin_configuration_type(self) -> type[ProviderPluginGroupData]: + """A required testing hook that allows plugin configuration data generation + + Returns: + The configuration type + """ + + return ProviderPluginGroupData + + @pytest.fixture(name="plugin_group_data", scope="session") + def fixture_plugin_group_data( + self, project_data: ProjectData, cppython_plugin_data: CPPythonPluginData + ) -> ProviderPluginGroupData: + """Generates plugin configuration data generation from environment configuration + + Args: + project_data: The project data fixture + cppython_plugin_data:The plugin configuration fixture + + Returns: + The plugin configuration + """ + + return resolve_provider(project_data=project_data, cppython_data=cppython_plugin_data) + + @pytest.fixture( + name="provider_type", + scope="session", + params=provider_variants, + ) + def fixture_provider_type(self, plugin_type: type[T]) -> type[T]: + """Fixture defining all testable variations mock Providers + + Args: + plugin_type: Plugin type + + Returns: + Variation of a Provider + """ + return plugin_type + + @pytest.fixture( + name="generator_type", + scope="session", + params=generator_variants, + ) + def fixture_generator_type(self, request: pytest.FixtureRequest) -> type[Generator]: + """Fixture defining all testable variations mock Generator + + Args: + request: Parameterization list + + Returns: + Variation of a Generator + """ + generator_type = cast(type[Generator], request.param) + + return generator_type + + @pytest.fixture( + name="scm_type", + scope="session", + params=scm_variants, + ) + def fixture_scm_type(self, request: pytest.FixtureRequest) -> type[SCM]: + """Fixture defining all testable variations mock Generator + + Args: + request: Parameterization list + + Returns: + Variation of a Generator + """ + scm_type = cast(type[SCM], request.param) + + return scm_type + + +class GeneratorTests[T: Generator](DataPluginTests[T], metaclass=ABCMeta): + """Shared functionality between the different Generator testing categories""" + + @pytest.fixture(name="plugin_configuration_type", scope="session") + def fixture_plugin_configuration_type(self) -> type[GeneratorPluginGroupData]: + """A required testing hook that allows plugin configuration data generation + + Returns: + The configuration type + """ + + return GeneratorPluginGroupData + + @pytest.fixture(name="plugin_group_data", scope="session") + def fixture_plugin_group_data( + self, project_data: ProjectData, cppython_plugin_data: CPPythonPluginData + ) -> GeneratorPluginGroupData: + """Generates plugin configuration data generation from environment configuration + + Args: + project_data: The project data fixture + cppython_plugin_data:The plugin configuration fixture + + Returns: + The plugin configuration + """ + + return resolve_generator(project_data=project_data, cppython_data=cppython_plugin_data) + + @pytest.fixture( + name="provider_type", + scope="session", + params=provider_variants, + ) + def fixture_provider_type(self, request: pytest.FixtureRequest) -> type[Provider]: + """Fixture defining all testable variations mock Providers + + Args: + request: Parameterization list + + Returns: + Variation of a Provider + """ + provider_type = cast(type[Provider], request.param) + + return provider_type + + @pytest.fixture( + name="generator_type", + scope="session", + ) + def fixture_generator_type(self, plugin_type: type[T]) -> type[T]: + """Override + + Args: + plugin_type: Plugin type + + Returns: + Plugin type + """ + + return plugin_type + + @pytest.fixture( + name="scm_type", + scope="session", + params=scm_variants, + ) + def fixture_scm_type(self, request: pytest.FixtureRequest) -> type[SCM]: + """Fixture defining all testable variations mock Generator + + Args: + request: Parameterization list + + Returns: + Variation of a Generator + """ + scm_type = cast(type[SCM], request.param) + + return scm_type + + +class SCMTests[T: SCM](PluginTests[T], metaclass=ABCMeta): + """Shared functionality between the different SCM testing categories""" + + @pytest.fixture(name="plugin_configuration_type", scope="session") + def fixture_plugin_configuration_type(self) -> type[SCMPluginGroupData]: + """A required testing hook that allows plugin configuration data generation + + Returns: + The configuration type + """ + + return SCMPluginGroupData + + @pytest.fixture(name="plugin_group_data", scope="session") + def fixture_plugin_group_data( + self, project_data: ProjectData, cppython_plugin_data: CPPythonPluginData + ) -> SCMPluginGroupData: + """Generates plugin configuration data generation from environment configuration + + Args: + project_data: The project data fixture + cppython_plugin_data:The plugin configuration fixture + + Returns: + The plugin configuration + """ + + return resolve_scm(project_data=project_data, cppython_data=cppython_plugin_data) + + @pytest.fixture( + name="provider_type", + scope="session", + params=provider_variants, + ) + def fixture_provider_type(self, request: pytest.FixtureRequest) -> type[Provider]: + """Fixture defining all testable variations mock Providers + + Args: + request: Parameterization list + + Returns: + Variation of a Provider + """ + provider_type = cast(type[Provider], request.param) + + return provider_type + + @pytest.fixture( + name="generator_type", + scope="session", + params=generator_variants, + ) + def fixture_generator_type(self, request: pytest.FixtureRequest) -> type[Generator]: + """Fixture defining all testable variations mock Generator + + Args: + request: Parameterization list + + Returns: + Variation of a Generator + """ + generator_type = cast(type[Generator], request.param) + + return generator_type + + @pytest.fixture( + name="scm_type", + scope="session", + params=scm_variants, + ) + def fixture_scm_type(self, plugin_type: type[T]) -> type[SCM]: + """Fixture defining all testable variations mock Generator + + Args: + plugin_type: Parameterization list + + Returns: + Variation of a Generator + """ + + return plugin_type diff --git a/tests/plugin_helper/tests.py b/tests/plugin_helper/tests.py new file mode 100644 index 0000000..2090f17 --- /dev/null +++ b/tests/plugin_helper/tests.py @@ -0,0 +1,99 @@ +"""Types to inherit from""" + +import asyncio +from abc import ABCMeta +from pathlib import Path + +import pytest +from cppython_core.plugin_schema.generator import Generator +from cppython_core.plugin_schema.provider import Provider +from cppython_core.plugin_schema.scm import SCM +from synodic_utilities.utility import canonicalize_type + +from pytest_cppython.shared import ( + DataPluginIntegrationTests, + DataPluginUnitTests, + GeneratorTests, + PluginIntegrationTests, + PluginUnitTests, + ProviderTests, + SCMTests, +) + + +class ProviderIntegrationTests[T: Provider](DataPluginIntegrationTests[T], ProviderTests[T], metaclass=ABCMeta): + """Base class for all provider integration tests that test plugin agnostic behavior""" + + @pytest.fixture(autouse=True, scope="session") + def _fixture_install_dependency(self, plugin: T, install_path: Path) -> None: + """Forces the download to only happen once per test session""" + + path = install_path / canonicalize_type(type(plugin)).name + path.mkdir(parents=True, exist_ok=True) + + asyncio.run(plugin.download_tooling(path)) + + def test_install(self, plugin: T) -> None: + """Ensure that the vanilla install command functions + + Args: + plugin: A newly constructed provider + """ + plugin.install() + + def test_update(self, plugin: T) -> None: + """Ensure that the vanilla update command functions + + Args: + plugin: A newly constructed provider + """ + plugin.update() + + def test_group_name(self, plugin_type: type[T]) -> None: + """Verifies that the group name is the same as the plugin type + + Args: + plugin_type: The type to register + """ + assert canonicalize_type(plugin_type).group == "provider" + + +class ProviderUnitTests[T: Provider](DataPluginUnitTests[T], ProviderTests[T], metaclass=ABCMeta): + """Custom implementations of the Provider class should inherit from this class for its tests. + Base class for all provider unit tests that test plugin agnostic behavior + """ + + +class GeneratorIntegrationTests[T: Generator](DataPluginIntegrationTests[T], GeneratorTests[T], metaclass=ABCMeta): + """Base class for all scm integration tests that test plugin agnostic behavior""" + + def test_group_name(self, plugin_type: type[T]) -> None: + """Verifies that the group name is the same as the plugin type + + Args: + plugin_type: The type to register + """ + assert canonicalize_type(plugin_type).group == "generator" + + +class GeneratorUnitTests[T: Generator](DataPluginUnitTests[T], GeneratorTests[T], metaclass=ABCMeta): + """Custom implementations of the Generator class should inherit from this class for its tests. + Base class for all Generator unit tests that test plugin agnostic behavior""" + + +class SCMIntegrationTests[T: SCM](PluginIntegrationTests[T], SCMTests[T], metaclass=ABCMeta): + """Base class for all generator integration tests that test plugin agnostic behavior""" + + def test_group_name(self, plugin_type: type[T]) -> None: + """Verifies that the group name is the same as the plugin type + + Args: + plugin_type: The type to register + """ + assert canonicalize_type(plugin_type).group == "scm" + + +class SCMUnitTests[T: SCM](PluginUnitTests[T], SCMTests[T], metaclass=ABCMeta): + """Custom implementations of the Generator class should inherit from this class for its tests. + Base class for all Generator unit tests that test plugin agnostic behavior + """ diff --git a/tests/plugin_helper/variants.py b/tests/plugin_helper/variants.py new file mode 100644 index 0000000..d024f38 --- /dev/null +++ b/tests/plugin_helper/variants.py @@ -0,0 +1,132 @@ +"""Data definitions""" + +from collections.abc import Sequence +from pathlib import Path + +from cppython_core.plugin_schema.generator import Generator +from cppython_core.plugin_schema.provider import Provider +from cppython_core.plugin_schema.scm import SCM +from cppython_core.schema import ( + CPPythonGlobalConfiguration, + CPPythonLocalConfiguration, + PEP621Configuration, + ProjectConfiguration, +) + +from pytest_cppython.mock.generator import MockGenerator +from pytest_cppython.mock.provider import MockProvider +from pytest_cppython.mock.scm import MockSCM + + +def _pep621_configuration_list() -> list[PEP621Configuration]: + """Creates a list of mocked configuration types + + Returns: + A list of variants to test + """ + variants = [] + + # Default + variants.append(PEP621Configuration(name="default-test", version="1.0.0")) + + return variants + + +def _cppython_local_configuration_list() -> list[CPPythonLocalConfiguration]: + """Mocked list of local configuration data + + Returns: + A list of variants to test + """ + variants = [] + + # Default + variants.append(CPPythonLocalConfiguration()) + + return variants + + +def _cppython_global_configuration_list() -> list[CPPythonGlobalConfiguration]: + """Mocked list of global configuration data + + Returns: + A list of variants to test + """ + variants = [] + + data = {"current-check": False} + + # Default + variants.append(CPPythonGlobalConfiguration()) + + # Check off + variants.append(CPPythonGlobalConfiguration(**data)) + + return variants + + +def _project_configuration_list() -> list[ProjectConfiguration]: + """Mocked list of project configuration data + + Returns: + A list of variants to test + """ + variants = [] + + # NOTE: pyproject_file will be overridden by fixture + + # Default + variants.append(ProjectConfiguration(pyproject_file=Path("pyproject.toml"), version="0.1.0")) + + return variants + + +def _mock_provider_list() -> Sequence[type[Provider]]: + """Mocked list of providers + + Returns: + A list of mock providers + """ + variants = [] + + # Default + variants.append(MockProvider) + + return variants + + +def _mock_generator_list() -> Sequence[type[Generator]]: + """Mocked list of generators + + Returns: + List of mock generators + """ + variants = [] + + # Default + variants.append(MockGenerator) + + return variants + + +def _mock_scm_list() -> Sequence[type[SCM]]: + """Mocked list of SCMs + + Returns: + List of mock SCMs + """ + variants = [] + + # Default + variants.append(MockSCM) + + return variants + + +pep621_variants = _pep621_configuration_list() +cppython_local_variants = _cppython_local_configuration_list() +cppython_global_variants = _cppython_global_configuration_list() +project_variants = _project_configuration_list() +provider_variants = _mock_provider_list() +generator_variants = _mock_generator_list() +scm_variants = _mock_scm_list() diff --git a/tests/unit/core/__init__.py b/tests/unit/core/__init__.py new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/tests/unit/core/__init__.py @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/unit/core/test_plugin_schema.py b/tests/unit/core/test_plugin_schema.py new file mode 100644 index 0000000..6f04954 --- /dev/null +++ b/tests/unit/core/test_plugin_schema.py @@ -0,0 +1,115 @@ +"""Test plugin schemas""" + +from synodic_utilities.utility import TypeName + +from cppython_core.plugin_schema.generator import SyncConsumer +from cppython_core.plugin_schema.provider import SyncProducer +from cppython_core.schema import SyncData + + +class TestSchema: + """Test validation""" + + class GeneratorSyncDataSuccess(SyncData): + """Dummy generator data""" + + success: bool + + class GeneratorSyncDataFail(SyncData): + """Dummy generator data""" + + failure: bool + + class Consumer(SyncConsumer): + """Dummy consumer""" + + @staticmethod + def sync_types() -> list[type[SyncData]]: + """Fulfils protocol + + Returns: + Fulfils protocol + """ + + return [TestSchema.GeneratorSyncDataSuccess, TestSchema.GeneratorSyncDataFail] + + def sync(self, sync_data: SyncData) -> None: + """Fulfils protocol + + Args: + sync_data: Fulfils protocol + """ + + if isinstance(sync_data, TestSchema.GeneratorSyncDataSuccess): + assert sync_data.success + else: + assert False + + class Producer(SyncProducer): + """Dummy producer""" + + @staticmethod + def supported_sync_type(sync_type: type[SyncData]) -> bool: + """Fulfils protocol + + Args: + sync_type: Fulfils protocol + + Returns: + Fulfils protocol + """ + return sync_type == TestSchema.GeneratorSyncDataSuccess + + def sync_data(self, consumer: SyncConsumer) -> SyncData | None: + """Fulfils protocol + + Args: + consumer: Fulfils protocol + + Returns: + Fulfils protocol + """ + for sync_type in consumer.sync_types(): + if sync_type == TestSchema.GeneratorSyncDataSuccess: + return TestSchema.GeneratorSyncDataSuccess(provider_name=TypeName("Dummy"), success=True) + + return None + + def test_sync_broadcast(self) -> None: + """Verifies broadcast support""" + + consumer = self.Consumer() + producer = self.Producer() + + types = consumer.sync_types() + + assert producer.supported_sync_type(types[0]) + assert not producer.supported_sync_type(types[1]) + + def test_sync_production(self) -> None: + """Verifies the variant behavior of SyncData""" + + producer = self.Producer() + consumer = self.Consumer() + assert producer.sync_data(consumer) + + def test_sync_consumption(self) -> None: + """Verifies the variant behavior of SyncData""" + + consumer = self.Consumer() + + data = self.GeneratorSyncDataSuccess(provider_name=TypeName("Dummy"), success=True) + consumer.sync(data) + + def test_sync_flow(self) -> None: + """Verifies the variant behavior of SyncData""" + + consumer = self.Consumer() + producer = self.Producer() + + types = consumer.sync_types() + + for test in types: + if producer.supported_sync_type(test): + if data := producer.sync_data(consumer): + consumer.sync(data) diff --git a/tests/unit/core/test_resolution.py b/tests/unit/core/test_resolution.py new file mode 100644 index 0000000..00a6fa3 --- /dev/null +++ b/tests/unit/core/test_resolution.py @@ -0,0 +1,164 @@ +"""Test data resolution""" + +from pathlib import Path + +import pytest +from pydantic import Field +from synodic_utilities.utility import TypeName + +from cppython_core.exceptions import ConfigException +from cppython_core.plugin_schema.generator import Generator +from cppython_core.plugin_schema.provider import Provider +from cppython_core.plugin_schema.scm import SCM +from cppython_core.resolution import ( + PluginCPPythonData, + resolve_cppython, + resolve_cppython_plugin, + resolve_generator, + resolve_model, + resolve_pep621, + resolve_project_configuration, + resolve_provider, + resolve_scm, +) +from cppython_core.schema import ( + CoreData, + CPPythonGlobalConfiguration, + CPPythonLocalConfiguration, + CPPythonModel, + PEP621Configuration, + ProjectConfiguration, + ProjectData, +) + + +class TestResolve: + """Test resolution of data""" + + def test_pep621_resolve(self) -> None: + """Test the PEP621 schema resolve function""" + + data = PEP621Configuration(name="pep621-resolve-test", dynamic=["version"]) + config = ProjectConfiguration(pyproject_file=Path("pyproject.toml"), version="0.1.0") + resolved = resolve_pep621(data, config, None) + + class_variables = vars(resolved) + + assert len(class_variables) + assert not None in class_variables.values() + + def test_project_resolve(self) -> None: + """Tests project configuration resolution""" + + config = ProjectConfiguration(pyproject_file=Path("pyproject.toml"), version="0.1.0") + assert resolve_project_configuration(config) + + def test_cppython_resolve(self) -> None: + """Tests cppython configuration resolution""" + + cppython_local_configuration = CPPythonLocalConfiguration() + cppython_global_configuration = CPPythonGlobalConfiguration() + + config = ProjectConfiguration(pyproject_file=Path("pyproject.toml"), version="0.1.0") + project_data = resolve_project_configuration(config) + + plugin_build_data = PluginCPPythonData( + generator_name=TypeName("generator"), provider_name=TypeName("provider"), scm_name=TypeName("scm") + ) + + cppython_data = resolve_cppython( + cppython_local_configuration, cppython_global_configuration, project_data, plugin_build_data + ) + + assert cppython_data + + def test_model_resolve(self) -> None: + """Test model resolution""" + + class MockModel(CPPythonModel): + """Mock model for testing""" + + field: str = Field() + + bad_data = {"field": 4} + + with pytest.raises(ConfigException) as error: + resolve_model(MockModel, bad_data) + + assert error.value.error_count == 1 + + good_data = {"field": "good"} + + resolve_model(MockModel, good_data) + + def test_generator_resolve(self) -> None: + """Test generator resolution""" + + project_data = ProjectData(pyproject_file=Path("pyproject.toml")) + cppython_local_configuration = CPPythonLocalConfiguration() + cppython_global_configuration = CPPythonGlobalConfiguration() + + config = ProjectConfiguration(pyproject_file=Path("pyproject.toml"), version="0.1.0") + project_data = resolve_project_configuration(config) + + plugin_build_data = PluginCPPythonData( + generator_name=TypeName("generator"), provider_name=TypeName("provider"), scm_name=TypeName("scm") + ) + + cppython_data = resolve_cppython( + cppython_local_configuration, cppython_global_configuration, project_data, plugin_build_data + ) + + MockGenerator = type("MockGenerator", (Generator,), {}) + + cppython_plugin_data = resolve_cppython_plugin(cppython_data, MockGenerator) + + assert resolve_generator(project_data, cppython_plugin_data) + + def test_provider_resolve(self) -> None: + """Test provider resolution""" + + project_data = ProjectData(pyproject_file=Path("pyproject.toml")) + cppython_local_configuration = CPPythonLocalConfiguration() + cppython_global_configuration = CPPythonGlobalConfiguration() + + config = ProjectConfiguration(pyproject_file=Path("pyproject.toml"), version="0.1.0") + project_data = resolve_project_configuration(config) + + plugin_build_data = PluginCPPythonData( + generator_name=TypeName("generator"), provider_name=TypeName("provider"), scm_name=TypeName("scm") + ) + + cppython_data = resolve_cppython( + cppython_local_configuration, cppython_global_configuration, project_data, plugin_build_data + ) + + MockProvider = type("MockProvider", (Provider,), {}) + + cppython_plugin_data = resolve_cppython_plugin(cppython_data, MockProvider) + + assert resolve_provider(project_data, cppython_plugin_data) + + def test_scm_resolve(self) -> None: + """Test scm resolution""" + + project_data = ProjectData(pyproject_file=Path("pyproject.toml")) + cppython_local_configuration = CPPythonLocalConfiguration() + cppython_global_configuration = CPPythonGlobalConfiguration() + + config = ProjectConfiguration(pyproject_file=Path("pyproject.toml"), version="0.1.0") + project_data = resolve_project_configuration(config) + + plugin_build_data = PluginCPPythonData( + generator_name=TypeName("generator"), provider_name=TypeName("provider"), scm_name=TypeName("scm") + ) + + cppython_data = resolve_cppython( + cppython_local_configuration, cppython_global_configuration, project_data, plugin_build_data + ) + + MockSCM = type("MockSCM", (SCM,), {}) + + cppython_plugin_data = resolve_cppython_plugin(cppython_data, MockSCM) + + assert resolve_scm(project_data, cppython_plugin_data) diff --git a/tests/unit/core/test_schema.py b/tests/unit/core/test_schema.py new file mode 100644 index 0000000..ee5aa2d --- /dev/null +++ b/tests/unit/core/test_schema.py @@ -0,0 +1,60 @@ +"""Test custom schema validation that cannot be verified by the Pydantic validation""" + +from tomllib import loads + +import pytest +from pydantic import Field + +from cppython_core.schema import ( + CPPythonGlobalConfiguration, + CPPythonLocalConfiguration, + CPPythonModel, + PEP621Configuration, +) + + +class TestSchema: + """Test validation""" + + class Model(CPPythonModel): + """Testing Model""" + + aliased_variable: bool = Field(default=False, alias="aliased-variable", description="Alias test") + + def test_model_construction(self) -> None: + """Verifies that the base model type has the expected construction behaviors""" + + model = self.Model(**{"aliased_variable": True}) + assert model.aliased_variable is False + + model = self.Model(**{"aliased-variable": True}) + assert model.aliased_variable is True + + def test_model_construction_from_data(self) -> None: + """Verifies that the base model type has the expected construction behaviors""" + + toml_str = """ + aliased_variable = false\n + aliased-variable = true + """ + + data = loads(toml_str) + result = self.Model.model_validate(data) + assert result.aliased_variable is True + + def test_cppython_local(self) -> None: + """Ensures that the CPPython local config data can be defaulted""" + CPPythonLocalConfiguration() + + def test_cppython_global(self) -> None: + """Ensures that the CPPython global config data can be defaulted""" + CPPythonGlobalConfiguration() + + def test_pep621_version(self) -> None: + """Tests the dynamic version validation""" + + with pytest.raises(ValueError): + PEP621Configuration(name="empty-test") + + with pytest.raises(ValueError): + PEP621Configuration(name="both-test", version="1.0.0", dynamic=["version"]) diff --git a/tests/unit/plugin_helper/__init__.py b/tests/unit/plugin_helper/__init__.py new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/tests/unit/plugin_helper/__init__.py @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/unit/plugin_helper/test_fixtures.py b/tests/unit/plugin_helper/test_fixtures.py new file mode 100644 index 0000000..f4ca3a2 --- /dev/null +++ b/tests/unit/plugin_helper/test_fixtures.py @@ -0,0 +1,42 @@ +"""Tests for fixtures""" + +from pathlib import Path + + +class TestFixtures: + """Tests for fixtures""" + + def test_pyproject_undefined(self, data_path: Path) -> None: + """Verifies that the directory data provided by pytest_cppython contains a pyproject.toml file + + Args: + data_path: The project's tests/data directory + """ + + paths = list(data_path.rglob("pyproject.toml")) + + assert len(paths) == 1 + + def test_data_directory(self, plugin_data_path: Path | None) -> None: + """Verifies that the directory data provided by pytest_cppython contains a pyproject.toml file + + Args: + plugin_data_path: The plugins tests/data directory + """ + + assert plugin_data_path is not None + + requirement = plugin_data_path / "requirement.txt" + + assert requirement.exists() + + def test_build_directory(self, build_test_build: Path) -> None: + """Verifies that the build data provided is the expected path + + Args: + build_test_build: The plugins build folder directory + """ + + requirement = build_test_build / "build.txt" + + assert requirement.exists() diff --git a/tests/unit/plugin_helper/test_generator.py b/tests/unit/plugin_helper/test_generator.py new file mode 100644 index 0000000..1a504d4 --- /dev/null +++ b/tests/unit/plugin_helper/test_generator.py @@ -0,0 +1,31 @@ +"""Tests the integration test plugin""" + +from typing import Any + +import pytest + +from pytest_cppython.mock.generator import MockGenerator +from pytest_cppython.tests import GeneratorUnitTests + + +class TestCPPythonGenerator(GeneratorUnitTests[MockGenerator]): + """The tests for the Mock generator""" + + @pytest.fixture(name="plugin_data", scope="session") + def fixture_plugin_data(self) -> dict[str, Any]: + """Returns mock data + + Returns: + An overridden data instance + """ + + return {} + + @pytest.fixture(name="plugin_type", scope="session") + def fixture_plugin_type(self) -> type[MockGenerator]: + """A required testing hook that allows type generation + + Returns: + An overridden generator type + """ + return MockGenerator diff --git a/tests/unit/plugin_helper/test_provider.py b/tests/unit/plugin_helper/test_provider.py new file mode 100644 index 0000000..d6ef206 --- /dev/null +++ b/tests/unit/plugin_helper/test_provider.py @@ -0,0 +1,46 @@ +"""Test the functions related to the internal provider implementation and the 'Provider' interface itself""" + +from typing import Any + +import pytest +from pytest_mock import MockerFixture + +from pytest_cppython.mock.generator import MockGenerator +from pytest_cppython.mock.provider import MockProvider +from pytest_cppython.tests import ProviderUnitTests + + +class TestMockProvider(ProviderUnitTests[MockProvider]): + """The tests for our Mock provider""" + + @pytest.fixture(name="plugin_data", scope="session") + def fixture_provider_data(self) -> dict[str, Any]: + """Returns mock data + + Returns: + An overridden data instance + """ + + return {} + + @pytest.fixture(name="plugin_type", scope="session") + def fixture_plugin_type(self) -> type[MockProvider]: + """A required testing hook that allows type generation + + Returns: + An overridden provider type + """ + return MockProvider + + def test_sync_types(self, plugin: MockProvider, mocker: MockerFixture) -> None: + """Verify that the mock provider can handle the mock generator's sync data + + Args: + plugin: The plugin instance + mocker: The pytest-mock fixture + """ + + mock_generator = mocker.Mock(spec=MockGenerator) + mock_generator.sync_types.return_value = MockGenerator.sync_types() + + assert plugin.sync_data(mock_generator) diff --git a/tests/unit/plugin_helper/test_scm.py b/tests/unit/plugin_helper/test_scm.py new file mode 100644 index 0000000..a5f4f58 --- /dev/null +++ b/tests/unit/plugin_helper/test_scm.py @@ -0,0 +1,31 @@ +"""Tests the unit test plugin""" + +from typing import Any + +import pytest + +from pytest_cppython.mock.scm import MockSCM +from pytest_cppython.tests import SCMUnitTests + + +class TestCPPythonSCM(SCMUnitTests[MockSCM]): + """The tests for the Mock version control""" + + @pytest.fixture(name="plugin_data", scope="session") + def fixture_plugin_data(self) -> dict[str, Any]: + """Returns mock data + + Returns: + An overridden data instance + """ + + return {} + + @pytest.fixture(name="plugin_type", scope="session") + def fixture_plugin_type(self) -> type[MockSCM]: + """A required testing hook that allows type generation + + Returns: + An overridden version control type + """ + return MockSCM diff --git a/tests/unit/utility/__init__.py b/tests/unit/utility/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/unit/utility/test_plugin.py b/tests/unit/utility/test_plugin.py new file mode 100644 index 0000000..5b305f1 --- /dev/null +++ b/tests/unit/utility/test_plugin.py @@ -0,0 +1,20 @@ +"""This module tests the plugin functionality""" + +from synodic_utilities.plugin import Plugin + + +class MockPlugin(Plugin): + """A mock plugin""" + + +class TestPlugin: + """Tests the plugin functionality""" + + def test_plugin(self) -> None: + """Test that the plugin functionality works""" + + assert MockPlugin.name() == "mock" + assert MockPlugin.group() == "plugin" + + def test_todo(self) -> None: + """Another test TODO""" diff --git a/tests/unit/utility/test_utility.py b/tests/unit/utility/test_utility.py new file mode 100644 index 0000000..f9ffe14 --- /dev/null +++ b/tests/unit/utility/test_utility.py @@ -0,0 +1,210 @@ +"""Tests the scope of utilities""" + +import logging +from logging import StreamHandler +from pathlib import Path +from sys import executable +from typing import NamedTuple + +import pytest +from pytest import LogCaptureFixture + +from synodic_utilities.exception import ProcessError +from synodic_utilities.subprocess import call +from synodic_utilities.utility import canonicalize_name + +cppython_logger = logging.getLogger("cppython") +cppython_logger.addHandler(StreamHandler()) + + +class TestUtility: + """Tests the utility functionality""" + + class ModelTest(NamedTuple): + """Model definition to help test IO utilities""" + + test_path: Path + test_int: int + + def test_none(self) -> None: + """Verifies that no exception is thrown with an empty string""" + + test = canonicalize_name("") + + assert test.group == "" + assert test.name == "" + + def test_only_group(self) -> None: + """Verifies that no exception is thrown when only a group is specified""" + + test = canonicalize_name("Group") + + assert test.group == "group" + assert test.name == "" + + def test_name_group(self) -> None: + """Test that canonicalization works""" + + test = canonicalize_name("NameGroup") + + assert test.group == "group" + assert test.name == "name" + + def test_group_only_caps(self) -> None: + """Test that canonicalization works""" + test = canonicalize_name("NameGROUP") + + assert test.group == "group" + assert test.name == "name" + + def test_name_only_caps(self) -> None: + """Test that canonicalization works""" + test = canonicalize_name("NAMEGroup") + assert test.group == "group" + assert test.name == "name" + + def test_name_multi_caps(self) -> None: + """Test that caps works""" + test = canonicalize_name("NAmeGroup") + assert test.group == "group" + assert test.name == "name" + + +class TestSubprocess: + """Subprocess testing""" + + def test_subprocess_stdout(self, caplog: LogCaptureFixture) -> None: + """Test subprocess_call + + Args: + caplog: Fixture for capturing logging input + """ + + python = Path(executable) + + with caplog.at_level(logging.INFO): + call( + [python, "-c", "import sys; print('Test Out', file = sys.stdout)"], + cppython_logger, + ) + + assert len(caplog.records) == 1 + assert "Test Out" == caplog.records[0].message + + def test_subprocess_stderr(self, caplog: LogCaptureFixture) -> None: + """Test subprocess_call + + Args: + caplog: Fixture for capturing logging input + """ + + python = Path(executable) + + with caplog.at_level(logging.INFO): + call( + [python, "-c", "import sys; print('Test Error', file = sys.stderr)"], + cppython_logger, + ) + + assert len(caplog.records) == 1 + assert "Test Error" == caplog.records[0].message + + def test_subprocess_suppression(self, caplog: LogCaptureFixture) -> None: + """Test subprocess_call suppression flag + + Args: + caplog: Fixture for capturing logging input + """ + + python = Path(executable) + + with caplog.at_level(logging.INFO): + call( + [python, "-c", "import sys; print('Test Out', file = sys.stdout)"], + cppython_logger, + suppress=True, + ) + assert len(caplog.records) == 0 + + def test_subprocess_exit(self, caplog: LogCaptureFixture) -> None: + """Test subprocess_call exception output + + Args: + caplog: Fixture for capturing logging input + """ + + python = Path(executable) + + with pytest.raises(ProcessError) as exec_info, caplog.at_level(logging.INFO): + call( + [python, "-c", "import sys; sys.exit('Test Exit Output')"], + cppython_logger, + ) + + assert len(caplog.records) == 1 + assert "Test Exit Output" == caplog.records[0].message + + assert "Subprocess task failed" in str(exec_info.value) + + def test_subprocess_exception(self, caplog: LogCaptureFixture) -> None: + """Test subprocess_call exception output + + Args: + caplog: Fixture for capturing logging input + """ + + python = Path(executable) + + with pytest.raises(ProcessError) as exec_info, caplog.at_level(logging.INFO): + call( + [python, "-c", "import sys; raise Exception('Test Exception Output')"], + cppython_logger, + ) + assert len(caplog.records) == 1 + assert "Test Exception Output" == caplog.records[0].message + + assert "Subprocess task failed" in str(exec_info.value) + + def test_stderr_exception(self, caplog: LogCaptureFixture) -> None: + """Verify print and exit + + Args: + caplog: Fixture for capturing logging input + """ + python = Path(executable) + with pytest.raises(ProcessError) as exec_info, caplog.at_level(logging.INFO): + call( + [ + python, + "-c", + "import sys; print('Test Out', file = sys.stdout); sys.exit('Test Exit Out')", + ], + cppython_logger, + ) + assert len(caplog.records) == 2 + assert "Test Out" == caplog.records[0].message + assert "Test Exit Out" == caplog.records[1].message + + assert "Subprocess task failed" in str(exec_info.value) + + def test_stdout_exception(self, caplog: LogCaptureFixture) -> None: + """Verify print and exit + + Args: + caplog: Fixture for capturing logging input + """ + python = Path(executable) + with pytest.raises(ProcessError) as exec_info, caplog.at_level(logging.INFO): + call( + [ + python, + "-c", + "import sys; print('Test Error', file = sys.stderr); sys.exit('Test Exit Error')", + ], + cppython_logger, + ) + assert len(caplog.records) == 2 + assert "Test Error" == caplog.records[0].message + assert "Test Exit Error" == caplog.records[1].message + + assert "Subprocess task failed" in str(exec_info.value) From 6a7173fd78c0fc1884076074a8de9fdac530d57f Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Sat, 17 Aug 2024 15:46:54 -0400 Subject: [PATCH 18/68] Git --- cppython/plugins/__init__.py | 0 cppython/plugins/git/__init__.py | 1 + cppython/plugins/git/plugin.py | 62 +++++++++++++++++++ cppython/plugins/git/py.typed | 0 pyproject.toml | 4 ++ tests/unit/plugins/__init__.py | 1 + tests/unit/plugins/git/__init__.py | 1 + .../unit/plugins/git/test_version_control.py | 19 ++++++ 8 files changed, 88 insertions(+) create mode 100644 cppython/plugins/__init__.py create mode 100644 cppython/plugins/git/__init__.py create mode 100644 cppython/plugins/git/plugin.py create mode 100644 cppython/plugins/git/py.typed create mode 100644 tests/unit/plugins/__init__.py create mode 100644 tests/unit/plugins/git/__init__.py create mode 100644 tests/unit/plugins/git/test_version_control.py diff --git a/cppython/plugins/__init__.py b/cppython/plugins/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/cppython/plugins/git/__init__.py b/cppython/plugins/git/__init__.py new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/cppython/plugins/git/__init__.py @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/cppython/plugins/git/plugin.py b/cppython/plugins/git/plugin.py new file mode 100644 index 0000000..7dc5027 --- /dev/null +++ b/cppython/plugins/git/plugin.py @@ -0,0 +1,62 @@ +"""Git SCM plugin""" + +from pathlib import Path + +from cppython_core.plugin_schema.scm import ( + SCM, + SCMPluginGroupData, + SupportedSCMFeatures, +) +from cppython_core.schema import Information +from dulwich.errors import NotGitRepository +from dulwich.repo import Repo + + +class GitSCM(SCM): + """Git implementation hooks""" + + def __init__(self, group_data: SCMPluginGroupData) -> None: + self.group_data = group_data + + @staticmethod + def features(directory: Path) -> SupportedSCMFeatures: + """Broadcasts the shared features of the SCM plugin to CPPython + + Args: + directory: The root directory where features are evaluated + + Returns: + The supported features + """ + + is_repository = True + try: + Repo(str(directory)) + except NotGitRepository: + is_repository = False + + return SupportedSCMFeatures(repository=is_repository) + + @staticmethod + def information() -> Information: + """Extracts the system's version metadata + + Returns: + A version + """ + return Information() + + def version(self, directory: Path) -> str: + """Extracts the system's version metadata + + Args: + directory: The repository path + + Returns: + The git version + """ + return "" + + def description(self) -> str | None: + """Requests extraction of the project description""" + return None diff --git a/cppython/plugins/git/py.typed b/cppython/plugins/git/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/pyproject.toml b/pyproject.toml index eafdc44..c521997 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,6 +40,10 @@ repository = "https://github.com/Synodic-Software/CPPython" # [project.entry-points.pytest11] # pytest_cppython = "pytest_cppython.plugin" +# Plugin registration +[project.entry-points."cppython.scm"] +git = "cppython_git.plugin:GitSCM" + [tool.pdm.options] update = ["--update-all"] diff --git a/tests/unit/plugins/__init__.py b/tests/unit/plugins/__init__.py new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/tests/unit/plugins/__init__.py @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/unit/plugins/git/__init__.py b/tests/unit/plugins/git/__init__.py new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/tests/unit/plugins/git/__init__.py @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/unit/plugins/git/test_version_control.py b/tests/unit/plugins/git/test_version_control.py new file mode 100644 index 0000000..4d96693 --- /dev/null +++ b/tests/unit/plugins/git/test_version_control.py @@ -0,0 +1,19 @@ +"""Unit tests for the cppython SCM plugin""" + +import pytest +from pytest_cppython.tests import SCMUnitTests + +from cppython_git.plugin import GitSCM + + +class TestGitInterface(SCMUnitTests[GitSCM]): + """Unit tests for the Git SCM plugin""" + + @pytest.fixture(name="plugin_type", scope="session") + def fixture_plugin_type(self) -> type[GitSCM]: + """A required testing hook that allows type generation + + Returns: + The SCM type + """ + return GitSCM From 45795a4e877634ce09819d73dc8746b0ee34a55c Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Sat, 17 Aug 2024 15:52:44 -0400 Subject: [PATCH 19/68] Cmake --- cppython/plugins/cmake/__init__.py | 1 + cppython/plugins/cmake/builder.py | 67 +++++++++ cppython/plugins/cmake/plugin.py | 80 ++++++++++ cppython/plugins/cmake/resolution.py | 29 ++++ cppython/plugins/cmake/schema.py | 68 +++++++++ pyproject.toml | 4 +- tests/conftest.py | 42 ++++++ .../data/cmake/default/CMakePresets.json | 0 tests/integration/plugins/__init__.py | 1 + tests/integration/plugins/cmake/__init__.py | 1 + .../plugins/cmake/test_generator.py | 35 +++++ tests/unit/plugins/cmake/__init__.py | 1 + tests/unit/plugins/cmake/test_generator.py | 137 ++++++++++++++++++ 13 files changed, 465 insertions(+), 1 deletion(-) create mode 100644 cppython/plugins/cmake/__init__.py create mode 100644 cppython/plugins/cmake/builder.py create mode 100644 cppython/plugins/cmake/plugin.py create mode 100644 cppython/plugins/cmake/resolution.py create mode 100644 cppython/plugins/cmake/schema.py create mode 100644 tests/conftest.py rename cppython/plugins/git/py.typed => tests/data/cmake/default/CMakePresets.json (100%) create mode 100644 tests/integration/plugins/__init__.py create mode 100644 tests/integration/plugins/cmake/__init__.py create mode 100644 tests/integration/plugins/cmake/test_generator.py create mode 100644 tests/unit/plugins/cmake/__init__.py create mode 100644 tests/unit/plugins/cmake/test_generator.py diff --git a/cppython/plugins/cmake/__init__.py b/cppython/plugins/cmake/__init__.py new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/cppython/plugins/cmake/__init__.py @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/cppython/plugins/cmake/builder.py b/cppython/plugins/cmake/builder.py new file mode 100644 index 0000000..e73a2c0 --- /dev/null +++ b/cppython/plugins/cmake/builder.py @@ -0,0 +1,67 @@ +"""Plugin builder""" + +from copy import deepcopy +from pathlib import Path + +from cppython_core.utility import read_json, write_json, write_model_json + +from cppython_cmake.schema import CMakePresets, CMakeSyncData, ConfigurePreset + + +class Builder: + """Aids in building the information needed for the CMake plugin""" + + def write_provider_preset(self, provider_directory: Path, data: CMakeSyncData) -> None: + """Writes a provider preset from input sync data + + Args: + provider_directory: The base directory to place the preset files + data: The providers synchronization data + """ + + configure_preset = ConfigurePreset(name=data.provider_name, cacheVariables=None) + presets = CMakePresets(configurePresets=[configure_preset]) + + json_path = provider_directory / f"{data.provider_name}.json" + + write_model_json(json_path, presets) + + def write_cppython_preset( + self, cppython_preset_directory: Path, provider_directory: Path, provider_data: CMakeSyncData + ) -> Path: + """Write the cppython presets which inherit from the provider presets + + Args: + cppython_preset_directory: The tool directory + provider_directory: The provider directory + provider_data: The collected data of all providers + + Returns: + A file path to the written data + """ + + configure_preset = ConfigurePreset(name="cppython", cacheVariables=None) + presets = CMakePresets(configurePresets=[configure_preset]) + + cppython_json_path = cppython_preset_directory / "cppython.json" + + write_model_json(cppython_json_path, presets) + return cppython_json_path + + def write_root_presets(self, preset_file: Path, cppython_preset_file: Path) -> None: + """Read the top level json file and insert the include reference. + Receives a relative path to the tool cmake json file + + Raises: + ConfigError: If key files do not exists + + Args: + preset_file: Preset file to modify + cppython_preset_file: The tool generated file path + """ + + initial_root_preset = read_json(preset_file) + root_preset = deepcopy(initial_root_preset) + + if root_preset != initial_root_preset: + write_json(preset_file, root_preset) diff --git a/cppython/plugins/cmake/plugin.py b/cppython/plugins/cmake/plugin.py new file mode 100644 index 0000000..14f99ae --- /dev/null +++ b/cppython/plugins/cmake/plugin.py @@ -0,0 +1,80 @@ +"""The CMake generator implementation""" + +from pathlib import Path +from typing import Any + +from cppython_core.plugin_schema.generator import ( + Generator, + GeneratorPluginGroupData, + SupportedGeneratorFeatures, +) +from cppython_core.schema import CorePluginData, Information, SyncData + +from cppython_cmake.builder import Builder +from cppython_cmake.resolution import resolve_cmake_data +from cppython_cmake.schema import CMakeSyncData + + +class CMakeGenerator(Generator): + """CMake generator""" + + def __init__(self, group_data: GeneratorPluginGroupData, core_data: CorePluginData, data: dict[str, Any]) -> None: + self.group_data = group_data + self.core_data = core_data + self.data = resolve_cmake_data(data, core_data) + self.builder = Builder() + + @staticmethod + def features(directory: Path) -> SupportedGeneratorFeatures: + """Queries if CMake is supported + + Args: + directory: The input directory to query + + Returns: + Supported? + """ + + return SupportedGeneratorFeatures() + + @staticmethod + def information() -> Information: + """Queries plugin info + + Returns: + Plugin information + """ + + return Information() + + @staticmethod + def sync_types() -> list[type[SyncData]]: + """Returns types in order of preference + + Returns: + The available types + """ + + return [CMakeSyncData] + + def sync(self, sync_data: SyncData) -> None: + """Disk sync point + + Args: + sync_data: The input data + """ + + if isinstance(sync_data, CMakeSyncData): + cppython_preset_directory = self.core_data.cppython_data.tool_path / "cppython" + cppython_preset_directory.mkdir(parents=True, exist_ok=True) + + provider_directory = cppython_preset_directory / "providers" + provider_directory.mkdir(parents=True, exist_ok=True) + + self.builder.write_provider_preset(provider_directory, sync_data) + + cppython_preset_file = self.builder.write_cppython_preset( + cppython_preset_directory, provider_directory, sync_data + ) + + self.builder.write_root_presets(self.data.preset_file, cppython_preset_file) diff --git a/cppython/plugins/cmake/resolution.py b/cppython/plugins/cmake/resolution.py new file mode 100644 index 0000000..8e0ef87 --- /dev/null +++ b/cppython/plugins/cmake/resolution.py @@ -0,0 +1,29 @@ +"""Builder to help resolve cmake state""" + +from typing import Any + +from cppython_core.schema import CorePluginData + +from cppython_cmake.schema import CMakeConfiguration, CMakeData + + +def resolve_cmake_data(data: dict[str, Any], core_data: CorePluginData) -> CMakeData: + """Resolves the input data table from defaults to requirements + + Args: + data: The input table + core_data: The core data to help with the resolve + + Returns: + The resolved data + """ + + parsed_data = CMakeConfiguration(**data) + + root_directory = core_data.project_data.pyproject_file.parent.absolute() + + modified_preset = parsed_data.preset_file + if not modified_preset.is_absolute(): + modified_preset = root_directory / modified_preset + + return CMakeData(preset_file=modified_preset, configuration_name=parsed_data.configuration_name) diff --git a/cppython/plugins/cmake/schema.py b/cppython/plugins/cmake/schema.py new file mode 100644 index 0000000..848919e --- /dev/null +++ b/cppython/plugins/cmake/schema.py @@ -0,0 +1,68 @@ +"""CMake data definitions""" + +from enum import Enum, auto +from pathlib import Path + +from cppython_core.schema import CPPythonModel, SyncData +from pydantic import Field +from pydantic.types import FilePath + + +class VariableType(Enum): + """_summary_ + + Args: + Enum: _description_ + """ + + BOOL = (auto(),) # Boolean ON/OFF value. + PATH = (auto(),) # Path to a directory. + FILEPATH = (auto(),) # Path to a file. + STRING = (auto(),) # Generic string value. + INTERNAL = (auto(),) # Do not present in GUI at all. + STATIC = (auto(),) # Value managed by CMake, do not change. + UNINITIALIZED = auto() # Type not yet specified. + + +class CacheVariable(CPPythonModel, extra="forbid"): + """_summary_""" + + type: None | VariableType + value: bool | str + + +class ConfigurePreset(CPPythonModel, extra="allow"): + """Partial Configure Preset specification to allow cache variable injection""" + + name: str + cacheVariables: dict[str, None | bool | str | CacheVariable] | None + + +class CMakePresets(CPPythonModel, extra="allow"): + """The schema for the CMakePresets and CMakeUserPresets files. + The only information needed is the configure preset list for cache variable injection""" + + configurePresets: list[ConfigurePreset] = Field(default=[], description="The list of configure presets") + + +class CMakeSyncData(SyncData): + """The CMake sync data""" + + top_level_includes: FilePath + + +class CMakeData(CPPythonModel): + """Resolved CMake data""" + + preset_file: FilePath + configuration_name: str + + +class CMakeConfiguration(CPPythonModel): + """Configuration""" + + preset_file: FilePath = Field( + default=Path("CMakePresets.json"), + description="The CMakePreset.json file that will be searched for the given 'configuration_name'", + ) + configuration_name: str = Field(description="The CMake configuration preset to look for and override") diff --git a/pyproject.toml b/pyproject.toml index c521997..a46d9eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,6 @@ paths = ["LICENSE.md"] homepage = "https://github.com/Synodic-Software/CPPython" repository = "https://github.com/Synodic-Software/CPPython" -# # Plugin registration # [project.entry-points."cppython.scm"] # mock = "pytest_cppython.mock.scm:MockSCM" @@ -44,6 +43,9 @@ repository = "https://github.com/Synodic-Software/CPPython" [project.entry-points."cppython.scm"] git = "cppython_git.plugin:GitSCM" +[project.entry-points."cppython.generator"] +cmake = "cppython_cmake.plugin:CMakeGenerator" + [tool.pdm.options] update = ["--update-all"] diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..0df2ac5 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,42 @@ +"""Data variations for testing""" + +from pathlib import Path +from typing import cast + +import pytest + +from cppython_cmake.schema import CMakeConfiguration + + +def _cmake_data_list() -> list[CMakeConfiguration]: + """Creates a list of mocked configuration types + + Returns: + A list of variants to test + """ + variants = [] + + # Default + variants.append(CMakeConfiguration(configuration_name="default")) + + variants.append(CMakeConfiguration(preset_file=Path("inner/CMakePresets.json"), configuration_name="default")) + + return variants + + +@pytest.fixture( + name="cmake_data", + scope="session", + params=_cmake_data_list(), +) +def fixture_cmake_data(request: pytest.FixtureRequest) -> CMakeConfiguration: + """A fixture to provide a list of configuration types + + Args: + request: Parameterization list + + Returns: + A configuration type instance + """ + + return cast(CMakeConfiguration, request.param) diff --git a/cppython/plugins/git/py.typed b/tests/data/cmake/default/CMakePresets.json similarity index 100% rename from cppython/plugins/git/py.typed rename to tests/data/cmake/default/CMakePresets.json diff --git a/tests/integration/plugins/__init__.py b/tests/integration/plugins/__init__.py new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/tests/integration/plugins/__init__.py @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/integration/plugins/cmake/__init__.py b/tests/integration/plugins/cmake/__init__.py new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/tests/integration/plugins/cmake/__init__.py @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/integration/plugins/cmake/test_generator.py b/tests/integration/plugins/cmake/test_generator.py new file mode 100644 index 0000000..ee256c8 --- /dev/null +++ b/tests/integration/plugins/cmake/test_generator.py @@ -0,0 +1,35 @@ +"""Integration tests for the provider""" + +from typing import Any + +import pytest +from pytest_cppython.tests import GeneratorIntegrationTests + +from cppython_cmake.plugin import CMakeGenerator +from cppython_cmake.schema import CMakeConfiguration + + +class TestCPPythonGenerator(GeneratorIntegrationTests[CMakeGenerator]): + """The tests for the CMake generator""" + + @pytest.fixture(name="plugin_data", scope="session") + def fixture_plugin_data(self, cmake_data: CMakeConfiguration) -> dict[str, Any]: + """A required testing hook that allows data generation + + Args: + cmake_data: The input data + + Returns: + The constructed plugin data + """ + + return cmake_data.model_dump() + + @pytest.fixture(name="plugin_type", scope="session") + def fixture_plugin_type(self) -> type[CMakeGenerator]: + """A required testing hook that allows type generation + + Returns: + The type of the Generator + """ + return CMakeGenerator diff --git a/tests/unit/plugins/cmake/__init__.py b/tests/unit/plugins/cmake/__init__.py new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/tests/unit/plugins/cmake/__init__.py @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/unit/plugins/cmake/test_generator.py b/tests/unit/plugins/cmake/test_generator.py new file mode 100644 index 0000000..8323b5f --- /dev/null +++ b/tests/unit/plugins/cmake/test_generator.py @@ -0,0 +1,137 @@ +"""Unit test the provider plugin""" + +from pathlib import Path +from typing import Any + +import pytest +from cppython_core.utility import write_model_json +from pytest_cppython.tests import GeneratorUnitTests +from synodic_utilities.utility import TypeName + +from cppython_cmake.builder import Builder +from cppython_cmake.plugin import CMakeGenerator +from cppython_cmake.schema import CMakeConfiguration, CMakePresets, CMakeSyncData + + +class TestCPPythonGenerator(GeneratorUnitTests[CMakeGenerator]): + """The tests for the CMake generator""" + + @pytest.fixture(name="plugin_data", scope="session") + def fixture_plugin_data(self, cmake_data: CMakeConfiguration) -> dict[str, Any]: + """A required testing hook that allows data generation + + Args: + cmake_data: The input data + + Returns: + The constructed plugin data + """ + + return cmake_data.model_dump() + + @pytest.fixture(name="plugin_type", scope="session") + def fixture_plugin_type(self) -> type[CMakeGenerator]: + """A required testing hook that allows type generation + + Returns: + The type of the Generator + """ + return CMakeGenerator + + def test_provider_write(self, tmp_path: Path) -> None: + """Verifies that the provider preset writing works as intended + + Args: + tmp_path: The input path the use + """ + builder = Builder() + + includes_file = tmp_path / "includes.cmake" + with includes_file.open("w", encoding="utf-8") as file: + file.write("example contents") + + data = CMakeSyncData(provider_name=TypeName("test-provider"), top_level_includes=includes_file) + builder.write_provider_preset(tmp_path, data) + + def test_cppython_write(self, tmp_path: Path) -> None: + """Verifies that the cppython preset writing works as intended + + Args: + tmp_path: The input path the use + """ + + builder = Builder() + + provider_directory = tmp_path / "providers" + provider_directory.mkdir(parents=True, exist_ok=True) + + includes_file = provider_directory / "includes.cmake" + with includes_file.open("w", encoding="utf-8") as file: + file.write("example contents") + + data = CMakeSyncData(provider_name=TypeName("test-provider"), top_level_includes=includes_file) + builder.write_provider_preset(provider_directory, data) + + builder.write_cppython_preset(tmp_path, provider_directory, data) + + def test_root_write(self, tmp_path: Path) -> None: + """Verifies that the root preset writing works as intended + + Args: + tmp_path: The input path the use + """ + + builder = Builder() + + cppython_preset_directory = tmp_path / "cppython" + cppython_preset_directory.mkdir(parents=True, exist_ok=True) + + provider_directory = cppython_preset_directory / "providers" + provider_directory.mkdir(parents=True, exist_ok=True) + + includes_file = provider_directory / "includes.cmake" + with includes_file.open("w", encoding="utf-8") as file: + file.write("example contents") + + root_file = tmp_path / "CMakePresets.json" + presets = CMakePresets() + write_model_json(root_file, presets) + + data = CMakeSyncData(provider_name=TypeName("test-provider"), top_level_includes=includes_file) + builder.write_provider_preset(provider_directory, data) + + cppython_preset_file = builder.write_cppython_preset(cppython_preset_directory, provider_directory, data) + + builder.write_root_presets(root_file, cppython_preset_file) + + def test_relative_root_write(self, tmp_path: Path) -> None: + """Verifies that the root preset writing works as intended + + Args: + tmp_path: The input path the use + """ + + builder = Builder() + + cppython_preset_directory = tmp_path / "tool" / "cppython" + cppython_preset_directory.mkdir(parents=True, exist_ok=True) + + provider_directory = cppython_preset_directory / "providers" + provider_directory.mkdir(parents=True, exist_ok=True) + + includes_file = provider_directory / "includes.cmake" + with includes_file.open("w", encoding="utf-8") as file: + file.write("example contents") + + relative_indirection = tmp_path / "nested" + relative_indirection.mkdir(parents=True, exist_ok=True) + + root_file = relative_indirection / "CMakePresets.json" + presets = CMakePresets() + write_model_json(root_file, presets) + + data = CMakeSyncData(provider_name=TypeName("test-provider"), top_level_includes=includes_file) + builder.write_provider_preset(provider_directory, data) + + cppython_preset_file = builder.write_cppython_preset(cppython_preset_directory, provider_directory, data) + builder.write_root_presets(root_file, cppython_preset_file) From e9ebb4bd52c2582f8513c0db55788ed1b1ce22a9 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Sat, 17 Aug 2024 16:26:42 -0400 Subject: [PATCH 20/68] Other Plugins --- cppython/plugins/pdm/__init__.py | 0 cppython/plugins/pdm/plugin.py | 55 +++++ cppython/plugins/vcpkg/__init__.py | 1 + cppython/plugins/vcpkg/plugin.py | 233 ++++++++++++++++++ cppython/plugins/vcpkg/resolution.py | 67 +++++ cppython/plugins/vcpkg/schema.py | 43 ++++ pyproject.toml | 6 + tests/integration/plugins/pdm/__init__.py | 1 + .../integration/plugins/pdm/test_interface.py | 39 +++ tests/integration/plugins/vcpkg/__init__.py | 1 + .../plugins/vcpkg/test_provider.py | 31 +++ tests/unit/plugins/pdm/__init__.py | 1 + tests/unit/plugins/pdm/test_interface.py | 33 +++ tests/unit/plugins/vcpkg/__init__.py | 1 + tests/unit/plugins/vcpkg/test_provider.py | 41 +++ 15 files changed, 553 insertions(+) create mode 100644 cppython/plugins/pdm/__init__.py create mode 100644 cppython/plugins/pdm/plugin.py create mode 100644 cppython/plugins/vcpkg/__init__.py create mode 100644 cppython/plugins/vcpkg/plugin.py create mode 100644 cppython/plugins/vcpkg/resolution.py create mode 100644 cppython/plugins/vcpkg/schema.py create mode 100644 tests/integration/plugins/pdm/__init__.py create mode 100644 tests/integration/plugins/pdm/test_interface.py create mode 100644 tests/integration/plugins/vcpkg/__init__.py create mode 100644 tests/integration/plugins/vcpkg/test_provider.py create mode 100644 tests/unit/plugins/pdm/__init__.py create mode 100644 tests/unit/plugins/pdm/test_interface.py create mode 100644 tests/unit/plugins/vcpkg/__init__.py create mode 100644 tests/unit/plugins/vcpkg/test_provider.py diff --git a/cppython/plugins/pdm/__init__.py b/cppython/plugins/pdm/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/cppython/plugins/pdm/plugin.py b/cppython/plugins/pdm/plugin.py new file mode 100644 index 0000000..285a07b --- /dev/null +++ b/cppython/plugins/pdm/plugin.py @@ -0,0 +1,55 @@ +"""Implementation of the PDM Interface Plugin +""" + +from logging import getLogger +from typing import Any + +from cppython.project import Project as CPPythonProject +from cppython_core.schema import Interface, ProjectConfiguration +from pdm.core import Core +from pdm.project.core import Project +from pdm.signals import post_install + + +class CPPythonPlugin(Interface): + """Implementation of the PDM Interface Plugin""" + + def __init__(self, _core: Core) -> None: + post_install.connect(self.on_post_install, weak=False) + self.logger = getLogger("cppython.interface.pdm") + + def write_pyproject(self) -> None: + """Write to file""" + + def write_configuration(self) -> None: + """Write to configuration""" + + def on_post_install(self, project: Project, dry_run: bool, **_kwargs: Any) -> None: + """Called after a pdm install command is called + + Args: + project: The input PDM project + dry_run: If true, won't perform any actions + _kwargs: Sink for unknown arguments + """ + + pyproject_file = project.root.absolute() / project.PYPROJECT_FILENAME + + # Attach configuration for CPPythonPlugin callbacks + version = project.pyproject.metadata.get("version") + verbosity = project.core.ui.verbosity + + project_configuration = ProjectConfiguration( + pyproject_file=pyproject_file, verbosity=verbosity, version=version + ) + + self.logger.info("CPPython: Entered 'on_post_install'") + + if (pdm_pyproject := project.pyproject.read()) is None: + self.logger.info("CPPython: Project data was not available") + return + + cppython_project = CPPythonProject(project_configuration, self, pdm_pyproject) + + if not dry_run: + cppython_project.install() diff --git a/cppython/plugins/vcpkg/__init__.py b/cppython/plugins/vcpkg/__init__.py new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/cppython/plugins/vcpkg/__init__.py @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/cppython/plugins/vcpkg/plugin.py b/cppython/plugins/vcpkg/plugin.py new file mode 100644 index 0000000..64dea6e --- /dev/null +++ b/cppython/plugins/vcpkg/plugin.py @@ -0,0 +1,233 @@ +"""The vcpkg provider implementation +""" + +import json +from logging import getLogger +from os import name as system_name +from pathlib import Path, PosixPath, WindowsPath +from typing import Any + +from cppython_cmake.plugin import CMakeGenerator +from cppython_cmake.schema import CMakeSyncData +from cppython_core.exceptions import NotSupportedError, ProcessError +from cppython_core.plugin_schema.generator import SyncConsumer +from cppython_core.plugin_schema.provider import ( + Provider, + ProviderPluginGroupData, + SupportedProviderFeatures, +) +from cppython_core.schema import CorePluginData, Information, PluginName, SyncData +from cppython_core.utility import subprocess_call + +from cppython_vcpkg.resolution import generate_manifest, resolve_vcpkg_data +from cppython_vcpkg.schema import VcpkgData + + +class VcpkgProvider(Provider): + """vcpkg Provider""" + + def __init__( + self, group_data: ProviderPluginGroupData, core_data: CorePluginData, configuration_data: dict[str, Any] + ) -> None: + self.group_data: ProviderPluginGroupData = group_data + self.core_data: CorePluginData = core_data + self.data: VcpkgData = resolve_vcpkg_data(configuration_data, core_data) + + @staticmethod + def features(directory: Path) -> SupportedProviderFeatures: + """Queries vcpkg support + + Args: + directory: The directory to query + + Returns: + Supported features + """ + return SupportedProviderFeatures() + + @staticmethod + def supported_sync_type(sync_type: type[SyncData]) -> bool: + """_summary_ + + Args: + sync_type: _description_ + + Returns: + _description_ + """ + + return sync_type in CMakeGenerator.sync_types() + + @staticmethod + def information() -> Information: + """Returns plugin information + + Returns: + Plugin information + """ + return Information() + + @classmethod + def _update_provider(cls, path: Path) -> None: + """Calls the vcpkg tool install script + + Args: + path: The path where the script is located + """ + + logger = getLogger("cppython.vcpkg") + + try: + if system_name == "nt": + subprocess_call([str(WindowsPath("bootstrap-vcpkg.bat"))], logger=logger, cwd=path, shell=True) + elif system_name == "posix": + subprocess_call(["./" + str(PosixPath("bootstrap-vcpkg.sh"))], logger=logger, cwd=path, shell=True) + except ProcessError: + logger.error("Unable to bootstrap the vcpkg repository", exc_info=True) + raise + + def sync_data(self, consumer: SyncConsumer) -> SyncData: + """Gathers a data object for the given generator + + Args: + consumer: The input consumer + + Raises: + NotSupportedError: If not supported + + Returns: + The synch data object + """ + + for sync_type in consumer.sync_types(): + if sync_type == CMakeSyncData: + toolchain_file = self.core_data.cppython_data.install_path / "scripts/buildsystems/vcpkg.cmake" + return CMakeSyncData(provider_name=PluginName("vcpkg"), toolchain=toolchain_file) + + raise NotSupportedError("OOF") + + @classmethod + def tooling_downloaded(cls, path: Path) -> bool: + """Returns whether the provider tooling needs to be downloaded + + Args: + path: The directory to check for downloaded tooling + + Raises: + ProcessError: Failed vcpkg calls + + Returns: + Whether the tooling has been downloaded or not + """ + + logger = getLogger("cppython.vcpkg") + + try: + # Hide output, given an error output is a logic conditional + subprocess_call( + ["git", "rev-parse", "--is-inside-work-tree"], + logger=logger, + suppress=True, + cwd=path, + ) + + except ProcessError: + return False + + return True + + @classmethod + async def download_tooling(cls, directory: Path) -> None: + """Installs the external tooling required by the provider + + Args: + directory: The directory to download any extra tooling to + + Raises: + ProcessError: Failed vcpkg calls + """ + logger = getLogger("cppython.vcpkg") + + if cls.tooling_downloaded(directory): + try: + # The entire history is need for vcpkg 'baseline' information + subprocess_call(["git", "fetch", "origin"], logger=logger, cwd=directory) + subprocess_call(["git", "pull"], logger=logger, cwd=directory) + except ProcessError: + logger.exception("Unable to update the vcpkg repository") + raise + else: + try: + # The entire history is need for vcpkg 'baseline' information + subprocess_call( + ["git", "clone", "https://github.com/microsoft/vcpkg", "."], + logger=logger, + cwd=directory, + ) + + except ProcessError: + logger.exception("Unable to clone the vcpkg repository") + raise + + cls._update_provider(directory) + + def install(self) -> None: + """Called when dependencies need to be installed from a lock file. + + Raises: + ProcessError: Failed vcpkg calls + """ + + manifest_directory = self.core_data.project_data.pyproject_file.parent + manifest = generate_manifest(self.core_data, self.data) + + # Write out the manifest + serialized = json.loads(manifest.json(exclude_none=True, by_alias=True)) + with open(manifest_directory / "vcpkg.json", "w", encoding="utf8") as file: + json.dump(serialized, file, ensure_ascii=False, indent=4) + + executable = self.core_data.cppython_data.install_path / "vcpkg" + logger = getLogger("cppython.vcpkg") + try: + subprocess_call( + [ + executable, + "install", + f"--x-install-root={self.data.install_directory}", + ], + logger=logger, + cwd=self.core_data.cppython_data.build_path, + ) + except ProcessError: + logger.exception("Unable to install project dependencies") + raise + + def update(self) -> None: + """Called when dependencies need to be updated and written to the lock file. + + Raises: + ProcessError: Failed vcpkg calls + """ + manifest_directory = self.core_data.project_data.pyproject_file.parent + manifest = generate_manifest(self.core_data, self.data) + + # Write out the manifest + serialized = json.loads(manifest.json(exclude_none=True, by_alias=True)) + with open(manifest_directory / "vcpkg.json", "w", encoding="utf8") as file: + json.dump(serialized, file, ensure_ascii=False, indent=4) + + executable = self.core_data.cppython_data.install_path / "vcpkg" + logger = getLogger("cppython.vcpkg") + try: + subprocess_call( + [ + executable, + "install", + f"--x-install-root={self.data.install_directory}", + ], + logger=logger, + cwd=self.core_data.cppython_data.build_path, + ) + except ProcessError: + logger.exception("Unable to install project dependencies") + raise diff --git a/cppython/plugins/vcpkg/resolution.py b/cppython/plugins/vcpkg/resolution.py new file mode 100644 index 0000000..113a6b8 --- /dev/null +++ b/cppython/plugins/vcpkg/resolution.py @@ -0,0 +1,67 @@ +"""Builder to help build vcpkg state""" + +from typing import Any + +from cppython_core.schema import CorePluginData + +from cppython_vcpkg.schema import ( + Manifest, + VcpkgConfiguration, + VcpkgData, + VcpkgDependency, +) + + +def generate_manifest(core_data: CorePluginData, data: VcpkgData) -> Manifest: + """From the input configuration data, construct a Vcpkg specific Manifest type + + Args: + core_data: The core data to help with the resolve + data: Converted vcpkg data + + Returns: + The manifest + """ + + manifest = { + "name": core_data.pep621_data.name, + "version_string": core_data.pep621_data.version, + "dependencies": data.dependencies, + } + + return Manifest(**manifest) + + +def resolve_vcpkg_data(data: dict[str, Any], core_data: CorePluginData) -> VcpkgData: + """Resolves the input data table from defaults to requirements + + Args: + data: The input table + core_data: The core data to help with the resolve + + Returns: + The resolved data + """ + + parsed_data = VcpkgConfiguration(**data) + + root_directory = core_data.project_data.pyproject_file.parent.absolute() + + modified_install_directory = parsed_data.install_directory + + # Add the project location to all relative paths + if not modified_install_directory.is_absolute(): + modified_install_directory = root_directory / modified_install_directory + + # Create directories + modified_install_directory.mkdir(parents=True, exist_ok=True) + + vcpkg_dependencies: list[VcpkgDependency] = [] + for dependency in parsed_data.dependencies: + vcpkg_dependency = VcpkgDependency(name=dependency.name) + vcpkg_dependencies.append(vcpkg_dependency) + + return VcpkgData( + install_directory=modified_install_directory, + dependencies=vcpkg_dependencies, + ) diff --git a/cppython/plugins/vcpkg/schema.py b/cppython/plugins/vcpkg/schema.py new file mode 100644 index 0000000..4d6faf6 --- /dev/null +++ b/cppython/plugins/vcpkg/schema.py @@ -0,0 +1,43 @@ +"""Definitions for the plugin""" +from pathlib import Path + +from cppython_core.schema import CPPythonModel +from pydantic import Field, HttpUrl +from pydantic.types import DirectoryPath + + +class VcpkgDependency(CPPythonModel): + """Vcpkg dependency type""" + + name: str + + +class VcpkgData(CPPythonModel): + """Resolved vcpkg data""" + + install_directory: DirectoryPath + dependencies: list[VcpkgDependency] + + +class VcpkgConfiguration(CPPythonModel): + """vcpkg provider data""" + + install_directory: Path = Field( + default=Path("build"), + alias="install-directory", + description="The referenced dependencies defined by the local vcpkg.json manifest file", + ) + + dependencies: list[VcpkgDependency] = Field( + default=[], description="The directory to store the manifest file, vcpkg.json" + ) + + +class Manifest(CPPythonModel): + """The manifest schema""" + + name: str = Field(description="The project name") + + version_string: str = Field(default="", alias="version-string", description="The arbitrary version string") + homepage: HttpUrl | None = Field(default=None, description="Homepage URL") + dependencies: list[VcpkgDependency] = Field(default=[], description="List of dependencies") diff --git a/pyproject.toml b/pyproject.toml index a46d9eb..6884649 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,6 +46,12 @@ git = "cppython_git.plugin:GitSCM" [project.entry-points."cppython.generator"] cmake = "cppython_cmake.plugin:CMakeGenerator" +[project.entry-points.pdm] +cppython = "cppython_pdm.plugin:CPPythonPlugin" + +[project.entry-points."cppython.provider"] +vcpkg = "cppython_vcpkg.plugin:VcpkgProvider" + [tool.pdm.options] update = ["--update-all"] diff --git a/tests/integration/plugins/pdm/__init__.py b/tests/integration/plugins/pdm/__init__.py new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/tests/integration/plugins/pdm/__init__.py @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/integration/plugins/pdm/test_interface.py b/tests/integration/plugins/pdm/test_interface.py new file mode 100644 index 0000000..c6aa70e --- /dev/null +++ b/tests/integration/plugins/pdm/test_interface.py @@ -0,0 +1,39 @@ +"""Integration tests for the interface +""" + +import pytest +from pdm.core import Core +from pytest_mock import MockerFixture + +from cppython_pdm.plugin import CPPythonPlugin + + +class TestCPPythonInterface: + """The tests for the PDM interface""" + + @pytest.fixture(name="interface") + def fixture_interface(self, plugin_type: type[CPPythonPlugin]) -> CPPythonPlugin: + """A hook allowing implementations to override the fixture + + Args: + plugin_type: An input interface type + + Returns: + A newly constructed interface + """ + + return plugin_type(Core()) + + def test_entrypoint(self, mocker: MockerFixture) -> None: + """Verify that this project's plugin hook is setup correctly + + Args: + mocker: Mocker fixture for plugin patch + """ + + patch = mocker.patch("cppython_pdm.plugin.CPPythonPlugin") + + core = Core() + core.load_plugins() + + assert patch.called diff --git a/tests/integration/plugins/vcpkg/__init__.py b/tests/integration/plugins/vcpkg/__init__.py new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/tests/integration/plugins/vcpkg/__init__.py @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/integration/plugins/vcpkg/test_provider.py b/tests/integration/plugins/vcpkg/test_provider.py new file mode 100644 index 0000000..f5c6303 --- /dev/null +++ b/tests/integration/plugins/vcpkg/test_provider.py @@ -0,0 +1,31 @@ +"""Integration tests for the provider +""" + +from typing import Any + +import pytest +from pytest_cppython.tests import ProviderIntegrationTests + +from cppython_vcpkg.plugin import VcpkgProvider + + +class TestCPPythonProvider(ProviderIntegrationTests[VcpkgProvider]): + """The tests for the vcpkg provider""" + + @pytest.fixture(name="plugin_data", scope="session") + def fixture_plugin_data(self) -> dict[str, Any]: + """A required testing hook that allows data generation + + Returns: + The constructed plugin data + """ + return {} + + @pytest.fixture(name="plugin_type", scope="session") + def fixture_plugin_type(self) -> type[VcpkgProvider]: + """A required testing hook that allows type generation + + Returns: + The type of the Provider + """ + return VcpkgProvider diff --git a/tests/unit/plugins/pdm/__init__.py b/tests/unit/plugins/pdm/__init__.py new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/tests/unit/plugins/pdm/__init__.py @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/unit/plugins/pdm/test_interface.py b/tests/unit/plugins/pdm/test_interface.py new file mode 100644 index 0000000..6a6d180 --- /dev/null +++ b/tests/unit/plugins/pdm/test_interface.py @@ -0,0 +1,33 @@ +"""Unit tests for the interface +""" + +import pytest +from pdm.core import Core +from pdm.project.core import Project + +from cppython_pdm.plugin import CPPythonPlugin + + +class TestCPPythonInterface: + """The tests for the PDM interface""" + + @pytest.fixture(name="interface") + def fixture_interface(self, plugin_type: type[CPPythonPlugin]) -> CPPythonPlugin: + """A hook allowing implementations to override the fixture + + Args: + plugin_type: An input interface type + + Returns: + A newly constructed interface + """ + return plugin_type(Core()) + + def test_pdm_project(self) -> None: + """Verify that this PDM won't return empty data""" + + core = Core() + core.load_plugins() + pdm_project = Project(core, root_path=None) + + assert pdm_project diff --git a/tests/unit/plugins/vcpkg/__init__.py b/tests/unit/plugins/vcpkg/__init__.py new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/tests/unit/plugins/vcpkg/__init__.py @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/unit/plugins/vcpkg/test_provider.py b/tests/unit/plugins/vcpkg/test_provider.py new file mode 100644 index 0000000..6115c1f --- /dev/null +++ b/tests/unit/plugins/vcpkg/test_provider.py @@ -0,0 +1,41 @@ +"""Unit test the provider plugin +""" + +from typing import Any + +import pytest +from pytest_cppython.tests import ProviderUnitTests + +from cppython_vcpkg.plugin import VcpkgProvider +from cppython_vcpkg.resolution import generate_manifest + + +class TestCPPythonProvider(ProviderUnitTests[VcpkgProvider]): + """The tests for the vcpkg Provider""" + + @pytest.fixture(name="plugin_data", scope="session") + def fixture_plugin_data(self) -> dict[str, Any]: + """A required testing hook that allows data generation + + Returns: + The constructed plugin data + """ + return {} + + @pytest.fixture(name="plugin_type", scope="session") + def fixture_plugin_type(self) -> type[VcpkgProvider]: + """A required testing hook that allows type generation + + Returns: + The type of the Provider + """ + return VcpkgProvider + + def test_manifest_generation(self, data_plugin: VcpkgProvider) -> None: + """Verifies that manifests can be generated from core data + + Args: + data_plugin: Generated plugin + """ + + assert generate_manifest(data_plugin.core_data, data_plugin.data) From dd827fac39e180f2c987a08988e67de8f7acf991 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Fri, 4 Oct 2024 04:39:35 -0400 Subject: [PATCH 21/68] Fix License Metadata --- .gitignore | 3 ++- pyproject.toml | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 54f7eb4..2e7edb8 100644 --- a/.gitignore +++ b/.gitignore @@ -23,4 +23,5 @@ __pypackages__/ !.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json -!.vscode/extensions.json \ No newline at end of file +!.vscode/extensions.json +/.mypy_cache diff --git a/pyproject.toml b/pyproject.toml index 6884649..46b84a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,13 +20,16 @@ dependencies = [ "packaging>=24.1", ] -[project.license-files] -paths = ["LICENSE.md"] - [project.urls] homepage = "https://github.com/Synodic-Software/CPPython" repository = "https://github.com/Synodic-Software/CPPython" +[project.optional-dependencies] +#all = [ +# "cppython[cmake]", +#] +#cmake = [] + # [project.entry-points."cppython.scm"] # mock = "pytest_cppython.mock.scm:MockSCM" From 925f2909a5bfce9b3aaa285d1c68a9db32b22b02 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Mon, 7 Oct 2024 16:06:28 -0400 Subject: [PATCH 22/68] Increment Python Requirement --- pdm.lock | 153 +++++++++++++++++++------------------------------ pyproject.toml | 2 +- 2 files changed, 59 insertions(+), 96 deletions(-) diff --git a/pdm.lock b/pdm.lock index 8aa6fc8..d1b9135 100644 --- a/pdm.lock +++ b/pdm.lock @@ -5,10 +5,10 @@ groups = ["default", "lint", "test"] strategy = ["inherit_metadata"] lock_version = "4.5.0" -content_hash = "sha256:54bccf00cb5182813af18ea04ae587d3ee633de3090f8ea2610238f37beb06d6" +content_hash = "sha256:88f0a6b1220d9cac53f9bf853b9bdbed49f1033009dc98e3494ff9b864ee313f" [[metadata.targets]] -requires_python = ">=3.12" +requires_python = ">=3.13" [[package]] name = "annotated-types" @@ -26,22 +26,22 @@ files = [ [[package]] name = "astroid" -version = "3.2.4" -requires_python = ">=3.8.0" +version = "3.3.5" +requires_python = ">=3.9.0" summary = "An abstract syntax tree for Python with inference support." groups = ["lint"] dependencies = [ "typing-extensions>=4.0.0; python_version < \"3.11\"", ] files = [ - {file = "astroid-3.2.4-py3-none-any.whl", hash = "sha256:413658a61eeca6202a59231abb473f932038fbcbf1666587f66d482083413a25"}, - {file = "astroid-3.2.4.tar.gz", hash = "sha256:0e14202810b30da1b735827f78f5157be2bbd4a7a59b7707ca0bfc2fb4c0063a"}, + {file = "astroid-3.3.5-py3-none-any.whl", hash = "sha256:a9d1c946ada25098d790e079ba2a1b112157278f3fb7e718ae6a9252f5835dc8"}, + {file = "astroid-3.3.5.tar.gz", hash = "sha256:5cfc40ae9f68311075d27ef68a4841bdc5cc7f6cf86671b49f00607d30188e2d"}, ] [[package]] name = "black" -version = "24.8.0" -requires_python = ">=3.8" +version = "24.10.0" +requires_python = ">=3.9" summary = "The uncompromising code formatter." groups = ["lint"] dependencies = [ @@ -54,12 +54,12 @@ dependencies = [ "typing-extensions>=4.0.1; python_version < \"3.11\"", ] files = [ - {file = "black-24.8.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:7c046c1d1eeb7aea9335da62472481d3bbf3fd986e093cffd35f4385c94ae368"}, - {file = "black-24.8.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:649f6d84ccbae73ab767e206772cc2d7a393a001070a4c814a546afd0d423aed"}, - {file = "black-24.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2b59b250fdba5f9a9cd9d0ece6e6d993d91ce877d121d161e4698af3eb9c1018"}, - {file = "black-24.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:6e55d30d44bed36593c3163b9bc63bf58b3b30e4611e4d88a0c3c239930ed5b2"}, - {file = "black-24.8.0-py3-none-any.whl", hash = "sha256:972085c618ee94f402da1af548a4f218c754ea7e5dc70acb168bfaca4c2542ed"}, - {file = "black-24.8.0.tar.gz", hash = "sha256:2500945420b6784c38b9ee885af039f5e7471ef284ab03fa35ecdde4688cd83f"}, + {file = "black-24.10.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:1cbacacb19e922a1d75ef2b6ccaefcd6e93a2c05ede32f06a21386a04cedb981"}, + {file = "black-24.10.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1f93102e0c5bb3907451063e08b9876dbeac810e7da5a8bfb7aeb5a9ef89066b"}, + {file = "black-24.10.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ddacb691cdcdf77b96f549cf9591701d8db36b2f19519373d60d31746068dbf2"}, + {file = "black-24.10.0-cp313-cp313-win_amd64.whl", hash = "sha256:680359d932801c76d2e9c9068d05c6b107f2584b2a5b88831c83962eb9984c1b"}, + {file = "black-24.10.0-py3-none-any.whl", hash = "sha256:3bb2b7a1f7b685f85b11fed1ef10f8a9148bceb49853e47a294a3dd963c1dd7d"}, + {file = "black-24.10.0.tar.gz", hash = "sha256:846ea64c97afe3bc677b761787993be4991810ecc7a4a937816dd6bddedc4875"}, ] [[package]] @@ -96,16 +96,6 @@ requires_python = ">=3.8" summary = "Code coverage measurement for Python" groups = ["test"] files = [ - {file = "coverage-7.6.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:95cae0efeb032af8458fc27d191f85d1717b1d4e49f7cb226cf526ff28179778"}, - {file = "coverage-7.6.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5621a9175cf9d0b0c84c2ef2b12e9f5f5071357c4d2ea6ca1cf01814f45d2391"}, - {file = "coverage-7.6.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:260933720fdcd75340e7dbe9060655aff3af1f0c5d20f46b57f262ab6c86a5e8"}, - {file = "coverage-7.6.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07e2ca0ad381b91350c0ed49d52699b625aab2b44b65e1b4e02fa9df0e92ad2d"}, - {file = "coverage-7.6.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c44fee9975f04b33331cb8eb272827111efc8930cfd582e0320613263ca849ca"}, - {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:877abb17e6339d96bf08e7a622d05095e72b71f8afd8a9fefc82cf30ed944163"}, - {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3e0cadcf6733c09154b461f1ca72d5416635e5e4ec4e536192180d34ec160f8a"}, - {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c3c02d12f837d9683e5ab2f3d9844dc57655b92c74e286c262e0fc54213c216d"}, - {file = "coverage-7.6.1-cp312-cp312-win32.whl", hash = "sha256:e05882b70b87a18d937ca6768ff33cc3f72847cbc4de4491c8e73880766718e5"}, - {file = "coverage-7.6.1-cp312-cp312-win_amd64.whl", hash = "sha256:b5d7b556859dd85f3a541db6a4e0167b86e7273e1cdc973e5b175166bb634fdb"}, {file = "coverage-7.6.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a4acd025ecc06185ba2b801f2de85546e0b8ac787cf9d3b06e7e2a69f925b106"}, {file = "coverage-7.6.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a6d3adcf24b624a7b778533480e32434a39ad8fa30c315208f6d3e5542aeb6e9"}, {file = "coverage-7.6.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d0c212c49b6c10e6951362f7c6df3329f04c2b1c28499563d4035d964ab8e08c"}, @@ -141,16 +131,6 @@ dependencies = [ "tomli; python_full_version <= \"3.11.0a6\"", ] files = [ - {file = "coverage-7.6.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:95cae0efeb032af8458fc27d191f85d1717b1d4e49f7cb226cf526ff28179778"}, - {file = "coverage-7.6.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5621a9175cf9d0b0c84c2ef2b12e9f5f5071357c4d2ea6ca1cf01814f45d2391"}, - {file = "coverage-7.6.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:260933720fdcd75340e7dbe9060655aff3af1f0c5d20f46b57f262ab6c86a5e8"}, - {file = "coverage-7.6.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07e2ca0ad381b91350c0ed49d52699b625aab2b44b65e1b4e02fa9df0e92ad2d"}, - {file = "coverage-7.6.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c44fee9975f04b33331cb8eb272827111efc8930cfd582e0320613263ca849ca"}, - {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:877abb17e6339d96bf08e7a622d05095e72b71f8afd8a9fefc82cf30ed944163"}, - {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3e0cadcf6733c09154b461f1ca72d5416635e5e4ec4e536192180d34ec160f8a"}, - {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c3c02d12f837d9683e5ab2f3d9844dc57655b92c74e286c262e0fc54213c216d"}, - {file = "coverage-7.6.1-cp312-cp312-win32.whl", hash = "sha256:e05882b70b87a18d937ca6768ff33cc3f72847cbc4de4491c8e73880766718e5"}, - {file = "coverage-7.6.1-cp312-cp312-win_amd64.whl", hash = "sha256:b5d7b556859dd85f3a541db6a4e0167b86e7273e1cdc973e5b175166bb634fdb"}, {file = "coverage-7.6.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a4acd025ecc06185ba2b801f2de85546e0b8ac787cf9d3b06e7e2a69f925b106"}, {file = "coverage-7.6.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a6d3adcf24b624a7b778533480e32434a39ad8fa30c315208f6d3e5542aeb6e9"}, {file = "coverage-7.6.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d0c212c49b6c10e6951362f7c6df3329f04c2b1c28499563d4035d964ab8e08c"}, @@ -176,14 +156,14 @@ files = [ [[package]] name = "dill" -version = "0.3.8" +version = "0.3.9" requires_python = ">=3.8" summary = "serialize all of Python" groups = ["lint"] marker = "python_version >= \"3.11\"" files = [ - {file = "dill-0.3.8-py3-none-any.whl", hash = "sha256:c36ca9ffb54365bdd2f8eb3eff7d2a21237f8452b57ace88b1ac615b7e815bd7"}, - {file = "dill-0.3.8.tar.gz", hash = "sha256:3ebe3c479ad625c4553aca177444d89b486b1d84982eeacded644afc0cf797ca"}, + {file = "dill-0.3.9-py3-none-any.whl", hash = "sha256:468dff3b89520b474c0397703366b7b95eebe6303f108adf9b19da1f702be87a"}, + {file = "dill-0.3.9.tar.gz", hash = "sha256:81aa267dddf68cbfe8029c42ca9ec6a4ab3b22371d1c450abc54422577b4512c"}, ] [[package]] @@ -246,7 +226,7 @@ files = [ [[package]] name = "mypy" -version = "1.11.1" +version = "1.11.2" requires_python = ">=3.8" summary = "Optional static typing for Python" groups = ["lint"] @@ -256,13 +236,8 @@ dependencies = [ "typing-extensions>=4.6.0", ] files = [ - {file = "mypy-1.11.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f39918a50f74dc5969807dcfaecafa804fa7f90c9d60506835036cc1bc891dc8"}, - {file = "mypy-1.11.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0bc71d1fb27a428139dd78621953effe0d208aed9857cb08d002280b0422003a"}, - {file = "mypy-1.11.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b868d3bcff720dd7217c383474008ddabaf048fad8d78ed948bb4b624870a417"}, - {file = "mypy-1.11.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a707ec1527ffcdd1c784d0924bf5cb15cd7f22683b919668a04d2b9c34549d2e"}, - {file = "mypy-1.11.1-cp312-cp312-win_amd64.whl", hash = "sha256:64f4a90e3ea07f590c5bcf9029035cf0efeae5ba8be511a8caada1a4893f5525"}, - {file = "mypy-1.11.1-py3-none-any.whl", hash = "sha256:0624bdb940255d2dd24e829d99a13cfeb72e4e9031f9492148f410ed30bcab54"}, - {file = "mypy-1.11.1.tar.gz", hash = "sha256:f404a0b069709f18bbdb702eb3dcfe51910602995de00bd39cea3050b5772d08"}, + {file = "mypy-1.11.2-py3-none-any.whl", hash = "sha256:b499bc07dbdcd3de92b0a8b29fdf592c111276f6a12fe29c30f6c417dd546d12"}, + {file = "mypy-1.11.2.tar.gz", hash = "sha256:7f9993ad3e0ffdc95c2a14b66dee63729f021968bff8ad911867579c65d13a79"}, ] [[package]] @@ -300,13 +275,13 @@ files = [ [[package]] name = "platformdirs" -version = "4.2.2" +version = "4.3.6" requires_python = ">=3.8" summary = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." groups = ["lint"] files = [ - {file = "platformdirs-4.2.2-py3-none-any.whl", hash = "sha256:2d7a1657e36a80ea911db832a8a6ece5ee53d8de21edd5cc5879af6530b1bfee"}, - {file = "platformdirs-4.2.2.tar.gz", hash = "sha256:38b7b51f512eed9e84a22788b4bce1de17c0adb134d6becb09836e37d8654cd3"}, + {file = "platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb"}, + {file = "platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907"}, ] [[package]] @@ -322,24 +297,24 @@ files = [ [[package]] name = "pydantic" -version = "2.8.2" +version = "2.9.2" requires_python = ">=3.8" summary = "Data validation using Python type hints" groups = ["default"] dependencies = [ - "annotated-types>=0.4.0", - "pydantic-core==2.20.1", + "annotated-types>=0.6.0", + "pydantic-core==2.23.4", "typing-extensions>=4.12.2; python_version >= \"3.13\"", "typing-extensions>=4.6.1; python_version < \"3.13\"", ] files = [ - {file = "pydantic-2.8.2-py3-none-any.whl", hash = "sha256:73ee9fddd406dc318b885c7a2eab8a6472b68b8fb5ba8150949fc3db939f23c8"}, - {file = "pydantic-2.8.2.tar.gz", hash = "sha256:6f62c13d067b0755ad1c21a34bdd06c0c12625a22b0fc09c6b149816604f7c2a"}, + {file = "pydantic-2.9.2-py3-none-any.whl", hash = "sha256:f048cec7b26778210e28a0459867920654d48e5e62db0958433636cde4254f12"}, + {file = "pydantic-2.9.2.tar.gz", hash = "sha256:d155cef71265d1e9807ed1c32b4c8deec042a44a50a4188b25ac67ecd81a9c0f"}, ] [[package]] name = "pydantic-core" -version = "2.20.1" +version = "2.23.4" requires_python = ">=3.8" summary = "Core functionality for Pydantic validation and serialization" groups = ["default"] @@ -347,31 +322,19 @@ dependencies = [ "typing-extensions!=4.7.0,>=4.6.0", ] files = [ - {file = "pydantic_core-2.20.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:595ba5be69b35777474fa07f80fc260ea71255656191adb22a8c53aba4479231"}, - {file = "pydantic_core-2.20.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a4f55095ad087474999ee28d3398bae183a66be4823f753cd7d67dd0153427c9"}, - {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f9aa05d09ecf4c75157197f27cdc9cfaeb7c5f15021c6373932bf3e124af029f"}, - {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e97fdf088d4b31ff4ba35db26d9cc472ac7ef4a2ff2badeabf8d727b3377fc52"}, - {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bc633a9fe1eb87e250b5c57d389cf28998e4292336926b0b6cdaee353f89a237"}, - {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d573faf8eb7e6b1cbbcb4f5b247c60ca8be39fe2c674495df0eb4318303137fe"}, - {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:26dc97754b57d2fd00ac2b24dfa341abffc380b823211994c4efac7f13b9e90e"}, - {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:33499e85e739a4b60c9dac710c20a08dc73cb3240c9a0e22325e671b27b70d24"}, - {file = "pydantic_core-2.20.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:bebb4d6715c814597f85297c332297c6ce81e29436125ca59d1159b07f423eb1"}, - {file = "pydantic_core-2.20.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:516d9227919612425c8ef1c9b869bbbee249bc91912c8aaffb66116c0b447ebd"}, - {file = "pydantic_core-2.20.1-cp312-none-win32.whl", hash = "sha256:469f29f9093c9d834432034d33f5fe45699e664f12a13bf38c04967ce233d688"}, - {file = "pydantic_core-2.20.1-cp312-none-win_amd64.whl", hash = "sha256:035ede2e16da7281041f0e626459bcae33ed998cca6a0a007a5ebb73414ac72d"}, - {file = "pydantic_core-2.20.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:0827505a5c87e8aa285dc31e9ec7f4a17c81a813d45f70b1d9164e03a813a686"}, - {file = "pydantic_core-2.20.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:19c0fa39fa154e7e0b7f82f88ef85faa2a4c23cc65aae2f5aea625e3c13c735a"}, - {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa223cd1e36b642092c326d694d8bf59b71ddddc94cdb752bbbb1c5c91d833b"}, - {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c336a6d235522a62fef872c6295a42ecb0c4e1d0f1a3e500fe949415761b8a19"}, - {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7eb6a0587eded33aeefea9f916899d42b1799b7b14b8f8ff2753c0ac1741edac"}, - {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:70c8daf4faca8da5a6d655f9af86faf6ec2e1768f4b8b9d0226c02f3d6209703"}, - {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e9fa4c9bf273ca41f940bceb86922a7667cd5bf90e95dbb157cbb8441008482c"}, - {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:11b71d67b4725e7e2a9f6e9c0ac1239bbc0c48cce3dc59f98635efc57d6dac83"}, - {file = "pydantic_core-2.20.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:270755f15174fb983890c49881e93f8f1b80f0b5e3a3cc1394a255706cabd203"}, - {file = "pydantic_core-2.20.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:c81131869240e3e568916ef4c307f8b99583efaa60a8112ef27a366eefba8ef0"}, - {file = "pydantic_core-2.20.1-cp313-none-win32.whl", hash = "sha256:b91ced227c41aa29c672814f50dbb05ec93536abf8f43cd14ec9521ea09afe4e"}, - {file = "pydantic_core-2.20.1-cp313-none-win_amd64.whl", hash = "sha256:65db0f2eefcaad1a3950f498aabb4875c8890438bc80b19362cf633b87a8ab20"}, - {file = "pydantic_core-2.20.1.tar.gz", hash = "sha256:26ca695eeee5f9f1aeeb211ffc12f10bcb6f71e2989988fda61dabd65db878d4"}, + {file = "pydantic_core-2.23.4-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:7530e201d10d7d14abce4fb54cfe5b94a0aefc87da539d0346a484ead376c3cc"}, + {file = "pydantic_core-2.23.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:df933278128ea1cd77772673c73954e53a1c95a4fdf41eef97c2b779271bd0bd"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cb3da3fd1b6a5d0279a01877713dbda118a2a4fc6f0d821a57da2e464793f05"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:42c6dcb030aefb668a2b7009c85b27f90e51e6a3b4d5c9bc4c57631292015b0d"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:696dd8d674d6ce621ab9d45b205df149399e4bb9aa34102c970b721554828510"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2971bb5ffe72cc0f555c13e19b23c85b654dd2a8f7ab493c262071377bfce9f6"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8394d940e5d400d04cad4f75c0598665cbb81aecefaca82ca85bd28264af7f9b"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0dff76e0602ca7d4cdaacc1ac4c005e0ce0dcfe095d5b5259163a80d3a10d327"}, + {file = "pydantic_core-2.23.4-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:7d32706badfe136888bdea71c0def994644e09fff0bfe47441deaed8e96fdbc6"}, + {file = "pydantic_core-2.23.4-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ed541d70698978a20eb63d8c5d72f2cc6d7079d9d90f6b50bad07826f1320f5f"}, + {file = "pydantic_core-2.23.4-cp313-none-win32.whl", hash = "sha256:3d5639516376dce1940ea36edf408c554475369f5da2abd45d44621cb616f769"}, + {file = "pydantic_core-2.23.4-cp313-none-win_amd64.whl", hash = "sha256:5a1504ad17ba4210df3a045132a7baeeba5a200e930f57512ee02909fc5c4cb5"}, + {file = "pydantic_core-2.23.4.tar.gz", hash = "sha256:2584f7cf844ac4d970fba483a717dbe10c1c1c96a969bf65d61ffe94df1b2863"}, ] [[package]] @@ -387,12 +350,12 @@ files = [ [[package]] name = "pylint" -version = "3.2.6" -requires_python = ">=3.8.0" +version = "3.3.1" +requires_python = ">=3.9.0" summary = "python code static checker" groups = ["lint"] dependencies = [ - "astroid<=3.3.0-dev0,>=3.2.4", + "astroid<=3.4.0-dev0,>=3.3.4", "colorama>=0.4.5; sys_platform == \"win32\"", "dill>=0.2; python_version < \"3.11\"", "dill>=0.3.6; python_version >= \"3.11\"", @@ -405,13 +368,13 @@ dependencies = [ "typing-extensions>=3.10.0; python_version < \"3.10\"", ] files = [ - {file = "pylint-3.2.6-py3-none-any.whl", hash = "sha256:03c8e3baa1d9fb995b12c1dbe00aa6c4bcef210c2a2634374aedeb22fb4a8f8f"}, - {file = "pylint-3.2.6.tar.gz", hash = "sha256:a5d01678349454806cff6d886fb072294f56a58c4761278c97fb557d708e1eb3"}, + {file = "pylint-3.3.1-py3-none-any.whl", hash = "sha256:2f846a466dd023513240bc140ad2dd73bfc080a5d85a710afdb728c420a5a2b9"}, + {file = "pylint-3.3.1.tar.gz", hash = "sha256:9f3dcc87b1203e612b78d91a896407787e708b3f189b5fa0b307712d49ff0c6e"}, ] [[package]] name = "pytest" -version = "8.3.2" +version = "8.3.3" requires_python = ">=3.8" summary = "pytest: simple powerful testing with Python" groups = ["test"] @@ -424,8 +387,8 @@ dependencies = [ "tomli>=1; python_version < \"3.11\"", ] files = [ - {file = "pytest-8.3.2-py3-none-any.whl", hash = "sha256:4ba08f9ae7dcf84ded419494d229b48d0903ea6407b030eaec46df5e6a73bba5"}, - {file = "pytest-8.3.2.tar.gz", hash = "sha256:c132345d12ce551242c87269de812483f5bcc87cdbb4722e48487ba194f9fdce"}, + {file = "pytest-8.3.3-py3-none-any.whl", hash = "sha256:a6853c7375b2663155079443d2e45de913a911a11d669df02a50814944db57b2"}, + {file = "pytest-8.3.3.tar.gz", hash = "sha256:70b98107bd648308a7952b06e6ca9a50bc660be218d53c257cc1fc94fda10181"}, ] [[package]] @@ -473,18 +436,18 @@ files = [ [[package]] name = "rich" -version = "13.7.1" -requires_python = ">=3.7.0" +version = "13.9.2" +requires_python = ">=3.8.0" summary = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" groups = ["default"] dependencies = [ "markdown-it-py>=2.2.0", "pygments<3.0.0,>=2.13.0", - "typing-extensions<5.0,>=4.0.0; python_version < \"3.9\"", + "typing-extensions<5.0,>=4.0.0; python_version < \"3.11\"", ] files = [ - {file = "rich-13.7.1-py3-none-any.whl", hash = "sha256:4edbae314f59eb482f54e9e30bf00d33350aaa94f4bfcd4e9e3110e64d0d7222"}, - {file = "rich-13.7.1.tar.gz", hash = "sha256:9be308cb1fe2f1f57d67ce99e95af38a1e2bc71ad9813b0e247cf7ffbcc3a432"}, + {file = "rich-13.9.2-py3-none-any.whl", hash = "sha256:8c82a3d3f8dcfe9e734771313e606b39d8247bb6b826e196f4914b333b743cf1"}, + {file = "rich-13.9.2.tar.gz", hash = "sha256:51a2c62057461aaf7152b4d611168f93a9fc73068f8ded2790f29fe2b5366d0c"}, ] [[package]] @@ -511,7 +474,7 @@ files = [ [[package]] name = "typer" -version = "0.12.4" +version = "0.12.5" requires_python = ">=3.7" summary = "Typer, build great CLIs. Easy to code. Based on Python type hints." groups = ["default"] @@ -522,8 +485,8 @@ dependencies = [ "typing-extensions>=3.7.4.3", ] files = [ - {file = "typer-0.12.4-py3-none-any.whl", hash = "sha256:819aa03699f438397e876aa12b0d63766864ecba1b579092cc9fe35d886e34b6"}, - {file = "typer-0.12.4.tar.gz", hash = "sha256:c9c1613ed6a166162705b3347b8d10b661ccc5d95692654d0fb628118f2c34e6"}, + {file = "typer-0.12.5-py3-none-any.whl", hash = "sha256:62fe4e471711b147e3365034133904df3e235698399bc4de2b36c8579298d52b"}, + {file = "typer-0.12.5.tar.gz", hash = "sha256:f592f089bedcc8ec1b974125d64851029c3b1af145f04aca64d69410f0c9b722"}, ] [[package]] diff --git a/pyproject.toml b/pyproject.toml index 46b84a6..03191a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ readme = "README.md" dynamic = ["version"] -requires-python = ">=3.12" +requires-python = ">=3.13" dependencies = [ "typer>=0.12.4", From 00c597fbd170561c1bae3b13ac81c5f42d445d05 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Tue, 5 Nov 2024 22:11:24 -0500 Subject: [PATCH 23/68] Update Chore --- pdm.lock | 123 +++++++++++++++++++++++++------------------------ pyproject.toml | 16 +++---- 2 files changed, 72 insertions(+), 67 deletions(-) diff --git a/pdm.lock b/pdm.lock index d1b9135..24c69ec 100644 --- a/pdm.lock +++ b/pdm.lock @@ -5,7 +5,7 @@ groups = ["default", "lint", "test"] strategy = ["inherit_metadata"] lock_version = "4.5.0" -content_hash = "sha256:88f0a6b1220d9cac53f9bf853b9bdbed49f1033009dc98e3494ff9b864ee313f" +content_hash = "sha256:7591325553665462c944a8d69554dbb2994105eef447c70ad8308f7faa84d0a4" [[metadata.targets]] requires_python = ">=3.13" @@ -91,67 +91,67 @@ files = [ [[package]] name = "coverage" -version = "7.6.1" -requires_python = ">=3.8" +version = "7.6.4" +requires_python = ">=3.9" summary = "Code coverage measurement for Python" groups = ["test"] files = [ - {file = "coverage-7.6.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a4acd025ecc06185ba2b801f2de85546e0b8ac787cf9d3b06e7e2a69f925b106"}, - {file = "coverage-7.6.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a6d3adcf24b624a7b778533480e32434a39ad8fa30c315208f6d3e5542aeb6e9"}, - {file = "coverage-7.6.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d0c212c49b6c10e6951362f7c6df3329f04c2b1c28499563d4035d964ab8e08c"}, - {file = "coverage-7.6.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6e81d7a3e58882450ec4186ca59a3f20a5d4440f25b1cff6f0902ad890e6748a"}, - {file = "coverage-7.6.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78b260de9790fd81e69401c2dc8b17da47c8038176a79092a89cb2b7d945d060"}, - {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a78d169acd38300060b28d600344a803628c3fd585c912cacc9ea8790fe96862"}, - {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2c09f4ce52cb99dd7505cd0fc8e0e37c77b87f46bc9c1eb03fe3bc9991085388"}, - {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6878ef48d4227aace338d88c48738a4258213cd7b74fd9a3d4d7582bb1d8a155"}, - {file = "coverage-7.6.1-cp313-cp313-win32.whl", hash = "sha256:44df346d5215a8c0e360307d46ffaabe0f5d3502c8a1cefd700b34baf31d411a"}, - {file = "coverage-7.6.1-cp313-cp313-win_amd64.whl", hash = "sha256:8284cf8c0dd272a247bc154eb6c95548722dce90d098c17a883ed36e67cdb129"}, - {file = "coverage-7.6.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:d3296782ca4eab572a1a4eca686d8bfb00226300dcefdf43faa25b5242ab8a3e"}, - {file = "coverage-7.6.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:502753043567491d3ff6d08629270127e0c31d4184c4c8d98f92c26f65019962"}, - {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6a89ecca80709d4076b95f89f308544ec8f7b4727e8a547913a35f16717856cb"}, - {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a318d68e92e80af8b00fa99609796fdbcdfef3629c77c6283566c6f02c6d6704"}, - {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13b0a73a0896988f053e4fbb7de6d93388e6dd292b0d87ee51d106f2c11b465b"}, - {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:4421712dbfc5562150f7554f13dde997a2e932a6b5f352edcce948a815efee6f"}, - {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:166811d20dfea725e2e4baa71fffd6c968a958577848d2131f39b60043400223"}, - {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:225667980479a17db1048cb2bf8bfb39b8e5be8f164b8f6628b64f78a72cf9d3"}, - {file = "coverage-7.6.1-cp313-cp313t-win32.whl", hash = "sha256:170d444ab405852903b7d04ea9ae9b98f98ab6d7e63e1115e82620807519797f"}, - {file = "coverage-7.6.1-cp313-cp313t-win_amd64.whl", hash = "sha256:b9f222de8cded79c49bf184bdbc06630d4c58eec9459b939b4a690c82ed05657"}, - {file = "coverage-7.6.1.tar.gz", hash = "sha256:953510dfb7b12ab69d20135a0662397f077c59b1e6379a768e97c59d852ee51d"}, + {file = "coverage-7.6.4-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:023bf8ee3ec6d35af9c1c6ccc1d18fa69afa1cb29eaac57cb064dbb262a517f9"}, + {file = "coverage-7.6.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:b0ac3d42cb51c4b12df9c5f0dd2f13a4f24f01943627120ec4d293c9181219ba"}, + {file = "coverage-7.6.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f8fe4984b431f8621ca53d9380901f62bfb54ff759a1348cd140490ada7b693c"}, + {file = "coverage-7.6.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5fbd612f8a091954a0c8dd4c0b571b973487277d26476f8480bfa4b2a65b5d06"}, + {file = "coverage-7.6.4-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dacbc52de979f2823a819571f2e3a350a7e36b8cb7484cdb1e289bceaf35305f"}, + {file = "coverage-7.6.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:dab4d16dfef34b185032580e2f2f89253d302facba093d5fa9dbe04f569c4f4b"}, + {file = "coverage-7.6.4-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:862264b12ebb65ad8d863d51f17758b1684560b66ab02770d4f0baf2ff75da21"}, + {file = "coverage-7.6.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:5beb1ee382ad32afe424097de57134175fea3faf847b9af002cc7895be4e2a5a"}, + {file = "coverage-7.6.4-cp313-cp313-win32.whl", hash = "sha256:bf20494da9653f6410213424f5f8ad0ed885e01f7e8e59811f572bdb20b8972e"}, + {file = "coverage-7.6.4-cp313-cp313-win_amd64.whl", hash = "sha256:182e6cd5c040cec0a1c8d415a87b67ed01193ed9ad458ee427741c7d8513d963"}, + {file = "coverage-7.6.4-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:a181e99301a0ae128493a24cfe5cfb5b488c4e0bf2f8702091473d033494d04f"}, + {file = "coverage-7.6.4-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:df57bdbeffe694e7842092c5e2e0bc80fff7f43379d465f932ef36f027179806"}, + {file = "coverage-7.6.4-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0bcd1069e710600e8e4cf27f65c90c7843fa8edfb4520fb0ccb88894cad08b11"}, + {file = "coverage-7.6.4-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:99b41d18e6b2a48ba949418db48159d7a2e81c5cc290fc934b7d2380515bd0e3"}, + {file = "coverage-7.6.4-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a6b1e54712ba3474f34b7ef7a41e65bd9037ad47916ccb1cc78769bae324c01a"}, + {file = "coverage-7.6.4-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:53d202fd109416ce011578f321460795abfe10bb901b883cafd9b3ef851bacfc"}, + {file = "coverage-7.6.4-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:c48167910a8f644671de9f2083a23630fbf7a1cb70ce939440cd3328e0919f70"}, + {file = "coverage-7.6.4-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:cc8ff50b50ce532de2fa7a7daae9dd12f0a699bfcd47f20945364e5c31799fef"}, + {file = "coverage-7.6.4-cp313-cp313t-win32.whl", hash = "sha256:b8d3a03d9bfcaf5b0141d07a88456bb6a4c3ce55c080712fec8418ef3610230e"}, + {file = "coverage-7.6.4-cp313-cp313t-win_amd64.whl", hash = "sha256:f3ddf056d3ebcf6ce47bdaf56142af51bb7fad09e4af310241e9db7a3a8022e1"}, + {file = "coverage-7.6.4.tar.gz", hash = "sha256:29fc0f17b1d3fea332f8001d4558f8214af7f1d87a345f3a133c901d60347c73"}, ] [[package]] name = "coverage" -version = "7.6.1" +version = "7.6.4" extras = ["toml"] -requires_python = ">=3.8" +requires_python = ">=3.9" summary = "Code coverage measurement for Python" groups = ["test"] dependencies = [ - "coverage==7.6.1", + "coverage==7.6.4", "tomli; python_full_version <= \"3.11.0a6\"", ] files = [ - {file = "coverage-7.6.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a4acd025ecc06185ba2b801f2de85546e0b8ac787cf9d3b06e7e2a69f925b106"}, - {file = "coverage-7.6.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a6d3adcf24b624a7b778533480e32434a39ad8fa30c315208f6d3e5542aeb6e9"}, - {file = "coverage-7.6.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d0c212c49b6c10e6951362f7c6df3329f04c2b1c28499563d4035d964ab8e08c"}, - {file = "coverage-7.6.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6e81d7a3e58882450ec4186ca59a3f20a5d4440f25b1cff6f0902ad890e6748a"}, - {file = "coverage-7.6.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78b260de9790fd81e69401c2dc8b17da47c8038176a79092a89cb2b7d945d060"}, - {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a78d169acd38300060b28d600344a803628c3fd585c912cacc9ea8790fe96862"}, - {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2c09f4ce52cb99dd7505cd0fc8e0e37c77b87f46bc9c1eb03fe3bc9991085388"}, - {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6878ef48d4227aace338d88c48738a4258213cd7b74fd9a3d4d7582bb1d8a155"}, - {file = "coverage-7.6.1-cp313-cp313-win32.whl", hash = "sha256:44df346d5215a8c0e360307d46ffaabe0f5d3502c8a1cefd700b34baf31d411a"}, - {file = "coverage-7.6.1-cp313-cp313-win_amd64.whl", hash = "sha256:8284cf8c0dd272a247bc154eb6c95548722dce90d098c17a883ed36e67cdb129"}, - {file = "coverage-7.6.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:d3296782ca4eab572a1a4eca686d8bfb00226300dcefdf43faa25b5242ab8a3e"}, - {file = "coverage-7.6.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:502753043567491d3ff6d08629270127e0c31d4184c4c8d98f92c26f65019962"}, - {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6a89ecca80709d4076b95f89f308544ec8f7b4727e8a547913a35f16717856cb"}, - {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a318d68e92e80af8b00fa99609796fdbcdfef3629c77c6283566c6f02c6d6704"}, - {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13b0a73a0896988f053e4fbb7de6d93388e6dd292b0d87ee51d106f2c11b465b"}, - {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:4421712dbfc5562150f7554f13dde997a2e932a6b5f352edcce948a815efee6f"}, - {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:166811d20dfea725e2e4baa71fffd6c968a958577848d2131f39b60043400223"}, - {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:225667980479a17db1048cb2bf8bfb39b8e5be8f164b8f6628b64f78a72cf9d3"}, - {file = "coverage-7.6.1-cp313-cp313t-win32.whl", hash = "sha256:170d444ab405852903b7d04ea9ae9b98f98ab6d7e63e1115e82620807519797f"}, - {file = "coverage-7.6.1-cp313-cp313t-win_amd64.whl", hash = "sha256:b9f222de8cded79c49bf184bdbc06630d4c58eec9459b939b4a690c82ed05657"}, - {file = "coverage-7.6.1.tar.gz", hash = "sha256:953510dfb7b12ab69d20135a0662397f077c59b1e6379a768e97c59d852ee51d"}, + {file = "coverage-7.6.4-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:023bf8ee3ec6d35af9c1c6ccc1d18fa69afa1cb29eaac57cb064dbb262a517f9"}, + {file = "coverage-7.6.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:b0ac3d42cb51c4b12df9c5f0dd2f13a4f24f01943627120ec4d293c9181219ba"}, + {file = "coverage-7.6.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f8fe4984b431f8621ca53d9380901f62bfb54ff759a1348cd140490ada7b693c"}, + {file = "coverage-7.6.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5fbd612f8a091954a0c8dd4c0b571b973487277d26476f8480bfa4b2a65b5d06"}, + {file = "coverage-7.6.4-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dacbc52de979f2823a819571f2e3a350a7e36b8cb7484cdb1e289bceaf35305f"}, + {file = "coverage-7.6.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:dab4d16dfef34b185032580e2f2f89253d302facba093d5fa9dbe04f569c4f4b"}, + {file = "coverage-7.6.4-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:862264b12ebb65ad8d863d51f17758b1684560b66ab02770d4f0baf2ff75da21"}, + {file = "coverage-7.6.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:5beb1ee382ad32afe424097de57134175fea3faf847b9af002cc7895be4e2a5a"}, + {file = "coverage-7.6.4-cp313-cp313-win32.whl", hash = "sha256:bf20494da9653f6410213424f5f8ad0ed885e01f7e8e59811f572bdb20b8972e"}, + {file = "coverage-7.6.4-cp313-cp313-win_amd64.whl", hash = "sha256:182e6cd5c040cec0a1c8d415a87b67ed01193ed9ad458ee427741c7d8513d963"}, + {file = "coverage-7.6.4-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:a181e99301a0ae128493a24cfe5cfb5b488c4e0bf2f8702091473d033494d04f"}, + {file = "coverage-7.6.4-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:df57bdbeffe694e7842092c5e2e0bc80fff7f43379d465f932ef36f027179806"}, + {file = "coverage-7.6.4-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0bcd1069e710600e8e4cf27f65c90c7843fa8edfb4520fb0ccb88894cad08b11"}, + {file = "coverage-7.6.4-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:99b41d18e6b2a48ba949418db48159d7a2e81c5cc290fc934b7d2380515bd0e3"}, + {file = "coverage-7.6.4-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a6b1e54712ba3474f34b7ef7a41e65bd9037ad47916ccb1cc78769bae324c01a"}, + {file = "coverage-7.6.4-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:53d202fd109416ce011578f321460795abfe10bb901b883cafd9b3ef851bacfc"}, + {file = "coverage-7.6.4-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:c48167910a8f644671de9f2083a23630fbf7a1cb70ce939440cd3328e0919f70"}, + {file = "coverage-7.6.4-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:cc8ff50b50ce532de2fa7a7daae9dd12f0a699bfcd47f20945364e5c31799fef"}, + {file = "coverage-7.6.4-cp313-cp313t-win32.whl", hash = "sha256:b8d3a03d9bfcaf5b0141d07a88456bb6a4c3ce55c080712fec8418ef3610230e"}, + {file = "coverage-7.6.4-cp313-cp313t-win_amd64.whl", hash = "sha256:f3ddf056d3ebcf6ce47bdaf56142af51bb7fad09e4af310241e9db7a3a8022e1"}, + {file = "coverage-7.6.4.tar.gz", hash = "sha256:29fc0f17b1d3fea332f8001d4558f8214af7f1d87a345f3a133c901d60347c73"}, ] [[package]] @@ -226,7 +226,7 @@ files = [ [[package]] name = "mypy" -version = "1.11.2" +version = "1.13.0" requires_python = ">=3.8" summary = "Optional static typing for Python" groups = ["lint"] @@ -236,8 +236,13 @@ dependencies = [ "typing-extensions>=4.6.0", ] files = [ - {file = "mypy-1.11.2-py3-none-any.whl", hash = "sha256:b499bc07dbdcd3de92b0a8b29fdf592c111276f6a12fe29c30f6c417dd546d12"}, - {file = "mypy-1.11.2.tar.gz", hash = "sha256:7f9993ad3e0ffdc95c2a14b66dee63729f021968bff8ad911867579c65d13a79"}, + {file = "mypy-1.13.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a7b44178c9760ce1a43f544e595d35ed61ac2c3de306599fa59b38a6048e1aa7"}, + {file = "mypy-1.13.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5d5092efb8516d08440e36626f0153b5006d4088c1d663d88bf79625af3d1d62"}, + {file = "mypy-1.13.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:de2904956dac40ced10931ac967ae63c5089bd498542194b436eb097a9f77bc8"}, + {file = "mypy-1.13.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:7bfd8836970d33c2105562650656b6846149374dc8ed77d98424b40b09340ba7"}, + {file = "mypy-1.13.0-cp313-cp313-win_amd64.whl", hash = "sha256:9f73dba9ec77acb86457a8fc04b5239822df0c14a082564737833d2963677dbc"}, + {file = "mypy-1.13.0-py3-none-any.whl", hash = "sha256:9c250883f9fd81d212e0952c92dbfcc96fc237f4b7c92f56ac81fd48460b3e5a"}, + {file = "mypy-1.13.0.tar.gz", hash = "sha256:0291a61b6fbf3e6673e3405cfcc0e7650bebc7939659fdca2702958038bd835e"}, ] [[package]] @@ -407,17 +412,17 @@ files = [ [[package]] name = "pytest-cov" -version = "5.0.0" -requires_python = ">=3.8" +version = "6.0.0" +requires_python = ">=3.9" summary = "Pytest plugin for measuring coverage." groups = ["test"] dependencies = [ - "coverage[toml]>=5.2.1", + "coverage[toml]>=7.5", "pytest>=4.6", ] files = [ - {file = "pytest-cov-5.0.0.tar.gz", hash = "sha256:5837b58e9f6ebd335b0f8060eecce69b662415b16dc503883a02f45dfeb14857"}, - {file = "pytest_cov-5.0.0-py3-none-any.whl", hash = "sha256:4f0764a1219df53214206bf1feea4633c3b558a2925c8b59f144f682861ce652"}, + {file = "pytest-cov-6.0.0.tar.gz", hash = "sha256:fde0b595ca248bb8e2d76f020b465f3b107c9632e6a1d1705f17834c89dcadc0"}, + {file = "pytest_cov-6.0.0-py3-none-any.whl", hash = "sha256:eee6f1b9e61008bd34975a4d5bab25801eb31898b032dd55addc93e96fcaaa35"}, ] [[package]] @@ -436,7 +441,7 @@ files = [ [[package]] name = "rich" -version = "13.9.2" +version = "13.9.4" requires_python = ">=3.8.0" summary = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" groups = ["default"] @@ -446,8 +451,8 @@ dependencies = [ "typing-extensions<5.0,>=4.0.0; python_version < \"3.11\"", ] files = [ - {file = "rich-13.9.2-py3-none-any.whl", hash = "sha256:8c82a3d3f8dcfe9e734771313e606b39d8247bb6b826e196f4914b333b743cf1"}, - {file = "rich-13.9.2.tar.gz", hash = "sha256:51a2c62057461aaf7152b4d611168f93a9fc73068f8ded2790f29fe2b5366d0c"}, + {file = "rich-13.9.4-py3-none-any.whl", hash = "sha256:6049d5e6ec054bf2779ab3358186963bac2ea89175919d699e378b99738c2a90"}, + {file = "rich-13.9.4.tar.gz", hash = "sha256:439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098"}, ] [[package]] diff --git a/pyproject.toml b/pyproject.toml index 03191a5..fa3c361 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,18 +61,18 @@ update = ["--update-all"] [tool.pdm.version] source = "scm" -[tool.pdm.dev-dependencies] +[dependency-groups] lint = [ - "black>=24.2.0", - "pylint>=3.2.4", + "black>=24.10.0", + "pylint>=3.3.1", "isort>=5.13.2", - "mypy>=1.11", + "mypy>=1.13", ] test = [ - "pytest>=8.0.2", - "pytest-cov>=4.1.0", - "pytest-click>=1.1", - "pytest-mock>=3.12.0", + "pytest>=8.3.3", + "pytest-cov>=6.0.0", + "pytest-click>=1.1.0", + "pytest-mock>=3.14.0", ] [project.scripts] From 6b37a9e038226b04defe3259c7f0d04c2b1c270d Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Sat, 9 Nov 2024 12:31:28 -0500 Subject: [PATCH 24/68] ja --- pdm.lock | 12 ++++++------ tests/conftest.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pdm.lock b/pdm.lock index 24c69ec..eb3e1aa 100644 --- a/pdm.lock +++ b/pdm.lock @@ -258,13 +258,13 @@ files = [ [[package]] name = "packaging" -version = "24.1" +version = "24.2" requires_python = ">=3.8" summary = "Core utilities for Python packages" groups = ["default", "lint", "test"] files = [ - {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, - {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, + {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, + {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, ] [[package]] @@ -479,7 +479,7 @@ files = [ [[package]] name = "typer" -version = "0.12.5" +version = "0.13.0" requires_python = ">=3.7" summary = "Typer, build great CLIs. Easy to code. Based on Python type hints." groups = ["default"] @@ -490,8 +490,8 @@ dependencies = [ "typing-extensions>=3.7.4.3", ] files = [ - {file = "typer-0.12.5-py3-none-any.whl", hash = "sha256:62fe4e471711b147e3365034133904df3e235698399bc4de2b36c8579298d52b"}, - {file = "typer-0.12.5.tar.gz", hash = "sha256:f592f089bedcc8ec1b974125d64851029c3b1af145f04aca64d69410f0c9b722"}, + {file = "typer-0.13.0-py3-none-any.whl", hash = "sha256:d85fe0b777b2517cc99c8055ed735452f2659cd45e451507c76f48ce5c1d00e2"}, + {file = "typer-0.13.0.tar.gz", hash = "sha256:f1c7198347939361eec90139ffa0fd8b3df3a2259d5852a0f7400e476d95985c"}, ] [[package]] diff --git a/tests/conftest.py b/tests/conftest.py index 0df2ac5..3f9d871 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -5,7 +5,7 @@ import pytest -from cppython_cmake.schema import CMakeConfiguration +from cppython.plugins.cmake.schema import CMakeConfiguration def _cmake_data_list() -> list[CMakeConfiguration]: From 70055a2875646687472269a5e13f06cab1c132b3 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Sat, 9 Nov 2024 18:19:58 -0500 Subject: [PATCH 25/68] Ouch --- cppython/core/schema.py | 5 +++-- cppython/plugins/cmake/schema.py | 3 ++- cppython/utility/plugin.py | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cppython/core/schema.py b/cppython/core/schema.py index b702645..fe14aa3 100644 --- a/cppython/core/schema.py +++ b/cppython/core/schema.py @@ -6,8 +6,9 @@ from pydantic import BaseModel, Field, field_validator, model_validator from pydantic.types import DirectoryPath, FilePath -from synodic_utilities.plugin import Plugin as SynodicPlugin -from synodic_utilities.utility import TypeName + +from cppython.utility.plugin import Plugin as SynodicPlugin +from cppython.utility.utility import TypeName class CPPythonModel(BaseModel): diff --git a/cppython/plugins/cmake/schema.py b/cppython/plugins/cmake/schema.py index 848919e..905ac76 100644 --- a/cppython/plugins/cmake/schema.py +++ b/cppython/plugins/cmake/schema.py @@ -3,10 +3,11 @@ from enum import Enum, auto from pathlib import Path -from cppython_core.schema import CPPythonModel, SyncData from pydantic import Field from pydantic.types import FilePath +from cppython.core.schema import CPPythonModel, SyncData + class VariableType(Enum): """_summary_ diff --git a/cppython/utility/plugin.py b/cppython/utility/plugin.py index 26a265e..1c404c6 100644 --- a/cppython/utility/plugin.py +++ b/cppython/utility/plugin.py @@ -2,7 +2,7 @@ from typing import Protocol -from synodic_utilities.utility import TypeGroup, TypeID, TypeName, canonicalize_name +from cppython.utility.utility import TypeGroup, TypeID, TypeName, canonicalize_name class Plugin(Protocol): From 36a59294bf26af2ad69ab64adc50b0ae18b4a918 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Sat, 9 Nov 2024 20:53:07 -0500 Subject: [PATCH 26/68] yaaa --- cppython/core/resolution.py | 15 +++++++-------- tests/conftest.py | 2 +- tests/unit/core/test_resolution.py | 15 +++++++-------- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/cppython/core/resolution.py b/cppython/core/resolution.py index f2c7c4c..3193e72 100644 --- a/cppython/core/resolution.py +++ b/cppython/core/resolution.py @@ -4,14 +4,12 @@ from typing import Any, cast from pydantic import BaseModel, DirectoryPath, ValidationError -from synodic_utilities.utility import TypeName - -from cppython_core.exceptions import ConfigError, ConfigException -from cppython_core.plugin_schema.generator import Generator, GeneratorPluginGroupData -from cppython_core.plugin_schema.provider import Provider, ProviderPluginGroupData -from cppython_core.plugin_schema.scm import SCM, SCMPluginGroupData -from cppython_core.schema import ( - CoreData, + +from cppython.core.exceptions import ConfigError, ConfigException +from cppython.core.plugin_schema.generator import Generator, GeneratorPluginGroupData +from cppython.core.plugin_schema.provider import Provider, ProviderPluginGroupData +from cppython.core.plugin_schema.scm import SCM, SCMPluginGroupData +from cppython.core.schema import ( CPPythonData, CPPythonGlobalConfiguration, CPPythonLocalConfiguration, @@ -23,6 +21,7 @@ ProjectConfiguration, ProjectData, ) +from cppython.utility.utility import TypeName def resolve_project_configuration(project_configuration: ProjectConfiguration) -> ProjectData: diff --git a/tests/conftest.py b/tests/conftest.py index 3f9d871..8c36377 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -19,7 +19,7 @@ def _cmake_data_list() -> list[CMakeConfiguration]: # Default variants.append(CMakeConfiguration(configuration_name="default")) - variants.append(CMakeConfiguration(preset_file=Path("inner/CMakePresets.json"), configuration_name="default")) + # variants.append(CMakeConfiguration(preset_file=Path("inner/CMakePresets.json"), configuration_name="default")) return variants diff --git a/tests/unit/core/test_resolution.py b/tests/unit/core/test_resolution.py index 00a6fa3..8f1ac38 100644 --- a/tests/unit/core/test_resolution.py +++ b/tests/unit/core/test_resolution.py @@ -4,13 +4,12 @@ import pytest from pydantic import Field -from synodic_utilities.utility import TypeName -from cppython_core.exceptions import ConfigException -from cppython_core.plugin_schema.generator import Generator -from cppython_core.plugin_schema.provider import Provider -from cppython_core.plugin_schema.scm import SCM -from cppython_core.resolution import ( +from cppython.core.exceptions import ConfigException +from cppython.core.plugin_schema.generator import Generator +from cppython.core.plugin_schema.provider import Provider +from cppython.core.plugin_schema.scm import SCM +from cppython.core.resolution import ( PluginCPPythonData, resolve_cppython, resolve_cppython_plugin, @@ -21,8 +20,7 @@ resolve_provider, resolve_scm, ) -from cppython_core.schema import ( - CoreData, +from cppython.core.schema import ( CPPythonGlobalConfiguration, CPPythonLocalConfiguration, CPPythonModel, @@ -30,6 +28,7 @@ ProjectConfiguration, ProjectData, ) +from cppython.utility.utility import TypeName class TestResolve: From 0a7f06e0c3208680470ac3ab7c6bc52e93b8c354 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Sat, 9 Nov 2024 22:14:50 -0500 Subject: [PATCH 27/68] Types --- cppython/console/interface.py | 8 ++-- cppython/core/plugin_schema/generator.py | 2 +- cppython/core/plugin_schema/provider.py | 4 +- cppython/core/plugin_schema/scm.py | 2 +- cppython/core/schema.py | 60 ++++++++++++++---------- pyproject.toml | 1 - tests/unit/test_project.py | 12 ++--- 7 files changed, 50 insertions(+), 39 deletions(-) diff --git a/cppython/console/interface.py b/cppython/console/interface.py index 1a5e49b..e0dcddb 100644 --- a/cppython/console/interface.py +++ b/cppython/console/interface.py @@ -1,12 +1,12 @@ """A click CLI for CPPython interfacing""" +import tomllib from logging import getLogger from pathlib import Path import click -import tomlkit -from cppython_core.schema import Interface, ProjectConfiguration +from cppython.core.schema import Interface, ProjectConfiguration from cppython.project import Project @@ -60,8 +60,8 @@ def generate_project(self) -> Project: The constructed Project """ - path: Path = self.configuration.pyproject_file - pyproject_data = tomlkit.loads(path.read_text(encoding="utf-8")) + path = self.configuration.pyproject_file + pyproject_data = tomllib.loads(path.read_text(encoding="utf-8")) return Project(self.configuration, self.interface, pyproject_data) diff --git a/cppython/core/plugin_schema/generator.py b/cppython/core/plugin_schema/generator.py index 1f6f293..98a5082 100644 --- a/cppython/core/plugin_schema/generator.py +++ b/cppython/core/plugin_schema/generator.py @@ -5,7 +5,7 @@ from pydantic.types import DirectoryPath -from cppython_core.schema import ( +from cppython.core.schema import ( CorePluginData, DataPlugin, DataPluginGroupData, diff --git a/cppython/core/plugin_schema/provider.py b/cppython/core/plugin_schema/provider.py index 7da2aa0..9d563b5 100644 --- a/cppython/core/plugin_schema/provider.py +++ b/cppython/core/plugin_schema/provider.py @@ -5,8 +5,8 @@ from pydantic.types import DirectoryPath -from cppython_core.plugin_schema.generator import SyncConsumer -from cppython_core.schema import ( +from cppython.core.plugin_schema.generator import SyncConsumer +from cppython.core.schema import ( CorePluginData, DataPlugin, DataPluginGroupData, diff --git a/cppython/core/plugin_schema/scm.py b/cppython/core/plugin_schema/scm.py index 503e0f1..ffa027b 100644 --- a/cppython/core/plugin_schema/scm.py +++ b/cppython/core/plugin_schema/scm.py @@ -5,7 +5,7 @@ from pydantic import DirectoryPath, Field -from cppython_core.schema import Plugin, PluginGroupData, SupportedFeatures +from cppython.core.schema import Plugin, PluginGroupData, SupportedFeatures class SCMPluginGroupData(PluginGroupData): diff --git a/cppython/core/schema.py b/cppython/core/schema.py index fe14aa3..f5d18b2 100644 --- a/cppython/core/schema.py +++ b/cppython/core/schema.py @@ -2,7 +2,7 @@ from abc import abstractmethod from pathlib import Path -from typing import Any, NewType, Protocol +from typing import Annotated, Any, NewType, Protocol from pydantic import BaseModel, Field, field_validator, model_validator from pydantic.types import DirectoryPath, FilePath @@ -27,7 +27,7 @@ class ProjectData(CPPythonModel, extra="forbid"): class ProjectConfiguration(CPPythonModel, extra="forbid"): """Project-wide configuration""" - pyproject_file: FilePath = Field(description="The path where the pyproject.toml exists") + pyproject_file: Annotated[FilePath, Field(description="The path where the pyproject.toml exists")] version: str | None = Field( description=( "The version number a 'dynamic' project version will resolve to. If not provided a CPPython project will" @@ -270,7 +270,9 @@ async def download_tooling(cls, directory: DirectoryPath) -> None: class CPPythonGlobalConfiguration(CPPythonModel, extra="forbid"): """Global data extracted by the tool""" - current_check: bool = Field(default=True, alias="current-check", description="Checks for a new CPPython version") + current_check: Annotated[ + bool, Field(default=True, alias="current-check", description="Checks for a new CPPython version") + ] ProviderData = NewType("ProviderData", dict[str, Any]) @@ -280,27 +282,37 @@ class CPPythonGlobalConfiguration(CPPythonModel, extra="forbid"): class CPPythonLocalConfiguration(CPPythonModel, extra="forbid"): """Data required by the tool""" - install_path: Path = Field( - default=_default_install_location(), alias="install-path", description="The global install path for the project" - ) - tool_path: Path = Field( - default=Path("tool"), alias="tool-path", description="The local tooling path for the project" - ) - build_path: Path = Field( - default=Path("build"), alias="build-path", description="The local build path for the project" - ) - provider: ProviderData = Field( - default=ProviderData({}), description="Provider plugin data associated with 'provider_name" - ) - provider_name: TypeName | None = Field( - default=None, alias="provider-name", description="If empty, the provider will be automatically deduced." - ) - generator: GeneratorData = Field( - default=GeneratorData({}), description="Generator plugin data associated with 'generator_name'" - ) - generator_name: TypeName | None = Field( - default=None, alias="generator-name", description="If empty, the generator will be automatically deduced." - ) + install_path: Annotated[ + Path, + Field( + default=_default_install_location(), + alias="install-path", + description="The global install path for the project", + ), + ] + tool_path: Annotated[ + Path, Field(default=Path("tool"), alias="tool-path", description="The local tooling path for the project") + ] + build_path: Annotated[ + Path, Field(default=Path("build"), alias="build-path", description="The local build path for the project") + ] + provider: Annotated[ + ProviderData, Field(default=ProviderData({}), description="Provider plugin data associated with 'provider_name") + ] + provider_name: Annotated[ + TypeName | None, + Field(default=None, alias="provider-name", description="If empty, the provider will be automatically deduced."), + ] + generator: Annotated[ + GeneratorData, + Field(default=GeneratorData({}), description="Generator plugin data associated with 'generator_name'"), + ] + generator_name: Annotated[ + TypeName | None, + Field( + default=None, alias="generator-name", description="If empty, the generator will be automatically deduced." + ), + ] class ToolData(CPPythonModel): diff --git a/pyproject.toml b/pyproject.toml index fa3c361..d5c635d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,6 @@ requires-python = ">=3.13" dependencies = [ "typer>=0.12.4", - "tomlkit>=0.13.2", "pydantic>=2.8.2", "packaging>=24.1", ] diff --git a/tests/unit/test_project.py b/tests/unit/test_project.py index 73c4e56..1ee7a0c 100644 --- a/tests/unit/test_project.py +++ b/tests/unit/test_project.py @@ -1,18 +1,18 @@ """Tests the Project type""" +import tomllib from pathlib import Path -import tomlkit -from cppython_core.schema import ( +from pytest import FixtureRequest +from pytest_cppython.mock.interface import MockInterface + +from cppython.core.schema import ( CPPythonLocalConfiguration, PEP621Configuration, ProjectConfiguration, PyProject, ToolData, ) -from pytest import FixtureRequest -from pytest_cppython.mock.interface import MockInterface - from cppython.project import Project pep621 = PEP621Configuration(name="test-project", version="0.1.0") @@ -33,7 +33,7 @@ def test_self_construction(self, request: FixtureRequest) -> None: project_configuration = ProjectConfiguration(pyproject_file=file, version=None) interface = MockInterface() - pyproject_data = tomlkit.loads(file.read_text(encoding="utf-8")) + pyproject_data = tomllib.loads(file.read_text(encoding="utf-8")) project = Project(project_configuration, interface, pyproject_data) # Doesn't have the cppython table From eabe23805eeba3a0cf6923c3fe512db1f8666028 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Sat, 9 Nov 2024 22:32:59 -0500 Subject: [PATCH 28/68] More Import and Type fixes --- pdm.lock | 4 ++-- tests/plugin_helper/mock/generator.py | 7 ++++--- tests/plugin_helper/mock/interface.py | 2 +- tests/plugin_helper/mock/provider.py | 12 ++++++------ tests/plugin_helper/mock/scm.py | 7 ++++--- tests/plugin_helper/plugin.py | 24 ++++++++++++------------ tests/plugin_helper/shared.py | 20 ++++++++++---------- tests/plugin_helper/tests.py | 10 +++++----- tests/plugin_helper/variants.py | 16 ++++++++-------- tests/unit/core/test_plugin_schema.py | 8 ++++---- tests/unit/test_data.py | 13 ++++++------- 11 files changed, 62 insertions(+), 61 deletions(-) diff --git a/pdm.lock b/pdm.lock index eb3e1aa..42bbb32 100644 --- a/pdm.lock +++ b/pdm.lock @@ -5,7 +5,7 @@ groups = ["default", "lint", "test"] strategy = ["inherit_metadata"] lock_version = "4.5.0" -content_hash = "sha256:7591325553665462c944a8d69554dbb2994105eef447c70ad8308f7faa84d0a4" +content_hash = "sha256:7c33d018e2ff2c1b85140b7abe20c16469a1305f8e600bd4a13f9d2c1bfe83a6" [[metadata.targets]] requires_python = ">=3.13" @@ -471,7 +471,7 @@ name = "tomlkit" version = "0.13.2" requires_python = ">=3.8" summary = "Style preserving TOML library" -groups = ["default", "lint"] +groups = ["lint"] files = [ {file = "tomlkit-0.13.2-py3-none-any.whl", hash = "sha256:7a974427f6e119197f670fbbbeae7bef749a6c14e793db934baefc1b5f03efde"}, {file = "tomlkit-0.13.2.tar.gz", hash = "sha256:fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79"}, diff --git a/tests/plugin_helper/mock/generator.py b/tests/plugin_helper/mock/generator.py index ba6a12c..b115415 100644 --- a/tests/plugin_helper/mock/generator.py +++ b/tests/plugin_helper/mock/generator.py @@ -2,13 +2,14 @@ from typing import Any -from cppython_core.plugin_schema.generator import ( +from pydantic import DirectoryPath + +from cppython.core.plugin_schema.generator import ( Generator, GeneratorPluginGroupData, SupportedGeneratorFeatures, ) -from cppython_core.schema import CorePluginData, CPPythonModel, Information, SyncData -from pydantic import DirectoryPath +from cppython.core.schema import CorePluginData, CPPythonModel, Information, SyncData class MockSyncData(SyncData): diff --git a/tests/plugin_helper/mock/interface.py b/tests/plugin_helper/mock/interface.py index 656efc2..87379b4 100644 --- a/tests/plugin_helper/mock/interface.py +++ b/tests/plugin_helper/mock/interface.py @@ -1,6 +1,6 @@ """Mock interface definitions""" -from cppython_core.schema import Interface +from cppython.core.schema import Interface class MockInterface(Interface): diff --git a/tests/plugin_helper/mock/provider.py b/tests/plugin_helper/mock/provider.py index 13c6fe3..372f322 100644 --- a/tests/plugin_helper/mock/provider.py +++ b/tests/plugin_helper/mock/provider.py @@ -2,16 +2,16 @@ from typing import Any -from cppython_core.plugin_schema.generator import SyncConsumer -from cppython_core.plugin_schema.provider import ( +from pydantic import DirectoryPath +from pytest_cppython.mock.generator import MockSyncData + +from cppython.core.plugin_schema.generator import SyncConsumer +from cppython.core.plugin_schema.provider import ( Provider, ProviderPluginGroupData, SupportedProviderFeatures, ) -from cppython_core.schema import CorePluginData, CPPythonModel, Information, SyncData -from pydantic import DirectoryPath - -from pytest_cppython.mock.generator import MockSyncData +from cppython.core.schema import CorePluginData, CPPythonModel, Information, SyncData class MockProviderData(CPPythonModel): diff --git a/tests/plugin_helper/mock/scm.py b/tests/plugin_helper/mock/scm.py index 4844abf..8365c8b 100644 --- a/tests/plugin_helper/mock/scm.py +++ b/tests/plugin_helper/mock/scm.py @@ -1,12 +1,13 @@ """Mock SCM definitions""" -from cppython_core.plugin_schema.scm import ( +from pydantic import DirectoryPath + +from cppython.core.plugin_schema.scm import ( SCM, SCMPluginGroupData, SupportedSCMFeatures, ) -from cppython_core.schema import Information -from pydantic import DirectoryPath +from cppython.core.schema import Information class MockSCM(SCM): diff --git a/tests/plugin_helper/plugin.py b/tests/plugin_helper/plugin.py index c688c2b..ebf80f2 100644 --- a/tests/plugin_helper/plugin.py +++ b/tests/plugin_helper/plugin.py @@ -5,17 +5,24 @@ from typing import cast import pytest -from cppython_core.plugin_schema.generator import Generator -from cppython_core.plugin_schema.provider import Provider -from cppython_core.plugin_schema.scm import SCM -from cppython_core.resolution import ( +from pytest_cppython.variants import ( + cppython_global_variants, + cppython_local_variants, + pep621_variants, + project_variants, +) + +from cppython.core.plugin_schema.generator import Generator +from cppython.core.plugin_schema.provider import Provider +from cppython.core.plugin_schema.scm import SCM +from cppython.core.resolution import ( PluginBuildData, PluginCPPythonData, resolve_cppython, resolve_pep621, resolve_project_configuration, ) -from cppython_core.schema import ( +from cppython.core.schema import ( CoreData, CPPythonData, CPPythonGlobalConfiguration, @@ -28,13 +35,6 @@ ToolData, ) -from pytest_cppython.variants import ( - cppython_global_variants, - cppython_local_variants, - pep621_variants, - project_variants, -) - @pytest.fixture( name="install_path", diff --git a/tests/plugin_helper/shared.py b/tests/plugin_helper/shared.py index cd6248d..3ae0212 100644 --- a/tests/plugin_helper/shared.py +++ b/tests/plugin_helper/shared.py @@ -5,16 +5,21 @@ from typing import Any, LiteralString, cast import pytest -from cppython_core.plugin_schema.generator import Generator, GeneratorPluginGroupData -from cppython_core.plugin_schema.provider import Provider, ProviderPluginGroupData -from cppython_core.plugin_schema.scm import SCM, SCMPluginGroupData -from cppython_core.resolution import ( +from pytest_cppython.variants import generator_variants, provider_variants, scm_variants +from pytest_synodic.plugin import BaseTests as SynodicBaseTests +from pytest_synodic.plugin import IntegrationTests as SynodicBaseIntegrationTests +from pytest_synodic.plugin import UnitTests as SynodicBaseUnitTests + +from cppython.core.plugin_schema.generator import Generator, GeneratorPluginGroupData +from cppython.core.plugin_schema.provider import Provider, ProviderPluginGroupData +from cppython.core.plugin_schema.scm import SCM, SCMPluginGroupData +from cppython.core.resolution import ( resolve_cppython_plugin, resolve_generator, resolve_provider, resolve_scm, ) -from cppython_core.schema import ( +from cppython.core.schema import ( CorePluginData, CPPythonData, CPPythonPluginData, @@ -26,11 +31,6 @@ ProjectConfiguration, ProjectData, ) -from pytest_synodic.plugin import BaseTests as SynodicBaseTests -from pytest_synodic.plugin import IntegrationTests as SynodicBaseIntegrationTests -from pytest_synodic.plugin import UnitTests as SynodicBaseUnitTests - -from pytest_cppython.variants import generator_variants, provider_variants, scm_variants class BaseTests[T: Plugin](SynodicBaseTests[T], metaclass=ABCMeta): diff --git a/tests/plugin_helper/tests.py b/tests/plugin_helper/tests.py index 2090f17..67f03c9 100644 --- a/tests/plugin_helper/tests.py +++ b/tests/plugin_helper/tests.py @@ -5,11 +5,6 @@ from pathlib import Path import pytest -from cppython_core.plugin_schema.generator import Generator -from cppython_core.plugin_schema.provider import Provider -from cppython_core.plugin_schema.scm import SCM -from synodic_utilities.utility import canonicalize_type - from pytest_cppython.shared import ( DataPluginIntegrationTests, DataPluginUnitTests, @@ -20,6 +15,11 @@ SCMTests, ) +from cppython.core.plugin_schema.generator import Generator +from cppython.core.plugin_schema.provider import Provider +from cppython.core.plugin_schema.scm import SCM +from cppython.utility.utility import canonicalize_type + class ProviderIntegrationTests[T: Provider](DataPluginIntegrationTests[T], ProviderTests[T], metaclass=ABCMeta): """Base class for all provider integration tests that test plugin agnostic behavior""" diff --git a/tests/plugin_helper/variants.py b/tests/plugin_helper/variants.py index d024f38..025cea0 100644 --- a/tests/plugin_helper/variants.py +++ b/tests/plugin_helper/variants.py @@ -3,20 +3,20 @@ from collections.abc import Sequence from pathlib import Path -from cppython_core.plugin_schema.generator import Generator -from cppython_core.plugin_schema.provider import Provider -from cppython_core.plugin_schema.scm import SCM -from cppython_core.schema import ( +from pytest_cppython.mock.generator import MockGenerator +from pytest_cppython.mock.provider import MockProvider +from pytest_cppython.mock.scm import MockSCM + +from cppython.core.plugin_schema.generator import Generator +from cppython.core.plugin_schema.provider import Provider +from cppython.core.plugin_schema.scm import SCM +from cppython.core.schema import ( CPPythonGlobalConfiguration, CPPythonLocalConfiguration, PEP621Configuration, ProjectConfiguration, ) -from pytest_cppython.mock.generator import MockGenerator -from pytest_cppython.mock.provider import MockProvider -from pytest_cppython.mock.scm import MockSCM - def _pep621_configuration_list() -> list[PEP621Configuration]: """Creates a list of mocked configuration types diff --git a/tests/unit/core/test_plugin_schema.py b/tests/unit/core/test_plugin_schema.py index 6f04954..b9266f5 100644 --- a/tests/unit/core/test_plugin_schema.py +++ b/tests/unit/core/test_plugin_schema.py @@ -1,10 +1,10 @@ """Test plugin schemas""" -from synodic_utilities.utility import TypeName +from cppython.utility.utility import TypeName -from cppython_core.plugin_schema.generator import SyncConsumer -from cppython_core.plugin_schema.provider import SyncProducer -from cppython_core.schema import SyncData +from cppython.core.plugin_schema.generator import SyncConsumer +from cppython.core.plugin_schema.provider import SyncProducer +from cppython.core.schema import SyncData class TestSchema: diff --git a/tests/unit/test_data.py b/tests/unit/test_data.py index 8539e9d..e6544ab 100644 --- a/tests/unit/test_data.py +++ b/tests/unit/test_data.py @@ -3,18 +3,17 @@ import logging import pytest -import pytest_cppython -from cppython_core.resolution import PluginBuildData -from cppython_core.schema import ( - CPPythonLocalConfiguration, - PEP621Configuration, - ProjectConfiguration, -) from pytest_cppython.mock.generator import MockGenerator from pytest_cppython.mock.provider import MockProvider from pytest_cppython.mock.scm import MockSCM from cppython.builder import Builder +from cppython.core.resolution import PluginBuildData +from cppython.core.schema import ( + CPPythonLocalConfiguration, + PEP621Configuration, + ProjectConfiguration, +) from cppython.data import Data From 8f9ea3563fd4ad4cad62d8249db12f3505e92ad8 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Mon, 11 Nov 2024 00:58:28 -0500 Subject: [PATCH 29/68] More Typing --- pdm.lock | 18 +----- pyproject.toml | 55 ++++++------------- .../plugin_helper/test_generator.py | 4 +- .../plugin_helper/test_provider.py | 4 +- tests/integration/plugin_helper/test_scm.py | 4 +- tests/plugin_helper/mock/provider.py | 2 +- tests/plugin_helper/plugin.py | 12 ++-- tests/plugin_helper/py.typed | 0 tests/plugin_helper/shared.py | 12 ++-- tests/plugin_helper/tests.py | 12 ++-- tests/plugin_helper/variants.py | 7 +-- tests/unit/plugin_helper/test_generator.py | 4 +- tests/unit/plugin_helper/test_provider.py | 6 +- tests/unit/plugin_helper/test_scm.py | 4 +- tests/unit/test_builder.py | 6 +- tests/unit/test_data.py | 6 +- 16 files changed, 63 insertions(+), 93 deletions(-) delete mode 100644 tests/plugin_helper/py.typed diff --git a/pdm.lock b/pdm.lock index 42bbb32..86f2560 100644 --- a/pdm.lock +++ b/pdm.lock @@ -5,7 +5,7 @@ groups = ["default", "lint", "test"] strategy = ["inherit_metadata"] lock_version = "4.5.0" -content_hash = "sha256:7c33d018e2ff2c1b85140b7abe20c16469a1305f8e600bd4a13f9d2c1bfe83a6" +content_hash = "sha256:3661d05d084c8aa76e902720779eed7e7880998a1d1396181aa5636e2dd1a8c6" [[metadata.targets]] requires_python = ">=3.13" @@ -67,7 +67,7 @@ name = "click" version = "8.1.7" requires_python = ">=3.7" summary = "Composable command line interface toolkit" -groups = ["default", "lint", "test"] +groups = ["default", "lint"] dependencies = [ "colorama; platform_system == \"Windows\"", "importlib-metadata; python_version < \"3.8\"", @@ -396,20 +396,6 @@ files = [ {file = "pytest-8.3.3.tar.gz", hash = "sha256:70b98107bd648308a7952b06e6ca9a50bc660be218d53c257cc1fc94fda10181"}, ] -[[package]] -name = "pytest-click" -version = "1.1.0" -summary = "Pytest plugin for Click" -groups = ["test"] -dependencies = [ - "click>=6.0", - "pytest>=5.0", -] -files = [ - {file = "pytest_click-1.1.0-py3-none-any.whl", hash = "sha256:eade4742c2f02c345e78a32534a43e8db04acf98d415090539dacc880b7cd0e9"}, - {file = "pytest_click-1.1.0.tar.gz", hash = "sha256:fdd9f6721f877dda021e7c5dc73e70aecd37e5ed23ec6820f8a7b3fd7b4f8d30"}, -] - [[package]] name = "pytest-cov" version = "6.0.0" diff --git a/pyproject.toml b/pyproject.toml index d5c635d..80799ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,25 +23,6 @@ dependencies = [ homepage = "https://github.com/Synodic-Software/CPPython" repository = "https://github.com/Synodic-Software/CPPython" -[project.optional-dependencies] -#all = [ -# "cppython[cmake]", -#] -#cmake = [] - -# [project.entry-points."cppython.scm"] -# mock = "pytest_cppython.mock.scm:MockSCM" - -# [project.entry-points."cppython.generator"] -# mock = "pytest_cppython.mock.generator:MockGenerator" - -# [project.entry-points."cppython.provider"] -# mock = "pytest_cppython.mock.provider:MockProvider" - -# [project.entry-points.pytest11] -# pytest_cppython = "pytest_cppython.plugin" - -# Plugin registration [project.entry-points."cppython.scm"] git = "cppython_git.plugin:GitSCM" @@ -54,12 +35,6 @@ cppython = "cppython_pdm.plugin:CPPythonPlugin" [project.entry-points."cppython.provider"] vcpkg = "cppython_vcpkg.plugin:VcpkgProvider" -[tool.pdm.options] -update = ["--update-all"] - -[tool.pdm.version] -source = "scm" - [dependency-groups] lint = [ "black>=24.10.0", @@ -68,23 +43,14 @@ lint = [ "mypy>=1.13", ] test = [ - "pytest>=8.3.3", - "pytest-cov>=6.0.0", - "pytest-click>=1.1.0", - "pytest-mock>=3.14.0", + "pytest>=8.3.3", + "pytest-cov>=6.0.0", + "pytest-mock>=3.14.0", ] [project.scripts] cppython = "cppython.console.interface:cli" -[tool.pdm.scripts] -analyze = {shell = "pylint --verbose cppython tests"} -format = {shell = "black --check --verbose ."} -lint = {composite = ["analyze", "format", "sort-imports", "type-check"]} -sort-imports = {shell = "isort --check-only --diff --verbose ."} -test = {shell = "pytest --cov=cppython --verbose tests"} -type-check = {shell = "mypy ."} - [tool.pytest.ini_options] log_cli = true testpaths = [ @@ -127,6 +93,21 @@ default-docstring-type = "google" [tool.coverage.report] skip_empty = true + +[tool.pdm.options] +update = ["--update-all"] + +[tool.pdm.version] +source = "scm" + +[tool.pdm.scripts] +analyze = {shell = "pylint --verbose cppython tests"} +format = {shell = "black --check --verbose ."} +lint = {composite = ["analyze", "format", "sort-imports", "type-check"]} +sort-imports = {shell = "isort --check-only --diff --verbose ."} +test = {shell = "pytest --cov=cppython --verbose tests"} +type-check = {shell = "mypy ."} + [build-system] build-backend = "pdm.backend" requires = ["pdm.backend"] diff --git a/tests/integration/plugin_helper/test_generator.py b/tests/integration/plugin_helper/test_generator.py index a93667c..7a734c9 100644 --- a/tests/integration/plugin_helper/test_generator.py +++ b/tests/integration/plugin_helper/test_generator.py @@ -4,8 +4,8 @@ import pytest -from pytest_cppython.mock.generator import MockGenerator -from pytest_cppython.tests import GeneratorIntegrationTests +from tests.plugin_helper.mock.generator import MockGenerator +from tests.plugin_helper.tests import GeneratorIntegrationTests class TestCPPythonGenerator(GeneratorIntegrationTests[MockGenerator]): diff --git a/tests/integration/plugin_helper/test_provider.py b/tests/integration/plugin_helper/test_provider.py index 012c536..301661b 100644 --- a/tests/integration/plugin_helper/test_provider.py +++ b/tests/integration/plugin_helper/test_provider.py @@ -4,8 +4,8 @@ import pytest -from pytest_cppython.mock.provider import MockProvider -from pytest_cppython.tests import ProviderIntegrationTests +from tests.plugin_helper.mock.provider import MockProvider +from tests.plugin_helper.tests import ProviderIntegrationTests class TestMockProvider(ProviderIntegrationTests[MockProvider]): diff --git a/tests/integration/plugin_helper/test_scm.py b/tests/integration/plugin_helper/test_scm.py index fb39cde..83202f5 100644 --- a/tests/integration/plugin_helper/test_scm.py +++ b/tests/integration/plugin_helper/test_scm.py @@ -4,8 +4,8 @@ import pytest -from pytest_cppython.mock.scm import MockSCM -from pytest_cppython.tests import SCMIntegrationTests +from tests.plugin_helper.mock.scm import MockSCM +from tests.plugin_helper.tests import SCMIntegrationTests class TestCPPythonSCM(SCMIntegrationTests[MockSCM]): diff --git a/tests/plugin_helper/mock/provider.py b/tests/plugin_helper/mock/provider.py index 372f322..5e42c09 100644 --- a/tests/plugin_helper/mock/provider.py +++ b/tests/plugin_helper/mock/provider.py @@ -3,7 +3,6 @@ from typing import Any from pydantic import DirectoryPath -from pytest_cppython.mock.generator import MockSyncData from cppython.core.plugin_schema.generator import SyncConsumer from cppython.core.plugin_schema.provider import ( @@ -12,6 +11,7 @@ SupportedProviderFeatures, ) from cppython.core.schema import CorePluginData, CPPythonModel, Information, SyncData +from tests.plugin_helper.mock.generator import MockSyncData class MockProviderData(CPPythonModel): diff --git a/tests/plugin_helper/plugin.py b/tests/plugin_helper/plugin.py index ebf80f2..99ff294 100644 --- a/tests/plugin_helper/plugin.py +++ b/tests/plugin_helper/plugin.py @@ -5,12 +5,6 @@ from typing import cast import pytest -from pytest_cppython.variants import ( - cppython_global_variants, - cppython_local_variants, - pep621_variants, - project_variants, -) from cppython.core.plugin_schema.generator import Generator from cppython.core.plugin_schema.provider import Provider @@ -34,6 +28,12 @@ PyProject, ToolData, ) +from tests.plugin_helper.variants import ( + cppython_global_variants, + cppython_local_variants, + pep621_variants, + project_variants, +) @pytest.fixture( diff --git a/tests/plugin_helper/py.typed b/tests/plugin_helper/py.typed deleted file mode 100644 index e69de29..0000000 diff --git a/tests/plugin_helper/shared.py b/tests/plugin_helper/shared.py index 3ae0212..d5aaf0a 100644 --- a/tests/plugin_helper/shared.py +++ b/tests/plugin_helper/shared.py @@ -5,10 +5,6 @@ from typing import Any, LiteralString, cast import pytest -from pytest_cppython.variants import generator_variants, provider_variants, scm_variants -from pytest_synodic.plugin import BaseTests as SynodicBaseTests -from pytest_synodic.plugin import IntegrationTests as SynodicBaseIntegrationTests -from pytest_synodic.plugin import UnitTests as SynodicBaseUnitTests from cppython.core.plugin_schema.generator import Generator, GeneratorPluginGroupData from cppython.core.plugin_schema.provider import Provider, ProviderPluginGroupData @@ -31,6 +27,14 @@ ProjectConfiguration, ProjectData, ) +from tests.plugin_helper.plugin import BaseTests as SynodicBaseTests +from tests.plugin_helper.plugin import IntegrationTests as SynodicBaseIntegrationTests +from tests.plugin_helper.plugin import UnitTests as SynodicBaseUnitTests +from tests.plugin_helper.variants import ( + generator_variants, + provider_variants, + scm_variants, +) class BaseTests[T: Plugin](SynodicBaseTests[T], metaclass=ABCMeta): diff --git a/tests/plugin_helper/tests.py b/tests/plugin_helper/tests.py index 67f03c9..0aff275 100644 --- a/tests/plugin_helper/tests.py +++ b/tests/plugin_helper/tests.py @@ -5,7 +5,12 @@ from pathlib import Path import pytest -from pytest_cppython.shared import ( + +from cppython.core.plugin_schema.generator import Generator +from cppython.core.plugin_schema.provider import Provider +from cppython.core.plugin_schema.scm import SCM +from cppython.utility.utility import canonicalize_type +from tests.plugin_helper.shared import ( DataPluginIntegrationTests, DataPluginUnitTests, GeneratorTests, @@ -15,11 +20,6 @@ SCMTests, ) -from cppython.core.plugin_schema.generator import Generator -from cppython.core.plugin_schema.provider import Provider -from cppython.core.plugin_schema.scm import SCM -from cppython.utility.utility import canonicalize_type - class ProviderIntegrationTests[T: Provider](DataPluginIntegrationTests[T], ProviderTests[T], metaclass=ABCMeta): """Base class for all provider integration tests that test plugin agnostic behavior""" diff --git a/tests/plugin_helper/variants.py b/tests/plugin_helper/variants.py index 025cea0..2873ab4 100644 --- a/tests/plugin_helper/variants.py +++ b/tests/plugin_helper/variants.py @@ -3,10 +3,6 @@ from collections.abc import Sequence from pathlib import Path -from pytest_cppython.mock.generator import MockGenerator -from pytest_cppython.mock.provider import MockProvider -from pytest_cppython.mock.scm import MockSCM - from cppython.core.plugin_schema.generator import Generator from cppython.core.plugin_schema.provider import Provider from cppython.core.plugin_schema.scm import SCM @@ -16,6 +12,9 @@ PEP621Configuration, ProjectConfiguration, ) +from tests.plugin_helper.mock.generator import MockGenerator +from tests.plugin_helper.mock.provider import MockProvider +from tests.plugin_helper.mock.scm import MockSCM def _pep621_configuration_list() -> list[PEP621Configuration]: diff --git a/tests/unit/plugin_helper/test_generator.py b/tests/unit/plugin_helper/test_generator.py index 1a504d4..69778e3 100644 --- a/tests/unit/plugin_helper/test_generator.py +++ b/tests/unit/plugin_helper/test_generator.py @@ -4,8 +4,8 @@ import pytest -from pytest_cppython.mock.generator import MockGenerator -from pytest_cppython.tests import GeneratorUnitTests +from tests.plugin_helper.mock.generator import MockGenerator +from tests.plugin_helper.tests import GeneratorUnitTests class TestCPPythonGenerator(GeneratorUnitTests[MockGenerator]): diff --git a/tests/unit/plugin_helper/test_provider.py b/tests/unit/plugin_helper/test_provider.py index d6ef206..778108c 100644 --- a/tests/unit/plugin_helper/test_provider.py +++ b/tests/unit/plugin_helper/test_provider.py @@ -5,9 +5,9 @@ import pytest from pytest_mock import MockerFixture -from pytest_cppython.mock.generator import MockGenerator -from pytest_cppython.mock.provider import MockProvider -from pytest_cppython.tests import ProviderUnitTests +from tests.plugin_helper.mock.generator import MockGenerator +from tests.plugin_helper.mock.provider import MockProvider +from tests.plugin_helper.tests import ProviderUnitTests class TestMockProvider(ProviderUnitTests[MockProvider]): diff --git a/tests/unit/plugin_helper/test_scm.py b/tests/unit/plugin_helper/test_scm.py index a5f4f58..167783d 100644 --- a/tests/unit/plugin_helper/test_scm.py +++ b/tests/unit/plugin_helper/test_scm.py @@ -4,8 +4,8 @@ import pytest -from pytest_cppython.mock.scm import MockSCM -from pytest_cppython.tests import SCMUnitTests +from tests.plugin_helper.mock.scm import MockSCM +from tests.plugin_helper.tests import SCMUnitTests class TestCPPythonSCM(SCMUnitTests[MockSCM]): diff --git a/tests/unit/test_builder.py b/tests/unit/test_builder.py index 2b4e4b8..8ec5dc4 100644 --- a/tests/unit/test_builder.py +++ b/tests/unit/test_builder.py @@ -3,15 +3,15 @@ import logging import pytest_cppython -from cppython_core.schema import ( + +from cppython.builder import Builder, Resolver +from cppython.core.schema import ( CPPythonLocalConfiguration, PEP621Configuration, ProjectConfiguration, ProjectData, ) -from cppython.builder import Builder, Resolver - class TestBuilder: """Various tests for the Builder type""" diff --git a/tests/unit/test_data.py b/tests/unit/test_data.py index e6544ab..7d0f87a 100644 --- a/tests/unit/test_data.py +++ b/tests/unit/test_data.py @@ -3,9 +3,6 @@ import logging import pytest -from pytest_cppython.mock.generator import MockGenerator -from pytest_cppython.mock.provider import MockProvider -from pytest_cppython.mock.scm import MockSCM from cppython.builder import Builder from cppython.core.resolution import PluginBuildData @@ -15,6 +12,9 @@ ProjectConfiguration, ) from cppython.data import Data +from tests.plugin_helper.mock.generator import MockGenerator +from tests.plugin_helper.mock.provider import MockProvider +from tests.plugin_helper.mock.scm import MockSCM class TestData: From 4c738fe4e75c666ec003465c996541b378d030c5 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Mon, 11 Nov 2024 12:17:16 -0500 Subject: [PATCH 30/68] Import Fixes --- cppython/builder.py | 13 +- cppython/core/exception.py | 28 ++ cppython/core/exceptions.py | 64 --- cppython/core/resolution.py | 2 +- cppython/data.py | 10 +- cppython/plugins/cmake/builder.py | 5 +- cppython/plugins/cmake/plugin.py | 11 +- cppython/plugins/cmake/resolution.py | 5 +- cppython/plugins/git/plugin.py | 9 +- cppython/plugins/pdm/plugin.py | 2 +- cppython/plugins/vcpkg/plugin.py | 25 +- cppython/plugins/vcpkg/resolution.py | 5 +- cppython/plugins/vcpkg/schema.py | 22 +- cppython/project.py | 7 +- cppython/utility/exception.py | 18 + cppython/utility/subprocess.py | 2 +- pdm.lock | 410 +++++++++++++++++- pyproject.toml | 16 +- .../plugins/cmake/test_generator.py | 6 +- .../integration/plugins/pdm/test_interface.py | 5 +- .../plugins/vcpkg/test_provider.py | 7 +- tests/unit/core/test_resolution.py | 2 +- tests/unit/core/test_schema.py | 2 +- tests/unit/plugins/cmake/test_generator.py | 16 +- .../unit/plugins/git/test_version_control.py | 4 +- tests/unit/plugins/pdm/test_interface.py | 5 +- tests/unit/plugins/vcpkg/test_provider.py | 9 +- tests/unit/test_builder.py | 2 - tests/unit/test_project.py | 2 +- tests/unit/utility/test_plugin.py | 2 +- tests/unit/utility/test_utility.py | 6 +- 31 files changed, 550 insertions(+), 172 deletions(-) create mode 100644 cppython/core/exception.py delete mode 100644 cppython/core/exceptions.py diff --git a/cppython/builder.py b/cppython/builder.py index 9b5bdb8..995bcd6 100644 --- a/cppython/builder.py +++ b/cppython/builder.py @@ -6,11 +6,10 @@ from logging import Logger from typing import Any -from cppython_core.exceptions import PluginError -from cppython_core.plugin_schema.generator import Generator -from cppython_core.plugin_schema.provider import Provider -from cppython_core.plugin_schema.scm import SCM -from cppython_core.resolution import ( +from cppython.core.plugin_schema.generator import Generator +from cppython.core.plugin_schema.provider import Provider +from cppython.core.plugin_schema.scm import SCM +from cppython.core.resolution import ( PluginBuildData, PluginCPPythonData, resolve_cppython, @@ -21,7 +20,7 @@ resolve_provider, resolve_scm, ) -from cppython_core.schema import ( +from cppython.core.schema import ( CoreData, CorePluginData, CPPythonGlobalConfiguration, @@ -32,8 +31,8 @@ ProjectConfiguration, ProjectData, ) - from cppython.data import Data, Plugins +from cppython.utility.exception import PluginError class Resolver: diff --git a/cppython/core/exception.py b/cppython/core/exception.py new file mode 100644 index 0000000..c1074e6 --- /dev/null +++ b/cppython/core/exception.py @@ -0,0 +1,28 @@ +"""Custom exceptions used by CPPython""" + +from pydantic import BaseModel + + +class ConfigError(BaseModel): + """Data for ConfigError""" + + message: str + + +class ConfigException(ValueError): + """Raised when there is a configuration error""" + + def __init__(self, message: str, errors: list[ConfigError]): + + super().__init__(message) + self._errors = errors + + @property + def error_count(self) -> int: + """The number of configuration errors associated with this exception""" + return len(self._errors) + + @property + def errors(self) -> list[ConfigError]: + """The list of configuration errors""" + return self._errors diff --git a/cppython/core/exceptions.py b/cppython/core/exceptions.py deleted file mode 100644 index cd88e2b..0000000 --- a/cppython/core/exceptions.py +++ /dev/null @@ -1,64 +0,0 @@ -"""Custom exceptions used by CPPython""" - -from pydantic import BaseModel - - -class ConfigError(BaseModel): - """Data for ConfigError""" - - message: str - - -class ConfigException(ValueError): - """Raised when there is a configuration error""" - - def __init__(self, message: str, errors: list[ConfigError]): - - super().__init__(message) - self._errors = errors - - @property - def error_count(self) -> int: - """The number of configuration errors associated with this exception""" - return len(self._errors) - - @property - def errors(self) -> list[ConfigError]: - """The list of configuration errors""" - return self._errors - - -class PluginError(Exception): - """Raised when there is a plugin error""" - - def __init__(self, error: str) -> None: - self._error = error - - super().__init__(error) - - @property - def error(self) -> str: - """Returns the underlying error - - Returns: - str -- The underlying error - """ - return self._error - - -class NotSupportedError(Exception): - """Raised when something is not supported""" - - def __init__(self, error: str) -> None: - self._error = error - - super().__init__(error) - - @property - def error(self) -> str: - """Returns the underlying error - - Returns: - str -- The underlying error - """ - return self._error diff --git a/cppython/core/resolution.py b/cppython/core/resolution.py index 3193e72..1774a26 100644 --- a/cppython/core/resolution.py +++ b/cppython/core/resolution.py @@ -5,7 +5,7 @@ from pydantic import BaseModel, DirectoryPath, ValidationError -from cppython.core.exceptions import ConfigError, ConfigException +from cppython.core.exception import ConfigError, ConfigException from cppython.core.plugin_schema.generator import Generator, GeneratorPluginGroupData from cppython.core.plugin_schema.provider import Provider, ProviderPluginGroupData from cppython.core.plugin_schema.scm import SCM, SCMPluginGroupData diff --git a/cppython/data.py b/cppython/data.py index ad24718..9ce5867 100644 --- a/cppython/data.py +++ b/cppython/data.py @@ -3,11 +3,11 @@ from dataclasses import dataclass from logging import Logger -from cppython_core.exceptions import PluginError -from cppython_core.plugin_schema.generator import Generator -from cppython_core.plugin_schema.provider import Provider -from cppython_core.plugin_schema.scm import SCM -from cppython_core.schema import CoreData +from cppython.core.plugin_schema.generator import Generator +from cppython.core.plugin_schema.provider import Provider +from cppython.core.plugin_schema.scm import SCM +from cppython.core.schema import CoreData +from cppython.utility.exception import PluginError @dataclass diff --git a/cppython/plugins/cmake/builder.py b/cppython/plugins/cmake/builder.py index e73a2c0..60200c8 100644 --- a/cppython/plugins/cmake/builder.py +++ b/cppython/plugins/cmake/builder.py @@ -3,9 +3,8 @@ from copy import deepcopy from pathlib import Path -from cppython_core.utility import read_json, write_json, write_model_json - -from cppython_cmake.schema import CMakePresets, CMakeSyncData, ConfigurePreset +from cppython.core.utility import read_json, write_json, write_model_json +from cppython.plugins.cmake.schema import CMakePresets, CMakeSyncData, ConfigurePreset class Builder: diff --git a/cppython/plugins/cmake/plugin.py b/cppython/plugins/cmake/plugin.py index 14f99ae..4e58760 100644 --- a/cppython/plugins/cmake/plugin.py +++ b/cppython/plugins/cmake/plugin.py @@ -3,16 +3,15 @@ from pathlib import Path from typing import Any -from cppython_core.plugin_schema.generator import ( +from cppython.core.plugin_schema.generator import ( Generator, GeneratorPluginGroupData, SupportedGeneratorFeatures, ) -from cppython_core.schema import CorePluginData, Information, SyncData - -from cppython_cmake.builder import Builder -from cppython_cmake.resolution import resolve_cmake_data -from cppython_cmake.schema import CMakeSyncData +from cppython.core.schema import CorePluginData, Information, SyncData +from cppython.plugins.cmake.builder import Builder +from cppython.plugins.cmake.resolution import resolve_cmake_data +from cppython.plugins.cmake.schema import CMakeSyncData class CMakeGenerator(Generator): diff --git a/cppython/plugins/cmake/resolution.py b/cppython/plugins/cmake/resolution.py index 8e0ef87..b9d0525 100644 --- a/cppython/plugins/cmake/resolution.py +++ b/cppython/plugins/cmake/resolution.py @@ -2,9 +2,8 @@ from typing import Any -from cppython_core.schema import CorePluginData - -from cppython_cmake.schema import CMakeConfiguration, CMakeData +from cppython.core.schema import CorePluginData +from cppython.plugins.cmake.schema import CMakeConfiguration, CMakeData def resolve_cmake_data(data: dict[str, Any], core_data: CorePluginData) -> CMakeData: diff --git a/cppython/plugins/git/plugin.py b/cppython/plugins/git/plugin.py index 7dc5027..995e5fa 100644 --- a/cppython/plugins/git/plugin.py +++ b/cppython/plugins/git/plugin.py @@ -2,14 +2,15 @@ from pathlib import Path -from cppython_core.plugin_schema.scm import ( +from dulwich.errors import NotGitRepository +from dulwich.repo import Repo + +from cppython.core.plugin_schema.scm import ( SCM, SCMPluginGroupData, SupportedSCMFeatures, ) -from cppython_core.schema import Information -from dulwich.errors import NotGitRepository -from dulwich.repo import Repo +from cppython.core.schema import Information class GitSCM(SCM): diff --git a/cppython/plugins/pdm/plugin.py b/cppython/plugins/pdm/plugin.py index 285a07b..57cacaf 100644 --- a/cppython/plugins/pdm/plugin.py +++ b/cppython/plugins/pdm/plugin.py @@ -5,7 +5,7 @@ from typing import Any from cppython.project import Project as CPPythonProject -from cppython_core.schema import Interface, ProjectConfiguration +from cppython.core.schema import Interface, ProjectConfiguration from pdm.core import Core from pdm.project.core import Project from pdm.signals import post_install diff --git a/cppython/plugins/vcpkg/plugin.py b/cppython/plugins/vcpkg/plugin.py index 64dea6e..651cde2 100644 --- a/cppython/plugins/vcpkg/plugin.py +++ b/cppython/plugins/vcpkg/plugin.py @@ -1,5 +1,4 @@ -"""The vcpkg provider implementation -""" +"""The vcpkg provider implementation""" import json from logging import getLogger @@ -7,20 +6,20 @@ from pathlib import Path, PosixPath, WindowsPath from typing import Any -from cppython_cmake.plugin import CMakeGenerator -from cppython_cmake.schema import CMakeSyncData -from cppython_core.exceptions import NotSupportedError, ProcessError -from cppython_core.plugin_schema.generator import SyncConsumer -from cppython_core.plugin_schema.provider import ( +from cppython.core.plugin_schema.generator import SyncConsumer +from cppython.core.plugin_schema.provider import ( Provider, ProviderPluginGroupData, SupportedProviderFeatures, ) -from cppython_core.schema import CorePluginData, Information, PluginName, SyncData -from cppython_core.utility import subprocess_call - -from cppython_vcpkg.resolution import generate_manifest, resolve_vcpkg_data -from cppython_vcpkg.schema import VcpkgData +from cppython.core.schema import CorePluginData, Information, SyncData +from cppython.plugins.cmake.plugin import CMakeGenerator +from cppython.plugins.cmake.schema import CMakeSyncData +from cppython.plugins.vcpkg.resolution import generate_manifest, resolve_vcpkg_data +from cppython.plugins.vcpkg.schema import VcpkgData +from cppython.utility.exception import NotSupportedError, ProcessError +from cppython.utility.subprocess import call as subprocess_call +from cppython.utility.utility import TypeName class VcpkgProvider(Provider): @@ -102,7 +101,7 @@ def sync_data(self, consumer: SyncConsumer) -> SyncData: for sync_type in consumer.sync_types(): if sync_type == CMakeSyncData: toolchain_file = self.core_data.cppython_data.install_path / "scripts/buildsystems/vcpkg.cmake" - return CMakeSyncData(provider_name=PluginName("vcpkg"), toolchain=toolchain_file) + return CMakeSyncData(provider_name=TypeName("vcpkg"), toolchain=toolchain_file) raise NotSupportedError("OOF") diff --git a/cppython/plugins/vcpkg/resolution.py b/cppython/plugins/vcpkg/resolution.py index 113a6b8..c67fd5f 100644 --- a/cppython/plugins/vcpkg/resolution.py +++ b/cppython/plugins/vcpkg/resolution.py @@ -2,9 +2,8 @@ from typing import Any -from cppython_core.schema import CorePluginData - -from cppython_vcpkg.schema import ( +from cppython.core.schema import CorePluginData +from cppython.plugins.vcpkg.schema import ( Manifest, VcpkgConfiguration, VcpkgData, diff --git a/cppython/plugins/vcpkg/schema.py b/cppython/plugins/vcpkg/schema.py index 4d6faf6..e49f140 100644 --- a/cppython/plugins/vcpkg/schema.py +++ b/cppython/plugins/vcpkg/schema.py @@ -1,10 +1,13 @@ """Definitions for the plugin""" + from pathlib import Path +from typing import Annotated -from cppython_core.schema import CPPythonModel from pydantic import Field, HttpUrl from pydantic.types import DirectoryPath +from cppython.core.schema import CPPythonModel + class VcpkgDependency(CPPythonModel): """Vcpkg dependency type""" @@ -22,11 +25,14 @@ class VcpkgData(CPPythonModel): class VcpkgConfiguration(CPPythonModel): """vcpkg provider data""" - install_directory: Path = Field( - default=Path("build"), - alias="install-directory", - description="The referenced dependencies defined by the local vcpkg.json manifest file", - ) + install_directory: Annotated[ + Path, + Field( + default=Path("build"), + alias="install-directory", + description="The referenced dependencies defined by the local vcpkg.json manifest file", + ), + ] dependencies: list[VcpkgDependency] = Field( default=[], description="The directory to store the manifest file, vcpkg.json" @@ -38,6 +44,8 @@ class Manifest(CPPythonModel): name: str = Field(description="The project name") - version_string: str = Field(default="", alias="version-string", description="The arbitrary version string") + version_string: Annotated[ + str, Field(default="", alias="version-string", description="The arbitrary version string") + ] homepage: HttpUrl | None = Field(default=None, description="Homepage URL") dependencies: list[VcpkgDependency] = Field(default=[], description="List of dependencies") diff --git a/cppython/project.py b/cppython/project.py index f4e7d3a..33885ea 100644 --- a/cppython/project.py +++ b/cppython/project.py @@ -4,11 +4,10 @@ import logging from typing import Any -from cppython_core.exceptions import ConfigException -from cppython_core.resolution import resolve_model -from cppython_core.schema import Interface, ProjectConfiguration, PyProject - from cppython.builder import Builder +from cppython.core.exception import ConfigException +from cppython.core.resolution import resolve_model +from cppython.core.schema import Interface, ProjectConfiguration, PyProject from cppython.schema import API diff --git a/cppython/utility/exception.py b/cppython/utility/exception.py index 61002eb..6a64977 100644 --- a/cppython/utility/exception.py +++ b/cppython/utility/exception.py @@ -35,3 +35,21 @@ def error(self) -> str: str -- The underlying error """ return self._error + + +class NotSupportedError(Exception): + """Raised when something is not supported""" + + def __init__(self, error: str) -> None: + self._error = error + + super().__init__(error) + + @property + def error(self) -> str: + """Returns the underlying error + + Returns: + str -- The underlying error + """ + return self._error diff --git a/cppython/utility/subprocess.py b/cppython/utility/subprocess.py index 427c129..2c3976d 100644 --- a/cppython/utility/subprocess.py +++ b/cppython/utility/subprocess.py @@ -5,7 +5,7 @@ from pathlib import Path from typing import Any -from synodic_utilities.exception import ProcessError +from cppython.utility.exception import ProcessError def call( diff --git a/pdm.lock b/pdm.lock index 86f2560..96fbf71 100644 --- a/pdm.lock +++ b/pdm.lock @@ -2,10 +2,10 @@ # It is not intended for manual editing. [metadata] -groups = ["default", "lint", "test"] +groups = ["default", "git", "lint", "pdm", "test"] strategy = ["inherit_metadata"] lock_version = "4.5.0" -content_hash = "sha256:3661d05d084c8aa76e902720779eed7e7880998a1d1396181aa5636e2dd1a8c6" +content_hash = "sha256:1f1da2fb9af3f630210b6c134178c626d5672b11f257923ddfe689eda675b236" [[metadata.targets]] requires_python = ">=3.13" @@ -24,6 +24,23 @@ files = [ {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, ] +[[package]] +name = "anyio" +version = "4.6.2.post1" +requires_python = ">=3.9" +summary = "High level compatibility layer for multiple asynchronous event loop implementations" +groups = ["pdm"] +dependencies = [ + "exceptiongroup>=1.0.2; python_version < \"3.11\"", + "idna>=2.8", + "sniffio>=1.1", + "typing-extensions>=4.1; python_version < \"3.11\"", +] +files = [ + {file = "anyio-4.6.2.post1-py3-none-any.whl", hash = "sha256:6d170c36fba3bdd840c73d3868c1e777e33676a69c3a72cf0a0d5d6d8009b61d"}, + {file = "anyio-4.6.2.post1.tar.gz", hash = "sha256:4c8bc31ccdb51c7f7bd251f51c609e038d63e34219b44aa86e47576389880b4c"}, +] + [[package]] name = "astroid" version = "3.3.5" @@ -62,6 +79,28 @@ files = [ {file = "black-24.10.0.tar.gz", hash = "sha256:846ea64c97afe3bc677b761787993be4991810ecc7a4a937816dd6bddedc4875"}, ] +[[package]] +name = "blinker" +version = "1.9.0" +requires_python = ">=3.9" +summary = "Fast, simple object-to-object and broadcast signaling" +groups = ["pdm"] +files = [ + {file = "blinker-1.9.0-py3-none-any.whl", hash = "sha256:ba0efaa9080b619ff2f3459d1d500c57bddea4a6b424b60a91141db6fd2f08bc"}, + {file = "blinker-1.9.0.tar.gz", hash = "sha256:b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf"}, +] + +[[package]] +name = "certifi" +version = "2024.8.30" +requires_python = ">=3.6" +summary = "Python package for providing Mozilla's CA Bundle." +groups = ["pdm"] +files = [ + {file = "certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8"}, + {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"}, +] + [[package]] name = "click" version = "8.1.7" @@ -154,6 +193,20 @@ files = [ {file = "coverage-7.6.4.tar.gz", hash = "sha256:29fc0f17b1d3fea332f8001d4558f8214af7f1d87a345f3a133c901d60347c73"}, ] +[[package]] +name = "dep-logic" +version = "0.4.9" +requires_python = ">=3.8" +summary = "Python dependency specifications supporting logical operations" +groups = ["pdm"] +dependencies = [ + "packaging>=22", +] +files = [ + {file = "dep_logic-0.4.9-py3-none-any.whl", hash = "sha256:06faa33814e5ff881922f644284a608d7da7946462760f710217d829ae864a0e"}, + {file = "dep_logic-0.4.9.tar.gz", hash = "sha256:5d455ea2a3da4fea2be6186d886905c57eeeebe3ea7fa967f599cb8e0f01d5c9"}, +] + [[package]] name = "dill" version = "0.3.9" @@ -166,6 +219,150 @@ files = [ {file = "dill-0.3.9.tar.gz", hash = "sha256:81aa267dddf68cbfe8029c42ca9ec6a4ab3b22371d1c450abc54422577b4512c"}, ] +[[package]] +name = "distlib" +version = "0.3.9" +summary = "Distribution utilities" +groups = ["pdm"] +files = [ + {file = "distlib-0.3.9-py2.py3-none-any.whl", hash = "sha256:47f8c22fd27c27e25a65601af709b38e4f0a45ea4fc2e710f65755fa8caaaf87"}, + {file = "distlib-0.3.9.tar.gz", hash = "sha256:a60f20dea646b8a33f3e7772f74dc0b2d0772d2837ee1342a00645c81edf9403"}, +] + +[[package]] +name = "dulwich" +version = "0.22.5" +requires_python = ">=3.9" +summary = "Python Git Library" +groups = ["git"] +dependencies = [ + "urllib3>=1.25", +] +files = [ + {file = "dulwich-0.22.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0d2ff25da411862194065fae2fae2bfe3246d60dc03d1c67369f6dd20ba88c6a"}, + {file = "dulwich-0.22.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d24b40c011d3f7efe3e83f786a20b9021c8709c5456823415d50a5f7b08eb0c7"}, + {file = "dulwich-0.22.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b32f901704a18a87587f6a2e3655cfaacebfbdea4b5e2a0f5908aea3d6c34d0d"}, + {file = "dulwich-0.22.5-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:81f87e7ff2954bcbd5e520bcbee882810bf10667cf780d6ea93c87f758b273c6"}, + {file = "dulwich-0.22.5-cp313-cp313-win32.whl", hash = "sha256:74b615facfbe2385e4ed2166e109c83db2c93056740618b94e4d612354dbe50d"}, + {file = "dulwich-0.22.5-cp313-cp313-win_amd64.whl", hash = "sha256:2de0440ea2c372e86e907900684c36b99d55dce805069bf345fbdbcfc3f6e419"}, + {file = "dulwich-0.22.5-py3-none-any.whl", hash = "sha256:7728938fd90e171b8e9429ec6689626a84ae50817606098f05405002f1958066"}, + {file = "dulwich-0.22.5.tar.gz", hash = "sha256:15af5feeaaf8fc89f26abc0d9a1518785b66f1801c3101506400775f2da921d4"}, +] + +[[package]] +name = "filelock" +version = "3.16.1" +requires_python = ">=3.8" +summary = "A platform independent file lock." +groups = ["pdm"] +files = [ + {file = "filelock-3.16.1-py3-none-any.whl", hash = "sha256:2082e5703d51fbf98ea75855d9d5527e33d8ff23099bec374a134febee6946b0"}, + {file = "filelock-3.16.1.tar.gz", hash = "sha256:c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435"}, +] + +[[package]] +name = "findpython" +version = "0.6.2" +requires_python = ">=3.8" +summary = "A utility to find python versions on your system" +groups = ["pdm"] +dependencies = [ + "packaging>=20", +] +files = [ + {file = "findpython-0.6.2-py3-none-any.whl", hash = "sha256:bda62477f858ea623ef2269f5e734469a018104a5f6c0fd9317ba238464ddb76"}, + {file = "findpython-0.6.2.tar.gz", hash = "sha256:e0c75ba9f35a7f9bb4423eb31bd17358cccf15761b6837317719177aeff46723"}, +] + +[[package]] +name = "h11" +version = "0.14.0" +requires_python = ">=3.7" +summary = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" +groups = ["pdm"] +dependencies = [ + "typing-extensions; python_version < \"3.8\"", +] +files = [ + {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, + {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, +] + +[[package]] +name = "hishel" +version = "0.0.33" +requires_python = ">=3.8" +summary = "Persistent cache implementation for httpx and httpcore" +groups = ["pdm"] +dependencies = [ + "httpx>=0.22.0", + "typing-extensions>=4.8.0", +] +files = [ + {file = "hishel-0.0.33-py3-none-any.whl", hash = "sha256:6e6c6cdaf432ff4c4981e7792ef7d1fa4c8ede58b9dbbcefb9ab3fc9770f2a07"}, + {file = "hishel-0.0.33.tar.gz", hash = "sha256:ab5b2661d5e2252f305fd0fb20e8c76bfab3ea73458f20f2591c53c37b270089"}, +] + +[[package]] +name = "httpcore" +version = "1.0.6" +requires_python = ">=3.8" +summary = "A minimal low-level HTTP client." +groups = ["pdm"] +dependencies = [ + "certifi", + "h11<0.15,>=0.13", +] +files = [ + {file = "httpcore-1.0.6-py3-none-any.whl", hash = "sha256:27b59625743b85577a8c0e10e55b50b5368a4f2cfe8cc7bcfa9cf00829c2682f"}, + {file = "httpcore-1.0.6.tar.gz", hash = "sha256:73f6dbd6eb8c21bbf7ef8efad555481853f5f6acdeaff1edb0694289269ee17f"}, +] + +[[package]] +name = "httpx" +version = "0.27.2" +requires_python = ">=3.8" +summary = "The next generation HTTP client." +groups = ["pdm"] +dependencies = [ + "anyio", + "certifi", + "httpcore==1.*", + "idna", + "sniffio", +] +files = [ + {file = "httpx-0.27.2-py3-none-any.whl", hash = "sha256:7bb2708e112d8fdd7829cd4243970f0c223274051cb35ee80c03301ee29a3df0"}, + {file = "httpx-0.27.2.tar.gz", hash = "sha256:f7c2be1d2f3c3c3160d441802406b206c2b76f5947b11115e6df10c6c65e66c2"}, +] + +[[package]] +name = "httpx" +version = "0.27.2" +extras = ["socks"] +requires_python = ">=3.8" +summary = "The next generation HTTP client." +groups = ["pdm"] +dependencies = [ + "httpx==0.27.2", + "socksio==1.*", +] +files = [ + {file = "httpx-0.27.2-py3-none-any.whl", hash = "sha256:7bb2708e112d8fdd7829cd4243970f0c223274051cb35ee80c03301ee29a3df0"}, + {file = "httpx-0.27.2.tar.gz", hash = "sha256:f7c2be1d2f3c3c3160d441802406b206c2b76f5947b11115e6df10c6c65e66c2"}, +] + +[[package]] +name = "idna" +version = "3.10" +requires_python = ">=3.6" +summary = "Internationalized Domain Names in Applications (IDNA)" +groups = ["pdm"] +files = [ + {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"}, + {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"}, +] + [[package]] name = "iniconfig" version = "2.0.0" @@ -177,6 +374,17 @@ files = [ {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, ] +[[package]] +name = "installer" +version = "0.7.0" +requires_python = ">=3.7" +summary = "A library for installing Python wheels." +groups = ["pdm"] +files = [ + {file = "installer-0.7.0-py3-none-any.whl", hash = "sha256:05d1933f0a5ba7d8d6296bb6d5018e7c94fa473ceb10cf198a92ccea19c27b53"}, + {file = "installer-0.7.0.tar.gz", hash = "sha256:a26d3e3116289bb08216e0d0f7d925fcef0b0194eedfa0c944bcaaa106c4b631"}, +] + [[package]] name = "isort" version = "5.13.2" @@ -193,7 +401,7 @@ name = "markdown-it-py" version = "3.0.0" requires_python = ">=3.8" summary = "Python port of markdown-it. Markdown parsing, done right!" -groups = ["default"] +groups = ["default", "pdm"] dependencies = [ "mdurl~=0.1", ] @@ -218,12 +426,33 @@ name = "mdurl" version = "0.1.2" requires_python = ">=3.7" summary = "Markdown URL utilities" -groups = ["default"] +groups = ["default", "pdm"] files = [ {file = "mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8"}, {file = "mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"}, ] +[[package]] +name = "msgpack" +version = "1.1.0" +requires_python = ">=3.8" +summary = "MessagePack serializer" +groups = ["pdm"] +files = [ + {file = "msgpack-1.1.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:071603e2f0771c45ad9bc65719291c568d4edf120b44eb36324dcb02a13bfddf"}, + {file = "msgpack-1.1.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0f92a83b84e7c0749e3f12821949d79485971f087604178026085f60ce109330"}, + {file = "msgpack-1.1.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:4a1964df7b81285d00a84da4e70cb1383f2e665e0f1f2a7027e683956d04b734"}, + {file = "msgpack-1.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:59caf6a4ed0d164055ccff8fe31eddc0ebc07cf7326a2aaa0dbf7a4001cd823e"}, + {file = "msgpack-1.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0907e1a7119b337971a689153665764adc34e89175f9a34793307d9def08e6ca"}, + {file = "msgpack-1.1.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:65553c9b6da8166e819a6aa90ad15288599b340f91d18f60b2061f402b9a4915"}, + {file = "msgpack-1.1.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:7a946a8992941fea80ed4beae6bff74ffd7ee129a90b4dd5cf9c476a30e9708d"}, + {file = "msgpack-1.1.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:4b51405e36e075193bc051315dbf29168d6141ae2500ba8cd80a522964e31434"}, + {file = "msgpack-1.1.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:b4c01941fd2ff87c2a934ee6055bda4ed353a7846b8d4f341c428109e9fcde8c"}, + {file = "msgpack-1.1.0-cp313-cp313-win32.whl", hash = "sha256:7c9a35ce2c2573bada929e0b7b3576de647b0defbd25f5139dcdaba0ae35a4cc"}, + {file = "msgpack-1.1.0-cp313-cp313-win_amd64.whl", hash = "sha256:bce7d9e614a04d0883af0b3d4d501171fbfca038f12c77fa838d9f198147a23f"}, + {file = "msgpack-1.1.0.tar.gz", hash = "sha256:dd432ccc2c72b914e4cb77afce64aab761c1137cc698be3984eee260bcb2896e"}, +] + [[package]] name = "mypy" version = "1.13.0" @@ -261,7 +490,7 @@ name = "packaging" version = "24.2" requires_python = ">=3.8" summary = "Core utilities for Python packages" -groups = ["default", "lint", "test"] +groups = ["default", "lint", "pdm", "test"] files = [ {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, @@ -278,12 +507,61 @@ files = [ {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, ] +[[package]] +name = "pbs-installer" +version = "2024.10.16" +requires_python = ">=3.8" +summary = "Installer for Python Build Standalone" +groups = ["pdm"] +files = [ + {file = "pbs_installer-2024.10.16-py3-none-any.whl", hash = "sha256:043f157ae0939b403b98b410f92bcc1d52062c8ced46e52ff0fdb45d37320a25"}, + {file = "pbs_installer-2024.10.16.tar.gz", hash = "sha256:d547d9a5bb564791102d138346bff609659c16acc0147fd701755a2eae8f2050"}, +] + +[[package]] +name = "pdm" +version = "2.20.1" +requires_python = ">=3.8" +summary = "A modern Python package and dependency manager supporting the latest PEP standards" +groups = ["pdm"] +dependencies = [ + "blinker", + "certifi>=2024.8.30", + "dep-logic>=0.4.4", + "filelock>=3.13", + "findpython<1.0.0a0,>=0.6.0", + "hishel<0.1.0,>=0.0.32", + "httpcore>=1.0.6", + "httpx[socks]<1,>0.20", + "importlib-metadata>=3.6; python_version < \"3.10\"", + "importlib-resources>=5; python_version < \"3.9\"", + "installer<0.8,>=0.7", + "msgpack>=1.0", + "packaging!=22.0,>=20.9", + "pbs-installer>=2024.4.18", + "platformdirs", + "pyproject-hooks", + "python-dotenv>=0.15", + "resolvelib>=1.1", + "rich>=12.3.0", + "shellingham>=1.3.2", + "tomli>=1.1.0; python_version < \"3.11\"", + "tomlkit<1,>=0.11.1", + "truststore>=0.9; python_version >= \"3.10\"", + "unearth>=0.17.0", + "virtualenv>=20", +] +files = [ + {file = "pdm-2.20.1-py3-none-any.whl", hash = "sha256:27904e5a703e6ce6598a2a92a6e4c95b2099746b1aba9402154978afce4ed6a7"}, + {file = "pdm-2.20.1.tar.gz", hash = "sha256:5348e9d33de381f998904a63ab18efdd6d1cf6377d45572e8b996d58dfc5b996"}, +] + [[package]] name = "platformdirs" version = "4.3.6" requires_python = ">=3.8" summary = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." -groups = ["lint"] +groups = ["lint", "pdm"] files = [ {file = "platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb"}, {file = "platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907"}, @@ -347,7 +625,7 @@ name = "pygments" version = "2.18.0" requires_python = ">=3.8" summary = "Pygments is a syntax highlighting package written in Python." -groups = ["default"] +groups = ["default", "pdm"] files = [ {file = "pygments-2.18.0-py3-none-any.whl", hash = "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a"}, {file = "pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199"}, @@ -377,6 +655,17 @@ files = [ {file = "pylint-3.3.1.tar.gz", hash = "sha256:9f3dcc87b1203e612b78d91a896407787e708b3f189b5fa0b307712d49ff0c6e"}, ] +[[package]] +name = "pyproject-hooks" +version = "1.2.0" +requires_python = ">=3.7" +summary = "Wrappers to call pyproject.toml-based build backend hooks." +groups = ["pdm"] +files = [ + {file = "pyproject_hooks-1.2.0-py3-none-any.whl", hash = "sha256:9e5c6bfa8dcc30091c74b0cf803c81fdd29d94f01992a7707bc97babb1141913"}, + {file = "pyproject_hooks-1.2.0.tar.gz", hash = "sha256:1e859bd5c40fae9448642dd871adf459e5e2084186e8d2c2a79a824c970da1f8"}, +] + [[package]] name = "pytest" version = "8.3.3" @@ -425,12 +714,34 @@ files = [ {file = "pytest_mock-3.14.0-py3-none-any.whl", hash = "sha256:0b72c38033392a5f4621342fe11e9219ac11ec9d375f8e2a0c164539e0d70f6f"}, ] +[[package]] +name = "python-dotenv" +version = "1.0.1" +requires_python = ">=3.8" +summary = "Read key-value pairs from a .env file and set them as environment variables" +groups = ["pdm"] +files = [ + {file = "python-dotenv-1.0.1.tar.gz", hash = "sha256:e324ee90a023d808f1959c46bcbc04446a10ced277783dc6ee09987c37ec10ca"}, + {file = "python_dotenv-1.0.1-py3-none-any.whl", hash = "sha256:f7b63ef50f1b690dddf550d03497b66d609393b40b564ed0d674909a68ebf16a"}, +] + +[[package]] +name = "resolvelib" +version = "1.1.0" +requires_python = ">=3.7" +summary = "Resolve abstract dependencies into concrete ones" +groups = ["pdm"] +files = [ + {file = "resolvelib-1.1.0-py2.py3-none-any.whl", hash = "sha256:f80de38ae744bcf4e918e27a681a5c6cb63a08d9a926c0989c0730bcdd089049"}, + {file = "resolvelib-1.1.0.tar.gz", hash = "sha256:b68591ef748f58c1e2a2ac28d0961b3586ae8b25f60b0ba9a5e4f3d87c1d6a79"}, +] + [[package]] name = "rich" version = "13.9.4" requires_python = ">=3.8.0" summary = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" -groups = ["default"] +groups = ["default", "pdm"] dependencies = [ "markdown-it-py>=2.2.0", "pygments<3.0.0,>=2.13.0", @@ -446,23 +757,57 @@ name = "shellingham" version = "1.5.4" requires_python = ">=3.7" summary = "Tool to Detect Surrounding Shell" -groups = ["default"] +groups = ["default", "pdm"] files = [ {file = "shellingham-1.5.4-py2.py3-none-any.whl", hash = "sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686"}, {file = "shellingham-1.5.4.tar.gz", hash = "sha256:8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de"}, ] +[[package]] +name = "sniffio" +version = "1.3.1" +requires_python = ">=3.7" +summary = "Sniff out which async library your code is running under" +groups = ["pdm"] +files = [ + {file = "sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2"}, + {file = "sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"}, +] + +[[package]] +name = "socksio" +version = "1.0.0" +requires_python = ">=3.6" +summary = "Sans-I/O implementation of SOCKS4, SOCKS4A, and SOCKS5." +groups = ["pdm"] +files = [ + {file = "socksio-1.0.0-py3-none-any.whl", hash = "sha256:95dc1f15f9b34e8d7b16f06d74b8ccf48f609af32ab33c608d08761c5dcbb1f3"}, + {file = "socksio-1.0.0.tar.gz", hash = "sha256:f88beb3da5b5c38b9890469de67d0cb0f9d494b78b106ca1845f96c10b91c4ac"}, +] + [[package]] name = "tomlkit" version = "0.13.2" requires_python = ">=3.8" summary = "Style preserving TOML library" -groups = ["lint"] +groups = ["lint", "pdm"] files = [ {file = "tomlkit-0.13.2-py3-none-any.whl", hash = "sha256:7a974427f6e119197f670fbbbeae7bef749a6c14e793db934baefc1b5f03efde"}, {file = "tomlkit-0.13.2.tar.gz", hash = "sha256:fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79"}, ] +[[package]] +name = "truststore" +version = "0.10.0" +requires_python = ">=3.10" +summary = "Verify certificates using native system trust stores" +groups = ["pdm"] +marker = "python_version >= \"3.10\"" +files = [ + {file = "truststore-0.10.0-py3-none-any.whl", hash = "sha256:b3798548e421ffe2ca2a6217cca49e7a17baf40b72d86a5505dc7d701e77d15b"}, + {file = "truststore-0.10.0.tar.gz", hash = "sha256:5da347c665714fdfbd46f738c823fe9f0d8775e41ac5fb94f325749091187896"}, +] + [[package]] name = "typer" version = "0.13.0" @@ -485,8 +830,51 @@ name = "typing-extensions" version = "4.12.2" requires_python = ">=3.8" summary = "Backported and Experimental Type Hints for Python 3.8+" -groups = ["default", "lint"] +groups = ["default", "lint", "pdm"] files = [ {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, ] + +[[package]] +name = "unearth" +version = "0.17.2" +requires_python = ">=3.8" +summary = "A utility to fetch and download python packages" +groups = ["pdm"] +dependencies = [ + "httpx<1,>=0.27.0", + "packaging>=20", +] +files = [ + {file = "unearth-0.17.2-py3-none-any.whl", hash = "sha256:4d21af1238a583835fca156322f7225382e718cdcc42d6278050a88e605c4ad5"}, + {file = "unearth-0.17.2.tar.gz", hash = "sha256:0b8a2afd3476f1ab6155fc579501ac47fffe43547d88a70e5a5b76a7fe6caa2c"}, +] + +[[package]] +name = "urllib3" +version = "2.2.3" +requires_python = ">=3.8" +summary = "HTTP library with thread-safe connection pooling, file post, and more." +groups = ["git"] +files = [ + {file = "urllib3-2.2.3-py3-none-any.whl", hash = "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac"}, + {file = "urllib3-2.2.3.tar.gz", hash = "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9"}, +] + +[[package]] +name = "virtualenv" +version = "20.27.1" +requires_python = ">=3.8" +summary = "Virtual Python Environment builder" +groups = ["pdm"] +dependencies = [ + "distlib<1,>=0.3.7", + "filelock<4,>=3.12.2", + "importlib-metadata>=6.6; python_version < \"3.8\"", + "platformdirs<5,>=3.9.1", +] +files = [ + {file = "virtualenv-20.27.1-py3-none-any.whl", hash = "sha256:f11f1b8a29525562925f745563bfd48b189450f61fb34c4f9cc79dd5aa32a1f4"}, + {file = "virtualenv-20.27.1.tar.gz", hash = "sha256:142c6be10212543b32c6c45d3d3893dff89112cc588b7d0879ae5a1ec03a47ba"}, +] diff --git a/pyproject.toml b/pyproject.toml index 80799ba..5e99f9a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,6 +19,15 @@ dependencies = [ "packaging>=24.1", ] +[project.optional-dependencies] +git = [ + "dulwich>=0.22.5", +] + +pdm = [ + "pdm>=2.20.1", +] + [project.urls] homepage = "https://github.com/Synodic-Software/CPPython" repository = "https://github.com/Synodic-Software/CPPython" @@ -43,9 +52,9 @@ lint = [ "mypy>=1.13", ] test = [ - "pytest>=8.3.3", - "pytest-cov>=6.0.0", - "pytest-mock>=3.14.0", + "pytest>=8.3.3", + "pytest-cov>=6.0.0", + "pytest-mock>=3.14.0", ] [project.scripts] @@ -93,7 +102,6 @@ default-docstring-type = "google" [tool.coverage.report] skip_empty = true - [tool.pdm.options] update = ["--update-all"] diff --git a/tests/integration/plugins/cmake/test_generator.py b/tests/integration/plugins/cmake/test_generator.py index ee256c8..6a79ad8 100644 --- a/tests/integration/plugins/cmake/test_generator.py +++ b/tests/integration/plugins/cmake/test_generator.py @@ -3,10 +3,10 @@ from typing import Any import pytest -from pytest_cppython.tests import GeneratorIntegrationTests -from cppython_cmake.plugin import CMakeGenerator -from cppython_cmake.schema import CMakeConfiguration +from cppython.plugins.cmake.plugin import CMakeGenerator +from cppython.plugins.cmake.schema import CMakeConfiguration +from tests.plugin_helper.tests import GeneratorIntegrationTests class TestCPPythonGenerator(GeneratorIntegrationTests[CMakeGenerator]): diff --git a/tests/integration/plugins/pdm/test_interface.py b/tests/integration/plugins/pdm/test_interface.py index c6aa70e..a5b01e8 100644 --- a/tests/integration/plugins/pdm/test_interface.py +++ b/tests/integration/plugins/pdm/test_interface.py @@ -1,11 +1,10 @@ -"""Integration tests for the interface -""" +"""Integration tests for the interface""" import pytest from pdm.core import Core from pytest_mock import MockerFixture -from cppython_pdm.plugin import CPPythonPlugin +from cppython.plugins.pdm.plugin import CPPythonPlugin class TestCPPythonInterface: diff --git a/tests/integration/plugins/vcpkg/test_provider.py b/tests/integration/plugins/vcpkg/test_provider.py index f5c6303..a0b255e 100644 --- a/tests/integration/plugins/vcpkg/test_provider.py +++ b/tests/integration/plugins/vcpkg/test_provider.py @@ -1,12 +1,11 @@ -"""Integration tests for the provider -""" +"""Integration tests for the provider""" from typing import Any import pytest -from pytest_cppython.tests import ProviderIntegrationTests -from cppython_vcpkg.plugin import VcpkgProvider +from cppython.plugins.vcpkg.plugin import VcpkgProvider +from tests.plugin_helper.tests import ProviderIntegrationTests class TestCPPythonProvider(ProviderIntegrationTests[VcpkgProvider]): diff --git a/tests/unit/core/test_resolution.py b/tests/unit/core/test_resolution.py index 8f1ac38..324d982 100644 --- a/tests/unit/core/test_resolution.py +++ b/tests/unit/core/test_resolution.py @@ -5,7 +5,7 @@ import pytest from pydantic import Field -from cppython.core.exceptions import ConfigException +from cppython.core.exception import ConfigException from cppython.core.plugin_schema.generator import Generator from cppython.core.plugin_schema.provider import Provider from cppython.core.plugin_schema.scm import SCM diff --git a/tests/unit/core/test_schema.py b/tests/unit/core/test_schema.py index ee5aa2d..9e8abb3 100644 --- a/tests/unit/core/test_schema.py +++ b/tests/unit/core/test_schema.py @@ -5,7 +5,7 @@ import pytest from pydantic import Field -from cppython_core.schema import ( +from cppython.core.schema import ( CPPythonGlobalConfiguration, CPPythonLocalConfiguration, CPPythonModel, diff --git a/tests/unit/plugins/cmake/test_generator.py b/tests/unit/plugins/cmake/test_generator.py index 8323b5f..5743b58 100644 --- a/tests/unit/plugins/cmake/test_generator.py +++ b/tests/unit/plugins/cmake/test_generator.py @@ -4,13 +4,17 @@ from typing import Any import pytest -from cppython_core.utility import write_model_json -from pytest_cppython.tests import GeneratorUnitTests -from synodic_utilities.utility import TypeName -from cppython_cmake.builder import Builder -from cppython_cmake.plugin import CMakeGenerator -from cppython_cmake.schema import CMakeConfiguration, CMakePresets, CMakeSyncData +from cppython.core.utility import write_model_json +from cppython.plugins.cmake.builder import Builder +from cppython.plugins.cmake.plugin import CMakeGenerator +from cppython.plugins.cmake.schema import ( + CMakeConfiguration, + CMakePresets, + CMakeSyncData, +) +from cppython.utility.utility import TypeName +from tests.plugin_helper.tests import GeneratorUnitTests class TestCPPythonGenerator(GeneratorUnitTests[CMakeGenerator]): diff --git a/tests/unit/plugins/git/test_version_control.py b/tests/unit/plugins/git/test_version_control.py index 4d96693..30957e1 100644 --- a/tests/unit/plugins/git/test_version_control.py +++ b/tests/unit/plugins/git/test_version_control.py @@ -1,9 +1,9 @@ """Unit tests for the cppython SCM plugin""" import pytest -from pytest_cppython.tests import SCMUnitTests -from cppython_git.plugin import GitSCM +from cppython.plugins.git.plugin import GitSCM +from tests.plugin_helper.tests import SCMUnitTests class TestGitInterface(SCMUnitTests[GitSCM]): diff --git a/tests/unit/plugins/pdm/test_interface.py b/tests/unit/plugins/pdm/test_interface.py index 6a6d180..d0ea067 100644 --- a/tests/unit/plugins/pdm/test_interface.py +++ b/tests/unit/plugins/pdm/test_interface.py @@ -1,11 +1,10 @@ -"""Unit tests for the interface -""" +"""Unit tests for the interface""" import pytest from pdm.core import Core from pdm.project.core import Project -from cppython_pdm.plugin import CPPythonPlugin +from cppython.plugins.pdm.plugin import CPPythonPlugin class TestCPPythonInterface: diff --git a/tests/unit/plugins/vcpkg/test_provider.py b/tests/unit/plugins/vcpkg/test_provider.py index 6115c1f..18fdfc3 100644 --- a/tests/unit/plugins/vcpkg/test_provider.py +++ b/tests/unit/plugins/vcpkg/test_provider.py @@ -1,13 +1,12 @@ -"""Unit test the provider plugin -""" +"""Unit test the provider plugin""" from typing import Any import pytest -from pytest_cppython.tests import ProviderUnitTests -from cppython_vcpkg.plugin import VcpkgProvider -from cppython_vcpkg.resolution import generate_manifest +from cppython.plugins.vcpkg.plugin import VcpkgProvider +from cppython.plugins.vcpkg.resolution import generate_manifest +from tests.plugin_helper.tests import ProviderUnitTests class TestCPPythonProvider(ProviderUnitTests[VcpkgProvider]): diff --git a/tests/unit/test_builder.py b/tests/unit/test_builder.py index 8ec5dc4..2754bda 100644 --- a/tests/unit/test_builder.py +++ b/tests/unit/test_builder.py @@ -2,8 +2,6 @@ import logging -import pytest_cppython - from cppython.builder import Builder, Resolver from cppython.core.schema import ( CPPythonLocalConfiguration, diff --git a/tests/unit/test_project.py b/tests/unit/test_project.py index 1ee7a0c..d82296d 100644 --- a/tests/unit/test_project.py +++ b/tests/unit/test_project.py @@ -4,7 +4,6 @@ from pathlib import Path from pytest import FixtureRequest -from pytest_cppython.mock.interface import MockInterface from cppython.core.schema import ( CPPythonLocalConfiguration, @@ -14,6 +13,7 @@ ToolData, ) from cppython.project import Project +from tests.plugin_helper.mock.interface import MockInterface pep621 = PEP621Configuration(name="test-project", version="0.1.0") diff --git a/tests/unit/utility/test_plugin.py b/tests/unit/utility/test_plugin.py index 5b305f1..224e9a2 100644 --- a/tests/unit/utility/test_plugin.py +++ b/tests/unit/utility/test_plugin.py @@ -1,6 +1,6 @@ """This module tests the plugin functionality""" -from synodic_utilities.plugin import Plugin +from cppython.utility.plugin import Plugin class MockPlugin(Plugin): diff --git a/tests/unit/utility/test_utility.py b/tests/unit/utility/test_utility.py index f9ffe14..72e4e86 100644 --- a/tests/unit/utility/test_utility.py +++ b/tests/unit/utility/test_utility.py @@ -9,9 +9,9 @@ import pytest from pytest import LogCaptureFixture -from synodic_utilities.exception import ProcessError -from synodic_utilities.subprocess import call -from synodic_utilities.utility import canonicalize_name +from cppython.utility.exception import ProcessError +from cppython.utility.subprocess import call +from cppython.utility.utility import canonicalize_name cppython_logger = logging.getLogger("cppython") cppython_logger.addHandler(StreamHandler()) From ce223d4514c809f3990b09b47b4816d6271ec222 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Mon, 11 Nov 2024 13:33:44 -0500 Subject: [PATCH 31/68] Final Type Checks --- cppython/core/schema.py | 73 ++++++++++++++++---------------- cppython/plugins/cmake/schema.py | 2 +- cppython/plugins/pdm/plugin.py | 8 ++-- cppython/plugins/vcpkg/plugin.py | 4 +- tests/plugin_helper/fixtures.py | 38 +++++++++++++++++ tests/plugin_helper/shared.py | 36 +++++++++++++--- 6 files changed, 112 insertions(+), 49 deletions(-) create mode 100644 tests/plugin_helper/fixtures.py diff --git a/cppython/core/schema.py b/cppython/core/schema.py index f5d18b2..1c8a0ee 100644 --- a/cppython/core/schema.py +++ b/cppython/core/schema.py @@ -2,7 +2,7 @@ from abc import abstractmethod from pathlib import Path -from typing import Annotated, Any, NewType, Protocol +from typing import Any, NewType, Protocol from pydantic import BaseModel, Field, field_validator, model_validator from pydantic.types import DirectoryPath, FilePath @@ -27,7 +27,7 @@ class ProjectData(CPPythonModel, extra="forbid"): class ProjectConfiguration(CPPythonModel, extra="forbid"): """Project-wide configuration""" - pyproject_file: Annotated[FilePath, Field(description="The path where the pyproject.toml exists")] + pyproject_file: FilePath = Field(description="The path where the pyproject.toml exists") version: str | None = Field( description=( "The version number a 'dynamic' project version will resolve to. If not provided a CPPython project will" @@ -270,9 +270,9 @@ async def download_tooling(cls, directory: DirectoryPath) -> None: class CPPythonGlobalConfiguration(CPPythonModel, extra="forbid"): """Global data extracted by the tool""" - current_check: Annotated[ - bool, Field(default=True, alias="current-check", description="Checks for a new CPPython version") - ] + current_check: bool = Field( + default=True, serialization_alias="current-check", description="Checks for a new CPPython version" + ) ProviderData = NewType("ProviderData", dict[str, Any]) @@ -282,37 +282,38 @@ class CPPythonGlobalConfiguration(CPPythonModel, extra="forbid"): class CPPythonLocalConfiguration(CPPythonModel, extra="forbid"): """Data required by the tool""" - install_path: Annotated[ - Path, - Field( - default=_default_install_location(), - alias="install-path", - description="The global install path for the project", - ), - ] - tool_path: Annotated[ - Path, Field(default=Path("tool"), alias="tool-path", description="The local tooling path for the project") - ] - build_path: Annotated[ - Path, Field(default=Path("build"), alias="build-path", description="The local build path for the project") - ] - provider: Annotated[ - ProviderData, Field(default=ProviderData({}), description="Provider plugin data associated with 'provider_name") - ] - provider_name: Annotated[ - TypeName | None, - Field(default=None, alias="provider-name", description="If empty, the provider will be automatically deduced."), - ] - generator: Annotated[ - GeneratorData, - Field(default=GeneratorData({}), description="Generator plugin data associated with 'generator_name'"), - ] - generator_name: Annotated[ - TypeName | None, - Field( - default=None, alias="generator-name", description="If empty, the generator will be automatically deduced." - ), - ] + install_path: Path = Field( + default=_default_install_location(), + serialization_alias="install-path", + description="The global install path for the project", + ) + tool_path: Path = Field( + default=Path("tool"), serialization_alias="tool-path", description="The local tooling path for the project" + ) + + build_path: Path = Field( + default=Path("build"), serialization_alias="build-path", description="The local build path for the project" + ) + + provider: ProviderData = Field( + default=ProviderData({}), description="Provider plugin data associated with 'provider_name" + ) + + provider_name: TypeName | None = Field( + default=None, + serialization_alias="provider-name", + description="If empty, the provider will be automatically deduced.", + ) + + generator: GeneratorData = Field( + default=GeneratorData({}), description="Generator plugin data associated with 'generator_name'" + ) + + generator_name: TypeName | None = Field( + default=None, + serialization_alias="generator-name", + description="If empty, the generator will be automatically deduced.", + ) class ToolData(CPPythonModel): diff --git a/cppython/plugins/cmake/schema.py b/cppython/plugins/cmake/schema.py index 905ac76..bcb2a10 100644 --- a/cppython/plugins/cmake/schema.py +++ b/cppython/plugins/cmake/schema.py @@ -49,7 +49,7 @@ class CMakePresets(CPPythonModel, extra="allow"): class CMakeSyncData(SyncData): """The CMake sync data""" - top_level_includes: FilePath + # top_level_includes: FilePath class CMakeData(CPPythonModel): diff --git a/cppython/plugins/pdm/plugin.py b/cppython/plugins/pdm/plugin.py index 57cacaf..d22e484 100644 --- a/cppython/plugins/pdm/plugin.py +++ b/cppython/plugins/pdm/plugin.py @@ -1,15 +1,15 @@ -"""Implementation of the PDM Interface Plugin -""" +"""Implementation of the PDM Interface Plugin""" from logging import getLogger from typing import Any -from cppython.project import Project as CPPythonProject -from cppython.core.schema import Interface, ProjectConfiguration from pdm.core import Core from pdm.project.core import Project from pdm.signals import post_install +from cppython.core.schema import Interface, ProjectConfiguration +from cppython.project import Project as CPPythonProject + class CPPythonPlugin(Interface): """Implementation of the PDM Interface Plugin""" diff --git a/cppython/plugins/vcpkg/plugin.py b/cppython/plugins/vcpkg/plugin.py index 651cde2..01cd0e8 100644 --- a/cppython/plugins/vcpkg/plugin.py +++ b/cppython/plugins/vcpkg/plugin.py @@ -100,8 +100,8 @@ def sync_data(self, consumer: SyncConsumer) -> SyncData: for sync_type in consumer.sync_types(): if sync_type == CMakeSyncData: - toolchain_file = self.core_data.cppython_data.install_path / "scripts/buildsystems/vcpkg.cmake" - return CMakeSyncData(provider_name=TypeName("vcpkg"), toolchain=toolchain_file) + # toolchain_file = self.core_data.cppython_data.install_path / "scripts/buildsystems/vcpkg.cmake" + return CMakeSyncData(provider_name=TypeName("vcpkg")) raise NotSupportedError("OOF") diff --git a/tests/plugin_helper/fixtures.py b/tests/plugin_helper/fixtures.py new file mode 100644 index 0000000..a52b8f0 --- /dev/null +++ b/tests/plugin_helper/fixtures.py @@ -0,0 +1,38 @@ +"""Pytest fixtures for Synodic tests""" + +from pathlib import Path + +import pytest + + +def pytest_generate_tests(metafunc: pytest.Metafunc) -> None: + """Called for each test function + + Args: + metafunc: Pytest hook data + """ + + for fixture in metafunc.fixturenames: + match fixture.split("_", 1): + case ["internal", "plugin_data_path"]: + # There should only ever be one fixture named 'internal_plugin_data_path' for value caching + data_path = metafunc.config.rootpath / "tests" / "data" + + test_paths: list[Path | None] = [] + + for path in data_path.glob("*"): + if path.is_dir(): + test_paths.append(path) + + if not test_paths: + test_paths = [None] + metafunc.parametrize(fixture, test_paths, scope="session") + + case ["internal", "data_path"]: + # There should only ever be one fixture named 'internal_data_path' for value caching + data_path = Path(__file__).parent / "data" + metafunc.parametrize(fixture, list(data_path.glob("*")), scope="session") + + case ["build", directory]: + data_path = metafunc.config.rootpath / "tests" / "build" / directory + metafunc.parametrize(fixture, [data_path], scope="session") diff --git a/tests/plugin_helper/shared.py b/tests/plugin_helper/shared.py index d5aaf0a..d20c53a 100644 --- a/tests/plugin_helper/shared.py +++ b/tests/plugin_helper/shared.py @@ -1,6 +1,7 @@ """Composable test types""" from abc import ABCMeta +from importlib.metadata import entry_points from pathlib import Path from typing import Any, LiteralString, cast @@ -27,9 +28,6 @@ ProjectConfiguration, ProjectData, ) -from tests.plugin_helper.plugin import BaseTests as SynodicBaseTests -from tests.plugin_helper.plugin import IntegrationTests as SynodicBaseIntegrationTests -from tests.plugin_helper.plugin import UnitTests as SynodicBaseUnitTests from tests.plugin_helper.variants import ( generator_variants, provider_variants, @@ -37,7 +35,7 @@ ) -class BaseTests[T: Plugin](SynodicBaseTests[T], metaclass=ABCMeta): +class BaseTests[T: Plugin](metaclass=ABCMeta): """Shared testing information for all plugin test classes.""" @pytest.fixture(name="plugin_type", scope="session") @@ -94,11 +92,37 @@ def fixture_plugin_group_name(self) -> LiteralString: return "cppython" -class BaseIntegrationTests[T: Plugin](SynodicBaseIntegrationTests[T], metaclass=ABCMeta): +class BaseIntegrationTests[T: Plugin](metaclass=ABCMeta): """Integration testing information for all plugin test classes""" + def test_entry_point(self, plugin_type: type[T], plugin_group_name: LiteralString) -> None: + """Verify that the plugin was registered -class BaseUnitTests[T: Plugin](SynodicBaseUnitTests[T], metaclass=ABCMeta): + Args: + plugin_type: The type to register + plugin_group_name: The group name for the plugin type + """ + types = [] + for entry in list(entry_points(group=f"{plugin_group_name}.{plugin_type.group()}")): + types.append(entry.load()) + + assert plugin_type in types + + def test_name(self, plugin_type: type[Plugin]) -> None: + """Verifies the the class name allows name extraction + + Args: + plugin_type: The type to register + """ + + assert plugin_type.group() + assert len(plugin_type.group()) + + assert plugin_type.name() + assert len(plugin_type.name()) + + +class BaseUnitTests[T: Plugin](metaclass=ABCMeta): """Unit testing information for all plugin test classes""" def test_feature_extraction(self, plugin_type: type[T], project_configuration: ProjectConfiguration) -> None: From 7270bf5b18a328ffaac29a524a0ddb37cf69adbf Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Mon, 11 Nov 2024 16:27:27 -0500 Subject: [PATCH 32/68] Fix Lints --- cppython/builder.py | 3 +- cppython/core/plugin_schema/scm.py | 6 +- cppython/core/schema.py | 135 ++++++++++++++++------------- cppython/plugins/cmake/builder.py | 10 +-- cppython/plugins/cmake/schema.py | 17 ++-- cppython/plugins/vcpkg/plugin.py | 2 +- cppython/plugins/vcpkg/schema.py | 22 ++--- pyproject.toml | 8 +- tests/conftest.py | 2 +- tests/unit/core/test_resolution.py | 3 +- tests/unit/core/test_schema.py | 5 +- tests/unit/test_data.py | 3 +- 12 files changed, 118 insertions(+), 98 deletions(-) diff --git a/cppython/builder.py b/cppython/builder.py index 995bcd6..61f989d 100644 --- a/cppython/builder.py +++ b/cppython/builder.py @@ -427,7 +427,8 @@ def build( Args: pep621_configuration: The PEP621 configuration cppython_local_configuration: The local configuration - plugin_build_data: Plugin override data. If it exists, the build will use the given types instead of resolving them + plugin_build_data: Plugin override data. If it exists, the build will use the given types + instead of resolving them Returns: The built data object diff --git a/cppython/core/plugin_schema/scm.py b/cppython/core/plugin_schema/scm.py index ffa027b..1582f19 100644 --- a/cppython/core/plugin_schema/scm.py +++ b/cppython/core/plugin_schema/scm.py @@ -1,7 +1,7 @@ """Version control data plugin definitions""" from abc import abstractmethod -from typing import Protocol, runtime_checkable +from typing import Annotated, Protocol, runtime_checkable from pydantic import DirectoryPath, Field @@ -15,7 +15,9 @@ class SCMPluginGroupData(PluginGroupData): class SupportedSCMFeatures(SupportedFeatures): """SCM plugin feature support""" - repository: bool = Field(description="True if the directory is a repository for the SCM. False, otherwise") + repository: Annotated[ + bool, Field(description="True if the directory is a repository for the SCM. False, otherwise") + ] @runtime_checkable diff --git a/cppython/core/schema.py b/cppython/core/schema.py index 1c8a0ee..8ea2de1 100644 --- a/cppython/core/schema.py +++ b/cppython/core/schema.py @@ -2,7 +2,7 @@ from abc import abstractmethod from pathlib import Path -from typing import Any, NewType, Protocol +from typing import Annotated, Any, NewType, Protocol from pydantic import BaseModel, Field, field_validator, model_validator from pydantic.types import DirectoryPath, FilePath @@ -20,24 +20,28 @@ class CPPythonModel(BaseModel): class ProjectData(CPPythonModel, extra="forbid"): """Resolved data of 'ProjectConfiguration'""" - pyproject_file: FilePath = Field(description="The path where the pyproject.toml exists") - verbosity: int = Field(default=0, description="The verbosity level as an integer [0,2]") + pyproject_file: Annotated[FilePath, Field(description="The path where the pyproject.toml exists")] + verbosity: Annotated[int, Field(description="The verbosity level as an integer [0,2]")] = 0 class ProjectConfiguration(CPPythonModel, extra="forbid"): """Project-wide configuration""" - pyproject_file: FilePath = Field(description="The path where the pyproject.toml exists") - version: str | None = Field( - description=( - "The version number a 'dynamic' project version will resolve to. If not provided a CPPython project will" - " initialize its SCM plugins to discover any available version" - ) - ) - verbosity: int = Field(default=0, description="The verbosity level as an integer [0,2]") - debug: bool = Field( - default=False, description="Debug mode. Additional processing will happen to expose more debug information" - ) + pyproject_file: Annotated[FilePath, Field(description="The path where the pyproject.toml exists")] + version: Annotated[ + str | None, + Field( + description=( + "The version number a 'dynamic' project version will resolve to. If not provided" + "a CPPython project will" + " initialize its SCM plugins to discover any available version" + ) + ), + ] + verbosity: Annotated[int, Field(description="The verbosity level as an integer [0,2]")] = 0 + debug: Annotated[ + bool, Field(description="Debug mode. Additional processing will happen to expose more debug information") + ] = False @field_validator("verbosity") @classmethod @@ -87,10 +91,10 @@ class PEP621Configuration(CPPythonModel): Schema: https://www.python.org/dev/peps/pep-0621/ """ - dynamic: list[str] = Field(default=[], description="https://peps.python.org/pep-0621/#dynamic") - name: str = Field(description="https://peps.python.org/pep-0621/#name") - version: str | None = Field(default=None, description="https://peps.python.org/pep-0621/#version") - description: str = Field(default="", description="https://peps.python.org/pep-0621/#description") + dynamic: Annotated[list[str], Field(description="https://peps.python.org/pep-0621/#dynamic")] = [] + name: Annotated[str, Field(description="https://peps.python.org/pep-0621/#name")] + version: Annotated[str | None, Field(description="https://peps.python.org/pep-0621/#version")] = None + description: Annotated[str, Field(description="https://peps.python.org/pep-0621/#description")] = "" @model_validator(mode="after") # type: ignore @classmethod @@ -168,9 +172,9 @@ class SyncData(CPPythonModel): class SupportedFeatures(CPPythonModel): """Plugin feature support""" - initialization: bool = Field( - default=False, description="Whether the plugin supports initialization from an empty state" - ) + initialization: Annotated[ + bool, Field(description="Whether the plugin supports initialization from an empty state") + ] = False class Information(CPPythonModel): @@ -180,13 +184,16 @@ class Information(CPPythonModel): class PluginGroupData(CPPythonModel, extra="forbid"): """Plugin group data""" - root_directory: DirectoryPath = Field(description="The directory of the project") - tool_directory: DirectoryPath = Field( - description=( - "Points to the project plugin directory within the tool directory. This directory is for project specific" - " cached data." - ) - ) + root_directory: Annotated[DirectoryPath, Field(description="The directory of the project")] + tool_directory: Annotated[ + DirectoryPath, + Field( + description=( + "Points to the project plugin directory within the tool directory. " + "This directory is for project specific cached data." + ) + ), + ] class Plugin(SynodicPlugin, Protocol): @@ -270,9 +277,9 @@ async def download_tooling(cls, directory: DirectoryPath) -> None: class CPPythonGlobalConfiguration(CPPythonModel, extra="forbid"): """Global data extracted by the tool""" - current_check: bool = Field( - default=True, serialization_alias="current-check", description="Checks for a new CPPython version" - ) + current_check: Annotated[ + bool, Field(serialization_alias="current-check", description="Checks for a new CPPython version") + ] = True ProviderData = NewType("ProviderData", dict[str, Any]) @@ -282,51 +289,57 @@ class CPPythonGlobalConfiguration(CPPythonModel, extra="forbid"): class CPPythonLocalConfiguration(CPPythonModel, extra="forbid"): """Data required by the tool""" - install_path: Path = Field( - default=_default_install_location(), - serialization_alias="install-path", - description="The global install path for the project", - ) - tool_path: Path = Field( - default=Path("tool"), serialization_alias="tool-path", description="The local tooling path for the project" - ) - - build_path: Path = Field( - default=Path("build"), serialization_alias="build-path", description="The local build path for the project" - ) - - provider: ProviderData = Field( - default=ProviderData({}), description="Provider plugin data associated with 'provider_name" + install_path: Annotated[ + Path, + Field( + serialization_alias="install-path", + description="The global install path for the project", + ), + ] = _default_install_location() + tool_path: Annotated[ + Path, Field(serialization_alias="tool-path", description="The local tooling path for the project") + ] = Path("tool") + + build_path: Annotated[ + Path, Field(serialization_alias="build-path", description="The local build path for the project") + ] = Path("build") + + provider: Annotated[ProviderData, Field(description="Provider plugin data associated with 'provider_name")] = ( + ProviderData({}) ) - provider_name: TypeName | None = Field( - default=None, - serialization_alias="provider-name", - description="If empty, the provider will be automatically deduced.", - ) + provider_name: Annotated[ + TypeName | None, + Field( + serialization_alias="provider-name", + description="If empty, the provider will be automatically deduced.", + ), + ] = None - generator: GeneratorData = Field( - default=GeneratorData({}), description="Generator plugin data associated with 'generator_name'" + generator: Annotated[GeneratorData, Field(description="Generator plugin data associated with 'generator_name'")] = ( + GeneratorData({}) ) - generator_name: TypeName | None = Field( - default=None, - serialization_alias="generator-name", - description="If empty, the generator will be automatically deduced.", - ) + generator_name: Annotated[ + TypeName | None, + Field( + serialization_alias="generator-name", + description="If empty, the generator will be automatically deduced.", + ), + ] = None class ToolData(CPPythonModel): """Tool entry of pyproject.toml""" - cppython: CPPythonLocalConfiguration | None = Field(description="CPPython tool data", default=None) + cppython: Annotated[CPPythonLocalConfiguration | None, Field(description="CPPython tool data")] = None class PyProject(CPPythonModel): """pyproject.toml schema""" - project: PEP621Configuration = Field(description="PEP621: https://www.python.org/dev/peps/pep-0621/") - tool: ToolData | None = Field(description="Tool data", default=None) + project: Annotated[PEP621Configuration, Field(description="PEP621: https://www.python.org/dev/peps/pep-0621/")] + tool: Annotated[ToolData | None, Field(description="Tool data")] = None class CoreData(CPPythonModel): diff --git a/cppython/plugins/cmake/builder.py b/cppython/plugins/cmake/builder.py index 60200c8..72d00a2 100644 --- a/cppython/plugins/cmake/builder.py +++ b/cppython/plugins/cmake/builder.py @@ -26,14 +26,12 @@ def write_provider_preset(self, provider_directory: Path, data: CMakeSyncData) - write_model_json(json_path, presets) def write_cppython_preset( - self, cppython_preset_directory: Path, provider_directory: Path, provider_data: CMakeSyncData + self, cppython_preset_directory: Path, _provider_directory: Path, _provider_data: CMakeSyncData ) -> Path: """Write the cppython presets which inherit from the provider presets Args: cppython_preset_directory: The tool directory - provider_directory: The provider directory - provider_data: The collected data of all providers Returns: A file path to the written data @@ -47,7 +45,7 @@ def write_cppython_preset( write_model_json(cppython_json_path, presets) return cppython_json_path - def write_root_presets(self, preset_file: Path, cppython_preset_file: Path) -> None: + def write_root_presets(self, preset_file: Path, _cppython_preset_file: Path) -> None: """Read the top level json file and insert the include reference. Receives a relative path to the tool cmake json file @@ -56,11 +54,9 @@ def write_root_presets(self, preset_file: Path, cppython_preset_file: Path) -> N Args: preset_file: Preset file to modify - cppython_preset_file: The tool generated file path """ initial_root_preset = read_json(preset_file) - root_preset = deepcopy(initial_root_preset) - if root_preset != initial_root_preset: + if (root_preset := deepcopy(initial_root_preset)) != initial_root_preset: write_json(preset_file, root_preset) diff --git a/cppython/plugins/cmake/schema.py b/cppython/plugins/cmake/schema.py index bcb2a10..f732fcb 100644 --- a/cppython/plugins/cmake/schema.py +++ b/cppython/plugins/cmake/schema.py @@ -2,6 +2,7 @@ from enum import Enum, auto from pathlib import Path +from typing import Annotated from pydantic import Field from pydantic.types import FilePath @@ -43,13 +44,13 @@ class CMakePresets(CPPythonModel, extra="allow"): """The schema for the CMakePresets and CMakeUserPresets files. The only information needed is the configure preset list for cache variable injection""" - configurePresets: list[ConfigurePreset] = Field(default=[], description="The list of configure presets") + configurePresets: Annotated[list[ConfigurePreset], Field(description="The list of configure presets")] = [] class CMakeSyncData(SyncData): """The CMake sync data""" - # top_level_includes: FilePath + top_level_includes: FilePath class CMakeData(CPPythonModel): @@ -62,8 +63,10 @@ class CMakeData(CPPythonModel): class CMakeConfiguration(CPPythonModel): """Configuration""" - preset_file: FilePath = Field( - default=Path("CMakePresets.json"), - description="The CMakePreset.json file that will be searched for the given 'configuration_name'", - ) - configuration_name: str = Field(description="The CMake configuration preset to look for and override") + preset_file: Annotated[ + FilePath, + Field( + description="The CMakePreset.json file that will be searched for the given 'configuration_name'", + ), + ] = Path("CMakePresets.json") + configuration_name: Annotated[str, Field(description="The CMake configuration preset to look for and override")] diff --git a/cppython/plugins/vcpkg/plugin.py b/cppython/plugins/vcpkg/plugin.py index 01cd0e8..2c54601 100644 --- a/cppython/plugins/vcpkg/plugin.py +++ b/cppython/plugins/vcpkg/plugin.py @@ -101,7 +101,7 @@ def sync_data(self, consumer: SyncConsumer) -> SyncData: for sync_type in consumer.sync_types(): if sync_type == CMakeSyncData: # toolchain_file = self.core_data.cppython_data.install_path / "scripts/buildsystems/vcpkg.cmake" - return CMakeSyncData(provider_name=TypeName("vcpkg")) + return CMakeSyncData(provider_name=TypeName("vcpkg"), top_level_includes=Path("test")) raise NotSupportedError("OOF") diff --git a/cppython/plugins/vcpkg/schema.py b/cppython/plugins/vcpkg/schema.py index e49f140..ae360a1 100644 --- a/cppython/plugins/vcpkg/schema.py +++ b/cppython/plugins/vcpkg/schema.py @@ -28,24 +28,24 @@ class VcpkgConfiguration(CPPythonModel): install_directory: Annotated[ Path, Field( - default=Path("build"), - alias="install-directory", + serialization_alias="install-directory", description="The referenced dependencies defined by the local vcpkg.json manifest file", ), - ] + ] = Path("build") - dependencies: list[VcpkgDependency] = Field( - default=[], description="The directory to store the manifest file, vcpkg.json" - ) + dependencies: Annotated[ + list[VcpkgDependency], Field(description="The directory to store the manifest file, vcpkg.json") + ] = [] class Manifest(CPPythonModel): """The manifest schema""" - name: str = Field(description="The project name") + name: Annotated[str, Field(description="The project name")] version_string: Annotated[ - str, Field(default="", alias="version-string", description="The arbitrary version string") - ] - homepage: HttpUrl | None = Field(default=None, description="Homepage URL") - dependencies: list[VcpkgDependency] = Field(default=[], description="List of dependencies") + str, Field(serialization_alias="version-string", description="The arbitrary version string") + ] = "" + + homepage: Annotated[HttpUrl | None, Field(description="Homepage URL")] = None + dependencies: Annotated[list[VcpkgDependency], Field(description="List of dependencies")] = [] diff --git a/pyproject.toml b/pyproject.toml index 5e99f9a..c3205c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,10 +46,10 @@ vcpkg = "cppython_vcpkg.plugin:VcpkgProvider" [dependency-groups] lint = [ - "black>=24.10.0", - "pylint>=3.3.1", - "isort>=5.13.2", - "mypy>=1.13", + "black>=24.10.0", + "pylint>=3.3.1", + "isort>=5.13.2", + "mypy>=1.13", ] test = [ "pytest>=8.3.3", diff --git a/tests/conftest.py b/tests/conftest.py index 8c36377..c1f57fa 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,6 +1,6 @@ """Data variations for testing""" -from pathlib import Path +# from pathlib import Path from typing import cast import pytest diff --git a/tests/unit/core/test_resolution.py b/tests/unit/core/test_resolution.py index 324d982..b6bf621 100644 --- a/tests/unit/core/test_resolution.py +++ b/tests/unit/core/test_resolution.py @@ -1,6 +1,7 @@ """Test data resolution""" from pathlib import Path +from typing import Annotated import pytest from pydantic import Field @@ -77,7 +78,7 @@ def test_model_resolve(self) -> None: class MockModel(CPPythonModel): """Mock model for testing""" - field: str = Field() + field: Annotated[str, Field()] bad_data = {"field": 4} diff --git a/tests/unit/core/test_schema.py b/tests/unit/core/test_schema.py index 9e8abb3..9996484 100644 --- a/tests/unit/core/test_schema.py +++ b/tests/unit/core/test_schema.py @@ -1,6 +1,7 @@ """Test custom schema validation that cannot be verified by the Pydantic validation""" from tomllib import loads +from typing import Annotated import pytest from pydantic import Field @@ -19,7 +20,9 @@ class TestSchema: class Model(CPPythonModel): """Testing Model""" - aliased_variable: bool = Field(default=False, alias="aliased-variable", description="Alias test") + aliased_variable: Annotated[bool, Field(serialization_alias="aliased-variable", description="Alias test")] = ( + False + ) def test_model_construction(self) -> None: """Verifies that the base model type has the expected construction behaviors""" diff --git a/tests/unit/test_data.py b/tests/unit/test_data.py index 7d0f87a..364d248 100644 --- a/tests/unit/test_data.py +++ b/tests/unit/test_data.py @@ -30,7 +30,8 @@ def fixture_data( pep621_configuration: PEP621Configuration, cppython_local_configuration: CPPythonLocalConfiguration, ) -> Data: - """Creates a mock plugins fixture. We want all the plugins to use the same data variants at the same time, so we have to resolve data inside the fixture instead of using other data fixtures + """Creates a mock plugins fixture. We want all the plugins to use the same data variants at the same time, so we + have to resolve data inside the fixture instead of using other data fixtures Args: project_configuration: Variant fixture for the project configuration From 72c6cd9be4034f0607b3d9da301ecd5e3a96752a Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Mon, 11 Nov 2024 16:31:00 -0500 Subject: [PATCH 33/68] Alias Fix --- cppython/core/schema.py | 22 ++++++++++------------ cppython/plugins/vcpkg/schema.py | 6 ++---- tests/unit/core/test_schema.py | 4 +--- 3 files changed, 13 insertions(+), 19 deletions(-) diff --git a/cppython/core/schema.py b/cppython/core/schema.py index 8ea2de1..bac3223 100644 --- a/cppython/core/schema.py +++ b/cppython/core/schema.py @@ -277,9 +277,7 @@ async def download_tooling(cls, directory: DirectoryPath) -> None: class CPPythonGlobalConfiguration(CPPythonModel, extra="forbid"): """Global data extracted by the tool""" - current_check: Annotated[ - bool, Field(serialization_alias="current-check", description="Checks for a new CPPython version") - ] = True + current_check: Annotated[bool, Field(alias="current-check", description="Checks for a new CPPython version")] = True ProviderData = NewType("ProviderData", dict[str, Any]) @@ -292,17 +290,17 @@ class CPPythonLocalConfiguration(CPPythonModel, extra="forbid"): install_path: Annotated[ Path, Field( - serialization_alias="install-path", + alias="install-path", description="The global install path for the project", ), ] = _default_install_location() - tool_path: Annotated[ - Path, Field(serialization_alias="tool-path", description="The local tooling path for the project") - ] = Path("tool") + tool_path: Annotated[Path, Field(alias="tool-path", description="The local tooling path for the project")] = Path( + "tool" + ) - build_path: Annotated[ - Path, Field(serialization_alias="build-path", description="The local build path for the project") - ] = Path("build") + build_path: Annotated[Path, Field(alias="build-path", description="The local build path for the project")] = Path( + "build" + ) provider: Annotated[ProviderData, Field(description="Provider plugin data associated with 'provider_name")] = ( ProviderData({}) @@ -311,7 +309,7 @@ class CPPythonLocalConfiguration(CPPythonModel, extra="forbid"): provider_name: Annotated[ TypeName | None, Field( - serialization_alias="provider-name", + alias="provider-name", description="If empty, the provider will be automatically deduced.", ), ] = None @@ -323,7 +321,7 @@ class CPPythonLocalConfiguration(CPPythonModel, extra="forbid"): generator_name: Annotated[ TypeName | None, Field( - serialization_alias="generator-name", + alias="generator-name", description="If empty, the generator will be automatically deduced.", ), ] = None diff --git a/cppython/plugins/vcpkg/schema.py b/cppython/plugins/vcpkg/schema.py index ae360a1..33b91ec 100644 --- a/cppython/plugins/vcpkg/schema.py +++ b/cppython/plugins/vcpkg/schema.py @@ -28,7 +28,7 @@ class VcpkgConfiguration(CPPythonModel): install_directory: Annotated[ Path, Field( - serialization_alias="install-directory", + alias="install-directory", description="The referenced dependencies defined by the local vcpkg.json manifest file", ), ] = Path("build") @@ -43,9 +43,7 @@ class Manifest(CPPythonModel): name: Annotated[str, Field(description="The project name")] - version_string: Annotated[ - str, Field(serialization_alias="version-string", description="The arbitrary version string") - ] = "" + version_string: Annotated[str, Field(alias="version-string", description="The arbitrary version string")] = "" homepage: Annotated[HttpUrl | None, Field(description="Homepage URL")] = None dependencies: Annotated[list[VcpkgDependency], Field(description="List of dependencies")] = [] diff --git a/tests/unit/core/test_schema.py b/tests/unit/core/test_schema.py index 9996484..c279707 100644 --- a/tests/unit/core/test_schema.py +++ b/tests/unit/core/test_schema.py @@ -20,9 +20,7 @@ class TestSchema: class Model(CPPythonModel): """Testing Model""" - aliased_variable: Annotated[bool, Field(serialization_alias="aliased-variable", description="Alias test")] = ( - False - ) + aliased_variable: Annotated[bool, Field(alias="aliased-variable", description="Alias test")] = False def test_model_construction(self) -> None: """Verifies that the base model type has the expected construction behaviors""" From ac184d836e4669b683554ae59be82c019604fc6e Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Mon, 11 Nov 2024 16:38:01 -0500 Subject: [PATCH 34/68] Ya --- tests/conftest.py | 34 +++++++++++++++++++++++++++++ tests/plugin_helper/fixtures.py | 38 --------------------------------- 2 files changed, 34 insertions(+), 38 deletions(-) delete mode 100644 tests/plugin_helper/fixtures.py diff --git a/tests/conftest.py b/tests/conftest.py index c1f57fa..f142f0b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,6 +1,7 @@ """Data variations for testing""" # from pathlib import Path +from pathlib import Path from typing import cast import pytest @@ -40,3 +41,36 @@ def fixture_cmake_data(request: pytest.FixtureRequest) -> CMakeConfiguration: """ return cast(CMakeConfiguration, request.param) + + +def pytest_generate_tests(metafunc: pytest.Metafunc) -> None: + """Called for each test function + + Args: + metafunc: Pytest hook data + """ + + for fixture in metafunc.fixturenames: + match fixture.split("_", 1): + case ["internal", "plugin_data_path"]: + # There should only ever be one fixture named 'internal_plugin_data_path' for value caching + data_path = metafunc.config.rootpath / "tests" / "data" + + test_paths: list[Path | None] = [] + + for path in data_path.glob("*"): + if path.is_dir(): + test_paths.append(path) + + if not test_paths: + test_paths = [None] + metafunc.parametrize(fixture, test_paths, scope="session") + + case ["internal", "data_path"]: + # There should only ever be one fixture named 'internal_data_path' for value caching + data_path = Path(__file__).parent / "data" + metafunc.parametrize(fixture, list(data_path.glob("*")), scope="session") + + case ["build", directory]: + data_path = metafunc.config.rootpath / "tests" / "build" / directory + metafunc.parametrize(fixture, [data_path], scope="session") diff --git a/tests/plugin_helper/fixtures.py b/tests/plugin_helper/fixtures.py deleted file mode 100644 index a52b8f0..0000000 --- a/tests/plugin_helper/fixtures.py +++ /dev/null @@ -1,38 +0,0 @@ -"""Pytest fixtures for Synodic tests""" - -from pathlib import Path - -import pytest - - -def pytest_generate_tests(metafunc: pytest.Metafunc) -> None: - """Called for each test function - - Args: - metafunc: Pytest hook data - """ - - for fixture in metafunc.fixturenames: - match fixture.split("_", 1): - case ["internal", "plugin_data_path"]: - # There should only ever be one fixture named 'internal_plugin_data_path' for value caching - data_path = metafunc.config.rootpath / "tests" / "data" - - test_paths: list[Path | None] = [] - - for path in data_path.glob("*"): - if path.is_dir(): - test_paths.append(path) - - if not test_paths: - test_paths = [None] - metafunc.parametrize(fixture, test_paths, scope="session") - - case ["internal", "data_path"]: - # There should only ever be one fixture named 'internal_data_path' for value caching - data_path = Path(__file__).parent / "data" - metafunc.parametrize(fixture, list(data_path.glob("*")), scope="session") - - case ["build", directory]: - data_path = metafunc.config.rootpath / "tests" / "build" / directory - metafunc.parametrize(fixture, [data_path], scope="session") From cbcdd74da4f87855353184df8c0bd2c8c4360db8 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Mon, 11 Nov 2024 17:03:48 -0500 Subject: [PATCH 35/68] Move Plugin --- pyproject.toml | 16 +- tests/conftest.py | 326 +++++++++++++++++ .../integration/plugins/pdm/test_interface.py | 2 +- tests/plugin_helper/plugin.py | 332 ------------------ 4 files changed, 335 insertions(+), 341 deletions(-) delete mode 100644 tests/plugin_helper/plugin.py diff --git a/pyproject.toml b/pyproject.toml index c3205c9..ef124a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,23 +33,23 @@ homepage = "https://github.com/Synodic-Software/CPPython" repository = "https://github.com/Synodic-Software/CPPython" [project.entry-points."cppython.scm"] -git = "cppython_git.plugin:GitSCM" +git = "cppython.plugins.git.plugin:GitSCM" [project.entry-points."cppython.generator"] -cmake = "cppython_cmake.plugin:CMakeGenerator" +cmake = "cppython.plugins.cmake.plugin:CMakeGenerator" [project.entry-points.pdm] -cppython = "cppython_pdm.plugin:CPPythonPlugin" +cppython = "cppython.plugins.pdm.plugin:CPPythonPlugin" [project.entry-points."cppython.provider"] -vcpkg = "cppython_vcpkg.plugin:VcpkgProvider" +vcpkg = "cppython.plugins.vcpkg.plugin:VcpkgProvider" [dependency-groups] lint = [ - "black>=24.10.0", - "pylint>=3.3.1", - "isort>=5.13.2", - "mypy>=1.13", + "black>=24.10.0", + "pylint>=3.3.1", + "isort>=5.13.2", + "mypy>=1.13", ] test = [ "pytest>=8.3.3", diff --git a/tests/conftest.py b/tests/conftest.py index f142f0b..c762c2c 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,12 +1,42 @@ """Data variations for testing""" +import shutil + # from pathlib import Path from pathlib import Path from typing import cast import pytest +from cppython.core.plugin_schema.generator import Generator +from cppython.core.plugin_schema.provider import Provider +from cppython.core.plugin_schema.scm import SCM +from cppython.core.resolution import ( + PluginBuildData, + PluginCPPythonData, + resolve_cppython, + resolve_pep621, + resolve_project_configuration, +) +from cppython.core.schema import ( + CoreData, + CPPythonData, + CPPythonGlobalConfiguration, + CPPythonLocalConfiguration, + PEP621Configuration, + PEP621Data, + ProjectConfiguration, + ProjectData, + PyProject, + ToolData, +) from cppython.plugins.cmake.schema import CMakeConfiguration +from tests.plugin_helper.variants import ( + cppython_global_variants, + cppython_local_variants, + pep621_variants, + project_variants, +) def _cmake_data_list() -> list[CMakeConfiguration]: @@ -25,6 +55,302 @@ def _cmake_data_list() -> list[CMakeConfiguration]: return variants +@pytest.fixture( + name="install_path", + scope="session", +) +def fixture_install_path(tmp_path_factory: pytest.TempPathFactory) -> Path: + """Creates temporary install location + Args: + tmp_path_factory: Factory for centralized temporary directories + Returns: + A temporary directory + """ + path = tmp_path_factory.getbasetemp() + path.mkdir(parents=True, exist_ok=True) + return path + + +@pytest.fixture( + name="pep621_configuration", + scope="session", + params=pep621_variants, +) +def fixture_pep621_configuration(request: pytest.FixtureRequest) -> PEP621Configuration: + """Fixture defining all testable variations of PEP621 + + Args: + request: Parameterization list + + Returns: + PEP621 variant + """ + + return cast(PEP621Configuration, request.param) + + +@pytest.fixture( + name="pep621_data", + scope="session", +) +def fixture_pep621_data( + pep621_configuration: PEP621Configuration, project_configuration: ProjectConfiguration +) -> PEP621Data: + """Resolved project table fixture + + Args: + pep621_configuration: The input configuration to resolve + project_configuration: The project configuration to help with the resolve + + Returns: + The resolved project table + """ + + return resolve_pep621(pep621_configuration, project_configuration, None) + + +@pytest.fixture( + name="cppython_local_configuration", + scope="session", + params=cppython_local_variants, +) +def fixture_cppython_local_configuration( + request: pytest.FixtureRequest, install_path: Path +) -> CPPythonLocalConfiguration: + """Fixture defining all testable variations of CPPythonData + + Args: + request: Parameterization list + install_path: The temporary install directory + + Returns: + Variation of CPPython data + """ + cppython_local_configuration = cast(CPPythonLocalConfiguration, request.param) + + data = cppython_local_configuration.model_dump(by_alias=True) + + # Pin the install location to the base temporary directory + data["install-path"] = install_path + + # Fill the plugin names with mocked values + data["provider-name"] = "mock" + data["generator-name"] = "mock" + + return CPPythonLocalConfiguration(**data) + + +@pytest.fixture( + name="cppython_global_configuration", + scope="session", + params=cppython_global_variants, +) +def fixture_cppython_global_configuration(request: pytest.FixtureRequest) -> CPPythonGlobalConfiguration: + """Fixture defining all testable variations of CPPythonData + + Args: + request: Parameterization list + + Returns: + Variation of CPPython data + """ + cppython_global_configuration = cast(CPPythonGlobalConfiguration, request.param) + + return cppython_global_configuration + + +@pytest.fixture( + name="plugin_build_data", + scope="session", +) +def fixture_plugin_build_data( + provider_type: type[Provider], + generator_type: type[Generator], + scm_type: type[SCM], +) -> PluginBuildData: + """Fixture for constructing resolved CPPython table data + + Args: + provider_type: The provider type + generator_type: The generator type + scm_type: The scm type + + Returns: + The plugin build data + """ + + return PluginBuildData(generator_type=generator_type, provider_type=provider_type, scm_type=scm_type) + + +@pytest.fixture( + name="plugin_cppython_data", + scope="session", +) +def fixture_plugin_cppython_data( + provider_type: type[Provider], + generator_type: type[Generator], + scm_type: type[SCM], +) -> PluginCPPythonData: + """Fixture for constructing resolved CPPython table data + + Args: + provider_type: The provider type + generator_type: The generator type + scm_type: The scm type + + Returns: + The plugin data for CPPython resolution + """ + + return PluginCPPythonData( + generator_name=generator_type.name(), provider_name=provider_type.name(), scm_name=scm_type.name() + ) + + +@pytest.fixture( + name="cppython_data", + scope="session", +) +def fixture_cppython_data( + cppython_local_configuration: CPPythonLocalConfiguration, + cppython_global_configuration: CPPythonGlobalConfiguration, + project_data: ProjectData, + plugin_cppython_data: PluginCPPythonData, +) -> CPPythonData: + """Fixture for constructing resolved CPPython table data + + Args: + cppython_local_configuration: The local configuration to resolve + cppython_global_configuration: The global configuration to resolve + project_data: The project data to help with the resolve + plugin_cppython_data: Plugin data for CPPython resolution + + Returns: + The resolved CPPython table + """ + + return resolve_cppython( + cppython_local_configuration, cppython_global_configuration, project_data, plugin_cppython_data + ) + + +@pytest.fixture( + name="core_data", +) +def fixture_core_data(cppython_data: CPPythonData, project_data: ProjectData) -> CoreData: + """Fixture for creating the wrapper CoreData type + + Args: + cppython_data: CPPython data + project_data: The project data + + Returns: + Wrapper Core Type + """ + + return CoreData(cppython_data=cppython_data, project_data=project_data) + + +@pytest.fixture(name="plugin_data_path", scope="session") +def fixture_plugin_data_path(internal_plugin_data_path: list[Path | None]) -> list[Path | None]: + """Fixture cache of internal_plugin_data_path + + Args: + internal_plugin_data_path: The input meta data + + Returns: + The session scoped data + """ + + return internal_plugin_data_path + + +@pytest.fixture(name="data_path", scope="session") +def fixture_data_path(internal_data_path: list[Path]) -> list[Path]: + """Fixture cache of internal_data_path + + Args: + internal_data_path: The input meta data + + Returns: + The session scoped data + """ + + return internal_data_path + + +@pytest.fixture( + name="project_configuration", + scope="session", + params=project_variants, +) +def fixture_project_configuration( + request: pytest.FixtureRequest, + tmp_path_factory: pytest.TempPathFactory, + data_path: Path, + plugin_data_path: Path | None, +) -> ProjectConfiguration: + """Project configuration fixture + + Args: + request: Parameterized configuration data + tmp_path_factory: Factory for centralized temporary directories + data_path: Project file requirements + plugin_data_path: Parameterized path to a data directory + + Returns: + Configuration with temporary directory capabilities + """ + + tmp_path = tmp_path_factory.mktemp("workspace-") + + shutil.copytree(data_path, tmp_path, dirs_exist_ok=True) + + if plugin_data_path is not None: + shutil.copytree(plugin_data_path, tmp_path, dirs_exist_ok=True) + + configuration = cast(ProjectConfiguration, request.param) + + # Pin the project location + paths = list(tmp_path.rglob("pyproject.toml")) + + # 'paths' length guaranteed to be 1 + configuration.pyproject_file = paths[0].resolve() + + return configuration + + +@pytest.fixture( + name="project_data", + scope="session", +) +def fixture_project_data(project_configuration: ProjectConfiguration) -> ProjectData: + """Fixture that creates a project space at 'workspace/test_project/pyproject.toml' + Args: + project_configuration: Project data + Returns: + A project data object that has populated a function level temporary directory + """ + + return resolve_project_configuration(project_configuration) + + +@pytest.fixture(name="project") +def fixture_project( + cppython_local_configuration: CPPythonLocalConfiguration, pep621_configuration: PEP621Configuration +) -> PyProject: + """Parameterized construction of PyProject data + Args: + cppython_local_configuration: The parameterized cppython table + pep621_configuration: The project table + Returns: + All the data as one object + """ + + tool = ToolData(cppython=cppython_local_configuration) + return PyProject(project=pep621_configuration, tool=tool) + + @pytest.fixture( name="cmake_data", scope="session", diff --git a/tests/integration/plugins/pdm/test_interface.py b/tests/integration/plugins/pdm/test_interface.py index a5b01e8..d4ce9bc 100644 --- a/tests/integration/plugins/pdm/test_interface.py +++ b/tests/integration/plugins/pdm/test_interface.py @@ -30,7 +30,7 @@ def test_entrypoint(self, mocker: MockerFixture) -> None: mocker: Mocker fixture for plugin patch """ - patch = mocker.patch("cppython_pdm.plugin.CPPythonPlugin") + patch = mocker.patch("cppython.plugins.pdm.plugin.CPPythonPlugin") core = Core() core.load_plugins() diff --git a/tests/plugin_helper/plugin.py b/tests/plugin_helper/plugin.py deleted file mode 100644 index 99ff294..0000000 --- a/tests/plugin_helper/plugin.py +++ /dev/null @@ -1,332 +0,0 @@ -"""Direct Fixtures""" - -import shutil -from pathlib import Path -from typing import cast - -import pytest - -from cppython.core.plugin_schema.generator import Generator -from cppython.core.plugin_schema.provider import Provider -from cppython.core.plugin_schema.scm import SCM -from cppython.core.resolution import ( - PluginBuildData, - PluginCPPythonData, - resolve_cppython, - resolve_pep621, - resolve_project_configuration, -) -from cppython.core.schema import ( - CoreData, - CPPythonData, - CPPythonGlobalConfiguration, - CPPythonLocalConfiguration, - PEP621Configuration, - PEP621Data, - ProjectConfiguration, - ProjectData, - PyProject, - ToolData, -) -from tests.plugin_helper.variants import ( - cppython_global_variants, - cppython_local_variants, - pep621_variants, - project_variants, -) - - -@pytest.fixture( - name="install_path", - scope="session", -) -def fixture_install_path(tmp_path_factory: pytest.TempPathFactory) -> Path: - """Creates temporary install location - Args: - tmp_path_factory: Factory for centralized temporary directories - Returns: - A temporary directory - """ - path = tmp_path_factory.getbasetemp() - path.mkdir(parents=True, exist_ok=True) - return path - - -@pytest.fixture( - name="pep621_configuration", - scope="session", - params=pep621_variants, -) -def fixture_pep621_configuration(request: pytest.FixtureRequest) -> PEP621Configuration: - """Fixture defining all testable variations of PEP621 - - Args: - request: Parameterization list - - Returns: - PEP621 variant - """ - - return cast(PEP621Configuration, request.param) - - -@pytest.fixture( - name="pep621_data", - scope="session", -) -def fixture_pep621_data( - pep621_configuration: PEP621Configuration, project_configuration: ProjectConfiguration -) -> PEP621Data: - """Resolved project table fixture - - Args: - pep621_configuration: The input configuration to resolve - project_configuration: The project configuration to help with the resolve - - Returns: - The resolved project table - """ - - return resolve_pep621(pep621_configuration, project_configuration, None) - - -@pytest.fixture( - name="cppython_local_configuration", - scope="session", - params=cppython_local_variants, -) -def fixture_cppython_local_configuration( - request: pytest.FixtureRequest, install_path: Path -) -> CPPythonLocalConfiguration: - """Fixture defining all testable variations of CPPythonData - - Args: - request: Parameterization list - install_path: The temporary install directory - - Returns: - Variation of CPPython data - """ - cppython_local_configuration = cast(CPPythonLocalConfiguration, request.param) - - data = cppython_local_configuration.model_dump(by_alias=True) - - # Pin the install location to the base temporary directory - data["install-path"] = install_path - - # Fill the plugin names with mocked values - data["provider-name"] = "mock" - data["generator-name"] = "mock" - - return CPPythonLocalConfiguration(**data) - - -@pytest.fixture( - name="cppython_global_configuration", - scope="session", - params=cppython_global_variants, -) -def fixture_cppython_global_configuration(request: pytest.FixtureRequest) -> CPPythonGlobalConfiguration: - """Fixture defining all testable variations of CPPythonData - - Args: - request: Parameterization list - - Returns: - Variation of CPPython data - """ - cppython_global_configuration = cast(CPPythonGlobalConfiguration, request.param) - - return cppython_global_configuration - - -@pytest.fixture( - name="plugin_build_data", - scope="session", -) -def fixture_plugin_build_data( - provider_type: type[Provider], - generator_type: type[Generator], - scm_type: type[SCM], -) -> PluginBuildData: - """Fixture for constructing resolved CPPython table data - - Args: - provider_type: The provider type - generator_type: The generator type - scm_type: The scm type - - Returns: - The plugin build data - """ - - return PluginBuildData(generator_type=generator_type, provider_type=provider_type, scm_type=scm_type) - - -@pytest.fixture( - name="plugin_cppython_data", - scope="session", -) -def fixture_plugin_cppython_data( - provider_type: type[Provider], - generator_type: type[Generator], - scm_type: type[SCM], -) -> PluginCPPythonData: - """Fixture for constructing resolved CPPython table data - - Args: - provider_type: The provider type - generator_type: The generator type - scm_type: The scm type - - Returns: - The plugin data for CPPython resolution - """ - - return PluginCPPythonData( - generator_name=generator_type.name(), provider_name=provider_type.name(), scm_name=scm_type.name() - ) - - -@pytest.fixture( - name="cppython_data", - scope="session", -) -def fixture_cppython_data( - cppython_local_configuration: CPPythonLocalConfiguration, - cppython_global_configuration: CPPythonGlobalConfiguration, - project_data: ProjectData, - plugin_cppython_data: PluginCPPythonData, -) -> CPPythonData: - """Fixture for constructing resolved CPPython table data - - Args: - cppython_local_configuration: The local configuration to resolve - cppython_global_configuration: The global configuration to resolve - project_data: The project data to help with the resolve - plugin_cppython_data: Plugin data for CPPython resolution - - Returns: - The resolved CPPython table - """ - - return resolve_cppython( - cppython_local_configuration, cppython_global_configuration, project_data, plugin_cppython_data - ) - - -@pytest.fixture( - name="core_data", -) -def fixture_core_data(cppython_data: CPPythonData, project_data: ProjectData) -> CoreData: - """Fixture for creating the wrapper CoreData type - - Args: - cppython_data: CPPython data - project_data: The project data - - Returns: - Wrapper Core Type - """ - - return CoreData(cppython_data=cppython_data, project_data=project_data) - - -@pytest.fixture(name="plugin_data_path", scope="session") -def fixture_plugin_data_path(internal_plugin_data_path: list[Path | None]) -> list[Path | None]: - """Fixture cache of internal_plugin_data_path - - Args: - internal_plugin_data_path: The input meta data - - Returns: - The session scoped data - """ - - return internal_plugin_data_path - - -@pytest.fixture(name="data_path", scope="session") -def fixture_data_path(internal_data_path: list[Path]) -> list[Path]: - """Fixture cache of internal_data_path - - Args: - internal_data_path: The input meta data - - Returns: - The session scoped data - """ - - return internal_data_path - - -@pytest.fixture( - name="project_configuration", - scope="session", - params=project_variants, -) -def fixture_project_configuration( - request: pytest.FixtureRequest, - tmp_path_factory: pytest.TempPathFactory, - data_path: Path, - plugin_data_path: Path | None, -) -> ProjectConfiguration: - """Project configuration fixture - - Args: - request: Parameterized configuration data - tmp_path_factory: Factory for centralized temporary directories - data_path: Project file requirements - plugin_data_path: Parameterized path to a data directory - - Returns: - Configuration with temporary directory capabilities - """ - - tmp_path = tmp_path_factory.mktemp("workspace-") - - shutil.copytree(data_path, tmp_path, dirs_exist_ok=True) - - if plugin_data_path is not None: - shutil.copytree(plugin_data_path, tmp_path, dirs_exist_ok=True) - - configuration = cast(ProjectConfiguration, request.param) - - # Pin the project location - paths = list(tmp_path.rglob("pyproject.toml")) - - # 'paths' length guaranteed to be 1 - configuration.pyproject_file = paths[0].resolve() - - return configuration - - -@pytest.fixture( - name="project_data", - scope="session", -) -def fixture_project_data(project_configuration: ProjectConfiguration) -> ProjectData: - """Fixture that creates a project space at 'workspace/test_project/pyproject.toml' - Args: - project_configuration: Project data - Returns: - A project data object that has populated a function level temporary directory - """ - - return resolve_project_configuration(project_configuration) - - -@pytest.fixture(name="project") -def fixture_project( - cppython_local_configuration: CPPythonLocalConfiguration, pep621_configuration: PEP621Configuration -) -> PyProject: - """Parameterized construction of PyProject data - Args: - cppython_local_configuration: The parameterized cppython table - pep621_configuration: The project table - Returns: - All the data as one object - """ - - tool = ToolData(cppython=cppython_local_configuration) - return PyProject(project=pep621_configuration, tool=tool) From 483ee5073eeb5c92376b85384f924ea8c4d9bd6e Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Thu, 14 Nov 2024 13:23:06 -0500 Subject: [PATCH 36/68] Update pdm.lock --- pdm.lock | 90 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/pdm.lock b/pdm.lock index 96fbf71..cfcbb55 100644 --- a/pdm.lock +++ b/pdm.lock @@ -130,67 +130,67 @@ files = [ [[package]] name = "coverage" -version = "7.6.4" +version = "7.6.5" requires_python = ">=3.9" summary = "Code coverage measurement for Python" groups = ["test"] files = [ - {file = "coverage-7.6.4-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:023bf8ee3ec6d35af9c1c6ccc1d18fa69afa1cb29eaac57cb064dbb262a517f9"}, - {file = "coverage-7.6.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:b0ac3d42cb51c4b12df9c5f0dd2f13a4f24f01943627120ec4d293c9181219ba"}, - {file = "coverage-7.6.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f8fe4984b431f8621ca53d9380901f62bfb54ff759a1348cd140490ada7b693c"}, - {file = "coverage-7.6.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5fbd612f8a091954a0c8dd4c0b571b973487277d26476f8480bfa4b2a65b5d06"}, - {file = "coverage-7.6.4-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dacbc52de979f2823a819571f2e3a350a7e36b8cb7484cdb1e289bceaf35305f"}, - {file = "coverage-7.6.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:dab4d16dfef34b185032580e2f2f89253d302facba093d5fa9dbe04f569c4f4b"}, - {file = "coverage-7.6.4-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:862264b12ebb65ad8d863d51f17758b1684560b66ab02770d4f0baf2ff75da21"}, - {file = "coverage-7.6.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:5beb1ee382ad32afe424097de57134175fea3faf847b9af002cc7895be4e2a5a"}, - {file = "coverage-7.6.4-cp313-cp313-win32.whl", hash = "sha256:bf20494da9653f6410213424f5f8ad0ed885e01f7e8e59811f572bdb20b8972e"}, - {file = "coverage-7.6.4-cp313-cp313-win_amd64.whl", hash = "sha256:182e6cd5c040cec0a1c8d415a87b67ed01193ed9ad458ee427741c7d8513d963"}, - {file = "coverage-7.6.4-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:a181e99301a0ae128493a24cfe5cfb5b488c4e0bf2f8702091473d033494d04f"}, - {file = "coverage-7.6.4-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:df57bdbeffe694e7842092c5e2e0bc80fff7f43379d465f932ef36f027179806"}, - {file = "coverage-7.6.4-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0bcd1069e710600e8e4cf27f65c90c7843fa8edfb4520fb0ccb88894cad08b11"}, - {file = "coverage-7.6.4-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:99b41d18e6b2a48ba949418db48159d7a2e81c5cc290fc934b7d2380515bd0e3"}, - {file = "coverage-7.6.4-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a6b1e54712ba3474f34b7ef7a41e65bd9037ad47916ccb1cc78769bae324c01a"}, - {file = "coverage-7.6.4-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:53d202fd109416ce011578f321460795abfe10bb901b883cafd9b3ef851bacfc"}, - {file = "coverage-7.6.4-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:c48167910a8f644671de9f2083a23630fbf7a1cb70ce939440cd3328e0919f70"}, - {file = "coverage-7.6.4-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:cc8ff50b50ce532de2fa7a7daae9dd12f0a699bfcd47f20945364e5c31799fef"}, - {file = "coverage-7.6.4-cp313-cp313t-win32.whl", hash = "sha256:b8d3a03d9bfcaf5b0141d07a88456bb6a4c3ce55c080712fec8418ef3610230e"}, - {file = "coverage-7.6.4-cp313-cp313t-win_amd64.whl", hash = "sha256:f3ddf056d3ebcf6ce47bdaf56142af51bb7fad09e4af310241e9db7a3a8022e1"}, - {file = "coverage-7.6.4.tar.gz", hash = "sha256:29fc0f17b1d3fea332f8001d4558f8214af7f1d87a345f3a133c901d60347c73"}, + {file = "coverage-7.6.5-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:49ea4a739dc14856d7c5f935da90db123b77a850cfddcfacb490a28de8f87257"}, + {file = "coverage-7.6.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e0c51339a28aa43d0f2b1211e57ceeeeed5e09f4deb6fc543d939de68069e81e"}, + {file = "coverage-7.6.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:040c3d5cf4db24e7cb890bf4b547a25bd3a3516c58c9f2a22f822199ee2ad8ed"}, + {file = "coverage-7.6.5-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f0b7e67f9d3b156ab93fce71485fadd043ab04b45d5d88623c6d94f7d16ced5b"}, + {file = "coverage-7.6.5-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e078bfb114025c55fdbaa802f4c13e20e6ce4e10a96918d7234656b41f69e649"}, + {file = "coverage-7.6.5-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:559cdb21aca30810e648ac08270535c1d2e17226ebbdf90860a060d3680cb05f"}, + {file = "coverage-7.6.5-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:23e2dd956277061f24d9eda7539113a9c35a9409a9935647a34ced79b8aacb75"}, + {file = "coverage-7.6.5-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:3e7c4ccb41dc9830b2ca8592e401045a81740f627c7c0348bdc3b7373ce52f8e"}, + {file = "coverage-7.6.5-cp313-cp313-win32.whl", hash = "sha256:9d3565bb7deaa12d634426f113e6b106028c535667ba7756af65f00464981ba5"}, + {file = "coverage-7.6.5-cp313-cp313-win_amd64.whl", hash = "sha256:5039410420d9ddcd5b8566d3afbb28b89d70c4481dbb283ea543263cbefa2b67"}, + {file = "coverage-7.6.5-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:77b640aa78d4d9f620fb2e1b2a41b0d196120c188d0a7f678761d668d6251fcc"}, + {file = "coverage-7.6.5-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:bb3799f6279df37e369027128926de4c159e6399000316ebd7a69e55b84dc97f"}, + {file = "coverage-7.6.5-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:55aba7ab64e8af37a18064f23f399dff10041fa3aaf201528f12004968638b9f"}, + {file = "coverage-7.6.5-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6065a988d724dd3328cb21e97378bef0549b2f8b7ac0a3376785d9f7f05dc736"}, + {file = "coverage-7.6.5-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5f092d222e4286cdd1ab9707da36944c11ba6294d8c9b18534057f03e6866367"}, + {file = "coverage-7.6.5-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:1dc99aece5f899955eece053a798e279f7fe7059dd5e2a95af82878cfe4a44e1"}, + {file = "coverage-7.6.5-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:1b14515f83ffa7a6787e725d804c6b11dd317a6bd0373d8519a61e4a587fe534"}, + {file = "coverage-7.6.5-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:9fa6d90130165346935541f3762933dae07e237ff7d6d780fae556039f08a470"}, + {file = "coverage-7.6.5-cp313-cp313t-win32.whl", hash = "sha256:1be9ec4c49becb35955b9d69c27e6385aedd40d233f1cf065e8430c59924b30e"}, + {file = "coverage-7.6.5-cp313-cp313t-win_amd64.whl", hash = "sha256:7ff4fd7679df56e36fc838ef227e95e3aa1b0ca0548daede7f8ae6e54479c115"}, + {file = "coverage-7.6.5.tar.gz", hash = "sha256:6069188329fbe0a63876719099076261ce7a1adeea95bf236cff4353a8451b0d"}, ] [[package]] name = "coverage" -version = "7.6.4" +version = "7.6.5" extras = ["toml"] requires_python = ">=3.9" summary = "Code coverage measurement for Python" groups = ["test"] dependencies = [ - "coverage==7.6.4", + "coverage==7.6.5", "tomli; python_full_version <= \"3.11.0a6\"", ] files = [ - {file = "coverage-7.6.4-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:023bf8ee3ec6d35af9c1c6ccc1d18fa69afa1cb29eaac57cb064dbb262a517f9"}, - {file = "coverage-7.6.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:b0ac3d42cb51c4b12df9c5f0dd2f13a4f24f01943627120ec4d293c9181219ba"}, - {file = "coverage-7.6.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f8fe4984b431f8621ca53d9380901f62bfb54ff759a1348cd140490ada7b693c"}, - {file = "coverage-7.6.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5fbd612f8a091954a0c8dd4c0b571b973487277d26476f8480bfa4b2a65b5d06"}, - {file = "coverage-7.6.4-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dacbc52de979f2823a819571f2e3a350a7e36b8cb7484cdb1e289bceaf35305f"}, - {file = "coverage-7.6.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:dab4d16dfef34b185032580e2f2f89253d302facba093d5fa9dbe04f569c4f4b"}, - {file = "coverage-7.6.4-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:862264b12ebb65ad8d863d51f17758b1684560b66ab02770d4f0baf2ff75da21"}, - {file = "coverage-7.6.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:5beb1ee382ad32afe424097de57134175fea3faf847b9af002cc7895be4e2a5a"}, - {file = "coverage-7.6.4-cp313-cp313-win32.whl", hash = "sha256:bf20494da9653f6410213424f5f8ad0ed885e01f7e8e59811f572bdb20b8972e"}, - {file = "coverage-7.6.4-cp313-cp313-win_amd64.whl", hash = "sha256:182e6cd5c040cec0a1c8d415a87b67ed01193ed9ad458ee427741c7d8513d963"}, - {file = "coverage-7.6.4-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:a181e99301a0ae128493a24cfe5cfb5b488c4e0bf2f8702091473d033494d04f"}, - {file = "coverage-7.6.4-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:df57bdbeffe694e7842092c5e2e0bc80fff7f43379d465f932ef36f027179806"}, - {file = "coverage-7.6.4-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0bcd1069e710600e8e4cf27f65c90c7843fa8edfb4520fb0ccb88894cad08b11"}, - {file = "coverage-7.6.4-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:99b41d18e6b2a48ba949418db48159d7a2e81c5cc290fc934b7d2380515bd0e3"}, - {file = "coverage-7.6.4-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a6b1e54712ba3474f34b7ef7a41e65bd9037ad47916ccb1cc78769bae324c01a"}, - {file = "coverage-7.6.4-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:53d202fd109416ce011578f321460795abfe10bb901b883cafd9b3ef851bacfc"}, - {file = "coverage-7.6.4-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:c48167910a8f644671de9f2083a23630fbf7a1cb70ce939440cd3328e0919f70"}, - {file = "coverage-7.6.4-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:cc8ff50b50ce532de2fa7a7daae9dd12f0a699bfcd47f20945364e5c31799fef"}, - {file = "coverage-7.6.4-cp313-cp313t-win32.whl", hash = "sha256:b8d3a03d9bfcaf5b0141d07a88456bb6a4c3ce55c080712fec8418ef3610230e"}, - {file = "coverage-7.6.4-cp313-cp313t-win_amd64.whl", hash = "sha256:f3ddf056d3ebcf6ce47bdaf56142af51bb7fad09e4af310241e9db7a3a8022e1"}, - {file = "coverage-7.6.4.tar.gz", hash = "sha256:29fc0f17b1d3fea332f8001d4558f8214af7f1d87a345f3a133c901d60347c73"}, + {file = "coverage-7.6.5-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:49ea4a739dc14856d7c5f935da90db123b77a850cfddcfacb490a28de8f87257"}, + {file = "coverage-7.6.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e0c51339a28aa43d0f2b1211e57ceeeeed5e09f4deb6fc543d939de68069e81e"}, + {file = "coverage-7.6.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:040c3d5cf4db24e7cb890bf4b547a25bd3a3516c58c9f2a22f822199ee2ad8ed"}, + {file = "coverage-7.6.5-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f0b7e67f9d3b156ab93fce71485fadd043ab04b45d5d88623c6d94f7d16ced5b"}, + {file = "coverage-7.6.5-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e078bfb114025c55fdbaa802f4c13e20e6ce4e10a96918d7234656b41f69e649"}, + {file = "coverage-7.6.5-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:559cdb21aca30810e648ac08270535c1d2e17226ebbdf90860a060d3680cb05f"}, + {file = "coverage-7.6.5-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:23e2dd956277061f24d9eda7539113a9c35a9409a9935647a34ced79b8aacb75"}, + {file = "coverage-7.6.5-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:3e7c4ccb41dc9830b2ca8592e401045a81740f627c7c0348bdc3b7373ce52f8e"}, + {file = "coverage-7.6.5-cp313-cp313-win32.whl", hash = "sha256:9d3565bb7deaa12d634426f113e6b106028c535667ba7756af65f00464981ba5"}, + {file = "coverage-7.6.5-cp313-cp313-win_amd64.whl", hash = "sha256:5039410420d9ddcd5b8566d3afbb28b89d70c4481dbb283ea543263cbefa2b67"}, + {file = "coverage-7.6.5-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:77b640aa78d4d9f620fb2e1b2a41b0d196120c188d0a7f678761d668d6251fcc"}, + {file = "coverage-7.6.5-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:bb3799f6279df37e369027128926de4c159e6399000316ebd7a69e55b84dc97f"}, + {file = "coverage-7.6.5-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:55aba7ab64e8af37a18064f23f399dff10041fa3aaf201528f12004968638b9f"}, + {file = "coverage-7.6.5-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6065a988d724dd3328cb21e97378bef0549b2f8b7ac0a3376785d9f7f05dc736"}, + {file = "coverage-7.6.5-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5f092d222e4286cdd1ab9707da36944c11ba6294d8c9b18534057f03e6866367"}, + {file = "coverage-7.6.5-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:1dc99aece5f899955eece053a798e279f7fe7059dd5e2a95af82878cfe4a44e1"}, + {file = "coverage-7.6.5-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:1b14515f83ffa7a6787e725d804c6b11dd317a6bd0373d8519a61e4a587fe534"}, + {file = "coverage-7.6.5-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:9fa6d90130165346935541f3762933dae07e237ff7d6d780fae556039f08a470"}, + {file = "coverage-7.6.5-cp313-cp313t-win32.whl", hash = "sha256:1be9ec4c49becb35955b9d69c27e6385aedd40d233f1cf065e8430c59924b30e"}, + {file = "coverage-7.6.5-cp313-cp313t-win_amd64.whl", hash = "sha256:7ff4fd7679df56e36fc838ef227e95e3aa1b0ca0548daede7f8ae6e54479c115"}, + {file = "coverage-7.6.5.tar.gz", hash = "sha256:6069188329fbe0a63876719099076261ce7a1adeea95bf236cff4353a8451b0d"}, ] [[package]] From 24d681ff7510da567e37dabcf8d247eaa1d3bb18 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Sat, 16 Nov 2024 00:53:32 -0500 Subject: [PATCH 37/68] Fix Tests --- tests/unit/plugin_helper/test_fixtures.py | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/tests/unit/plugin_helper/test_fixtures.py b/tests/unit/plugin_helper/test_fixtures.py index f4ca3a2..35f4294 100644 --- a/tests/unit/plugin_helper/test_fixtures.py +++ b/tests/unit/plugin_helper/test_fixtures.py @@ -6,17 +6,6 @@ class TestFixtures: """Tests for fixtures""" - def test_pyproject_undefined(self, data_path: Path) -> None: - """Verifies that the directory data provided by pytest_cppython contains a pyproject.toml file - - Args: - data_path: The project's tests/data directory - """ - - paths = list(data_path.rglob("pyproject.toml")) - - assert len(paths) == 1 - def test_data_directory(self, plugin_data_path: Path | None) -> None: """Verifies that the directory data provided by pytest_cppython contains a pyproject.toml file @@ -25,10 +14,7 @@ def test_data_directory(self, plugin_data_path: Path | None) -> None: """ assert plugin_data_path is not None - - requirement = plugin_data_path / "requirement.txt" - - assert requirement.exists() + assert plugin_data_path.exists() def test_build_directory(self, build_test_build: Path) -> None: """Verifies that the build data provided is the expected path From f7fb98f020d578a233953917bd691a72f2a9135f Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Sat, 16 Nov 2024 02:15:03 -0500 Subject: [PATCH 38/68] Update pdm.lock --- pdm.lock | 96 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/pdm.lock b/pdm.lock index cfcbb55..fba198c 100644 --- a/pdm.lock +++ b/pdm.lock @@ -130,67 +130,67 @@ files = [ [[package]] name = "coverage" -version = "7.6.5" +version = "7.6.7" requires_python = ">=3.9" summary = "Code coverage measurement for Python" groups = ["test"] files = [ - {file = "coverage-7.6.5-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:49ea4a739dc14856d7c5f935da90db123b77a850cfddcfacb490a28de8f87257"}, - {file = "coverage-7.6.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e0c51339a28aa43d0f2b1211e57ceeeeed5e09f4deb6fc543d939de68069e81e"}, - {file = "coverage-7.6.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:040c3d5cf4db24e7cb890bf4b547a25bd3a3516c58c9f2a22f822199ee2ad8ed"}, - {file = "coverage-7.6.5-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f0b7e67f9d3b156ab93fce71485fadd043ab04b45d5d88623c6d94f7d16ced5b"}, - {file = "coverage-7.6.5-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e078bfb114025c55fdbaa802f4c13e20e6ce4e10a96918d7234656b41f69e649"}, - {file = "coverage-7.6.5-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:559cdb21aca30810e648ac08270535c1d2e17226ebbdf90860a060d3680cb05f"}, - {file = "coverage-7.6.5-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:23e2dd956277061f24d9eda7539113a9c35a9409a9935647a34ced79b8aacb75"}, - {file = "coverage-7.6.5-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:3e7c4ccb41dc9830b2ca8592e401045a81740f627c7c0348bdc3b7373ce52f8e"}, - {file = "coverage-7.6.5-cp313-cp313-win32.whl", hash = "sha256:9d3565bb7deaa12d634426f113e6b106028c535667ba7756af65f00464981ba5"}, - {file = "coverage-7.6.5-cp313-cp313-win_amd64.whl", hash = "sha256:5039410420d9ddcd5b8566d3afbb28b89d70c4481dbb283ea543263cbefa2b67"}, - {file = "coverage-7.6.5-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:77b640aa78d4d9f620fb2e1b2a41b0d196120c188d0a7f678761d668d6251fcc"}, - {file = "coverage-7.6.5-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:bb3799f6279df37e369027128926de4c159e6399000316ebd7a69e55b84dc97f"}, - {file = "coverage-7.6.5-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:55aba7ab64e8af37a18064f23f399dff10041fa3aaf201528f12004968638b9f"}, - {file = "coverage-7.6.5-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6065a988d724dd3328cb21e97378bef0549b2f8b7ac0a3376785d9f7f05dc736"}, - {file = "coverage-7.6.5-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5f092d222e4286cdd1ab9707da36944c11ba6294d8c9b18534057f03e6866367"}, - {file = "coverage-7.6.5-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:1dc99aece5f899955eece053a798e279f7fe7059dd5e2a95af82878cfe4a44e1"}, - {file = "coverage-7.6.5-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:1b14515f83ffa7a6787e725d804c6b11dd317a6bd0373d8519a61e4a587fe534"}, - {file = "coverage-7.6.5-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:9fa6d90130165346935541f3762933dae07e237ff7d6d780fae556039f08a470"}, - {file = "coverage-7.6.5-cp313-cp313t-win32.whl", hash = "sha256:1be9ec4c49becb35955b9d69c27e6385aedd40d233f1cf065e8430c59924b30e"}, - {file = "coverage-7.6.5-cp313-cp313t-win_amd64.whl", hash = "sha256:7ff4fd7679df56e36fc838ef227e95e3aa1b0ca0548daede7f8ae6e54479c115"}, - {file = "coverage-7.6.5.tar.gz", hash = "sha256:6069188329fbe0a63876719099076261ce7a1adeea95bf236cff4353a8451b0d"}, + {file = "coverage-7.6.7-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:46f21663e358beae6b368429ffadf14ed0a329996248a847a4322fb2e35d64d3"}, + {file = "coverage-7.6.7-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:40cca284c7c310d622a1677f105e8507441d1bb7c226f41978ba7c86979609ab"}, + {file = "coverage-7.6.7-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77256ad2345c29fe59ae861aa11cfc74579c88d4e8dbf121cbe46b8e32aec808"}, + {file = "coverage-7.6.7-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:87ea64b9fa52bf395272e54020537990a28078478167ade6c61da7ac04dc14bc"}, + {file = "coverage-7.6.7-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2d608a7808793e3615e54e9267519351c3ae204a6d85764d8337bd95993581a8"}, + {file = "coverage-7.6.7-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:cdd94501d65adc5c24f8a1a0eda110452ba62b3f4aeaba01e021c1ed9cb8f34a"}, + {file = "coverage-7.6.7-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:82c809a62e953867cf57e0548c2b8464207f5f3a6ff0e1e961683e79b89f2c55"}, + {file = "coverage-7.6.7-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:bb684694e99d0b791a43e9fc0fa58efc15ec357ac48d25b619f207c41f2fd384"}, + {file = "coverage-7.6.7-cp313-cp313-win32.whl", hash = "sha256:963e4a08cbb0af6623e61492c0ec4c0ec5c5cf74db5f6564f98248d27ee57d30"}, + {file = "coverage-7.6.7-cp313-cp313-win_amd64.whl", hash = "sha256:14045b8bfd5909196a90da145a37f9d335a5d988a83db34e80f41e965fb7cb42"}, + {file = "coverage-7.6.7-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:f2c7a045eef561e9544359a0bf5784b44e55cefc7261a20e730baa9220c83413"}, + {file = "coverage-7.6.7-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:5dd4e4a49d9c72a38d18d641135d2fb0bdf7b726ca60a103836b3d00a1182acd"}, + {file = "coverage-7.6.7-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5c95e0fa3d1547cb6f021ab72f5c23402da2358beec0a8e6d19a368bd7b0fb37"}, + {file = "coverage-7.6.7-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f63e21ed474edd23f7501f89b53280014436e383a14b9bd77a648366c81dce7b"}, + {file = "coverage-7.6.7-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ead9b9605c54d15be228687552916c89c9683c215370c4a44f1f217d2adcc34d"}, + {file = "coverage-7.6.7-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:0573f5cbf39114270842d01872952d301027d2d6e2d84013f30966313cadb529"}, + {file = "coverage-7.6.7-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:e2c8e3384c12dfa19fa9a52f23eb091a8fad93b5b81a41b14c17c78e23dd1d8b"}, + {file = "coverage-7.6.7-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:70a56a2ec1869e6e9fa69ef6b76b1a8a7ef709972b9cc473f9ce9d26b5997ce3"}, + {file = "coverage-7.6.7-cp313-cp313t-win32.whl", hash = "sha256:dbba8210f5067398b2c4d96b4e64d8fb943644d5eb70be0d989067c8ca40c0f8"}, + {file = "coverage-7.6.7-cp313-cp313t-win_amd64.whl", hash = "sha256:dfd14bcae0c94004baba5184d1c935ae0d1231b8409eb6c103a5fd75e8ecdc56"}, + {file = "coverage-7.6.7.tar.gz", hash = "sha256:d79d4826e41441c9a118ff045e4bccb9fdbdcb1d02413e7ea6eb5c87b5439d24"}, ] [[package]] name = "coverage" -version = "7.6.5" +version = "7.6.7" extras = ["toml"] requires_python = ">=3.9" summary = "Code coverage measurement for Python" groups = ["test"] dependencies = [ - "coverage==7.6.5", + "coverage==7.6.7", "tomli; python_full_version <= \"3.11.0a6\"", ] files = [ - {file = "coverage-7.6.5-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:49ea4a739dc14856d7c5f935da90db123b77a850cfddcfacb490a28de8f87257"}, - {file = "coverage-7.6.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e0c51339a28aa43d0f2b1211e57ceeeeed5e09f4deb6fc543d939de68069e81e"}, - {file = "coverage-7.6.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:040c3d5cf4db24e7cb890bf4b547a25bd3a3516c58c9f2a22f822199ee2ad8ed"}, - {file = "coverage-7.6.5-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f0b7e67f9d3b156ab93fce71485fadd043ab04b45d5d88623c6d94f7d16ced5b"}, - {file = "coverage-7.6.5-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e078bfb114025c55fdbaa802f4c13e20e6ce4e10a96918d7234656b41f69e649"}, - {file = "coverage-7.6.5-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:559cdb21aca30810e648ac08270535c1d2e17226ebbdf90860a060d3680cb05f"}, - {file = "coverage-7.6.5-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:23e2dd956277061f24d9eda7539113a9c35a9409a9935647a34ced79b8aacb75"}, - {file = "coverage-7.6.5-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:3e7c4ccb41dc9830b2ca8592e401045a81740f627c7c0348bdc3b7373ce52f8e"}, - {file = "coverage-7.6.5-cp313-cp313-win32.whl", hash = "sha256:9d3565bb7deaa12d634426f113e6b106028c535667ba7756af65f00464981ba5"}, - {file = "coverage-7.6.5-cp313-cp313-win_amd64.whl", hash = "sha256:5039410420d9ddcd5b8566d3afbb28b89d70c4481dbb283ea543263cbefa2b67"}, - {file = "coverage-7.6.5-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:77b640aa78d4d9f620fb2e1b2a41b0d196120c188d0a7f678761d668d6251fcc"}, - {file = "coverage-7.6.5-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:bb3799f6279df37e369027128926de4c159e6399000316ebd7a69e55b84dc97f"}, - {file = "coverage-7.6.5-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:55aba7ab64e8af37a18064f23f399dff10041fa3aaf201528f12004968638b9f"}, - {file = "coverage-7.6.5-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6065a988d724dd3328cb21e97378bef0549b2f8b7ac0a3376785d9f7f05dc736"}, - {file = "coverage-7.6.5-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5f092d222e4286cdd1ab9707da36944c11ba6294d8c9b18534057f03e6866367"}, - {file = "coverage-7.6.5-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:1dc99aece5f899955eece053a798e279f7fe7059dd5e2a95af82878cfe4a44e1"}, - {file = "coverage-7.6.5-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:1b14515f83ffa7a6787e725d804c6b11dd317a6bd0373d8519a61e4a587fe534"}, - {file = "coverage-7.6.5-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:9fa6d90130165346935541f3762933dae07e237ff7d6d780fae556039f08a470"}, - {file = "coverage-7.6.5-cp313-cp313t-win32.whl", hash = "sha256:1be9ec4c49becb35955b9d69c27e6385aedd40d233f1cf065e8430c59924b30e"}, - {file = "coverage-7.6.5-cp313-cp313t-win_amd64.whl", hash = "sha256:7ff4fd7679df56e36fc838ef227e95e3aa1b0ca0548daede7f8ae6e54479c115"}, - {file = "coverage-7.6.5.tar.gz", hash = "sha256:6069188329fbe0a63876719099076261ce7a1adeea95bf236cff4353a8451b0d"}, + {file = "coverage-7.6.7-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:46f21663e358beae6b368429ffadf14ed0a329996248a847a4322fb2e35d64d3"}, + {file = "coverage-7.6.7-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:40cca284c7c310d622a1677f105e8507441d1bb7c226f41978ba7c86979609ab"}, + {file = "coverage-7.6.7-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77256ad2345c29fe59ae861aa11cfc74579c88d4e8dbf121cbe46b8e32aec808"}, + {file = "coverage-7.6.7-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:87ea64b9fa52bf395272e54020537990a28078478167ade6c61da7ac04dc14bc"}, + {file = "coverage-7.6.7-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2d608a7808793e3615e54e9267519351c3ae204a6d85764d8337bd95993581a8"}, + {file = "coverage-7.6.7-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:cdd94501d65adc5c24f8a1a0eda110452ba62b3f4aeaba01e021c1ed9cb8f34a"}, + {file = "coverage-7.6.7-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:82c809a62e953867cf57e0548c2b8464207f5f3a6ff0e1e961683e79b89f2c55"}, + {file = "coverage-7.6.7-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:bb684694e99d0b791a43e9fc0fa58efc15ec357ac48d25b619f207c41f2fd384"}, + {file = "coverage-7.6.7-cp313-cp313-win32.whl", hash = "sha256:963e4a08cbb0af6623e61492c0ec4c0ec5c5cf74db5f6564f98248d27ee57d30"}, + {file = "coverage-7.6.7-cp313-cp313-win_amd64.whl", hash = "sha256:14045b8bfd5909196a90da145a37f9d335a5d988a83db34e80f41e965fb7cb42"}, + {file = "coverage-7.6.7-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:f2c7a045eef561e9544359a0bf5784b44e55cefc7261a20e730baa9220c83413"}, + {file = "coverage-7.6.7-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:5dd4e4a49d9c72a38d18d641135d2fb0bdf7b726ca60a103836b3d00a1182acd"}, + {file = "coverage-7.6.7-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5c95e0fa3d1547cb6f021ab72f5c23402da2358beec0a8e6d19a368bd7b0fb37"}, + {file = "coverage-7.6.7-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f63e21ed474edd23f7501f89b53280014436e383a14b9bd77a648366c81dce7b"}, + {file = "coverage-7.6.7-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ead9b9605c54d15be228687552916c89c9683c215370c4a44f1f217d2adcc34d"}, + {file = "coverage-7.6.7-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:0573f5cbf39114270842d01872952d301027d2d6e2d84013f30966313cadb529"}, + {file = "coverage-7.6.7-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:e2c8e3384c12dfa19fa9a52f23eb091a8fad93b5b81a41b14c17c78e23dd1d8b"}, + {file = "coverage-7.6.7-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:70a56a2ec1869e6e9fa69ef6b76b1a8a7ef709972b9cc473f9ce9d26b5997ce3"}, + {file = "coverage-7.6.7-cp313-cp313t-win32.whl", hash = "sha256:dbba8210f5067398b2c4d96b4e64d8fb943644d5eb70be0d989067c8ca40c0f8"}, + {file = "coverage-7.6.7-cp313-cp313t-win_amd64.whl", hash = "sha256:dfd14bcae0c94004baba5184d1c935ae0d1231b8409eb6c103a5fd75e8ecdc56"}, + {file = "coverage-7.6.7.tar.gz", hash = "sha256:d79d4826e41441c9a118ff045e4bccb9fdbdcb1d02413e7ea6eb5c87b5439d24"}, ] [[package]] @@ -305,7 +305,7 @@ files = [ [[package]] name = "httpcore" -version = "1.0.6" +version = "1.0.7" requires_python = ">=3.8" summary = "A minimal low-level HTTP client." groups = ["pdm"] @@ -314,8 +314,8 @@ dependencies = [ "h11<0.15,>=0.13", ] files = [ - {file = "httpcore-1.0.6-py3-none-any.whl", hash = "sha256:27b59625743b85577a8c0e10e55b50b5368a4f2cfe8cc7bcfa9cf00829c2682f"}, - {file = "httpcore-1.0.6.tar.gz", hash = "sha256:73f6dbd6eb8c21bbf7ef8efad555481853f5f6acdeaff1edb0694289269ee17f"}, + {file = "httpcore-1.0.7-py3-none-any.whl", hash = "sha256:a3fff8f43dc260d5bd363d9f9cf1830fa3a458b332856f34282de498ed420edd"}, + {file = "httpcore-1.0.7.tar.gz", hash = "sha256:8551cb62a169ec7162ac7be8d4817d561f60e08eaa485234898414bb5a8a0b4c"}, ] [[package]] From 23d05f83441c2e8482aa202d0590cf83966e3c5f Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Sat, 16 Nov 2024 02:15:05 -0500 Subject: [PATCH 39/68] Delete requirement.txt --- tests/data/test_folder/requirement.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 tests/data/test_folder/requirement.txt diff --git a/tests/data/test_folder/requirement.txt b/tests/data/test_folder/requirement.txt deleted file mode 100644 index e69de29..0000000 From fbf18121392f53e7753a106cb8105c7086caf4a6 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Sat, 16 Nov 2024 06:20:46 -0500 Subject: [PATCH 40/68] Skip Mocked Plugin Entrypoint Tests --- tests/plugin_helper/shared.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/plugin_helper/shared.py b/tests/plugin_helper/shared.py index d20c53a..d6ecfc3 100644 --- a/tests/plugin_helper/shared.py +++ b/tests/plugin_helper/shared.py @@ -102,6 +102,12 @@ def test_entry_point(self, plugin_type: type[T], plugin_group_name: LiteralStrin plugin_type: The type to register plugin_group_name: The group name for the plugin type """ + + # We only require the entry point to be registered if the plugin is not a Mocked type + + if plugin_type.name() == "mock": + pytest.skip("Mocked plugin type") + types = [] for entry in list(entry_points(group=f"{plugin_group_name}.{plugin_type.group()}")): types.append(entry.load()) From 7cfac1ef177c6a3277aba3fd5f564447364775d9 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Sat, 16 Nov 2024 23:13:11 -0500 Subject: [PATCH 41/68] Add Docs Folder --- .gitignore | 1 + docs/package-lock.json | 1737 ++++++++++++++++++++++++++++++++++++++++ docs/package.json | 5 + tests/conftest.py | 34 +- 4 files changed, 1764 insertions(+), 13 deletions(-) create mode 100644 docs/package-lock.json create mode 100644 docs/package.json diff --git a/.gitignore b/.gitignore index 2e7edb8..7b422ca 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ __pypackages__/ !.vscode/launch.json !.vscode/extensions.json /.mypy_cache +/docs/node_modules diff --git a/docs/package-lock.json b/docs/package-lock.json new file mode 100644 index 0000000..09e16f2 --- /dev/null +++ b/docs/package-lock.json @@ -0,0 +1,1737 @@ +{ + "name": "docs", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "devDependencies": { + "antora": "3.1.9" + } + }, + "node_modules/@antora/asciidoc-loader": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/@antora/asciidoc-loader/-/asciidoc-loader-3.1.9.tgz", + "integrity": "sha512-flE27T2yI8TX7rUNjbBHWN3iR6s+kBuRBbUPncUFcWjx6mXzll8JLiTkxnc8JXHGzgKlveT+t5AkPYGACLfasg==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "@antora/logger": "3.1.9", + "@antora/user-require-helper": "~2.0", + "@asciidoctor/core": "~2.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/cli": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/@antora/cli/-/cli-3.1.9.tgz", + "integrity": "sha512-kCUqWX3G/9Pvf8SWZ45ioHwWdOc9uamy2E5/FFwyGiTeu4ubNbadOauLVvMzSZHUxVDnGxXwCsmmQ2HwM919ew==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "@antora/logger": "3.1.9", + "@antora/playbook-builder": "3.1.9", + "@antora/user-require-helper": "~2.0", + "commander": "~11.1" + }, + "bin": { + "antora": "bin/antora" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/content-aggregator": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/@antora/content-aggregator/-/content-aggregator-3.1.9.tgz", + "integrity": "sha512-g+UzevPSm5c4R0j1U9uysJfdIUfp++QOHIEBmqjhfx/aIEnOL70zA+WF55Mm+syAfzU3877puI27sOp8qtPglw==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "@antora/expand-path-helper": "~2.0", + "@antora/logger": "3.1.9", + "@antora/user-require-helper": "~2.0", + "braces": "~3.0", + "cache-directory": "~2.0", + "fast-glob": "~3.3", + "hpagent": "~1.2", + "isomorphic-git": "~1.25", + "js-yaml": "~4.1", + "multi-progress": "~4.0", + "picomatch": "~4.0", + "progress": "~2.0", + "should-proxy": "~1.0", + "simple-get": "~4.0", + "vinyl": "~3.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/content-classifier": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/@antora/content-classifier/-/content-classifier-3.1.9.tgz", + "integrity": "sha512-PVJqwp5uvZE1PlpeJtb0p6al75fN+fmXGIC6DHcKysRnr0xo+sgz8X2r4mnNWdTWRqum2yVigMmmuXYTg3cJlQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "@antora/asciidoc-loader": "3.1.9", + "@antora/logger": "3.1.9", + "mime-types": "~2.1", + "vinyl": "~3.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/document-converter": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/@antora/document-converter/-/document-converter-3.1.9.tgz", + "integrity": "sha512-pH7tQaIjcPsFdYkaBEAvA/5ki04IQwQGHoR+2jadKdMl6P+J5KA1VzNnMgyIL6gHn7auJIkoOKadfItRB9lHGQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "@antora/asciidoc-loader": "3.1.9" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/expand-path-helper": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@antora/expand-path-helper/-/expand-path-helper-2.0.0.tgz", + "integrity": "sha512-CSMBGC+tI21VS2kGW3PV7T2kQTM5eT3f2GTPVLttwaNYbNxDve08en/huzszHJfxo11CcEs26Ostr0F2c1QqeA==", + "dev": true, + "license": "MPL-2.0", + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/@antora/file-publisher": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/@antora/file-publisher/-/file-publisher-3.1.9.tgz", + "integrity": "sha512-C0VwVjuFbE1CVpZDgwYR1gZCNr1tMw5vueyF9wHZH0KCqAsp9iwo7bwj8wKWMPogxcxdYhnAvtDJnYmYFCuDWQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "@antora/expand-path-helper": "~2.0", + "@antora/user-require-helper": "~2.0", + "vinyl": "~3.0", + "yazl": "~2.5" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/logger": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/@antora/logger/-/logger-3.1.9.tgz", + "integrity": "sha512-MKuANodcX0lfRyiB+Rxl/Kv7UOxc2glzTYFoIoBB7uzxF0A+AhvUJDmpGQFRFN2ihxy99N3nLJmZpDebwXyE+A==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "@antora/expand-path-helper": "~2.0", + "pino": "~9.2", + "pino-pretty": "~11.2", + "sonic-boom": "~4.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/navigation-builder": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/@antora/navigation-builder/-/navigation-builder-3.1.9.tgz", + "integrity": "sha512-zyl2yNjK31Dl6TRJgnoFb4Czwt9ar3wLTycAdMeZ+U/8YcAUHD8z7NCssPFFvZ0BbUr00NP+gbqDmCr6yz32NQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "@antora/asciidoc-loader": "3.1.9" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/page-composer": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/@antora/page-composer/-/page-composer-3.1.9.tgz", + "integrity": "sha512-X6Qj+J5dfFAGXoCAOaA+R6xRp8UoNMDHsRsB1dUTT2QNzk1Lrq6YkYyljdD2cxkWjLVqQ/pQSP+BJVNFGbqDAQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "@antora/logger": "3.1.9", + "handlebars": "~4.7", + "require-from-string": "~2.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/playbook-builder": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/@antora/playbook-builder/-/playbook-builder-3.1.9.tgz", + "integrity": "sha512-MJ/OWz4pReC98nygGTXC5bOL/TDDtCYpSkHFBz2ST4L6tuM8rv9c5+cp//JkwY/QlTOvcuJ0f2xq4a7a5nI7Qw==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "@iarna/toml": "~2.2", + "convict": "~6.2", + "js-yaml": "~4.1", + "json5": "~2.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/redirect-producer": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/@antora/redirect-producer/-/redirect-producer-3.1.9.tgz", + "integrity": "sha512-9OLwoMhqifsBxTebInh/5W16GdDsdj+YkKG3TiCASlAOYsDbuhbeRPFUlyKKSRkMrtKKnFgHR0Z3DNPXYlH2NQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "vinyl": "~3.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/site-generator": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/@antora/site-generator/-/site-generator-3.1.9.tgz", + "integrity": "sha512-YYESPG22tGX1CxRPSAr6acKILCO8JfGkM1OYc7Sw3D7ZvCy1YgZMAaTYK0T5yl9LXg+l/UZi1xq/Ej0qHnYQiw==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "@antora/asciidoc-loader": "3.1.9", + "@antora/content-aggregator": "3.1.9", + "@antora/content-classifier": "3.1.9", + "@antora/document-converter": "3.1.9", + "@antora/file-publisher": "3.1.9", + "@antora/logger": "3.1.9", + "@antora/navigation-builder": "3.1.9", + "@antora/page-composer": "3.1.9", + "@antora/playbook-builder": "3.1.9", + "@antora/redirect-producer": "3.1.9", + "@antora/site-mapper": "3.1.9", + "@antora/site-publisher": "3.1.9", + "@antora/ui-loader": "3.1.9", + "@antora/user-require-helper": "~2.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/site-mapper": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/@antora/site-mapper/-/site-mapper-3.1.9.tgz", + "integrity": "sha512-9FCObL+JIjBoby8z+beu2uuvAtCjm5EsEQt+16gCIMX1ktVP3W3gVsdRSvVcGcVEpizILFhMawkcQknZPUp5mg==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "@antora/content-classifier": "3.1.9", + "vinyl": "~3.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/site-publisher": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/@antora/site-publisher/-/site-publisher-3.1.9.tgz", + "integrity": "sha512-L5To8f4QswZliXu6yB6O7O8CuBbLctjNbxZqP3m0FP7VaOONp85ftzEq1BFEm4BXXSwH1n4ujZx1qGBHP9ooOQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "@antora/file-publisher": "3.1.9" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/ui-loader": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/@antora/ui-loader/-/ui-loader-3.1.9.tgz", + "integrity": "sha512-g0/9dRE5JVMYukIU3x+Rvr41bPdK3sUD2xQIAniRjE6usIZs1mEsTGshVKVEoOqqnSekXE85HVhybjNHsC+qbQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "@antora/expand-path-helper": "~2.0", + "braces": "~3.0", + "cache-directory": "~2.0", + "fast-glob": "~3.3", + "hpagent": "~1.2", + "js-yaml": "~4.1", + "picomatch": "~4.0", + "should-proxy": "~1.0", + "simple-get": "~4.0", + "vinyl": "~3.0", + "yauzl": "~3.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@antora/user-require-helper": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@antora/user-require-helper/-/user-require-helper-2.0.0.tgz", + "integrity": "sha512-5fMfBZfw4zLoFdDAPMQX6Frik90uvfD8rXOA4UpXPOUikkX4uT1Rk6m0/4oi8oS3fcjiIl0k/7Nc+eTxW5TcQQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "@antora/expand-path-helper": "~2.0" + }, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/@asciidoctor/core": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/@asciidoctor/core/-/core-2.2.8.tgz", + "integrity": "sha512-oozXk7ZO1RAd/KLFLkKOhqTcG4GO3CV44WwOFg2gMcCsqCUTarvMT7xERIoWW2WurKbB0/ce+98r01p8xPOlBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "asciidoctor-opal-runtime": "0.3.3", + "unxhr": "1.0.1" + }, + "engines": { + "node": ">=8.11", + "npm": ">=5.0.0", + "yarn": ">=1.1.0" + } + }, + "node_modules/@iarna/toml": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz", + "integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==", + "dev": true, + "license": "ISC" + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "dev": true, + "license": "MIT", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, + "node_modules/antora": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/antora/-/antora-3.1.9.tgz", + "integrity": "sha512-MSNXZQWeM8jKZ9v8Nby4DTMoaMzWo6YnDw3etphFip1E56/prSAgbuJU7hcUoQg1NfOJNhiiseGI6wZR5v4u6g==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "@antora/cli": "3.1.9", + "@antora/site-generator": "3.1.9" + }, + "bin": { + "antora": "bin/antora" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/asciidoctor-opal-runtime": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/asciidoctor-opal-runtime/-/asciidoctor-opal-runtime-0.3.3.tgz", + "integrity": "sha512-/CEVNiOia8E5BMO9FLooo+Kv18K4+4JBFRJp8vUy/N5dMRAg+fRNV4HA+o6aoSC79jVU/aT5XvUpxSxSsTS8FQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "glob": "7.1.3", + "unxhr": "1.0.1" + }, + "engines": { + "node": ">=8.11" + } + }, + "node_modules/async-lock": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/async-lock/-/async-lock-1.4.1.tgz", + "integrity": "sha512-Az2ZTpuytrtqENulXwO3GGv1Bztugx6TT37NIo7imr/Qo0gsYiGtSdBa2B6fsXhTpVZDNfu1Qn3pk531e3q+nQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/atomic-sleep": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz", + "integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/bare-events": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.5.0.tgz", + "integrity": "sha512-/E8dDe9dsbLyh2qrZ64PEPadOQ0F4gbl1sUJOrmph7xOiIxfY8vwab/4bFLh4Y88/Hk/ujKcrQKc+ps0mv873A==", + "dev": true, + "license": "Apache-2.0", + "optional": true + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/cache-directory": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/cache-directory/-/cache-directory-2.0.0.tgz", + "integrity": "sha512-7YKEapH+2Uikde8hySyfobXBqPKULDyHNl/lhKm7cKf/GJFdG/tU/WpLrOg2y9aUrQrWUilYqawFIiGJPS6gDA==", + "dev": true, + "license": "LGPL-3.0+", + "dependencies": { + "xdg-basedir": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/clean-git-ref": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/clean-git-ref/-/clean-git-ref-2.0.1.tgz", + "integrity": "sha512-bLSptAy2P0s6hU4PzuIMKmMJJSE6gLXGH1cntDu7bWJUksvuM+7ReOK61mozULErYvP6a15rnYl0zFDef+pyPw==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha512-au6ydSpg6nsrigcZ4m8Bc9hxjeW+GJ8xh5G3BJCMt4WXe1H10UNaVOamqQTmrx1kjVuxAHIQSNU6hY4Nsn9/ag==", + "dev": true, + "license": "MIT" + }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/commander": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", + "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/convict": { + "version": "6.2.4", + "resolved": "https://registry.npmjs.org/convict/-/convict-6.2.4.tgz", + "integrity": "sha512-qN60BAwdMVdofckX7AlohVJ2x9UvjTNoKVXCL2LxFk1l7757EJqf1nySdMkPQer0bt8kQ5lQiyZ9/2NvrFBuwQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "lodash.clonedeep": "^4.5.0", + "yargs-parser": "^20.2.7" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "crc32": "bin/crc32.njs" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/dateformat": { + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", + "integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/diff3": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/diff3/-/diff3-0.0.3.tgz", + "integrity": "sha512-iSq8ngPOt0K53A6eVr4d5Kn6GNrM2nQZtC740pzIriHtn4pOQ2lyzEXQMBeVcWERN0ye7fhBsk9PbLLQOnUx/g==", + "dev": true, + "license": "MIT" + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/fast-copy": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/fast-copy/-/fast-copy-3.0.2.tgz", + "integrity": "sha512-dl0O9Vhju8IrcLndv2eU4ldt1ftXMqqfgN4H1cpmGV7P6jeB9FwpN9a2c8DPGE1Ys88rNUJVYDHq73CGAGOPfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-fifo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-redact": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.5.0.tgz", + "integrity": "sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/fast-safe-stringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", + "dev": true, + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/help-me": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/help-me/-/help-me-5.0.0.tgz", + "integrity": "sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg==", + "dev": true, + "license": "MIT" + }, + "node_modules/hpagent": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/hpagent/-/hpagent-1.2.0.tgz", + "integrity": "sha512-A91dYTeIB6NoXG+PxTQpCCDDnfHsW9kc06Lvpu1TEe9gnd6ZFeiBoRO9JvzEv6xK7EX97/dUE8g/vBMTqTS3CA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/isomorphic-git": { + "version": "1.25.10", + "resolved": "https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.25.10.tgz", + "integrity": "sha512-IxGiaKBwAdcgBXwIcxJU6rHLk+NrzYaaPKXXQffcA0GW3IUrQXdUPDXDo+hkGVcYruuz/7JlGBiuaeTCgIgivQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "async-lock": "^1.4.1", + "clean-git-ref": "^2.0.1", + "crc-32": "^1.2.0", + "diff3": "0.0.3", + "ignore": "^5.1.4", + "minimisted": "^2.0.0", + "pako": "^1.0.10", + "pify": "^4.0.1", + "readable-stream": "^3.4.0", + "sha.js": "^2.4.9", + "simple-get": "^4.0.1" + }, + "bin": { + "isogit": "cli.cjs" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/joycon": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minimisted": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/minimisted/-/minimisted-2.0.1.tgz", + "integrity": "sha512-1oPjfuLQa2caorJUM8HV8lGgWCc0qqAO1MNv/k05G4qslmsndV/5WdNZrqCiyqiz3wohia2Ij2B7w2Dr7/IyrA==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5" + } + }, + "node_modules/multi-progress": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/multi-progress/-/multi-progress-4.0.0.tgz", + "integrity": "sha512-9zcjyOou3FFCKPXsmkbC3ethv51SFPoA4dJD6TscIp2pUmy26kBDZW6h9XofPELrzseSkuD7r0V+emGEeo39Pg==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "progress": "^2.0.0" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "license": "MIT" + }, + "node_modules/on-exit-leak-free": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz", + "integrity": "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true, + "license": "(MIT AND Zlib)" + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true, + "license": "MIT" + }, + "node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/pino": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/pino/-/pino-9.2.0.tgz", + "integrity": "sha512-g3/hpwfujK5a4oVbaefoJxezLzsDgLcNJeITvC6yrfwYeT9la+edCK42j5QpEQSQCZgTKapXvnQIdgZwvRaZug==", + "dev": true, + "license": "MIT", + "dependencies": { + "atomic-sleep": "^1.0.0", + "fast-redact": "^3.1.1", + "on-exit-leak-free": "^2.1.0", + "pino-abstract-transport": "^1.2.0", + "pino-std-serializers": "^7.0.0", + "process-warning": "^3.0.0", + "quick-format-unescaped": "^4.0.3", + "real-require": "^0.2.0", + "safe-stable-stringify": "^2.3.1", + "sonic-boom": "^4.0.1", + "thread-stream": "^3.0.0" + }, + "bin": { + "pino": "bin.js" + } + }, + "node_modules/pino-abstract-transport": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-1.2.0.tgz", + "integrity": "sha512-Guhh8EZfPCfH+PMXAb6rKOjGQEoy0xlAIn+irODG5kgfYV+BQ0rGYYWTIel3P5mmyXqkYkPmdIkywsn6QKUR1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "readable-stream": "^4.0.0", + "split2": "^4.0.0" + } + }, + "node_modules/pino-abstract-transport/node_modules/readable-stream": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", + "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/pino-pretty": { + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/pino-pretty/-/pino-pretty-11.2.2.tgz", + "integrity": "sha512-2FnyGir8nAJAqD3srROdrF1J5BIcMT4nwj7hHSc60El6Uxlym00UbCCd8pYIterstVBFlMyF1yFV8XdGIPbj4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "colorette": "^2.0.7", + "dateformat": "^4.6.3", + "fast-copy": "^3.0.2", + "fast-safe-stringify": "^2.1.1", + "help-me": "^5.0.0", + "joycon": "^3.1.1", + "minimist": "^1.2.6", + "on-exit-leak-free": "^2.1.0", + "pino-abstract-transport": "^1.0.0", + "pump": "^3.0.0", + "readable-stream": "^4.0.0", + "secure-json-parse": "^2.4.0", + "sonic-boom": "^4.0.1", + "strip-json-comments": "^3.1.1" + }, + "bin": { + "pino-pretty": "bin.js" + } + }, + "node_modules/pino-pretty/node_modules/readable-stream": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", + "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/pino-std-serializers": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-7.0.0.tgz", + "integrity": "sha512-e906FRY0+tV27iq4juKzSYPbUj2do2X2JX4EzSca1631EB2QJQUqGbDuERal7LCtOpxl6x3+nvo9NPZcmjkiFA==", + "dev": true, + "license": "MIT" + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/process-warning": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-3.0.0.tgz", + "integrity": "sha512-mqn0kFRl0EoqhnL0GQ0veqFHyIN1yig9RHh/InzORTUiZHFRAur+aMtRkELNwGs9aNwKS6tg/An4NYBPGwvtzQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/pump": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", + "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", + "dev": true, + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/queue-tick": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", + "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==", + "dev": true, + "license": "MIT" + }, + "node_modules/quick-format-unescaped": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz", + "integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==", + "dev": true, + "license": "MIT" + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/real-require": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz", + "integrity": "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12.13.0" + } + }, + "node_modules/remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==", + "dev": true, + "license": "ISC" + }, + "node_modules/replace-ext": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-2.0.0.tgz", + "integrity": "sha512-UszKE5KVK6JvyD92nzMn9cDapSk6w/CaFZ96CnmDMUqH9oowfxF/ZjRITD25H4DnOQClLA4/j7jLGXXLVKxAug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safe-stable-stringify": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz", + "integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/secure-json-parse": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-2.7.0.tgz", + "integrity": "sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "license": "(MIT AND BSD-3-Clause)", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/should-proxy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/should-proxy/-/should-proxy-1.0.4.tgz", + "integrity": "sha512-RPQhIndEIVUCjkfkQ6rs6sOR6pkxJWCNdxtfG5pP0RVgUYbK5911kLTF0TNcCC0G3YCGd492rMollFT2aTd9iQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "node_modules/sonic-boom": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-4.0.1.tgz", + "integrity": "sha512-hTSD/6JMLyT4r9zeof6UtuBDpjJ9sO08/nmS5djaA9eozT9oOlNdpXSnzcgj4FTqpk3nkLrs61l4gip9r1HCrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "atomic-sleep": "^1.0.0" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 10.x" + } + }, + "node_modules/streamx": { + "version": "2.20.2", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.20.2.tgz", + "integrity": "sha512-aDGDLU+j9tJcUdPGOaHmVF1u/hhI+CsGkT02V3OKlHDV7IukOI+nTWAGkiZEKCO35rWN1wIr4tS7YFr1f4qSvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-fifo": "^1.3.2", + "queue-tick": "^1.0.1", + "text-decoder": "^1.1.0" + }, + "optionalDependencies": { + "bare-events": "^2.2.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/teex": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/teex/-/teex-1.0.1.tgz", + "integrity": "sha512-eYE6iEI62Ni1H8oIa7KlDU6uQBtqr4Eajni3wX7rpfXD8ysFx8z0+dri+KWEPWpBsxXfxu58x/0jvTVT1ekOSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "streamx": "^2.12.5" + } + }, + "node_modules/text-decoder": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.1.tgz", + "integrity": "sha512-x9v3H/lTKIJKQQe7RPQkLfKAnc9lUTkWDypIQgTzPJAq+5/GCDHonmshfvlsNSj58yyshbIJJDLmU15qNERrXQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/thread-stream": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-3.1.0.tgz", + "integrity": "sha512-OqyPZ9u96VohAyMfJykzmivOrY2wfMSf3C5TtFJVgN+Hm6aj+voFhlK+kZEIv2FBh1X6Xp3DlnCOfEQ3B2J86A==", + "dev": true, + "license": "MIT", + "dependencies": { + "real-require": "^0.2.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/uglify-js": { + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", + "dev": true, + "license": "BSD-2-Clause", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/unxhr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unxhr/-/unxhr-1.0.1.tgz", + "integrity": "sha512-MAhukhVHyaLGDjyDYhy8gVjWJyhTECCdNsLwlMoGFoNJ3o79fpQhtQuzmAE4IxCMDwraF4cW8ZjpAV0m9CRQbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.11" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/vinyl": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-3.0.0.tgz", + "integrity": "sha512-rC2VRfAVVCGEgjnxHUnpIVh3AGuk62rP3tqVrn+yab0YH7UULisC085+NYH+mnqf3Wx4SpSi1RQMwudL89N03g==", + "dev": true, + "license": "MIT", + "dependencies": { + "clone": "^2.1.2", + "clone-stats": "^1.0.0", + "remove-trailing-separator": "^1.1.0", + "replace-ext": "^2.0.0", + "teex": "^1.0.1" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/xdg-basedir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", + "integrity": "sha512-1Dly4xqlulvPD3fZUQJLY+FUIeqN3N2MM3uqe4rCJftAvOjFa3jFGfctOgluGx4ahPbUCsZkmJILiP0Vi4T6lQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yauzl": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-3.1.3.tgz", + "integrity": "sha512-JCCdmlJJWv7L0q/KylOekyRaUrdEoUxWkWVcgorosTROCFWiS9p2NNPE9Yb91ak7b1N5SxAZEliWpspbZccivw==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-crc32": "~0.2.3", + "pend": "~1.2.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yazl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.5.1.tgz", + "integrity": "sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-crc32": "~0.2.3" + } + } + } +} diff --git a/docs/package.json b/docs/package.json new file mode 100644 index 0000000..f7b8630 --- /dev/null +++ b/docs/package.json @@ -0,0 +1,5 @@ +{ + "devDependencies": { + "antora": "3.1.9" + } +} diff --git a/tests/conftest.py b/tests/conftest.py index c762c2c..4bc2c26 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -370,7 +370,8 @@ def fixture_cmake_data(request: pytest.FixtureRequest) -> CMakeConfiguration: def pytest_generate_tests(metafunc: pytest.Metafunc) -> None: - """Called for each test function + """Called for each test function. Provides a parametrization of the specified fixtures with the appropriate paths or + lists of paths, allowing pytest to run tests with different sets of data Args: metafunc: Pytest hook data @@ -379,24 +380,31 @@ def pytest_generate_tests(metafunc: pytest.Metafunc) -> None: for fixture in metafunc.fixturenames: match fixture.split("_", 1): case ["internal", "plugin_data_path"]: + # Gathers directories from tests/data from the project's root directory + # There should only ever be one fixture named 'internal_plugin_data_path' for value caching - data_path = metafunc.config.rootpath / "tests" / "data" + plugin_data_path = metafunc.config.rootpath / "tests" / "data" - test_paths: list[Path | None] = [] + plugin_test_paths: list[Path | None] = [] - for path in data_path.glob("*"): - if path.is_dir(): - test_paths.append(path) + for plugin_path in plugin_data_path.glob("*"): + if plugin_path.is_dir(): + plugin_test_paths.append(plugin_path) - if not test_paths: - test_paths = [None] - metafunc.parametrize(fixture, test_paths, scope="session") + if not plugin_test_paths: + plugin_test_paths = [None] + metafunc.parametrize(fixture, plugin_test_paths, scope="session") case ["internal", "data_path"]: + # Gathers directories from tests/data from the package's root directory + # There should only ever be one fixture named 'internal_data_path' for value caching - data_path = Path(__file__).parent / "data" - metafunc.parametrize(fixture, list(data_path.glob("*")), scope="session") + internal_data_path = Path(__file__).parent / "data" + metafunc.parametrize(fixture, list(internal_data_path.glob("*")), scope="session") case ["build", directory]: - data_path = metafunc.config.rootpath / "tests" / "build" / directory - metafunc.parametrize(fixture, [data_path], scope="session") + + # Parameterizes the paths under tests/build/ where is the fixture suffix + + build_data_path = metafunc.config.rootpath / "tests" / "build" / directory + metafunc.parametrize(fixture, [build_data_path], scope="session") From 199f05ce0dcd4f375ab1cf1be32363c2d4d6ae4e Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Sat, 16 Nov 2024 23:22:03 -0500 Subject: [PATCH 42/68] Yas --- .gitignore | 7 ++++--- docs/antora-playbook.yml | 6 ++++++ docs/modules/ROOT/pages/index.adoc | 1 + 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 docs/antora-playbook.yml create mode 100644 docs/modules/ROOT/pages/index.adoc diff --git a/.gitignore b/.gitignore index 7b422ca..127fb2c 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ __pypackages__/ !.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json -!.vscode/extensions.json -/.mypy_cache -/docs/node_modules +!.vscode/extensions.json +/.mypy_cache +/docs/node_modules +/docs/build \ No newline at end of file diff --git a/docs/antora-playbook.yml b/docs/antora-playbook.yml new file mode 100644 index 0000000..4019d61 --- /dev/null +++ b/docs/antora-playbook.yml @@ -0,0 +1,6 @@ +site: + title: CPPython + start_page: cppython::index.adoc +ui: + bundle: + url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/master/raw/build/ui-bundle.zip?job=bundle-stable diff --git a/docs/modules/ROOT/pages/index.adoc b/docs/modules/ROOT/pages/index.adoc new file mode 100644 index 0000000..2120a3c --- /dev/null +++ b/docs/modules/ROOT/pages/index.adoc @@ -0,0 +1 @@ += CPPython Website \ No newline at end of file From 7b69588fded5f76ea6a3ffbabbf6c684b6cd39ff Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Sun, 17 Nov 2024 02:45:59 -0500 Subject: [PATCH 43/68] ya --- docs/antora.yml | 5 +++++ docs/modules/ROOT/nav.adoc | 1 + docs/modules/ROOT/pages/new-page.adoc | 0 3 files changed, 6 insertions(+) create mode 100644 docs/antora.yml create mode 100644 docs/modules/ROOT/nav.adoc create mode 100644 docs/modules/ROOT/pages/new-page.adoc diff --git a/docs/antora.yml b/docs/antora.yml new file mode 100644 index 0000000..2212372 --- /dev/null +++ b/docs/antora.yml @@ -0,0 +1,5 @@ +name: cppython +version: 0.1.0 +title: CPPython +nav: + - modules/ROOT/nav.adoc diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc new file mode 100644 index 0000000..d7f056b --- /dev/null +++ b/docs/modules/ROOT/nav.adoc @@ -0,0 +1 @@ +* xref:new-page.adoc[] \ No newline at end of file diff --git a/docs/modules/ROOT/pages/new-page.adoc b/docs/modules/ROOT/pages/new-page.adoc new file mode 100644 index 0000000..e69de29 From 283f54eb319ad3cd783b576292efbee627160570 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Mon, 18 Nov 2024 00:26:10 -0500 Subject: [PATCH 44/68] Update pdm.lock --- pdm.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pdm.lock b/pdm.lock index fba198c..0da5483 100644 --- a/pdm.lock +++ b/pdm.lock @@ -231,7 +231,7 @@ files = [ [[package]] name = "dulwich" -version = "0.22.5" +version = "0.22.6" requires_python = ">=3.9" summary = "Python Git Library" groups = ["git"] @@ -239,14 +239,14 @@ dependencies = [ "urllib3>=1.25", ] files = [ - {file = "dulwich-0.22.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0d2ff25da411862194065fae2fae2bfe3246d60dc03d1c67369f6dd20ba88c6a"}, - {file = "dulwich-0.22.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d24b40c011d3f7efe3e83f786a20b9021c8709c5456823415d50a5f7b08eb0c7"}, - {file = "dulwich-0.22.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b32f901704a18a87587f6a2e3655cfaacebfbdea4b5e2a0f5908aea3d6c34d0d"}, - {file = "dulwich-0.22.5-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:81f87e7ff2954bcbd5e520bcbee882810bf10667cf780d6ea93c87f758b273c6"}, - {file = "dulwich-0.22.5-cp313-cp313-win32.whl", hash = "sha256:74b615facfbe2385e4ed2166e109c83db2c93056740618b94e4d612354dbe50d"}, - {file = "dulwich-0.22.5-cp313-cp313-win_amd64.whl", hash = "sha256:2de0440ea2c372e86e907900684c36b99d55dce805069bf345fbdbcfc3f6e419"}, - {file = "dulwich-0.22.5-py3-none-any.whl", hash = "sha256:7728938fd90e171b8e9429ec6689626a84ae50817606098f05405002f1958066"}, - {file = "dulwich-0.22.5.tar.gz", hash = "sha256:15af5feeaaf8fc89f26abc0d9a1518785b66f1801c3101506400775f2da921d4"}, + {file = "dulwich-0.22.6-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:dff11fe1ecd6f9d915b490c660456a467c9150404de5100b3cf112c6bd5c830d"}, + {file = "dulwich-0.22.6-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f9e75774fe5f219490912931bb8d91a12ec5cc7155f377fd88088fe0f035e1b8"}, + {file = "dulwich-0.22.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eb5f8ff0eb0d6759cebd13cb9e6d7029af5d87f89074bd1a702c7a0943a33d6e"}, + {file = "dulwich-0.22.6-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:096a9fe8754bce136e128b7161fca30ff1b2e5859f2324a7e2c8270dcb2ba672"}, + {file = "dulwich-0.22.6-cp313-cp313-win32.whl", hash = "sha256:115920aff5756cdf02900504fe3c9b941f2f41fab5cea2670130783f02e0ae2c"}, + {file = "dulwich-0.22.6-cp313-cp313-win_amd64.whl", hash = "sha256:4b84f9a849d64201a8e5cde024bbbf9c56d3138f284eb5cc1a937ee3503f18b0"}, + {file = "dulwich-0.22.6-py3-none-any.whl", hash = "sha256:a609c1939b8050c9876d0dd2b15302fef695759f479613c20025fbd4ece32bda"}, + {file = "dulwich-0.22.6.tar.gz", hash = "sha256:c1f44d599fa5dc59ca43e0789f835b8689b4d831d8de5ae009c442192a1408b5"}, ] [[package]] From 74438bc598561ed9c11c3a211f588e41084f9fe2 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Mon, 18 Nov 2024 00:27:45 -0500 Subject: [PATCH 45/68] Update extensions.json --- .vscode/extensions.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 2a98eef..493d170 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -2,6 +2,7 @@ "recommendations": [ "ms-python.mypy-type-checker", "ms-python.pylint", - "ms-python.black-formatter" + "ms-python.black-formatter", + "asciidoctor.asciidoctor-vscode" ] } \ No newline at end of file From 025bd4b9a8a7b057ef8bfc0bee1504888913cb6a Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Mon, 18 Nov 2024 01:43:37 -0500 Subject: [PATCH 46/68] Update Scripts --- .gitignore | 4 +- docs/package-lock.json | 237 +++++++++++++++++++++ docs/package.json | 9 +- docs/{antora-playbook.yml => playbook.yml} | 7 + pyproject.toml | 8 + 5 files changed, 262 insertions(+), 3 deletions(-) rename docs/{antora-playbook.yml => playbook.yml} (58%) diff --git a/.gitignore b/.gitignore index 127fb2c..416d732 100644 --- a/.gitignore +++ b/.gitignore @@ -25,5 +25,5 @@ __pypackages__/ !.vscode/launch.json !.vscode/extensions.json /.mypy_cache -/docs/node_modules -/docs/build \ No newline at end of file +node_modules/ +build/ \ No newline at end of file diff --git a/docs/package-lock.json b/docs/package-lock.json index 09e16f2..33a3b4d 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -4,7 +4,11 @@ "requires": true, "packages": { "": { + "dependencies": { + "@antora/lunr-extension": "^1.0.0-alpha.8" + }, "devDependencies": { + "@antora/cli": "3.1.9", "antora": "3.1.9" } }, @@ -140,6 +144,24 @@ "node": ">=16.0.0" } }, + "node_modules/@antora/lunr-extension": { + "version": "1.0.0-alpha.8", + "resolved": "https://registry.npmjs.org/@antora/lunr-extension/-/lunr-extension-1.0.0-alpha.8.tgz", + "integrity": "sha512-vdBgW3rsvbnmA236kT2Dckh9n0Db5za2/WxiLnFLgZ05ZO1KJQa9+R2WHaIFuGE7bKKbY+lqfM/i3KiezbL9YQ==", + "license": "MPL-2.0", + "workspaces": [ + "." + ], + "dependencies": { + "cheerio": "1.0.0-rc.10", + "html-entities": "~2.3", + "lunr": "~2.3", + "lunr-languages": "~1.9" + }, + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/@antora/navigation-builder": { "version": "3.1.9", "resolved": "https://registry.npmjs.org/@antora/navigation-builder/-/navigation-builder-3.1.9.tgz", @@ -451,6 +473,12 @@ ], "license": "MIT" }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", + "license": "ISC" + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -523,6 +551,43 @@ "node": ">=4" } }, + "node_modules/cheerio": { + "version": "1.0.0-rc.10", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.10.tgz", + "integrity": "sha512-g0J0q/O6mW8z5zxQ3A8E8J1hUgp4SMOvEoW/x84OwyHKe/Zccz83PVT4y5Crcr530FV6NgmKI1qvGTKVl9XXVw==", + "license": "MIT", + "dependencies": { + "cheerio-select": "^1.5.0", + "dom-serializer": "^1.3.2", + "domhandler": "^4.2.0", + "htmlparser2": "^6.1.0", + "parse5": "^6.0.1", + "parse5-htmlparser2-tree-adapter": "^6.0.1", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/cheeriojs/cheerio?sponsor=1" + } + }, + "node_modules/cheerio-select": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-1.6.0.tgz", + "integrity": "sha512-eq0GdBvxVFbqWgmCm7M3XGs1I8oLy/nExUnh6oLqmBditPO9AqQJrkslDpMun/hZ0yyTs8L0m85OHp4ho6Qm9g==", + "license": "BSD-2-Clause", + "dependencies": { + "css-select": "^4.3.0", + "css-what": "^6.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.3.1", + "domutils": "^2.8.0" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, "node_modules/clean-git-ref": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/clean-git-ref/-/clean-git-ref-2.0.1.tgz", @@ -598,6 +663,34 @@ "node": ">=0.8" } }, + "node_modules/css-select": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz", + "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==", + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.0.1", + "domhandler": "^4.3.1", + "domutils": "^2.8.0", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-what": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "license": "BSD-2-Clause", + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, "node_modules/dateformat": { "version": "4.6.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", @@ -631,6 +724,61 @@ "dev": true, "license": "MIT" }, + "node_modules/dom-serializer": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", + "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", + "license": "MIT", + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "BSD-2-Clause" + }, + "node_modules/domhandler": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", + "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", + "license": "BSD-2-Clause", + "dependencies": { + "domelementtype": "^2.2.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", + "license": "BSD-2-Clause", + "dependencies": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, "node_modules/end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", @@ -641,6 +789,15 @@ "once": "^1.4.0" } }, + "node_modules/entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "license": "BSD-2-Clause", + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/event-target-shim": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", @@ -810,6 +967,41 @@ "node": ">=14" } }, + "node_modules/html-entities": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.3.6.tgz", + "integrity": "sha512-9o0+dcpIw2/HxkNuYKxSJUF/MMRZQECK4GnF+oQOmJ83yCVHTWgCH5aOXxK5bozNRmM8wtgryjHD3uloPBDEGw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/mdevils" + }, + { + "type": "patreon", + "url": "https://patreon.com/mdevils" + } + ], + "license": "MIT" + }, + "node_modules/htmlparser2": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", + "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "MIT", + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", + "domutils": "^2.5.2", + "entities": "^2.0.0" + } + }, "node_modules/ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -962,6 +1154,18 @@ "dev": true, "license": "MIT" }, + "node_modules/lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "license": "MIT" + }, + "node_modules/lunr-languages": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/lunr-languages/-/lunr-languages-1.9.0.tgz", + "integrity": "sha512-Be5vFuc8NAheOIjviCRms3ZqFFBlzns3u9DXpPSZvALetgnydAN0poV71pVLFn0keYy/s4VblMMkqewTLe+KPg==", + "license": "MPL-1.1" + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -1085,6 +1289,18 @@ "dev": true, "license": "MIT" }, + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, "node_modules/on-exit-leak-free": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz", @@ -1112,6 +1328,21 @@ "dev": true, "license": "(MIT AND Zlib)" }, + "node_modules/parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", + "license": "MIT" + }, + "node_modules/parse5-htmlparser2-tree-adapter": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", + "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", + "license": "MIT", + "dependencies": { + "parse5": "^6.0.1" + } + }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -1627,6 +1858,12 @@ "node": ">=8.0" } }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/uglify-js": { "version": "3.19.3", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", diff --git a/docs/package.json b/docs/package.json index f7b8630..723dcee 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,5 +1,12 @@ { "devDependencies": { + "@antora/cli": "3.1.9", "antora": "3.1.9" + }, + "scripts": { + "generate": "antora playbook.yml" + }, + "dependencies": { + "@antora/lunr-extension": "^1.0.0-alpha.8" } -} +} \ No newline at end of file diff --git a/docs/antora-playbook.yml b/docs/playbook.yml similarity index 58% rename from docs/antora-playbook.yml rename to docs/playbook.yml index 4019d61..2125cb2 100644 --- a/docs/antora-playbook.yml +++ b/docs/playbook.yml @@ -4,3 +4,10 @@ site: ui: bundle: url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/master/raw/build/ui-bundle.zip?job=bundle-stable +antora: + extensions: + - require: '@antora/lunr-extension' + index_latest_only: true +output: + dir: ./dist + clean: true \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index ef124a5..b951e8a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -110,6 +110,14 @@ source = "scm" [tool.pdm.scripts] analyze = {shell = "pylint --verbose cppython tests"} +install-docs.cmd = "npm install" +install-docs.working_dir = "docs" + +build-docs.cmd = "npm run generate" +build-docs.working_dir = "docs" + +docs = {composite = ["install-docs", "build-docs"]} + format = {shell = "black --check --verbose ."} lint = {composite = ["analyze", "format", "sort-imports", "type-check"]} sort-imports = {shell = "isort --check-only --diff --verbose ."} From dc041a31fcbd8df211a7a78d7fe1a7a697b5a6a6 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Mon, 18 Nov 2024 02:26:44 -0500 Subject: [PATCH 47/68] Remove Playbook --- docs/package-lock.json | 1974 ---------------------------------------- docs/package.json | 12 - docs/playbook.yml | 13 - pyproject.toml | 8 - 4 files changed, 2007 deletions(-) delete mode 100644 docs/package-lock.json delete mode 100644 docs/package.json delete mode 100644 docs/playbook.yml diff --git a/docs/package-lock.json b/docs/package-lock.json deleted file mode 100644 index 33a3b4d..0000000 --- a/docs/package-lock.json +++ /dev/null @@ -1,1974 +0,0 @@ -{ - "name": "docs", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "dependencies": { - "@antora/lunr-extension": "^1.0.0-alpha.8" - }, - "devDependencies": { - "@antora/cli": "3.1.9", - "antora": "3.1.9" - } - }, - "node_modules/@antora/asciidoc-loader": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/@antora/asciidoc-loader/-/asciidoc-loader-3.1.9.tgz", - "integrity": "sha512-flE27T2yI8TX7rUNjbBHWN3iR6s+kBuRBbUPncUFcWjx6mXzll8JLiTkxnc8JXHGzgKlveT+t5AkPYGACLfasg==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "@antora/logger": "3.1.9", - "@antora/user-require-helper": "~2.0", - "@asciidoctor/core": "~2.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@antora/cli": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/@antora/cli/-/cli-3.1.9.tgz", - "integrity": "sha512-kCUqWX3G/9Pvf8SWZ45ioHwWdOc9uamy2E5/FFwyGiTeu4ubNbadOauLVvMzSZHUxVDnGxXwCsmmQ2HwM919ew==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "@antora/logger": "3.1.9", - "@antora/playbook-builder": "3.1.9", - "@antora/user-require-helper": "~2.0", - "commander": "~11.1" - }, - "bin": { - "antora": "bin/antora" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@antora/content-aggregator": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/@antora/content-aggregator/-/content-aggregator-3.1.9.tgz", - "integrity": "sha512-g+UzevPSm5c4R0j1U9uysJfdIUfp++QOHIEBmqjhfx/aIEnOL70zA+WF55Mm+syAfzU3877puI27sOp8qtPglw==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "@antora/expand-path-helper": "~2.0", - "@antora/logger": "3.1.9", - "@antora/user-require-helper": "~2.0", - "braces": "~3.0", - "cache-directory": "~2.0", - "fast-glob": "~3.3", - "hpagent": "~1.2", - "isomorphic-git": "~1.25", - "js-yaml": "~4.1", - "multi-progress": "~4.0", - "picomatch": "~4.0", - "progress": "~2.0", - "should-proxy": "~1.0", - "simple-get": "~4.0", - "vinyl": "~3.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@antora/content-classifier": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/@antora/content-classifier/-/content-classifier-3.1.9.tgz", - "integrity": "sha512-PVJqwp5uvZE1PlpeJtb0p6al75fN+fmXGIC6DHcKysRnr0xo+sgz8X2r4mnNWdTWRqum2yVigMmmuXYTg3cJlQ==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "@antora/asciidoc-loader": "3.1.9", - "@antora/logger": "3.1.9", - "mime-types": "~2.1", - "vinyl": "~3.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@antora/document-converter": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/@antora/document-converter/-/document-converter-3.1.9.tgz", - "integrity": "sha512-pH7tQaIjcPsFdYkaBEAvA/5ki04IQwQGHoR+2jadKdMl6P+J5KA1VzNnMgyIL6gHn7auJIkoOKadfItRB9lHGQ==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "@antora/asciidoc-loader": "3.1.9" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@antora/expand-path-helper": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@antora/expand-path-helper/-/expand-path-helper-2.0.0.tgz", - "integrity": "sha512-CSMBGC+tI21VS2kGW3PV7T2kQTM5eT3f2GTPVLttwaNYbNxDve08en/huzszHJfxo11CcEs26Ostr0F2c1QqeA==", - "dev": true, - "license": "MPL-2.0", - "engines": { - "node": ">=10.17.0" - } - }, - "node_modules/@antora/file-publisher": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/@antora/file-publisher/-/file-publisher-3.1.9.tgz", - "integrity": "sha512-C0VwVjuFbE1CVpZDgwYR1gZCNr1tMw5vueyF9wHZH0KCqAsp9iwo7bwj8wKWMPogxcxdYhnAvtDJnYmYFCuDWQ==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "@antora/expand-path-helper": "~2.0", - "@antora/user-require-helper": "~2.0", - "vinyl": "~3.0", - "yazl": "~2.5" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@antora/logger": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/@antora/logger/-/logger-3.1.9.tgz", - "integrity": "sha512-MKuANodcX0lfRyiB+Rxl/Kv7UOxc2glzTYFoIoBB7uzxF0A+AhvUJDmpGQFRFN2ihxy99N3nLJmZpDebwXyE+A==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "@antora/expand-path-helper": "~2.0", - "pino": "~9.2", - "pino-pretty": "~11.2", - "sonic-boom": "~4.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@antora/lunr-extension": { - "version": "1.0.0-alpha.8", - "resolved": "https://registry.npmjs.org/@antora/lunr-extension/-/lunr-extension-1.0.0-alpha.8.tgz", - "integrity": "sha512-vdBgW3rsvbnmA236kT2Dckh9n0Db5za2/WxiLnFLgZ05ZO1KJQa9+R2WHaIFuGE7bKKbY+lqfM/i3KiezbL9YQ==", - "license": "MPL-2.0", - "workspaces": [ - "." - ], - "dependencies": { - "cheerio": "1.0.0-rc.10", - "html-entities": "~2.3", - "lunr": "~2.3", - "lunr-languages": "~1.9" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@antora/navigation-builder": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/@antora/navigation-builder/-/navigation-builder-3.1.9.tgz", - "integrity": "sha512-zyl2yNjK31Dl6TRJgnoFb4Czwt9ar3wLTycAdMeZ+U/8YcAUHD8z7NCssPFFvZ0BbUr00NP+gbqDmCr6yz32NQ==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "@antora/asciidoc-loader": "3.1.9" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@antora/page-composer": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/@antora/page-composer/-/page-composer-3.1.9.tgz", - "integrity": "sha512-X6Qj+J5dfFAGXoCAOaA+R6xRp8UoNMDHsRsB1dUTT2QNzk1Lrq6YkYyljdD2cxkWjLVqQ/pQSP+BJVNFGbqDAQ==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "@antora/logger": "3.1.9", - "handlebars": "~4.7", - "require-from-string": "~2.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@antora/playbook-builder": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/@antora/playbook-builder/-/playbook-builder-3.1.9.tgz", - "integrity": "sha512-MJ/OWz4pReC98nygGTXC5bOL/TDDtCYpSkHFBz2ST4L6tuM8rv9c5+cp//JkwY/QlTOvcuJ0f2xq4a7a5nI7Qw==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "@iarna/toml": "~2.2", - "convict": "~6.2", - "js-yaml": "~4.1", - "json5": "~2.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@antora/redirect-producer": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/@antora/redirect-producer/-/redirect-producer-3.1.9.tgz", - "integrity": "sha512-9OLwoMhqifsBxTebInh/5W16GdDsdj+YkKG3TiCASlAOYsDbuhbeRPFUlyKKSRkMrtKKnFgHR0Z3DNPXYlH2NQ==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "vinyl": "~3.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@antora/site-generator": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/@antora/site-generator/-/site-generator-3.1.9.tgz", - "integrity": "sha512-YYESPG22tGX1CxRPSAr6acKILCO8JfGkM1OYc7Sw3D7ZvCy1YgZMAaTYK0T5yl9LXg+l/UZi1xq/Ej0qHnYQiw==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "@antora/asciidoc-loader": "3.1.9", - "@antora/content-aggregator": "3.1.9", - "@antora/content-classifier": "3.1.9", - "@antora/document-converter": "3.1.9", - "@antora/file-publisher": "3.1.9", - "@antora/logger": "3.1.9", - "@antora/navigation-builder": "3.1.9", - "@antora/page-composer": "3.1.9", - "@antora/playbook-builder": "3.1.9", - "@antora/redirect-producer": "3.1.9", - "@antora/site-mapper": "3.1.9", - "@antora/site-publisher": "3.1.9", - "@antora/ui-loader": "3.1.9", - "@antora/user-require-helper": "~2.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@antora/site-mapper": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/@antora/site-mapper/-/site-mapper-3.1.9.tgz", - "integrity": "sha512-9FCObL+JIjBoby8z+beu2uuvAtCjm5EsEQt+16gCIMX1ktVP3W3gVsdRSvVcGcVEpizILFhMawkcQknZPUp5mg==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "@antora/content-classifier": "3.1.9", - "vinyl": "~3.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@antora/site-publisher": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/@antora/site-publisher/-/site-publisher-3.1.9.tgz", - "integrity": "sha512-L5To8f4QswZliXu6yB6O7O8CuBbLctjNbxZqP3m0FP7VaOONp85ftzEq1BFEm4BXXSwH1n4ujZx1qGBHP9ooOQ==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "@antora/file-publisher": "3.1.9" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@antora/ui-loader": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/@antora/ui-loader/-/ui-loader-3.1.9.tgz", - "integrity": "sha512-g0/9dRE5JVMYukIU3x+Rvr41bPdK3sUD2xQIAniRjE6usIZs1mEsTGshVKVEoOqqnSekXE85HVhybjNHsC+qbQ==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "@antora/expand-path-helper": "~2.0", - "braces": "~3.0", - "cache-directory": "~2.0", - "fast-glob": "~3.3", - "hpagent": "~1.2", - "js-yaml": "~4.1", - "picomatch": "~4.0", - "should-proxy": "~1.0", - "simple-get": "~4.0", - "vinyl": "~3.0", - "yauzl": "~3.1" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@antora/user-require-helper": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@antora/user-require-helper/-/user-require-helper-2.0.0.tgz", - "integrity": "sha512-5fMfBZfw4zLoFdDAPMQX6Frik90uvfD8rXOA4UpXPOUikkX4uT1Rk6m0/4oi8oS3fcjiIl0k/7Nc+eTxW5TcQQ==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "@antora/expand-path-helper": "~2.0" - }, - "engines": { - "node": ">=10.17.0" - } - }, - "node_modules/@asciidoctor/core": { - "version": "2.2.8", - "resolved": "https://registry.npmjs.org/@asciidoctor/core/-/core-2.2.8.tgz", - "integrity": "sha512-oozXk7ZO1RAd/KLFLkKOhqTcG4GO3CV44WwOFg2gMcCsqCUTarvMT7xERIoWW2WurKbB0/ce+98r01p8xPOlBw==", - "dev": true, - "license": "MIT", - "dependencies": { - "asciidoctor-opal-runtime": "0.3.3", - "unxhr": "1.0.1" - }, - "engines": { - "node": ">=8.11", - "npm": ">=5.0.0", - "yarn": ">=1.1.0" - } - }, - "node_modules/@iarna/toml": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz", - "integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==", - "dev": true, - "license": "ISC" - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/abort-controller": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", - "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", - "dev": true, - "license": "MIT", - "dependencies": { - "event-target-shim": "^5.0.0" - }, - "engines": { - "node": ">=6.5" - } - }, - "node_modules/antora": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/antora/-/antora-3.1.9.tgz", - "integrity": "sha512-MSNXZQWeM8jKZ9v8Nby4DTMoaMzWo6YnDw3etphFip1E56/prSAgbuJU7hcUoQg1NfOJNhiiseGI6wZR5v4u6g==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "@antora/cli": "3.1.9", - "@antora/site-generator": "3.1.9" - }, - "bin": { - "antora": "bin/antora" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/asciidoctor-opal-runtime": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/asciidoctor-opal-runtime/-/asciidoctor-opal-runtime-0.3.3.tgz", - "integrity": "sha512-/CEVNiOia8E5BMO9FLooo+Kv18K4+4JBFRJp8vUy/N5dMRAg+fRNV4HA+o6aoSC79jVU/aT5XvUpxSxSsTS8FQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "glob": "7.1.3", - "unxhr": "1.0.1" - }, - "engines": { - "node": ">=8.11" - } - }, - "node_modules/async-lock": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/async-lock/-/async-lock-1.4.1.tgz", - "integrity": "sha512-Az2ZTpuytrtqENulXwO3GGv1Bztugx6TT37NIo7imr/Qo0gsYiGtSdBa2B6fsXhTpVZDNfu1Qn3pk531e3q+nQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/atomic-sleep": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz", - "integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/bare-events": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.5.0.tgz", - "integrity": "sha512-/E8dDe9dsbLyh2qrZ64PEPadOQ0F4gbl1sUJOrmph7xOiIxfY8vwab/4bFLh4Y88/Hk/ujKcrQKc+ps0mv873A==", - "dev": true, - "license": "Apache-2.0", - "optional": true - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", - "license": "ISC" - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "node_modules/buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/cache-directory": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/cache-directory/-/cache-directory-2.0.0.tgz", - "integrity": "sha512-7YKEapH+2Uikde8hySyfobXBqPKULDyHNl/lhKm7cKf/GJFdG/tU/WpLrOg2y9aUrQrWUilYqawFIiGJPS6gDA==", - "dev": true, - "license": "LGPL-3.0+", - "dependencies": { - "xdg-basedir": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/cheerio": { - "version": "1.0.0-rc.10", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.10.tgz", - "integrity": "sha512-g0J0q/O6mW8z5zxQ3A8E8J1hUgp4SMOvEoW/x84OwyHKe/Zccz83PVT4y5Crcr530FV6NgmKI1qvGTKVl9XXVw==", - "license": "MIT", - "dependencies": { - "cheerio-select": "^1.5.0", - "dom-serializer": "^1.3.2", - "domhandler": "^4.2.0", - "htmlparser2": "^6.1.0", - "parse5": "^6.0.1", - "parse5-htmlparser2-tree-adapter": "^6.0.1", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/cheeriojs/cheerio?sponsor=1" - } - }, - "node_modules/cheerio-select": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-1.6.0.tgz", - "integrity": "sha512-eq0GdBvxVFbqWgmCm7M3XGs1I8oLy/nExUnh6oLqmBditPO9AqQJrkslDpMun/hZ0yyTs8L0m85OHp4ho6Qm9g==", - "license": "BSD-2-Clause", - "dependencies": { - "css-select": "^4.3.0", - "css-what": "^6.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.3.1", - "domutils": "^2.8.0" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/clean-git-ref": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/clean-git-ref/-/clean-git-ref-2.0.1.tgz", - "integrity": "sha512-bLSptAy2P0s6hU4PzuIMKmMJJSE6gLXGH1cntDu7bWJUksvuM+7ReOK61mozULErYvP6a15rnYl0zFDef+pyPw==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/clone-stats": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", - "integrity": "sha512-au6ydSpg6nsrigcZ4m8Bc9hxjeW+GJ8xh5G3BJCMt4WXe1H10UNaVOamqQTmrx1kjVuxAHIQSNU6hY4Nsn9/ag==", - "dev": true, - "license": "MIT" - }, - "node_modules/colorette": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", - "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", - "dev": true, - "license": "MIT" - }, - "node_modules/commander": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", - "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, - "node_modules/convict": { - "version": "6.2.4", - "resolved": "https://registry.npmjs.org/convict/-/convict-6.2.4.tgz", - "integrity": "sha512-qN60BAwdMVdofckX7AlohVJ2x9UvjTNoKVXCL2LxFk1l7757EJqf1nySdMkPQer0bt8kQ5lQiyZ9/2NvrFBuwQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "lodash.clonedeep": "^4.5.0", - "yargs-parser": "^20.2.7" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/crc-32": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", - "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "crc32": "bin/crc32.njs" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/css-select": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz", - "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==", - "license": "BSD-2-Clause", - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^6.0.1", - "domhandler": "^4.3.1", - "domutils": "^2.8.0", - "nth-check": "^2.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/css-what": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", - "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", - "license": "BSD-2-Clause", - "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/dateformat": { - "version": "4.6.3", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", - "integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-response": "^3.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/diff3": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/diff3/-/diff3-0.0.3.tgz", - "integrity": "sha512-iSq8ngPOt0K53A6eVr4d5Kn6GNrM2nQZtC740pzIriHtn4pOQ2lyzEXQMBeVcWERN0ye7fhBsk9PbLLQOnUx/g==", - "dev": true, - "license": "MIT" - }, - "node_modules/dom-serializer": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", - "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", - "license": "MIT", - "dependencies": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.0", - "entities": "^2.0.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "BSD-2-Clause" - }, - "node_modules/domhandler": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", - "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", - "license": "BSD-2-Clause", - "dependencies": { - "domelementtype": "^2.2.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/domutils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", - "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", - "license": "BSD-2-Clause", - "dependencies": { - "dom-serializer": "^1.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", - "license": "BSD-2-Clause", - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.x" - } - }, - "node_modules/fast-copy": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/fast-copy/-/fast-copy-3.0.2.tgz", - "integrity": "sha512-dl0O9Vhju8IrcLndv2eU4ldt1ftXMqqfgN4H1cpmGV7P6jeB9FwpN9a2c8DPGE1Ys88rNUJVYDHq73CGAGOPfQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-fifo": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", - "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-redact": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.5.0.tgz", - "integrity": "sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/fast-safe-stringify": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", - "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", - "dev": true, - "license": "MIT" - }, - "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, - "license": "ISC" - }, - "node_modules/glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/handlebars": { - "version": "4.7.8", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", - "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.5", - "neo-async": "^2.6.2", - "source-map": "^0.6.1", - "wordwrap": "^1.0.0" - }, - "bin": { - "handlebars": "bin/handlebars" - }, - "engines": { - "node": ">=0.4.7" - }, - "optionalDependencies": { - "uglify-js": "^3.1.4" - } - }, - "node_modules/help-me": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/help-me/-/help-me-5.0.0.tgz", - "integrity": "sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg==", - "dev": true, - "license": "MIT" - }, - "node_modules/hpagent": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/hpagent/-/hpagent-1.2.0.tgz", - "integrity": "sha512-A91dYTeIB6NoXG+PxTQpCCDDnfHsW9kc06Lvpu1TEe9gnd6ZFeiBoRO9JvzEv6xK7EX97/dUE8g/vBMTqTS3CA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14" - } - }, - "node_modules/html-entities": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.3.6.tgz", - "integrity": "sha512-9o0+dcpIw2/HxkNuYKxSJUF/MMRZQECK4GnF+oQOmJ83yCVHTWgCH5aOXxK5bozNRmM8wtgryjHD3uloPBDEGw==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/mdevils" - }, - { - "type": "patreon", - "url": "https://patreon.com/mdevils" - } - ], - "license": "MIT" - }, - "node_modules/htmlparser2": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", - "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "MIT", - "dependencies": { - "domelementtype": "^2.0.1", - "domhandler": "^4.0.0", - "domutils": "^2.5.2", - "entities": "^2.0.0" - } - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/isomorphic-git": { - "version": "1.25.10", - "resolved": "https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.25.10.tgz", - "integrity": "sha512-IxGiaKBwAdcgBXwIcxJU6rHLk+NrzYaaPKXXQffcA0GW3IUrQXdUPDXDo+hkGVcYruuz/7JlGBiuaeTCgIgivQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "async-lock": "^1.4.1", - "clean-git-ref": "^2.0.1", - "crc-32": "^1.2.0", - "diff3": "0.0.3", - "ignore": "^5.1.4", - "minimisted": "^2.0.0", - "pako": "^1.0.10", - "pify": "^4.0.1", - "readable-stream": "^3.4.0", - "sha.js": "^2.4.9", - "simple-get": "^4.0.1" - }, - "bin": { - "isogit": "cli.cjs" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/joycon": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", - "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/lunr": { - "version": "2.3.9", - "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", - "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", - "license": "MIT" - }, - "node_modules/lunr-languages": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/lunr-languages/-/lunr-languages-1.9.0.tgz", - "integrity": "sha512-Be5vFuc8NAheOIjviCRms3ZqFFBlzns3u9DXpPSZvALetgnydAN0poV71pVLFn0keYy/s4VblMMkqewTLe+KPg==", - "license": "MPL-1.1" - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/micromatch/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/minimisted": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/minimisted/-/minimisted-2.0.1.tgz", - "integrity": "sha512-1oPjfuLQa2caorJUM8HV8lGgWCc0qqAO1MNv/k05G4qslmsndV/5WdNZrqCiyqiz3wohia2Ij2B7w2Dr7/IyrA==", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.5" - } - }, - "node_modules/multi-progress": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/multi-progress/-/multi-progress-4.0.0.tgz", - "integrity": "sha512-9zcjyOou3FFCKPXsmkbC3ethv51SFPoA4dJD6TscIp2pUmy26kBDZW6h9XofPELrzseSkuD7r0V+emGEeo39Pg==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "progress": "^2.0.0" - } - }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true, - "license": "MIT" - }, - "node_modules/nth-check": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", - "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", - "license": "BSD-2-Clause", - "dependencies": { - "boolbase": "^1.0.0" - }, - "funding": { - "url": "https://github.com/fb55/nth-check?sponsor=1" - } - }, - "node_modules/on-exit-leak-free": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz", - "integrity": "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "dev": true, - "license": "(MIT AND Zlib)" - }, - "node_modules/parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "license": "MIT" - }, - "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", - "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", - "license": "MIT", - "dependencies": { - "parse5": "^6.0.1" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", - "dev": true, - "license": "MIT" - }, - "node_modules/picomatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", - "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/pino": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/pino/-/pino-9.2.0.tgz", - "integrity": "sha512-g3/hpwfujK5a4oVbaefoJxezLzsDgLcNJeITvC6yrfwYeT9la+edCK42j5QpEQSQCZgTKapXvnQIdgZwvRaZug==", - "dev": true, - "license": "MIT", - "dependencies": { - "atomic-sleep": "^1.0.0", - "fast-redact": "^3.1.1", - "on-exit-leak-free": "^2.1.0", - "pino-abstract-transport": "^1.2.0", - "pino-std-serializers": "^7.0.0", - "process-warning": "^3.0.0", - "quick-format-unescaped": "^4.0.3", - "real-require": "^0.2.0", - "safe-stable-stringify": "^2.3.1", - "sonic-boom": "^4.0.1", - "thread-stream": "^3.0.0" - }, - "bin": { - "pino": "bin.js" - } - }, - "node_modules/pino-abstract-transport": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-1.2.0.tgz", - "integrity": "sha512-Guhh8EZfPCfH+PMXAb6rKOjGQEoy0xlAIn+irODG5kgfYV+BQ0rGYYWTIel3P5mmyXqkYkPmdIkywsn6QKUR1Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "readable-stream": "^4.0.0", - "split2": "^4.0.0" - } - }, - "node_modules/pino-abstract-transport/node_modules/readable-stream": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", - "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "abort-controller": "^3.0.0", - "buffer": "^6.0.3", - "events": "^3.3.0", - "process": "^0.11.10", - "string_decoder": "^1.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/pino-pretty": { - "version": "11.2.2", - "resolved": "https://registry.npmjs.org/pino-pretty/-/pino-pretty-11.2.2.tgz", - "integrity": "sha512-2FnyGir8nAJAqD3srROdrF1J5BIcMT4nwj7hHSc60El6Uxlym00UbCCd8pYIterstVBFlMyF1yFV8XdGIPbj4A==", - "dev": true, - "license": "MIT", - "dependencies": { - "colorette": "^2.0.7", - "dateformat": "^4.6.3", - "fast-copy": "^3.0.2", - "fast-safe-stringify": "^2.1.1", - "help-me": "^5.0.0", - "joycon": "^3.1.1", - "minimist": "^1.2.6", - "on-exit-leak-free": "^2.1.0", - "pino-abstract-transport": "^1.0.0", - "pump": "^3.0.0", - "readable-stream": "^4.0.0", - "secure-json-parse": "^2.4.0", - "sonic-boom": "^4.0.1", - "strip-json-comments": "^3.1.1" - }, - "bin": { - "pino-pretty": "bin.js" - } - }, - "node_modules/pino-pretty/node_modules/readable-stream": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", - "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "abort-controller": "^3.0.0", - "buffer": "^6.0.3", - "events": "^3.3.0", - "process": "^0.11.10", - "string_decoder": "^1.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/pino-std-serializers": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-7.0.0.tgz", - "integrity": "sha512-e906FRY0+tV27iq4juKzSYPbUj2do2X2JX4EzSca1631EB2QJQUqGbDuERal7LCtOpxl6x3+nvo9NPZcmjkiFA==", - "dev": true, - "license": "MIT" - }, - "node_modules/process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6.0" - } - }, - "node_modules/process-warning": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-3.0.0.tgz", - "integrity": "sha512-mqn0kFRl0EoqhnL0GQ0veqFHyIN1yig9RHh/InzORTUiZHFRAur+aMtRkELNwGs9aNwKS6tg/An4NYBPGwvtzQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/pump": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", - "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", - "dev": true, - "license": "MIT", - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/queue-tick": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", - "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==", - "dev": true, - "license": "MIT" - }, - "node_modules/quick-format-unescaped": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz", - "integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==", - "dev": true, - "license": "MIT" - }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/real-require": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz", - "integrity": "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 12.13.0" - } - }, - "node_modules/remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==", - "dev": true, - "license": "ISC" - }, - "node_modules/replace-ext": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-2.0.0.tgz", - "integrity": "sha512-UszKE5KVK6JvyD92nzMn9cDapSk6w/CaFZ96CnmDMUqH9oowfxF/ZjRITD25H4DnOQClLA4/j7jLGXXLVKxAug==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10" - } - }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/safe-stable-stringify": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz", - "integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/secure-json-parse": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-2.7.0.tgz", - "integrity": "sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "license": "(MIT AND BSD-3-Clause)", - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "bin": { - "sha.js": "bin.js" - } - }, - "node_modules/should-proxy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/should-proxy/-/should-proxy-1.0.4.tgz", - "integrity": "sha512-RPQhIndEIVUCjkfkQ6rs6sOR6pkxJWCNdxtfG5pP0RVgUYbK5911kLTF0TNcCC0G3YCGd492rMollFT2aTd9iQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/simple-get": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", - "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "decompress-response": "^6.0.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, - "node_modules/sonic-boom": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-4.0.1.tgz", - "integrity": "sha512-hTSD/6JMLyT4r9zeof6UtuBDpjJ9sO08/nmS5djaA9eozT9oOlNdpXSnzcgj4FTqpk3nkLrs61l4gip9r1HCrQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "atomic-sleep": "^1.0.0" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/split2": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", - "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">= 10.x" - } - }, - "node_modules/streamx": { - "version": "2.20.2", - "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.20.2.tgz", - "integrity": "sha512-aDGDLU+j9tJcUdPGOaHmVF1u/hhI+CsGkT02V3OKlHDV7IukOI+nTWAGkiZEKCO35rWN1wIr4tS7YFr1f4qSvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-fifo": "^1.3.2", - "queue-tick": "^1.0.1", - "text-decoder": "^1.1.0" - }, - "optionalDependencies": { - "bare-events": "^2.2.0" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/teex": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/teex/-/teex-1.0.1.tgz", - "integrity": "sha512-eYE6iEI62Ni1H8oIa7KlDU6uQBtqr4Eajni3wX7rpfXD8ysFx8z0+dri+KWEPWpBsxXfxu58x/0jvTVT1ekOSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "streamx": "^2.12.5" - } - }, - "node_modules/text-decoder": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.1.tgz", - "integrity": "sha512-x9v3H/lTKIJKQQe7RPQkLfKAnc9lUTkWDypIQgTzPJAq+5/GCDHonmshfvlsNSj58yyshbIJJDLmU15qNERrXQ==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/thread-stream": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-3.1.0.tgz", - "integrity": "sha512-OqyPZ9u96VohAyMfJykzmivOrY2wfMSf3C5TtFJVgN+Hm6aj+voFhlK+kZEIv2FBh1X6Xp3DlnCOfEQ3B2J86A==", - "dev": true, - "license": "MIT", - "dependencies": { - "real-require": "^0.2.0" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/uglify-js": { - "version": "3.19.3", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", - "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", - "dev": true, - "license": "BSD-2-Clause", - "optional": true, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/unxhr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/unxhr/-/unxhr-1.0.1.tgz", - "integrity": "sha512-MAhukhVHyaLGDjyDYhy8gVjWJyhTECCdNsLwlMoGFoNJ3o79fpQhtQuzmAE4IxCMDwraF4cW8ZjpAV0m9CRQbg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.11" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true, - "license": "MIT" - }, - "node_modules/vinyl": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-3.0.0.tgz", - "integrity": "sha512-rC2VRfAVVCGEgjnxHUnpIVh3AGuk62rP3tqVrn+yab0YH7UULisC085+NYH+mnqf3Wx4SpSi1RQMwudL89N03g==", - "dev": true, - "license": "MIT", - "dependencies": { - "clone": "^2.1.2", - "clone-stats": "^1.0.0", - "remove-trailing-separator": "^1.1.0", - "replace-ext": "^2.0.0", - "teex": "^1.0.1" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/xdg-basedir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", - "integrity": "sha512-1Dly4xqlulvPD3fZUQJLY+FUIeqN3N2MM3uqe4rCJftAvOjFa3jFGfctOgluGx4ahPbUCsZkmJILiP0Vi4T6lQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yauzl": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-3.1.3.tgz", - "integrity": "sha512-JCCdmlJJWv7L0q/KylOekyRaUrdEoUxWkWVcgorosTROCFWiS9p2NNPE9Yb91ak7b1N5SxAZEliWpspbZccivw==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-crc32": "~0.2.3", - "pend": "~1.2.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yazl": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.5.1.tgz", - "integrity": "sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-crc32": "~0.2.3" - } - } - } -} diff --git a/docs/package.json b/docs/package.json deleted file mode 100644 index 723dcee..0000000 --- a/docs/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "devDependencies": { - "@antora/cli": "3.1.9", - "antora": "3.1.9" - }, - "scripts": { - "generate": "antora playbook.yml" - }, - "dependencies": { - "@antora/lunr-extension": "^1.0.0-alpha.8" - } -} \ No newline at end of file diff --git a/docs/playbook.yml b/docs/playbook.yml deleted file mode 100644 index 2125cb2..0000000 --- a/docs/playbook.yml +++ /dev/null @@ -1,13 +0,0 @@ -site: - title: CPPython - start_page: cppython::index.adoc -ui: - bundle: - url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/master/raw/build/ui-bundle.zip?job=bundle-stable -antora: - extensions: - - require: '@antora/lunr-extension' - index_latest_only: true -output: - dir: ./dist - clean: true \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b951e8a..ef124a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -110,14 +110,6 @@ source = "scm" [tool.pdm.scripts] analyze = {shell = "pylint --verbose cppython tests"} -install-docs.cmd = "npm install" -install-docs.working_dir = "docs" - -build-docs.cmd = "npm run generate" -build-docs.working_dir = "docs" - -docs = {composite = ["install-docs", "build-docs"]} - format = {shell = "black --check --verbose ."} lint = {composite = ["analyze", "format", "sort-imports", "type-check"]} sort-imports = {shell = "isort --check-only --diff --verbose ."} From 9c85e907de53ef4ec9d7bba66708be27d51b02af Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Mon, 18 Nov 2024 16:50:07 -0500 Subject: [PATCH 48/68] Init Fixture Documentation --- cppython/pytest/__init__.py | 1 + .../new-page.adoc => cppython/pytest/test.py | 0 docs/modules/ROOT/nav.adoc | 2 +- docs/modules/ROOT/pages/configuration.adoc | 0 docs/modules/tests/nav.adoc | 1 + docs/modules/tests/pages/fixtures.adoc | 30 +++++++++++++++++++ pyproject.toml | 5 ++++ 7 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 cppython/pytest/__init__.py rename docs/modules/ROOT/pages/new-page.adoc => cppython/pytest/test.py (100%) create mode 100644 docs/modules/ROOT/pages/configuration.adoc create mode 100644 docs/modules/tests/nav.adoc create mode 100644 docs/modules/tests/pages/fixtures.adoc diff --git a/cppython/pytest/__init__.py b/cppython/pytest/__init__.py new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/cppython/pytest/__init__.py @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/modules/ROOT/pages/new-page.adoc b/cppython/pytest/test.py similarity index 100% rename from docs/modules/ROOT/pages/new-page.adoc rename to cppython/pytest/test.py diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index d7f056b..99cea0f 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -1 +1 @@ -* xref:new-page.adoc[] \ No newline at end of file +* xref:configuration.adoc[] \ No newline at end of file diff --git a/docs/modules/ROOT/pages/configuration.adoc b/docs/modules/ROOT/pages/configuration.adoc new file mode 100644 index 0000000..e69de29 diff --git a/docs/modules/tests/nav.adoc b/docs/modules/tests/nav.adoc new file mode 100644 index 0000000..b08b38f --- /dev/null +++ b/docs/modules/tests/nav.adoc @@ -0,0 +1 @@ +* xref:fixtures.adoc[] \ No newline at end of file diff --git a/docs/modules/tests/pages/fixtures.adoc b/docs/modules/tests/pages/fixtures.adoc new file mode 100644 index 0000000..8cd2b0c --- /dev/null +++ b/docs/modules/tests/pages/fixtures.adoc @@ -0,0 +1,30 @@ += Fixtures + +Fixtures can be accessed by installing the optional `pytest` module, `cppython.pytest`. + +== Dynamic Fixtures + +With the pytest feature of `pytest_generate_tests` we register multiple dynamic fixtures for collecting test data, both for plugins and for the test suite itself. + +=== `data_path` Fixture + +A list of directories that contain + +* Parameterized over `tests/data` +* Merged with paths from the`cppython.test` module +** The module defines configuration data that all plugins should test against + +=== `plugin_data_path` Fixture + + + +- Parameterized over `tests/plugin//data` + +=== `build_` Fixture + +- Discovered from `tests/build` + + +=== `plugin_build_` Fixture + +- Discovered from `tests/plugin//build` diff --git a/pyproject.toml b/pyproject.toml index ef124a5..6ff1d54 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,11 @@ dependencies = [ ] [project.optional-dependencies] +pytest = [ + "pytest>=8.3.3", + "pytest-mock>=3.14.0", +] + git = [ "dulwich>=0.22.5", ] From 9deef9def5f9cf91bcbbd767ba484b11c38e8979 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Tue, 19 Nov 2024 01:36:50 -0500 Subject: [PATCH 49/68] Update pdm.lock --- pdm.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pdm.lock b/pdm.lock index 0da5483..d46b6e0 100644 --- a/pdm.lock +++ b/pdm.lock @@ -5,7 +5,7 @@ groups = ["default", "git", "lint", "pdm", "test"] strategy = ["inherit_metadata"] lock_version = "4.5.0" -content_hash = "sha256:1f1da2fb9af3f630210b6c134178c626d5672b11f257923ddfe689eda675b236" +content_hash = "sha256:4eb799cfbd811f26da533d803609b512cdb487e16b1c745cdaa658cc95f7119a" [[metadata.targets]] requires_python = ">=3.13" @@ -810,7 +810,7 @@ files = [ [[package]] name = "typer" -version = "0.13.0" +version = "0.13.1" requires_python = ">=3.7" summary = "Typer, build great CLIs. Easy to code. Based on Python type hints." groups = ["default"] @@ -821,8 +821,8 @@ dependencies = [ "typing-extensions>=3.7.4.3", ] files = [ - {file = "typer-0.13.0-py3-none-any.whl", hash = "sha256:d85fe0b777b2517cc99c8055ed735452f2659cd45e451507c76f48ce5c1d00e2"}, - {file = "typer-0.13.0.tar.gz", hash = "sha256:f1c7198347939361eec90139ffa0fd8b3df3a2259d5852a0f7400e476d95985c"}, + {file = "typer-0.13.1-py3-none-any.whl", hash = "sha256:5b59580fd925e89463a29d363e0a43245ec02765bde9fb77d39e5d0f29dd7157"}, + {file = "typer-0.13.1.tar.gz", hash = "sha256:9d444cb96cc268ce6f8b94e13b4335084cef4c079998a9f4851a90229a3bd25c"}, ] [[package]] From 652f3f4740ecd2b7c68d2b66b213e639adf75b2e Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Tue, 19 Nov 2024 19:39:18 -0500 Subject: [PATCH 50/68] Remove Data Config --- docs/modules/tests/pages/fixtures.adoc | 20 +----- tests/conftest.py | 76 +---------------------- tests/plugin_helper/shared.py | 12 ---- tests/unit/plugin_helper/test_fixtures.py | 10 --- vcpkg.json | 5 ++ 5 files changed, 8 insertions(+), 115 deletions(-) create mode 100644 vcpkg.json diff --git a/docs/modules/tests/pages/fixtures.adoc b/docs/modules/tests/pages/fixtures.adoc index 8cd2b0c..2f5f65d 100644 --- a/docs/modules/tests/pages/fixtures.adoc +++ b/docs/modules/tests/pages/fixtures.adoc @@ -6,25 +6,9 @@ Fixtures can be accessed by installing the optional `pytest` module, `cppython.p With the pytest feature of `pytest_generate_tests` we register multiple dynamic fixtures for collecting test data, both for plugins and for the test suite itself. -=== `data_path` Fixture - -A list of directories that contain - -* Parameterized over `tests/data` -* Merged with paths from the`cppython.test` module -** The module defines configuration data that all plugins should test against - -=== `plugin_data_path` Fixture - - - -- Parameterized over `tests/plugin//data` === `build_` Fixture -- Discovered from `tests/build` - - -=== `plugin_build_` Fixture +* Discovered from `tests/build/` +* The contents of the directory are copied to a temporary directory -- Discovered from `tests/plugin//build` diff --git a/tests/conftest.py b/tests/conftest.py index 4bc2c26..6c486c7 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,7 +1,5 @@ """Data variations for testing""" -import shutil - # from pathlib import Path from pathlib import Path from typing import cast @@ -251,72 +249,23 @@ def fixture_core_data(cppython_data: CPPythonData, project_data: ProjectData) -> return CoreData(cppython_data=cppython_data, project_data=project_data) -@pytest.fixture(name="plugin_data_path", scope="session") -def fixture_plugin_data_path(internal_plugin_data_path: list[Path | None]) -> list[Path | None]: - """Fixture cache of internal_plugin_data_path - - Args: - internal_plugin_data_path: The input meta data - - Returns: - The session scoped data - """ - - return internal_plugin_data_path - - -@pytest.fixture(name="data_path", scope="session") -def fixture_data_path(internal_data_path: list[Path]) -> list[Path]: - """Fixture cache of internal_data_path - - Args: - internal_data_path: The input meta data - - Returns: - The session scoped data - """ - - return internal_data_path - - @pytest.fixture( name="project_configuration", scope="session", params=project_variants, ) -def fixture_project_configuration( - request: pytest.FixtureRequest, - tmp_path_factory: pytest.TempPathFactory, - data_path: Path, - plugin_data_path: Path | None, -) -> ProjectConfiguration: +def fixture_project_configuration(request: pytest.FixtureRequest) -> ProjectConfiguration: """Project configuration fixture Args: request: Parameterized configuration data - tmp_path_factory: Factory for centralized temporary directories - data_path: Project file requirements - plugin_data_path: Parameterized path to a data directory Returns: Configuration with temporary directory capabilities """ - tmp_path = tmp_path_factory.mktemp("workspace-") - - shutil.copytree(data_path, tmp_path, dirs_exist_ok=True) - - if plugin_data_path is not None: - shutil.copytree(plugin_data_path, tmp_path, dirs_exist_ok=True) - configuration = cast(ProjectConfiguration, request.param) - # Pin the project location - paths = list(tmp_path.rglob("pyproject.toml")) - - # 'paths' length guaranteed to be 1 - configuration.pyproject_file = paths[0].resolve() - return configuration @@ -379,29 +328,6 @@ def pytest_generate_tests(metafunc: pytest.Metafunc) -> None: for fixture in metafunc.fixturenames: match fixture.split("_", 1): - case ["internal", "plugin_data_path"]: - # Gathers directories from tests/data from the project's root directory - - # There should only ever be one fixture named 'internal_plugin_data_path' for value caching - plugin_data_path = metafunc.config.rootpath / "tests" / "data" - - plugin_test_paths: list[Path | None] = [] - - for plugin_path in plugin_data_path.glob("*"): - if plugin_path.is_dir(): - plugin_test_paths.append(plugin_path) - - if not plugin_test_paths: - plugin_test_paths = [None] - metafunc.parametrize(fixture, plugin_test_paths, scope="session") - - case ["internal", "data_path"]: - # Gathers directories from tests/data from the package's root directory - - # There should only ever be one fixture named 'internal_data_path' for value caching - internal_data_path = Path(__file__).parent / "data" - metafunc.parametrize(fixture, list(internal_data_path.glob("*")), scope="session") - case ["build", directory]: # Parameterizes the paths under tests/build/ where is the fixture suffix diff --git a/tests/plugin_helper/shared.py b/tests/plugin_helper/shared.py index d6ecfc3..802e2b5 100644 --- a/tests/plugin_helper/shared.py +++ b/tests/plugin_helper/shared.py @@ -229,18 +229,6 @@ class DataPluginIntegrationTests[T: DataPlugin](BaseIntegrationTests[T], metacla class DataPluginUnitTests[T: DataPlugin](BaseUnitTests[T], metaclass=ABCMeta): """Unit testing information for all data plugin test classes""" - def test_pyproject_undefined(self, plugin_data_path: Path | None) -> None: - """Verifies that the directory data provided by plugins does not contain a pyproject.toml file - - Args: - plugin_data_path: The plugin's tests/data directory - """ - - if plugin_data_path is not None: - paths = list(plugin_data_path.rglob("pyproject.toml")) - - assert not paths - class ProviderTests[T: Provider](DataPluginTests[T], metaclass=ABCMeta): """Shared functionality between the different Provider testing categories""" diff --git a/tests/unit/plugin_helper/test_fixtures.py b/tests/unit/plugin_helper/test_fixtures.py index 35f4294..05f2449 100644 --- a/tests/unit/plugin_helper/test_fixtures.py +++ b/tests/unit/plugin_helper/test_fixtures.py @@ -6,16 +6,6 @@ class TestFixtures: """Tests for fixtures""" - def test_data_directory(self, plugin_data_path: Path | None) -> None: - """Verifies that the directory data provided by pytest_cppython contains a pyproject.toml file - - Args: - plugin_data_path: The plugins tests/data directory - """ - - assert plugin_data_path is not None - assert plugin_data_path.exists() - def test_build_directory(self, build_test_build: Path) -> None: """Verifies that the build data provided is the expected path diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 0000000..22cdde5 --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,5 @@ +{ + "name": "default-test", + "version-string": "", + "dependencies": [] +} \ No newline at end of file From 7f8682585e2d8378af6344135055c0986d4b66b6 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Tue, 19 Nov 2024 19:39:35 -0500 Subject: [PATCH 51/68] Delete CMakePresets.json --- tests/data/cmake/default/CMakePresets.json | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 tests/data/cmake/default/CMakePresets.json diff --git a/tests/data/cmake/default/CMakePresets.json b/tests/data/cmake/default/CMakePresets.json deleted file mode 100644 index e69de29..0000000 From e0f4a9ddb3b7d216deef3a037341421d57086625 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Tue, 19 Nov 2024 19:41:50 -0500 Subject: [PATCH 52/68] Delete vcpkg.json --- vcpkg.json | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 vcpkg.json diff --git a/vcpkg.json b/vcpkg.json deleted file mode 100644 index 22cdde5..0000000 --- a/vcpkg.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "default-test", - "version-string": "", - "dependencies": [] -} \ No newline at end of file From 745c9fb20440a6b85a178f11d0ee729def7382e2 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Wed, 20 Nov 2024 00:53:56 -0500 Subject: [PATCH 53/68] Update plugin.py --- cppython/plugins/vcpkg/plugin.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cppython/plugins/vcpkg/plugin.py b/cppython/plugins/vcpkg/plugin.py index 2c54601..a0f51dc 100644 --- a/cppython/plugins/vcpkg/plugin.py +++ b/cppython/plugins/vcpkg/plugin.py @@ -149,6 +149,8 @@ async def download_tooling(cls, directory: Path) -> None: if cls.tooling_downloaded(directory): try: + logger.debug("Updating the vcpkg repository at '%s'", directory.absolute()) + # The entire history is need for vcpkg 'baseline' information subprocess_call(["git", "fetch", "origin"], logger=logger, cwd=directory) subprocess_call(["git", "pull"], logger=logger, cwd=directory) @@ -157,6 +159,8 @@ async def download_tooling(cls, directory: Path) -> None: raise else: try: + logger.debug("Cloning the vcpkg repository to '%s'", directory.absolute()) + # The entire history is need for vcpkg 'baseline' information subprocess_call( ["git", "clone", "https://github.com/microsoft/vcpkg", "."], @@ -181,7 +185,7 @@ def install(self) -> None: manifest = generate_manifest(self.core_data, self.data) # Write out the manifest - serialized = json.loads(manifest.json(exclude_none=True, by_alias=True)) + serialized = json.loads(manifest.model_dump_json(exclude_none=True, by_alias=True)) with open(manifest_directory / "vcpkg.json", "w", encoding="utf8") as file: json.dump(serialized, file, ensure_ascii=False, indent=4) @@ -211,7 +215,7 @@ def update(self) -> None: manifest = generate_manifest(self.core_data, self.data) # Write out the manifest - serialized = json.loads(manifest.json(exclude_none=True, by_alias=True)) + serialized = json.loads(manifest.model_dump_json(exclude_none=True, by_alias=True)) with open(manifest_directory / "vcpkg.json", "w", encoding="utf8") as file: json.dump(serialized, file, ensure_ascii=False, indent=4) From c055d30d0c1365ca9231c49949fed14141f34159 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Wed, 20 Nov 2024 00:55:57 -0500 Subject: [PATCH 54/68] Fix Path Overriding --- tests/conftest.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 6c486c7..269a381 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -254,18 +254,30 @@ def fixture_core_data(cppython_data: CPPythonData, project_data: ProjectData) -> scope="session", params=project_variants, ) -def fixture_project_configuration(request: pytest.FixtureRequest) -> ProjectConfiguration: - """Project configuration fixture +def fixture_project_configuration( + request: pytest.FixtureRequest, tmp_path_factory: pytest.TempPathFactory +) -> ProjectConfiguration: + """Project configuration fixture. Here we provide overrides on the input variants so that + we can use a temporary directory for testing purposes. Args: request: Parameterized configuration data + tmp_path_factory: Factory for centralized temporary directories Returns: Configuration with temporary directory capabilities """ - + tmp_path = tmp_path_factory.mktemp("workspace-") configuration = cast(ProjectConfiguration, request.param) + pyproject_file = tmp_path / "pyproject.toml" + + # Write a dummy file to satisfy the config constraints + with open(pyproject_file, "w", encoding="utf-8"): + pass + + configuration.pyproject_file = pyproject_file + return configuration From 50f2fb727fbb00e3f7ff1a43f78c1dd3aa64b860 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Wed, 20 Nov 2024 00:59:24 -0500 Subject: [PATCH 55/68] Update utility.py --- cppython/core/utility.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cppython/core/utility.py b/cppython/core/utility.py index 1a19948..c930759 100644 --- a/cppython/core/utility.py +++ b/cppython/core/utility.py @@ -29,7 +29,7 @@ def write_model_json(path: Path, model: BaseModel) -> None: model: The model to write into a json """ - serialized = json.loads(model.json(exclude_none=True)) + serialized = json.loads(model.model_dump_json(exclude_none=True)) with open(path, "w", encoding="utf8") as file: json.dump(serialized, file, ensure_ascii=False, indent=4) From 1a6ecfea1177d2150cd0558df8f735484d9840fa Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Wed, 20 Nov 2024 01:10:38 -0500 Subject: [PATCH 56/68] Update test_project.py --- tests/unit/test_project.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/unit/test_project.py b/tests/unit/test_project.py index d82296d..87b7e75 100644 --- a/tests/unit/test_project.py +++ b/tests/unit/test_project.py @@ -48,8 +48,8 @@ def test_missing_tool_table(self, tmp_path: Path) -> None: file_path = tmp_path / "pyproject.toml" - with open(file_path, "a", encoding="utf8") as file: - file.write("") + with open(file_path, "a", encoding="utf8"): + pass project_configuration = ProjectConfiguration(pyproject_file=file_path, version=None) interface = MockInterface() @@ -68,8 +68,8 @@ def test_missing_cppython_table(self, tmp_path: Path) -> None: file_path = tmp_path / "pyproject.toml" - with open(file_path, "a", encoding="utf8") as file: - file.write("") + with open(file_path, "a", encoding="utf8"): + pass project_configuration = ProjectConfiguration(pyproject_file=file_path, version=None) interface = MockInterface() @@ -89,8 +89,8 @@ def test_default_cppython_table(self, tmp_path: Path) -> None: file_path = tmp_path / "pyproject.toml" - with open(file_path, "a", encoding="utf8") as file: - file.write("") + with open(file_path, "a", encoding="utf8"): + pass project_configuration = ProjectConfiguration(pyproject_file=file_path, version=None) interface = MockInterface() From aac1417b6b6412b1e81799758eaaaeec65d57ee9 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Wed, 20 Nov 2024 01:25:04 -0500 Subject: [PATCH 57/68] DefaultSCM For when no plugin applies --- cppython/builder.py | 8 ++++---- cppython/defaults.py | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 cppython/defaults.py diff --git a/cppython/builder.py b/cppython/builder.py index 61f989d..e313a9a 100644 --- a/cppython/builder.py +++ b/cppython/builder.py @@ -32,6 +32,7 @@ ProjectData, ) from cppython.data import Data, Plugins +from cppython.defaults import DefaultSCM from cppython.utility.exception import PluginError @@ -259,9 +260,6 @@ def select_scm(self, scm_plugins: list[type[SCM]], project_data: ProjectData) -> scm_plugins: The list of SCM plugin types project_data: The project data - Raises: - PluginError: Raised if no SCM plugin was found that supports the given data - Returns: The selected SCM plugin type """ @@ -270,7 +268,9 @@ def select_scm(self, scm_plugins: list[type[SCM]], project_data: ProjectData) -> if scm_type.features(project_data.pyproject_file.parent).repository: return scm_type - raise PluginError("No SCM plugin was found that supports the given path") + self._logger.info("No SCM plugin was found that supports the given path") + + return DefaultSCM def solve( self, generator_types: list[type[Generator]], provider_types: list[type[Provider]] diff --git a/cppython/defaults.py b/cppython/defaults.py new file mode 100644 index 0000000..afe02dc --- /dev/null +++ b/cppython/defaults.py @@ -0,0 +1,42 @@ +"""Defines a SCM subclass that is used as the default SCM if no plugin is found or selected""" + +from pydantic import DirectoryPath +from cppython.core.plugin_schema.scm import SCM, SCMPluginGroupData, SupportedSCMFeatures +from cppython.core.schema import Information + + +class DefaultSCM(SCM): + """A default SCM class for when no SCM plugin is selected""" + + def __init__(self, group_data: SCMPluginGroupData) -> None: + self.group_data = group_data + + @staticmethod + def features(directory: DirectoryPath) -> SupportedSCMFeatures: + """Broadcasts the shared features of the SCM plugin to CPPython + + Args: + directory: The root directory where features are evaluated + + Returns: + The supported features + """ + + return SupportedSCMFeatures(repository=True) + + @staticmethod + def information() -> Information: + """Returns plugin information + + Returns: + The plugin information + """ + return Information() + + def version(self, _: DirectoryPath) -> str: + """Extracts the system's version metadata + + Returns: + A version + """ + return "1.0.0" From e26c5fea1c1bb30970d61daf862ee6bf024c0de9 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Wed, 20 Nov 2024 01:51:06 -0500 Subject: [PATCH 58/68] Update builder.py --- cppython/builder.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cppython/builder.py b/cppython/builder.py index e313a9a..027be6d 100644 --- a/cppython/builder.py +++ b/cppython/builder.py @@ -1,7 +1,7 @@ """Defines the data and routines for building a CPPython project type""" import logging -from importlib import metadata +from importlib.metadata import entry_points from inspect import getmodule from logging import Logger from typing import Any @@ -134,7 +134,7 @@ def find_generators(self) -> list[type[Generator]]: plugin_types: list[type[Generator]] = [] # Filter entries by type - for entry_point in list(metadata.entry_points(group=f"cppython.{group_name}")): + for entry_point in list(entry_points(group=f"cppython.{group_name}")): loaded_type = entry_point.load() if not issubclass(loaded_type, Generator): self._logger.warning( @@ -164,7 +164,7 @@ def find_providers(self) -> list[type[Provider]]: plugin_types: list[type[Provider]] = [] # Filter entries by type - for entry_point in list(metadata.entry_points(group=f"cppython.{group_name}")): + for entry_point in list(entry_points(group=f"cppython.{group_name}")): loaded_type = entry_point.load() if not issubclass(loaded_type, Provider): self._logger.warning( @@ -194,7 +194,7 @@ def find_source_managers(self) -> list[type[SCM]]: plugin_types: list[type[SCM]] = [] # Filter entries by type - for entry_point in list(metadata.entry_points(group=f"cppython.{group_name}")): + for entry_point in list(entry_points(group=f"cppython.{group_name}")): loaded_type = entry_point.load() if not issubclass(loaded_type, SCM): self._logger.warning( From e9d6325613a83cdcce9b6c3a399b41f54c68a9bc Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Wed, 20 Nov 2024 01:51:10 -0500 Subject: [PATCH 59/68] Update shared.py --- tests/plugin_helper/shared.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/plugin_helper/shared.py b/tests/plugin_helper/shared.py index 802e2b5..d9c04c8 100644 --- a/tests/plugin_helper/shared.py +++ b/tests/plugin_helper/shared.py @@ -104,7 +104,6 @@ def test_entry_point(self, plugin_type: type[T], plugin_group_name: LiteralStrin """ # We only require the entry point to be registered if the plugin is not a Mocked type - if plugin_type.name() == "mock": pytest.skip("Mocked plugin type") From a9d1667b6f8aced991f98826db0aae6a5eda57b1 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Wed, 20 Nov 2024 01:57:02 -0500 Subject: [PATCH 60/68] Update test_project.py --- tests/unit/test_project.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/unit/test_project.py b/tests/unit/test_project.py index 87b7e75..d58f5cf 100644 --- a/tests/unit/test_project.py +++ b/tests/unit/test_project.py @@ -87,6 +87,11 @@ def test_default_cppython_table(self, tmp_path: Path) -> None: tmp_path: Temporary directory for dummy data """ + distribution = pkg_resources.Distribution(__file__) + entry_point = pkg_resources.EntryPoint.parse("plugin1 = plugins.plugin1:plugin1_class", dist=distribution) + distribution._ep_map = {"my_project.plugins": {"plugin1": entry_point}} + pkg_resources.working_set.add(distribution) + file_path = tmp_path / "pyproject.toml" with open(file_path, "a", encoding="utf8"): From 8133ae61d776e7349f2137ae193dd40042740c70 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Wed, 20 Nov 2024 04:26:45 -0500 Subject: [PATCH 61/68] Update test_project.py --- tests/unit/test_project.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/unit/test_project.py b/tests/unit/test_project.py index d58f5cf..b673c58 100644 --- a/tests/unit/test_project.py +++ b/tests/unit/test_project.py @@ -2,8 +2,11 @@ import tomllib from pathlib import Path +from typing import Any from pytest import FixtureRequest +from pytest_mock import MockerFixture +from importlib import metadata from cppython.core.schema import ( CPPythonLocalConfiguration, @@ -13,7 +16,9 @@ ToolData, ) from cppython.project import Project +from tests.plugin_helper.mock.generator import MockGenerator from tests.plugin_helper.mock.interface import MockInterface +from tests.plugin_helper.mock.provider import MockProvider pep621 = PEP621Configuration(name="test-project", version="0.1.0") @@ -80,17 +85,15 @@ def test_missing_cppython_table(self, tmp_path: Path) -> None: assert not project.enabled - def test_default_cppython_table(self, tmp_path: Path) -> None: + def test_default_cppython_table(self, tmp_path: Path, mocker: MockerFixture) -> None: """The project type should be constructable with the default cppython table Args: tmp_path: Temporary directory for dummy data + mocker: Pytest mocker fixture """ - distribution = pkg_resources.Distribution(__file__) - entry_point = pkg_resources.EntryPoint.parse("plugin1 = plugins.plugin1:plugin1_class", dist=distribution) - distribution._ep_map = {"my_project.plugins": {"plugin1": entry_point}} - pkg_resources.working_set.add(distribution) + mocker.patch.object(metadata.EntryPoint, "load", side_effect=[MockGenerator, MockProvider]) file_path = tmp_path / "pyproject.toml" From b7ad0eafb674348d6f342ada4e4ec666a962b9a5 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Wed, 20 Nov 2024 04:33:53 -0500 Subject: [PATCH 62/68] Mock Entrypoints --- tests/unit/test_builder.py | 14 ++++++++++++++ tests/unit/test_project.py | 8 +++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/tests/unit/test_builder.py b/tests/unit/test_builder.py index 2754bda..7c7e943 100644 --- a/tests/unit/test_builder.py +++ b/tests/unit/test_builder.py @@ -2,6 +2,8 @@ import logging +from pytest_mock import MockerFixture +from importlib import metadata from cppython.builder import Builder, Resolver from cppython.core.schema import ( CPPythonLocalConfiguration, @@ -9,6 +11,9 @@ ProjectConfiguration, ProjectData, ) +from tests.plugin_helper.mock.generator import MockGenerator +from tests.plugin_helper.mock.provider import MockProvider +from tests.plugin_helper.mock.scm import MockSCM class TestBuilder: @@ -19,6 +24,7 @@ def test_build( project_configuration: ProjectConfiguration, pep621_configuration: PEP621Configuration, cppython_local_configuration: CPPythonLocalConfiguration, + mocker: MockerFixture, ) -> None: """Verifies that the builder can build a project with all test variants @@ -26,10 +32,18 @@ def test_build( project_configuration: Variant fixture for the project configuration pep621_configuration: Variant fixture for PEP 621 configuration cppython_local_configuration: Variant fixture for cppython configuration + mocker: Pytest mocker fixture """ logger = logging.getLogger() builder = Builder(project_configuration, logger) + mocker.patch.object( + metadata, + "entry_points", + return_value=[metadata.EntryPoint(name="mock", value="mock", group="mock")], + ) + mocker.patch.object(metadata.EntryPoint, "load", side_effect=[MockGenerator, MockProvider, MockSCM]) + assert builder.build(pep621_configuration, cppython_local_configuration) diff --git a/tests/unit/test_project.py b/tests/unit/test_project.py index b673c58..9ac3e77 100644 --- a/tests/unit/test_project.py +++ b/tests/unit/test_project.py @@ -19,6 +19,7 @@ from tests.plugin_helper.mock.generator import MockGenerator from tests.plugin_helper.mock.interface import MockInterface from tests.plugin_helper.mock.provider import MockProvider +from tests.plugin_helper.mock.scm import MockSCM pep621 = PEP621Configuration(name="test-project", version="0.1.0") @@ -93,7 +94,12 @@ def test_default_cppython_table(self, tmp_path: Path, mocker: MockerFixture) -> mocker: Pytest mocker fixture """ - mocker.patch.object(metadata.EntryPoint, "load", side_effect=[MockGenerator, MockProvider]) + mocker.patch.object( + metadata, + "entry_points", + return_value=[metadata.EntryPoint(name="mock", value="mock", group="mock")], + ) + mocker.patch.object(metadata.EntryPoint, "load", side_effect=[MockGenerator, MockProvider, MockSCM]) file_path = tmp_path / "pyproject.toml" From 78d44f7c313d246e65904db08d9c7e3208f01792 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Wed, 20 Nov 2024 04:35:42 -0500 Subject: [PATCH 63/68] Remove Outdated Test --- tests/unit/plugins/vcpkg/test_provider.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tests/unit/plugins/vcpkg/test_provider.py b/tests/unit/plugins/vcpkg/test_provider.py index 18fdfc3..55624ed 100644 --- a/tests/unit/plugins/vcpkg/test_provider.py +++ b/tests/unit/plugins/vcpkg/test_provider.py @@ -29,12 +29,3 @@ def fixture_plugin_type(self) -> type[VcpkgProvider]: The type of the Provider """ return VcpkgProvider - - def test_manifest_generation(self, data_plugin: VcpkgProvider) -> None: - """Verifies that manifests can be generated from core data - - Args: - data_plugin: Generated plugin - """ - - assert generate_manifest(data_plugin.core_data, data_plugin.data) From 6f0466f8725ba8fc1d7f3fe8e67d6d5249d88a81 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Wed, 20 Nov 2024 10:24:03 -0500 Subject: [PATCH 64/68] Harness Module --- {tests/plugin_helper => cppython/test}/__init__.py | 0 .../plugin_helper => cppython/test}/mock/__init__.py | 0 .../plugin_helper => cppython/test}/mock/generator.py | 0 .../plugin_helper => cppython/test}/mock/interface.py | 0 .../plugin_helper => cppython/test}/mock/provider.py | 2 +- {tests/plugin_helper => cppython/test}/mock/scm.py | 0 cppython/{pytest/test.py => test/pytest/__init__.py} | 0 .../plugin_helper => cppython/test/pytest}/shared.py | 2 +- .../plugin_helper => cppython/test/pytest}/tests.py | 4 ++-- .../test/pytest}/variants.py | 6 +++--- tests/conftest.py | 2 +- tests/integration/plugins/cmake/test_generator.py | 2 +- tests/integration/plugins/vcpkg/test_provider.py | 2 +- .../pytest => tests/integration/test}/__init__.py | 0 .../{plugin_helper => test}/test_generator.py | 4 ++-- .../{plugin_helper => test}/test_provider.py | 4 ++-- tests/integration/{plugin_helper => test}/test_scm.py | 4 ++-- tests/plugin_helper/data/default/pyproject.toml | 1 - tests/unit/plugin_helper/__init__.py | 1 - tests/unit/plugins/cmake/test_generator.py | 2 +- tests/unit/plugins/git/test_version_control.py | 2 +- tests/unit/plugins/vcpkg/test_provider.py | 2 +- .../plugin_helper => unit/test}/__init__.py | 0 tests/unit/{plugin_helper => test}/test_fixtures.py | 0 tests/unit/{plugin_helper => test}/test_generator.py | 4 ++-- tests/unit/{plugin_helper => test}/test_provider.py | 6 +++--- tests/unit/{plugin_helper => test}/test_scm.py | 4 ++-- tests/unit/test_builder.py | 9 +++++---- tests/unit/test_data.py | 6 +++--- tests/unit/test_project.py | 11 +++++------ 30 files changed, 39 insertions(+), 41 deletions(-) rename {tests/plugin_helper => cppython/test}/__init__.py (100%) rename {tests/plugin_helper => cppython/test}/mock/__init__.py (100%) rename {tests/plugin_helper => cppython/test}/mock/generator.py (100%) rename {tests/plugin_helper => cppython/test}/mock/interface.py (100%) rename {tests/plugin_helper => cppython/test}/mock/provider.py (94%) rename {tests/plugin_helper => cppython/test}/mock/scm.py (100%) rename cppython/{pytest/test.py => test/pytest/__init__.py} (100%) rename {tests/plugin_helper => cppython/test/pytest}/shared.py (96%) rename {tests/plugin_helper => cppython/test/pytest}/tests.py (96%) rename {tests/plugin_helper => cppython/test/pytest}/variants.py (90%) rename {cppython/pytest => tests/integration/test}/__init__.py (100%) rename tests/integration/{plugin_helper => test}/test_generator.py (81%) rename tests/integration/{plugin_helper => test}/test_provider.py (83%) rename tests/integration/{plugin_helper => test}/test_scm.py (83%) delete mode 100644 tests/plugin_helper/data/default/pyproject.toml delete mode 100644 tests/unit/plugin_helper/__init__.py rename tests/{integration/plugin_helper => unit/test}/__init__.py (100%) rename tests/unit/{plugin_helper => test}/test_fixtures.py (100%) rename tests/unit/{plugin_helper => test}/test_generator.py (82%) rename tests/unit/{plugin_helper => test}/test_provider.py (84%) rename tests/unit/{plugin_helper => test}/test_scm.py (83%) diff --git a/tests/plugin_helper/__init__.py b/cppython/test/__init__.py similarity index 100% rename from tests/plugin_helper/__init__.py rename to cppython/test/__init__.py diff --git a/tests/plugin_helper/mock/__init__.py b/cppython/test/mock/__init__.py similarity index 100% rename from tests/plugin_helper/mock/__init__.py rename to cppython/test/mock/__init__.py diff --git a/tests/plugin_helper/mock/generator.py b/cppython/test/mock/generator.py similarity index 100% rename from tests/plugin_helper/mock/generator.py rename to cppython/test/mock/generator.py diff --git a/tests/plugin_helper/mock/interface.py b/cppython/test/mock/interface.py similarity index 100% rename from tests/plugin_helper/mock/interface.py rename to cppython/test/mock/interface.py diff --git a/tests/plugin_helper/mock/provider.py b/cppython/test/mock/provider.py similarity index 94% rename from tests/plugin_helper/mock/provider.py rename to cppython/test/mock/provider.py index 5e42c09..bfc973a 100644 --- a/tests/plugin_helper/mock/provider.py +++ b/cppython/test/mock/provider.py @@ -11,7 +11,7 @@ SupportedProviderFeatures, ) from cppython.core.schema import CorePluginData, CPPythonModel, Information, SyncData -from tests.plugin_helper.mock.generator import MockSyncData +from cppython.test.mock.generator import MockSyncData class MockProviderData(CPPythonModel): diff --git a/tests/plugin_helper/mock/scm.py b/cppython/test/mock/scm.py similarity index 100% rename from tests/plugin_helper/mock/scm.py rename to cppython/test/mock/scm.py diff --git a/cppython/pytest/test.py b/cppython/test/pytest/__init__.py similarity index 100% rename from cppython/pytest/test.py rename to cppython/test/pytest/__init__.py diff --git a/tests/plugin_helper/shared.py b/cppython/test/pytest/shared.py similarity index 96% rename from tests/plugin_helper/shared.py rename to cppython/test/pytest/shared.py index d9c04c8..e5a3fcf 100644 --- a/tests/plugin_helper/shared.py +++ b/cppython/test/pytest/shared.py @@ -28,7 +28,7 @@ ProjectConfiguration, ProjectData, ) -from tests.plugin_helper.variants import ( +from cppython.test.pytest.variants import ( generator_variants, provider_variants, scm_variants, diff --git a/tests/plugin_helper/tests.py b/cppython/test/pytest/tests.py similarity index 96% rename from tests/plugin_helper/tests.py rename to cppython/test/pytest/tests.py index 0aff275..b302365 100644 --- a/tests/plugin_helper/tests.py +++ b/cppython/test/pytest/tests.py @@ -9,8 +9,7 @@ from cppython.core.plugin_schema.generator import Generator from cppython.core.plugin_schema.provider import Provider from cppython.core.plugin_schema.scm import SCM -from cppython.utility.utility import canonicalize_type -from tests.plugin_helper.shared import ( +from cppython.test.pytest.shared import ( DataPluginIntegrationTests, DataPluginUnitTests, GeneratorTests, @@ -19,6 +18,7 @@ ProviderTests, SCMTests, ) +from cppython.utility.utility import canonicalize_type class ProviderIntegrationTests[T: Provider](DataPluginIntegrationTests[T], ProviderTests[T], metaclass=ABCMeta): diff --git a/tests/plugin_helper/variants.py b/cppython/test/pytest/variants.py similarity index 90% rename from tests/plugin_helper/variants.py rename to cppython/test/pytest/variants.py index 2873ab4..cfc1a85 100644 --- a/tests/plugin_helper/variants.py +++ b/cppython/test/pytest/variants.py @@ -12,9 +12,9 @@ PEP621Configuration, ProjectConfiguration, ) -from tests.plugin_helper.mock.generator import MockGenerator -from tests.plugin_helper.mock.provider import MockProvider -from tests.plugin_helper.mock.scm import MockSCM +from cppython.test.mock.generator import MockGenerator +from cppython.test.mock.provider import MockProvider +from cppython.test.mock.scm import MockSCM def _pep621_configuration_list() -> list[PEP621Configuration]: diff --git a/tests/conftest.py b/tests/conftest.py index 269a381..27885b9 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -29,7 +29,7 @@ ToolData, ) from cppython.plugins.cmake.schema import CMakeConfiguration -from tests.plugin_helper.variants import ( +from cppython.test.pytest.variants import ( cppython_global_variants, cppython_local_variants, pep621_variants, diff --git a/tests/integration/plugins/cmake/test_generator.py b/tests/integration/plugins/cmake/test_generator.py index 6a79ad8..507cb6a 100644 --- a/tests/integration/plugins/cmake/test_generator.py +++ b/tests/integration/plugins/cmake/test_generator.py @@ -6,7 +6,7 @@ from cppython.plugins.cmake.plugin import CMakeGenerator from cppython.plugins.cmake.schema import CMakeConfiguration -from tests.plugin_helper.tests import GeneratorIntegrationTests +from cppython.test.pytest.tests import GeneratorIntegrationTests class TestCPPythonGenerator(GeneratorIntegrationTests[CMakeGenerator]): diff --git a/tests/integration/plugins/vcpkg/test_provider.py b/tests/integration/plugins/vcpkg/test_provider.py index a0b255e..523c17c 100644 --- a/tests/integration/plugins/vcpkg/test_provider.py +++ b/tests/integration/plugins/vcpkg/test_provider.py @@ -5,7 +5,7 @@ import pytest from cppython.plugins.vcpkg.plugin import VcpkgProvider -from tests.plugin_helper.tests import ProviderIntegrationTests +from cppython.test.pytest.tests import ProviderIntegrationTests class TestCPPythonProvider(ProviderIntegrationTests[VcpkgProvider]): diff --git a/cppython/pytest/__init__.py b/tests/integration/test/__init__.py similarity index 100% rename from cppython/pytest/__init__.py rename to tests/integration/test/__init__.py diff --git a/tests/integration/plugin_helper/test_generator.py b/tests/integration/test/test_generator.py similarity index 81% rename from tests/integration/plugin_helper/test_generator.py rename to tests/integration/test/test_generator.py index 7a734c9..66ab58e 100644 --- a/tests/integration/plugin_helper/test_generator.py +++ b/tests/integration/test/test_generator.py @@ -4,8 +4,8 @@ import pytest -from tests.plugin_helper.mock.generator import MockGenerator -from tests.plugin_helper.tests import GeneratorIntegrationTests +from cppython.test.mock.generator import MockGenerator +from cppython.test.pytest.tests import GeneratorIntegrationTests class TestCPPythonGenerator(GeneratorIntegrationTests[MockGenerator]): diff --git a/tests/integration/plugin_helper/test_provider.py b/tests/integration/test/test_provider.py similarity index 83% rename from tests/integration/plugin_helper/test_provider.py rename to tests/integration/test/test_provider.py index 301661b..a88e75a 100644 --- a/tests/integration/plugin_helper/test_provider.py +++ b/tests/integration/test/test_provider.py @@ -4,8 +4,8 @@ import pytest -from tests.plugin_helper.mock.provider import MockProvider -from tests.plugin_helper.tests import ProviderIntegrationTests +from cppython.test.mock.provider import MockProvider +from cppython.test.pytest.tests import ProviderIntegrationTests class TestMockProvider(ProviderIntegrationTests[MockProvider]): diff --git a/tests/integration/plugin_helper/test_scm.py b/tests/integration/test/test_scm.py similarity index 83% rename from tests/integration/plugin_helper/test_scm.py rename to tests/integration/test/test_scm.py index 83202f5..fb5e78b 100644 --- a/tests/integration/plugin_helper/test_scm.py +++ b/tests/integration/test/test_scm.py @@ -4,8 +4,8 @@ import pytest -from tests.plugin_helper.mock.scm import MockSCM -from tests.plugin_helper.tests import SCMIntegrationTests +from cppython.test.pytest.tests import SCMIntegrationTests +from cppython.test.mock.scm import MockSCM class TestCPPythonSCM(SCMIntegrationTests[MockSCM]): diff --git a/tests/plugin_helper/data/default/pyproject.toml b/tests/plugin_helper/data/default/pyproject.toml deleted file mode 100644 index 0bd6eae..0000000 --- a/tests/plugin_helper/data/default/pyproject.toml +++ /dev/null @@ -1 +0,0 @@ -Test Project File diff --git a/tests/unit/plugin_helper/__init__.py b/tests/unit/plugin_helper/__init__.py deleted file mode 100644 index 5f28270..0000000 --- a/tests/unit/plugin_helper/__init__.py +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tests/unit/plugins/cmake/test_generator.py b/tests/unit/plugins/cmake/test_generator.py index 5743b58..6aee27c 100644 --- a/tests/unit/plugins/cmake/test_generator.py +++ b/tests/unit/plugins/cmake/test_generator.py @@ -13,8 +13,8 @@ CMakePresets, CMakeSyncData, ) +from cppython.test.pytest.tests import GeneratorUnitTests from cppython.utility.utility import TypeName -from tests.plugin_helper.tests import GeneratorUnitTests class TestCPPythonGenerator(GeneratorUnitTests[CMakeGenerator]): diff --git a/tests/unit/plugins/git/test_version_control.py b/tests/unit/plugins/git/test_version_control.py index 30957e1..78cf927 100644 --- a/tests/unit/plugins/git/test_version_control.py +++ b/tests/unit/plugins/git/test_version_control.py @@ -3,7 +3,7 @@ import pytest from cppython.plugins.git.plugin import GitSCM -from tests.plugin_helper.tests import SCMUnitTests +from cppython.test.pytest.tests import SCMUnitTests class TestGitInterface(SCMUnitTests[GitSCM]): diff --git a/tests/unit/plugins/vcpkg/test_provider.py b/tests/unit/plugins/vcpkg/test_provider.py index 55624ed..620ce6c 100644 --- a/tests/unit/plugins/vcpkg/test_provider.py +++ b/tests/unit/plugins/vcpkg/test_provider.py @@ -6,7 +6,7 @@ from cppython.plugins.vcpkg.plugin import VcpkgProvider from cppython.plugins.vcpkg.resolution import generate_manifest -from tests.plugin_helper.tests import ProviderUnitTests +from cppython.test.pytest.tests import ProviderUnitTests class TestCPPythonProvider(ProviderUnitTests[VcpkgProvider]): diff --git a/tests/integration/plugin_helper/__init__.py b/tests/unit/test/__init__.py similarity index 100% rename from tests/integration/plugin_helper/__init__.py rename to tests/unit/test/__init__.py diff --git a/tests/unit/plugin_helper/test_fixtures.py b/tests/unit/test/test_fixtures.py similarity index 100% rename from tests/unit/plugin_helper/test_fixtures.py rename to tests/unit/test/test_fixtures.py diff --git a/tests/unit/plugin_helper/test_generator.py b/tests/unit/test/test_generator.py similarity index 82% rename from tests/unit/plugin_helper/test_generator.py rename to tests/unit/test/test_generator.py index 69778e3..4fe19ff 100644 --- a/tests/unit/plugin_helper/test_generator.py +++ b/tests/unit/test/test_generator.py @@ -4,8 +4,8 @@ import pytest -from tests.plugin_helper.mock.generator import MockGenerator -from tests.plugin_helper.tests import GeneratorUnitTests +from cppython.test.mock.generator import MockGenerator +from cppython.test.pytest.tests import GeneratorUnitTests class TestCPPythonGenerator(GeneratorUnitTests[MockGenerator]): diff --git a/tests/unit/plugin_helper/test_provider.py b/tests/unit/test/test_provider.py similarity index 84% rename from tests/unit/plugin_helper/test_provider.py rename to tests/unit/test/test_provider.py index 778108c..a1c9770 100644 --- a/tests/unit/plugin_helper/test_provider.py +++ b/tests/unit/test/test_provider.py @@ -5,9 +5,9 @@ import pytest from pytest_mock import MockerFixture -from tests.plugin_helper.mock.generator import MockGenerator -from tests.plugin_helper.mock.provider import MockProvider -from tests.plugin_helper.tests import ProviderUnitTests +from cppython.test.mock.generator import MockGenerator +from cppython.test.mock.provider import MockProvider +from cppython.test.pytest.tests import ProviderUnitTests class TestMockProvider(ProviderUnitTests[MockProvider]): diff --git a/tests/unit/plugin_helper/test_scm.py b/tests/unit/test/test_scm.py similarity index 83% rename from tests/unit/plugin_helper/test_scm.py rename to tests/unit/test/test_scm.py index 167783d..1af810e 100644 --- a/tests/unit/plugin_helper/test_scm.py +++ b/tests/unit/test/test_scm.py @@ -4,8 +4,8 @@ import pytest -from tests.plugin_helper.mock.scm import MockSCM -from tests.plugin_helper.tests import SCMUnitTests +from cppython.test.mock.scm import MockSCM +from cppython.test.pytest.tests import SCMUnitTests class TestCPPythonSCM(SCMUnitTests[MockSCM]): diff --git a/tests/unit/test_builder.py b/tests/unit/test_builder.py index 7c7e943..21e2761 100644 --- a/tests/unit/test_builder.py +++ b/tests/unit/test_builder.py @@ -1,9 +1,10 @@ """Tests the Builder and Resolver types""" import logging +from importlib import metadata from pytest_mock import MockerFixture -from importlib import metadata + from cppython.builder import Builder, Resolver from cppython.core.schema import ( CPPythonLocalConfiguration, @@ -11,9 +12,9 @@ ProjectConfiguration, ProjectData, ) -from tests.plugin_helper.mock.generator import MockGenerator -from tests.plugin_helper.mock.provider import MockProvider -from tests.plugin_helper.mock.scm import MockSCM +from cppython.test.mock.generator import MockGenerator +from cppython.test.mock.provider import MockProvider +from cppython.test.mock.scm import MockSCM class TestBuilder: diff --git a/tests/unit/test_data.py b/tests/unit/test_data.py index 364d248..b237551 100644 --- a/tests/unit/test_data.py +++ b/tests/unit/test_data.py @@ -12,9 +12,9 @@ ProjectConfiguration, ) from cppython.data import Data -from tests.plugin_helper.mock.generator import MockGenerator -from tests.plugin_helper.mock.provider import MockProvider -from tests.plugin_helper.mock.scm import MockSCM +from cppython.test.mock.generator import MockGenerator +from cppython.test.mock.provider import MockProvider +from cppython.test.mock.scm import MockSCM class TestData: diff --git a/tests/unit/test_project.py b/tests/unit/test_project.py index 9ac3e77..a746fae 100644 --- a/tests/unit/test_project.py +++ b/tests/unit/test_project.py @@ -1,12 +1,11 @@ """Tests the Project type""" import tomllib +from importlib import metadata from pathlib import Path -from typing import Any from pytest import FixtureRequest from pytest_mock import MockerFixture -from importlib import metadata from cppython.core.schema import ( CPPythonLocalConfiguration, @@ -16,10 +15,10 @@ ToolData, ) from cppython.project import Project -from tests.plugin_helper.mock.generator import MockGenerator -from tests.plugin_helper.mock.interface import MockInterface -from tests.plugin_helper.mock.provider import MockProvider -from tests.plugin_helper.mock.scm import MockSCM +from cppython.test.mock.generator import MockGenerator +from cppython.test.mock.interface import MockInterface +from cppython.test.mock.provider import MockProvider +from cppython.test.mock.scm import MockSCM pep621 = PEP621Configuration(name="test-project", version="0.1.0") From 32254baeb2ed578fbfa8e139ba8e990bf7ebdcba Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Wed, 20 Nov 2024 13:37:04 -0500 Subject: [PATCH 65/68] Replace Interface --- cppython/console/entry.py | 118 +++++++++++++++++++++++++++ cppython/console/interface.py | 146 ---------------------------------- cppython/console/schema.py | 24 ++++++ cppython/core/schema.py | 3 +- pdm.lock | 2 +- pyproject.toml | 4 +- tests/unit/test_console.py | 35 ++++++++ tests/unit/test_interface.py | 49 ------------ 8 files changed, 182 insertions(+), 199 deletions(-) create mode 100644 cppython/console/entry.py delete mode 100644 cppython/console/interface.py create mode 100644 cppython/console/schema.py create mode 100644 tests/unit/test_console.py delete mode 100644 tests/unit/test_interface.py diff --git a/cppython/console/entry.py b/cppython/console/entry.py new file mode 100644 index 0000000..71e2e36 --- /dev/null +++ b/cppython/console/entry.py @@ -0,0 +1,118 @@ +"""A click CLI for CPPython interfacing""" + +from pathlib import Path +from tomllib import loads +from typing import Annotated + +import typer + +from cppython.console.schema import ConsoleConfiguration, ConsoleInterface +from cppython.core.schema import ProjectConfiguration +from cppython.project import Project + +app = typer.Typer() + + +def _find_pyproject_file() -> Path: + """Searches upward for a pyproject.toml file + + Returns: + The found directory + """ + + # Search for a path upward + path = Path.cwd() + + while not path.glob("pyproject.toml"): + if path.is_absolute(): + assert ( + False + ), "This is not a valid project. No pyproject.toml found in the current directory or any of its parents." + + path = Path(path) + + return path + + +@app.callback() +def main( + context: typer.Context, + verbose: Annotated[ + int, typer.Option("-v", "--verbose", count=True, min=0, max=2, help="Print additional output") + ] = 0, + debug: Annotated[bool, typer.Option()] = False, +) -> None: + """entry_point group for the CLI commands + + Args: + context: The typer context + verbose: The verbosity level + debug: Debug mode + """ + + path = _find_pyproject_file() + file_path = path / "pyproject.toml" + + project_configuration = ProjectConfiguration(verbosity=verbose, debug=debug, pyproject_file=file_path, version=None) + + interface = ConsoleInterface() + context.obj = ConsoleConfiguration(project_configuration=project_configuration, interface=interface) + + +@app.command() +def info( + _: typer.Context, +) -> None: + """Prints project information""" + + +@app.command() +def install( + context: typer.Context, +) -> None: + """Install API call + + Args: + context: The CLI configuration object + + Raises: + ValueError: If the configuration object is missing + """ + + if (configuration := context.find_object(ConsoleConfiguration)) is None: + raise ValueError("The configuration object is missing") + + path = configuration.project_configuration.pyproject_file + pyproject_data = loads(path.read_text(encoding="utf-8")) + + project = Project(configuration.project_configuration, configuration.interface, pyproject_data) + project.install() + + +@app.command() +def update( + context: typer.Context, +) -> None: + """Update API call + + Args: + context: The CLI configuration object + + Raises: + ValueError: If the configuration object is missing + """ + if (configuration := context.find_object(ConsoleConfiguration)) is None: + raise ValueError("The configuration object is missing") + + path = configuration.project_configuration.pyproject_file + pyproject_data = loads(path.read_text(encoding="utf-8")) + + project = Project(configuration.project_configuration, configuration.interface, pyproject_data) + project.update() + + +@app.command(name="list") +def list_command( + _: typer.Context, +) -> None: + """Prints project information""" diff --git a/cppython/console/interface.py b/cppython/console/interface.py deleted file mode 100644 index e0dcddb..0000000 --- a/cppython/console/interface.py +++ /dev/null @@ -1,146 +0,0 @@ -"""A click CLI for CPPython interfacing""" - -import tomllib -from logging import getLogger -from pathlib import Path - -import click - -from cppython.core.schema import Interface, ProjectConfiguration -from cppython.project import Project - - -def _find_pyproject_file() -> Path: - """Searches upward for a pyproject.toml file - - Returns: - The found directory - """ - - # Search for a path upward - path = Path.cwd() - - while not path.glob("pyproject.toml"): - if path.is_absolute(): - assert ( - False - ), "This is not a valid project. No pyproject.toml found in the current directory or any of its parents." - - path = Path(path) - - return path - - -class Configuration: - """Click configuration object""" - - def __init__(self) -> None: - self.interface = ConsoleInterface() - - self.logger = getLogger("cppython.console") - - path = _find_pyproject_file() - file_path = path / "pyproject.toml" - - self.configuration = ProjectConfiguration(pyproject_file=file_path, version=None) - - def query_scm(self) -> str: - """Queries the SCM system for its version - - Returns: - The version - """ - - return "TODO" - - def generate_project(self) -> Project: - """Aids in project generation. Allows deferred configuration from within the "config" object - - Returns: - The constructed Project - """ - - path = self.configuration.pyproject_file - pyproject_data = tomllib.loads(path.read_text(encoding="utf-8")) - - return Project(self.configuration, self.interface, pyproject_data) - - -# Attach our config object to click's hook -pass_config = click.make_pass_decorator(Configuration, ensure=True) - - -@click.group() -@click.option("-v", "--verbose", count=True, help="Print additional output") -@click.option("--debug/--no-debug", default=False) -@pass_config -def cli(config: Configuration, verbose: int, debug: bool) -> None: - """entry_point group for the CLI commands - - Args: - config: The CLI configuration object - verbose: The verbosity level - debug: Debug mode - """ - config.configuration.verbosity = verbose - config.configuration.debug = debug - - -@cli.command(name="info") -@pass_config -def info_command(config: Configuration) -> None: - """Prints project information - - Args: - config: The CLI configuration object - """ - - version = config.query_scm() - config.logger.info("The SCM project version is: %s", version) - - -@cli.command(name="list") -@pass_config -def list_command(config: Configuration) -> None: - """Prints project information - - Args: - config: The CLI configuration object - """ - - version = config.query_scm() - config.logger.info("The SCM project version is: %s", version) - - -@cli.command(name="install") -@pass_config -def install_command(config: Configuration) -> None: - """Install API call - - Args: - config: The CLI configuration object - """ - project = config.generate_project() - project.install() - - -@cli.command(name="update") -@pass_config -def update_command(config: Configuration) -> None: - """Update API call - - Args: - config: The CLI configuration object - """ - project = config.generate_project() - project.update() - - -class ConsoleInterface(Interface): - """Interface implementation to pass to the project""" - - def write_pyproject(self) -> None: - """Write output""" - - def write_configuration(self) -> None: - """Write output""" diff --git a/cppython/console/schema.py b/cppython/console/schema.py new file mode 100644 index 0000000..263bcd6 --- /dev/null +++ b/cppython/console/schema.py @@ -0,0 +1,24 @@ +"""Data definitions for the console application""" + +from pydantic import ConfigDict + +from cppython.core.schema import CPPythonModel, Interface, ProjectConfiguration + + +class ConsoleInterface(Interface): + """Interface implementation to pass to the project""" + + def write_pyproject(self) -> None: + """Write output""" + + def write_configuration(self) -> None: + """Write output""" + + +class ConsoleConfiguration(CPPythonModel): + """Configuration data for the console application""" + + model_config = ConfigDict(arbitrary_types_allowed=True) + + project_configuration: ProjectConfiguration + interface: Interface diff --git a/cppython/core/schema.py b/cppython/core/schema.py index bac3223..791e186 100644 --- a/cppython/core/schema.py +++ b/cppython/core/schema.py @@ -2,7 +2,7 @@ from abc import abstractmethod from pathlib import Path -from typing import Annotated, Any, NewType, Protocol +from typing import Annotated, Any, NewType, Protocol, runtime_checkable from pydantic import BaseModel, Field, field_validator, model_validator from pydantic.types import DirectoryPath, FilePath @@ -347,6 +347,7 @@ class CoreData(CPPythonModel): cppython_data: CPPythonData +@runtime_checkable class Interface(Protocol): """Type for interfaces to allow feedback from CPPython""" diff --git a/pdm.lock b/pdm.lock index d46b6e0..33c88ba 100644 --- a/pdm.lock +++ b/pdm.lock @@ -5,7 +5,7 @@ groups = ["default", "git", "lint", "pdm", "test"] strategy = ["inherit_metadata"] lock_version = "4.5.0" -content_hash = "sha256:4eb799cfbd811f26da533d803609b512cdb487e16b1c745cdaa658cc95f7119a" +content_hash = "sha256:fbf7d1ffa91e1e0bbdfb8b7914d92efe752e5f47867f4ef352e8dc700d7231f0" [[metadata.targets]] requires_python = ">=3.13" diff --git a/pyproject.toml b/pyproject.toml index 6ff1d54..5496363 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ dynamic = ["version"] requires-python = ">=3.13" dependencies = [ - "typer>=0.12.4", + "typer>=0.13.1", "pydantic>=2.8.2", "packaging>=24.1", ] @@ -63,7 +63,7 @@ test = [ ] [project.scripts] -cppython = "cppython.console.interface:cli" +cppython = "cppython.console.entry:app" [tool.pytest.ini_options] log_cli = true diff --git a/tests/unit/test_console.py b/tests/unit/test_console.py new file mode 100644 index 0000000..617092a --- /dev/null +++ b/tests/unit/test_console.py @@ -0,0 +1,35 @@ +"""Tests the typer interface type""" + +from typer.testing import CliRunner + +from cppython.console.entry import app + +runner = CliRunner() + + +class TestConsole: + """Various tests for the typer interface""" + + def test_info(self) -> None: + """Verifies that the info command functions with CPPython hooks""" + + result = runner.invoke(app, ["info"]) + assert result.exit_code == 0 + + def test_list(self) -> None: + """Verifies that the list command functions with CPPython hooks""" + + result = runner.invoke(app, ["list"]) + assert result.exit_code == 0 + + def test_update(self) -> None: + """Verifies that the update command functions with CPPython hooks""" + + result = runner.invoke(app, ["update"]) + assert result.exit_code == 0 + + def test_install(self) -> None: + """Verifies that the install command functions with CPPython hooks""" + + result = runner.invoke(app, ["install"]) + assert result.exit_code == 0 diff --git a/tests/unit/test_interface.py b/tests/unit/test_interface.py deleted file mode 100644 index 396ed28..0000000 --- a/tests/unit/test_interface.py +++ /dev/null @@ -1,49 +0,0 @@ -"""Tests the click interface type""" - -from click.testing import CliRunner - -from cppython.console.interface import cli - - -class TestInterface: - """Various tests for the click interface""" - - def test_info(self, cli_runner: CliRunner) -> None: - """Verifies that the info command functions with CPPython hooks - - Args: - cli_runner: The click runner - """ - - result = cli_runner.invoke(cli, ["info"], catch_exceptions=False) - assert result.exit_code == 0 - - def test_list(self, cli_runner: CliRunner) -> None: - """Verifies that the list command functions with CPPython hooks - - Args: - cli_runner: The click runner - """ - - result = cli_runner.invoke(cli, ["list"], catch_exceptions=False) - assert result.exit_code == 0 - - def test_update(self, cli_runner: CliRunner) -> None: - """Verifies that the update command functions with CPPython hooks - - Args: - cli_runner: The click runner - """ - - result = cli_runner.invoke(cli, ["update"], catch_exceptions=False) - assert result.exit_code == 0 - - def test_install(self, cli_runner: CliRunner) -> None: - """Verifies that the install command functions with CPPython hooks - - Args: - cli_runner: The click runner - """ - - result = cli_runner.invoke(cli, ["install"], catch_exceptions=False) - assert result.exit_code == 0 From 83df4f102167b53bfd782efb861718e1392be8c8 Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Wed, 20 Nov 2024 15:32:04 -0500 Subject: [PATCH 66/68] Base Ruff Config --- .vscode/extensions.json | 4 +- cppython/__init__.py | 1 - cppython/builder.py | 60 +++---- cppython/console/__init__.py | 1 - cppython/console/entry.py | 25 ++- cppython/core/__init__.py | 1 - cppython/core/exception.py | 1 - cppython/core/plugin_schema/__init__.py | 1 - cppython/core/plugin_schema/scm.py | 2 +- cppython/core/resolution.py | 22 +-- cppython/core/schema.py | 103 ++++++------ cppython/core/utility.py | 9 +- cppython/data.py | 3 +- cppython/defaults.py | 4 +- cppython/plugins/cmake/__init__.py | 1 - cppython/plugins/cmake/builder.py | 9 +- cppython/plugins/cmake/plugin.py | 8 +- cppython/plugins/cmake/resolution.py | 1 - cppython/plugins/cmake/schema.py | 15 +- cppython/plugins/git/__init__.py | 1 - cppython/plugins/git/plugin.py | 3 +- cppython/plugins/pdm/plugin.py | 7 +- cppython/plugins/vcpkg/__init__.py | 1 - cppython/plugins/vcpkg/plugin.py | 61 ++++--- cppython/plugins/vcpkg/resolution.py | 8 +- cppython/plugins/vcpkg/schema.py | 16 +- cppython/project.py | 26 +-- cppython/schema.py | 1 - cppython/test/mock/generator.py | 1 - cppython/test/mock/provider.py | 3 - cppython/test/mock/scm.py | 3 +- cppython/test/pytest/shared.py | 95 +++++------ cppython/test/pytest/tests.py | 12 +- cppython/test/pytest/variants.py | 6 +- cppython/utility/subprocess.py | 5 +- cppython/utility/utility.py | 13 +- pdm.lock | 156 +++++------------- pyproject.toml | 64 +++---- tests/__init__.py | 1 - tests/conftest.py | 81 ++++----- tests/integration/__init__.py | 1 - tests/integration/plugins/__init__.py | 1 - tests/integration/plugins/cmake/__init__.py | 1 - .../plugins/cmake/test_generator.py | 5 +- tests/integration/plugins/pdm/__init__.py | 1 - .../integration/plugins/pdm/test_interface.py | 6 +- tests/integration/plugins/vcpkg/__init__.py | 1 - .../plugins/vcpkg/test_provider.py | 4 +- tests/integration/test/__init__.py | 1 - tests/integration/test/test_generator.py | 5 +- tests/integration/test/test_provider.py | 5 +- tests/integration/test/test_scm.py | 7 +- tests/unit/__init__.py | 1 - tests/unit/core/__init__.py | 1 - tests/unit/core/test_plugin_schema.py | 13 +- tests/unit/core/test_resolution.py | 46 +++--- tests/unit/core/test_schema.py | 13 +- tests/unit/plugins/__init__.py | 1 - tests/unit/plugins/cmake/__init__.py | 1 - tests/unit/plugins/cmake/test_generator.py | 56 +++---- tests/unit/plugins/git/__init__.py | 1 - .../unit/plugins/git/test_version_control.py | 2 +- tests/unit/plugins/pdm/__init__.py | 1 - tests/unit/plugins/pdm/test_interface.py | 3 +- tests/unit/plugins/vcpkg/__init__.py | 1 - tests/unit/plugins/vcpkg/test_provider.py | 5 +- tests/unit/test/__init__.py | 1 - tests/unit/test/test_fixtures.py | 3 +- tests/unit/test/test_generator.py | 5 +- tests/unit/test/test_provider.py | 6 +- tests/unit/test/test_scm.py | 5 +- tests/unit/test_builder.py | 6 +- tests/unit/test_console.py | 12 +- tests/unit/test_data.py | 5 +- tests/unit/test_project.py | 28 ++-- tests/unit/utility/test_plugin.py | 5 +- tests/unit/utility/test_utility.py | 84 +++++----- 77 files changed, 473 insertions(+), 705 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 493d170..89243e9 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,8 +1,8 @@ { "recommendations": [ "ms-python.mypy-type-checker", - "ms-python.pylint", "ms-python.black-formatter", - "asciidoctor.asciidoctor-vscode" + "asciidoctor.asciidoctor-vscode", + "charliermarsh.ruff" ] } \ No newline at end of file diff --git a/cppython/__init__.py b/cppython/__init__.py index 5f28270..e69de29 100644 --- a/cppython/__init__.py +++ b/cppython/__init__.py @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/cppython/builder.py b/cppython/builder.py index 027be6d..2aa5cb2 100644 --- a/cppython/builder.py +++ b/cppython/builder.py @@ -40,7 +40,6 @@ class Resolver: """The resolution of data sources for the builder""" def __init__(self, project_configuration: ProjectConfiguration, logger: Logger) -> None: - self._project_configuration = project_configuration self._logger = logger @@ -56,19 +55,18 @@ def generate_plugins( Returns: The resolved plugin data """ - raw_generator_plugins = self.find_generators() generator_plugins = self.filter_plugins( raw_generator_plugins, cppython_local_configuration.generator_name, - "Generator", + 'Generator', ) raw_provider_plugins = self.find_providers() provider_plugins = self.filter_plugins( raw_provider_plugins, cppython_local_configuration.provider_name, - "Provider", + 'Provider', ) scm_plugins = self.find_source_managers() @@ -89,7 +87,6 @@ def generate_cppython_plugin_data(self, plugin_build_data: PluginBuildData) -> P Returns: The plugin data used by CPPython """ - return PluginCPPythonData( generator_name=plugin_build_data.generator_type.name(), provider_name=plugin_build_data.provider_type.name(), @@ -117,7 +114,6 @@ def resolve_global_config(self) -> CPPythonGlobalConfiguration: Returns: The global configuration object """ - return CPPythonGlobalConfiguration() def find_generators(self) -> list[type[Generator]]: @@ -129,12 +125,11 @@ def find_generators(self) -> list[type[Generator]]: Returns: The list of generator plugin types """ - - group_name = "generator" + group_name = 'generator' plugin_types: list[type[Generator]] = [] # Filter entries by type - for entry_point in list(entry_points(group=f"cppython.{group_name}")): + for entry_point in list(entry_points(group=f'cppython.{group_name}')): loaded_type = entry_point.load() if not issubclass(loaded_type, Generator): self._logger.warning( @@ -142,11 +137,11 @@ def find_generators(self) -> list[type[Generator]]: f" '{group_name}'" ) else: - self._logger.warning(f"{group_name} plugin found: {loaded_type.name()} from {getmodule(loaded_type)}") + self._logger.warning(f'{group_name} plugin found: {loaded_type.name()} from {getmodule(loaded_type)}') plugin_types.append(loaded_type) if not plugin_types: - raise PluginError(f"No {group_name} plugin was found") + raise PluginError(f'No {group_name} plugin was found') return plugin_types @@ -159,12 +154,11 @@ def find_providers(self) -> list[type[Provider]]: Returns: The list of provider plugin types """ - - group_name = "provider" + group_name = 'provider' plugin_types: list[type[Provider]] = [] # Filter entries by type - for entry_point in list(entry_points(group=f"cppython.{group_name}")): + for entry_point in list(entry_points(group=f'cppython.{group_name}')): loaded_type = entry_point.load() if not issubclass(loaded_type, Provider): self._logger.warning( @@ -172,11 +166,11 @@ def find_providers(self) -> list[type[Provider]]: f" '{group_name}'" ) else: - self._logger.warning(f"{group_name} plugin found: {loaded_type.name()} from {getmodule(loaded_type)}") + self._logger.warning(f'{group_name} plugin found: {loaded_type.name()} from {getmodule(loaded_type)}') plugin_types.append(loaded_type) if not plugin_types: - raise PluginError(f"No {group_name} plugin was found") + raise PluginError(f'No {group_name} plugin was found') return plugin_types @@ -189,12 +183,11 @@ def find_source_managers(self) -> list[type[SCM]]: Returns: The list of source control manager plugin types """ - - group_name = "scm" + group_name = 'scm' plugin_types: list[type[SCM]] = [] # Filter entries by type - for entry_point in list(entry_points(group=f"cppython.{group_name}")): + for entry_point in list(entry_points(group=f'cppython.{group_name}')): loaded_type = entry_point.load() if not issubclass(loaded_type, SCM): self._logger.warning( @@ -202,17 +195,17 @@ def find_source_managers(self) -> list[type[SCM]]: f" '{group_name}'" ) else: - self._logger.warning(f"{group_name} plugin found: {loaded_type.name()} from {getmodule(loaded_type)}") + self._logger.warning(f'{group_name} plugin found: {loaded_type.name()} from {getmodule(loaded_type)}') plugin_types.append(loaded_type) if not plugin_types: - raise PluginError(f"No {group_name} plugin was found") + raise PluginError(f'No {group_name} plugin was found') return plugin_types - def filter_plugins[ - T: DataPlugin - ](self, plugin_types: list[type[T]], pinned_name: str | None, group_name: str) -> list[type[T]]: + def filter_plugins[T: DataPlugin]( + self, plugin_types: list[type[T]], pinned_name: str | None, group_name: str + ) -> list[type[T]]: """Finds and filters data plugins Args: @@ -226,13 +219,12 @@ def filter_plugins[ Returns: The list of applicable plugins """ - # Lookup the requested plugin if given if pinned_name is not None: for loaded_type in plugin_types: if loaded_type.name() == pinned_name: self._logger.warning( - f"Using {group_name} plugin: {loaded_type.name()} from {getmodule(loaded_type)}" + f'Using {group_name} plugin: {loaded_type.name()} from {getmodule(loaded_type)}' ) return [loaded_type] @@ -243,13 +235,13 @@ def filter_plugins[ # Deduce types for loaded_type in plugin_types: self._logger.warning( - f"A {group_name} plugin is supported: {loaded_type.name()} from {getmodule(loaded_type)}" + f'A {group_name} plugin is supported: {loaded_type.name()} from {getmodule(loaded_type)}' ) supported_types.append(loaded_type) # Fail if supported_types is None: - raise PluginError(f"No {group_name} could be deduced from the root directory.") + raise PluginError(f'No {group_name} could be deduced from the root directory.') return supported_types @@ -263,12 +255,11 @@ def select_scm(self, scm_plugins: list[type[SCM]], project_data: ProjectData) -> Returns: The selected SCM plugin type """ - for scm_type in scm_plugins: if scm_type.features(project_data.pyproject_file.parent).repository: return scm_type - self._logger.info("No SCM plugin was found that supports the given path") + self._logger.info('No SCM plugin was found that supports the given path') return DefaultSCM @@ -287,7 +278,6 @@ def solve( Returns: A tuple of the selected generator and provider plugin types """ - combos: list[tuple[type[Generator], type[Provider]]] = [] for generator_type in generator_types: @@ -299,7 +289,7 @@ def solve( break if not combos: - raise PluginError("No provider that supports a given generator could be deduced") + raise PluginError('No provider that supports a given generator could be deduced') return combos[0] @@ -317,7 +307,6 @@ def create_scm( Returns: The constructed source control manager """ - cppython_plugin_data = resolve_cppython_plugin(core_data.cppython_data, scm_type) scm_data = resolve_scm(core_data.project_data, cppython_plugin_data) @@ -343,7 +332,6 @@ def create_generator( Returns: The constructed generator """ - cppython_plugin_data = resolve_cppython_plugin(core_data.cppython_data, generator_type) generator_data = resolve_generator(core_data.project_data, cppython_plugin_data) @@ -379,7 +367,6 @@ def create_provider( Returns: A constructed provider plugins """ - cppython_plugin_data = resolve_cppython_plugin(core_data.cppython_data, provider_type) provider_data = resolve_provider(core_data.project_data, cppython_plugin_data) @@ -412,7 +399,7 @@ def __init__(self, project_configuration: ProjectConfiguration, logger: Logger) self._logger.addHandler(logging.StreamHandler()) self._logger.setLevel(levels[project_configuration.verbosity]) - self._logger.info("Logging setup complete") + self._logger.info('Logging setup complete') self._resolver = Resolver(self._project_configuration, self._logger) @@ -433,7 +420,6 @@ def build( Returns: The built data object """ - project_data = resolve_project_configuration(self._project_configuration) if plugin_build_data is None: diff --git a/cppython/console/__init__.py b/cppython/console/__init__.py index 5f28270..e69de29 100644 --- a/cppython/console/__init__.py +++ b/cppython/console/__init__.py @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/cppython/console/entry.py b/cppython/console/entry.py index 71e2e36..5ddb029 100644 --- a/cppython/console/entry.py +++ b/cppython/console/entry.py @@ -19,15 +19,14 @@ def _find_pyproject_file() -> Path: Returns: The found directory """ - # Search for a path upward path = Path.cwd() - while not path.glob("pyproject.toml"): + while not path.glob('pyproject.toml'): if path.is_absolute(): - assert ( - False - ), "This is not a valid project. No pyproject.toml found in the current directory or any of its parents." + assert False, ( + 'This is not a valid project. No pyproject.toml found in the current directory or any of its parents.' + ) path = Path(path) @@ -38,7 +37,7 @@ def _find_pyproject_file() -> Path: def main( context: typer.Context, verbose: Annotated[ - int, typer.Option("-v", "--verbose", count=True, min=0, max=2, help="Print additional output") + int, typer.Option('-v', '--verbose', count=True, min=0, max=2, help='Print additional output') ] = 0, debug: Annotated[bool, typer.Option()] = False, ) -> None: @@ -49,9 +48,8 @@ def main( verbose: The verbosity level debug: Debug mode """ - path = _find_pyproject_file() - file_path = path / "pyproject.toml" + file_path = path / 'pyproject.toml' project_configuration = ProjectConfiguration(verbosity=verbose, debug=debug, pyproject_file=file_path, version=None) @@ -78,12 +76,11 @@ def install( Raises: ValueError: If the configuration object is missing """ - if (configuration := context.find_object(ConsoleConfiguration)) is None: - raise ValueError("The configuration object is missing") + raise ValueError('The configuration object is missing') path = configuration.project_configuration.pyproject_file - pyproject_data = loads(path.read_text(encoding="utf-8")) + pyproject_data = loads(path.read_text(encoding='utf-8')) project = Project(configuration.project_configuration, configuration.interface, pyproject_data) project.install() @@ -102,16 +99,16 @@ def update( ValueError: If the configuration object is missing """ if (configuration := context.find_object(ConsoleConfiguration)) is None: - raise ValueError("The configuration object is missing") + raise ValueError('The configuration object is missing') path = configuration.project_configuration.pyproject_file - pyproject_data = loads(path.read_text(encoding="utf-8")) + pyproject_data = loads(path.read_text(encoding='utf-8')) project = Project(configuration.project_configuration, configuration.interface, pyproject_data) project.update() -@app.command(name="list") +@app.command(name='list') def list_command( _: typer.Context, ) -> None: diff --git a/cppython/core/__init__.py b/cppython/core/__init__.py index 5f28270..e69de29 100644 --- a/cppython/core/__init__.py +++ b/cppython/core/__init__.py @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/cppython/core/exception.py b/cppython/core/exception.py index c1074e6..b7ec551 100644 --- a/cppython/core/exception.py +++ b/cppython/core/exception.py @@ -13,7 +13,6 @@ class ConfigException(ValueError): """Raised when there is a configuration error""" def __init__(self, message: str, errors: list[ConfigError]): - super().__init__(message) self._errors = errors diff --git a/cppython/core/plugin_schema/__init__.py b/cppython/core/plugin_schema/__init__.py index 5f28270..e69de29 100644 --- a/cppython/core/plugin_schema/__init__.py +++ b/cppython/core/plugin_schema/__init__.py @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/cppython/core/plugin_schema/scm.py b/cppython/core/plugin_schema/scm.py index 1582f19..b9afe16 100644 --- a/cppython/core/plugin_schema/scm.py +++ b/cppython/core/plugin_schema/scm.py @@ -16,7 +16,7 @@ class SupportedSCMFeatures(SupportedFeatures): """SCM plugin feature support""" repository: Annotated[ - bool, Field(description="True if the directory is a repository for the SCM. False, otherwise") + bool, Field(description='True if the directory is a repository for the SCM. False, otherwise') ] diff --git a/cppython/core/resolution.py b/cppython/core/resolution.py index 1774a26..17e47c8 100644 --- a/cppython/core/resolution.py +++ b/cppython/core/resolution.py @@ -53,9 +53,8 @@ def resolve_pep621( Returns: The resolved type """ - # Update the dynamic version - if "version" in pep621_configuration.dynamic: + if 'version' in pep621_configuration.dynamic: if project_configuration.version is not None: modified_version = project_configuration.version elif scm is not None: @@ -111,7 +110,6 @@ def resolve_cppython( Returns: An instance of the resolved type """ - root_directory = project_data.pyproject_file.parent.absolute() # Add the base path to all relative paths @@ -168,7 +166,6 @@ def resolve_cppython_plugin(cppython_data: CPPythonData, plugin_type: type[Plugi Returns: The resolved type with plugin specific modifications """ - # Add plugin specific paths to the base path modified_install_path = cppython_data.install_path / plugin_type.name() modified_install_path.mkdir(parents=True, exist_ok=True) @@ -196,8 +193,7 @@ def _write_tool_directory(cppython_data: CPPythonData, directory: Path) -> Direc Returns: The written path """ - - plugin_directory = cppython_data.tool_path / "cppython" / directory + plugin_directory = cppython_data.tool_path / 'cppython' / directory plugin_directory.mkdir(parents=True, exist_ok=True) return plugin_directory @@ -213,9 +209,8 @@ def resolve_generator(project_data: ProjectData, cppython_data: CPPythonPluginDa Returns: The plugin specific configuration """ - root_directory = project_data.pyproject_file.parent - tool_directory = _write_tool_directory(cppython_data, Path("generators") / cppython_data.generator_name) + tool_directory = _write_tool_directory(cppython_data, Path('generators') / cppython_data.generator_name) configuration = GeneratorPluginGroupData(root_directory=root_directory, tool_directory=tool_directory) return configuration @@ -230,9 +225,8 @@ def resolve_provider(project_data: ProjectData, cppython_data: CPPythonPluginDat Returns: The plugin specific configuration """ - root_directory = project_data.pyproject_file.parent - tool_directory = _write_tool_directory(cppython_data, Path("providers") / cppython_data.provider_name) + tool_directory = _write_tool_directory(cppython_data, Path('providers') / cppython_data.provider_name) configuration = ProviderPluginGroupData(root_directory=root_directory, tool_directory=tool_directory) return configuration @@ -247,9 +241,8 @@ def resolve_scm(project_data: ProjectData, cppython_data: CPPythonPluginData) -> Returns: The plugin specific configuration """ - root_directory = project_data.pyproject_file.parent - tool_directory = _write_tool_directory(cppython_data, Path("managers") / cppython_data.scm_name) + tool_directory = _write_tool_directory(cppython_data, Path('managers') / cppython_data.scm_name) configuration = SCMPluginGroupData(root_directory=root_directory, tool_directory=tool_directory) return configuration @@ -267,12 +260,11 @@ def resolve_model[T: BaseModel](model: type[T], data: dict[str, Any]) -> T: Returns: The instance of the model """ - try: # BaseModel is setup to ignore extra fields return model(**data) except ValidationError as e: new_errors: list[ConfigError] = [] for error in e.errors(): - new_errors.append(ConfigError(message=error["msg"])) - raise ConfigException("The input project failed", new_errors) from e + new_errors.append(ConfigError(message=error['msg'])) + raise ConfigException('The input project failed', new_errors) from e diff --git a/cppython/core/schema.py b/cppython/core/schema.py index 791e186..015225d 100644 --- a/cppython/core/schema.py +++ b/cppython/core/schema.py @@ -14,36 +14,36 @@ class CPPythonModel(BaseModel): """The base model to use for all CPPython models""" - model_config = {"populate_by_name": False} + model_config = {'populate_by_name': False} -class ProjectData(CPPythonModel, extra="forbid"): +class ProjectData(CPPythonModel, extra='forbid'): """Resolved data of 'ProjectConfiguration'""" - pyproject_file: Annotated[FilePath, Field(description="The path where the pyproject.toml exists")] - verbosity: Annotated[int, Field(description="The verbosity level as an integer [0,2]")] = 0 + pyproject_file: Annotated[FilePath, Field(description='The path where the pyproject.toml exists')] + verbosity: Annotated[int, Field(description='The verbosity level as an integer [0,2]')] = 0 -class ProjectConfiguration(CPPythonModel, extra="forbid"): +class ProjectConfiguration(CPPythonModel, extra='forbid'): """Project-wide configuration""" - pyproject_file: Annotated[FilePath, Field(description="The path where the pyproject.toml exists")] + pyproject_file: Annotated[FilePath, Field(description='The path where the pyproject.toml exists')] version: Annotated[ str | None, Field( description=( "The version number a 'dynamic' project version will resolve to. If not provided" - "a CPPython project will" - " initialize its SCM plugins to discover any available version" + 'a CPPython project will' + ' initialize its SCM plugins to discover any available version' ) ), ] - verbosity: Annotated[int, Field(description="The verbosity level as an integer [0,2]")] = 0 + verbosity: Annotated[int, Field(description='The verbosity level as an integer [0,2]')] = 0 debug: Annotated[ - bool, Field(description="Debug mode. Additional processing will happen to expose more debug information") + bool, Field(description='Debug mode. Additional processing will happen to expose more debug information') ] = False - @field_validator("verbosity") + @field_validator('verbosity') @classmethod def min_max(cls, value: int) -> int: """Validator that clamps the input value @@ -56,7 +56,7 @@ def min_max(cls, value: int) -> int: """ return min(max(value, 0), 2) - @field_validator("pyproject_file") + @field_validator('pyproject_file') @classmethod def pyproject_name(cls, value: FilePath) -> FilePath: """Validator that verifies the name of the file @@ -70,8 +70,7 @@ def pyproject_name(cls, value: FilePath) -> FilePath: Returns: The file path """ - - if value.name != "pyproject.toml": + if value.name != 'pyproject.toml': raise ValueError('The given file is not named "pyproject.toml"') return value @@ -91,14 +90,14 @@ class PEP621Configuration(CPPythonModel): Schema: https://www.python.org/dev/peps/pep-0621/ """ - dynamic: Annotated[list[str], Field(description="https://peps.python.org/pep-0621/#dynamic")] = [] - name: Annotated[str, Field(description="https://peps.python.org/pep-0621/#name")] - version: Annotated[str | None, Field(description="https://peps.python.org/pep-0621/#version")] = None - description: Annotated[str, Field(description="https://peps.python.org/pep-0621/#description")] = "" + dynamic: Annotated[list[str], Field(description='https://peps.python.org/pep-0621/#dynamic')] = [] + name: Annotated[str, Field(description='https://peps.python.org/pep-0621/#name')] + version: Annotated[str | None, Field(description='https://peps.python.org/pep-0621/#version')] = None + description: Annotated[str, Field(description='https://peps.python.org/pep-0621/#description')] = '' - @model_validator(mode="after") # type: ignore + @model_validator(mode='after') # type: ignore @classmethod - def dynamic_data(cls, model: "PEP621Configuration") -> "PEP621Configuration": + def dynamic_data(cls, model: 'PEP621Configuration') -> 'PEP621Configuration': """Validates that dynamic data is represented correctly Args: @@ -110,26 +109,24 @@ def dynamic_data(cls, model: "PEP621Configuration") -> "PEP621Configuration": Returns: The data """ - for field in model.model_fields.keys(): - if field == "dynamic": + if field == 'dynamic': continue value = getattr(model, field) if field not in model.dynamic: if value is None: raise ValueError(f"'{field}' is not a dynamic field. It must be defined") - else: - if value is not None: - raise ValueError(f"'{field}' is a dynamic field. It must not be defined") + elif value is not None: + raise ValueError(f"'{field}' is a dynamic field. It must not be defined") return model def _default_install_location() -> Path: - return Path.home() / ".cppython" + return Path.home() / '.cppython' -class CPPythonData(CPPythonModel, extra="forbid"): +class CPPythonData(CPPythonModel, extra='forbid'): """Resolved CPPython data with local and global configuration""" install_path: DirectoryPath @@ -140,7 +137,7 @@ class CPPythonData(CPPythonModel, extra="forbid"): generator_name: TypeName scm_name: TypeName - @field_validator("install_path", "tool_path", "build_path") + @field_validator('install_path', 'tool_path', 'build_path') @classmethod def validate_absolute_path(cls, value: DirectoryPath) -> DirectoryPath: """Enforce the input is an absolute path @@ -155,12 +152,12 @@ def validate_absolute_path(cls, value: DirectoryPath) -> DirectoryPath: The validated input value """ if not value.is_absolute(): - raise ValueError("Absolute path required") + raise ValueError('Absolute path required') return value -CPPythonPluginData = NewType("CPPythonPluginData", CPPythonData) +CPPythonPluginData = NewType('CPPythonPluginData', CPPythonData) class SyncData(CPPythonModel): @@ -173,7 +170,7 @@ class SupportedFeatures(CPPythonModel): """Plugin feature support""" initialization: Annotated[ - bool, Field(description="Whether the plugin supports initialization from an empty state") + bool, Field(description='Whether the plugin supports initialization from an empty state') ] = False @@ -181,16 +178,16 @@ class Information(CPPythonModel): """Plugin information that complements the packaged project metadata""" -class PluginGroupData(CPPythonModel, extra="forbid"): +class PluginGroupData(CPPythonModel, extra='forbid'): """Plugin group data""" - root_directory: Annotated[DirectoryPath, Field(description="The directory of the project")] + root_directory: Annotated[DirectoryPath, Field(description='The directory of the project')] tool_directory: Annotated[ DirectoryPath, Field( description=( - "Points to the project plugin directory within the tool directory. " - "This directory is for project specific cached data." + 'Points to the project plugin directory within the tool directory. ' + 'This directory is for project specific cached data.' ) ), ] @@ -274,32 +271,32 @@ async def download_tooling(cls, directory: DirectoryPath) -> None: """ -class CPPythonGlobalConfiguration(CPPythonModel, extra="forbid"): +class CPPythonGlobalConfiguration(CPPythonModel, extra='forbid'): """Global data extracted by the tool""" - current_check: Annotated[bool, Field(alias="current-check", description="Checks for a new CPPython version")] = True + current_check: Annotated[bool, Field(alias='current-check', description='Checks for a new CPPython version')] = True -ProviderData = NewType("ProviderData", dict[str, Any]) -GeneratorData = NewType("GeneratorData", dict[str, Any]) +ProviderData = NewType('ProviderData', dict[str, Any]) +GeneratorData = NewType('GeneratorData', dict[str, Any]) -class CPPythonLocalConfiguration(CPPythonModel, extra="forbid"): +class CPPythonLocalConfiguration(CPPythonModel, extra='forbid'): """Data required by the tool""" install_path: Annotated[ Path, Field( - alias="install-path", - description="The global install path for the project", + alias='install-path', + description='The global install path for the project', ), ] = _default_install_location() - tool_path: Annotated[Path, Field(alias="tool-path", description="The local tooling path for the project")] = Path( - "tool" + tool_path: Annotated[Path, Field(alias='tool-path', description='The local tooling path for the project')] = Path( + 'tool' ) - build_path: Annotated[Path, Field(alias="build-path", description="The local build path for the project")] = Path( - "build" + build_path: Annotated[Path, Field(alias='build-path', description='The local build path for the project')] = Path( + 'build' ) provider: Annotated[ProviderData, Field(description="Provider plugin data associated with 'provider_name")] = ( @@ -309,8 +306,8 @@ class CPPythonLocalConfiguration(CPPythonModel, extra="forbid"): provider_name: Annotated[ TypeName | None, Field( - alias="provider-name", - description="If empty, the provider will be automatically deduced.", + alias='provider-name', + description='If empty, the provider will be automatically deduced.', ), ] = None @@ -321,8 +318,8 @@ class CPPythonLocalConfiguration(CPPythonModel, extra="forbid"): generator_name: Annotated[ TypeName | None, Field( - alias="generator-name", - description="If empty, the generator will be automatically deduced.", + alias='generator-name', + description='If empty, the generator will be automatically deduced.', ), ] = None @@ -330,14 +327,14 @@ class CPPythonLocalConfiguration(CPPythonModel, extra="forbid"): class ToolData(CPPythonModel): """Tool entry of pyproject.toml""" - cppython: Annotated[CPPythonLocalConfiguration | None, Field(description="CPPython tool data")] = None + cppython: Annotated[CPPythonLocalConfiguration | None, Field(description='CPPython tool data')] = None class PyProject(CPPythonModel): """pyproject.toml schema""" - project: Annotated[PEP621Configuration, Field(description="PEP621: https://www.python.org/dev/peps/pep-0621/")] - tool: Annotated[ToolData | None, Field(description="Tool data")] = None + project: Annotated[PEP621Configuration, Field(description='PEP621: https://www.python.org/dev/peps/pep-0621/')] + tool: Annotated[ToolData | None, Field(description='Tool data')] = None class CoreData(CPPythonModel): diff --git a/cppython/core/utility.py b/cppython/core/utility.py index c930759..b361baf 100644 --- a/cppython/core/utility.py +++ b/cppython/core/utility.py @@ -16,8 +16,7 @@ def read_json(path: Path) -> Any: Returns: The json data """ - - with open(path, "r", encoding="utf-8") as file: + with open(path, encoding='utf-8') as file: return json.load(file) @@ -28,9 +27,8 @@ def write_model_json(path: Path, model: BaseModel) -> None: path: The json file to write model: The model to write into a json """ - serialized = json.loads(model.model_dump_json(exclude_none=True)) - with open(path, "w", encoding="utf8") as file: + with open(path, 'w', encoding='utf8') as file: json.dump(serialized, file, ensure_ascii=False, indent=4) @@ -41,6 +39,5 @@ def write_json(path: Path, data: Any) -> None: path: The json to write data: The data to write into json """ - - with open(path, "w", encoding="utf-8") as file: + with open(path, 'w', encoding='utf-8') as file: json.dump(data, file, ensure_ascii=False, indent=4) diff --git a/cppython/data.py b/cppython/data.py index 9ce5867..5b0d7b0 100644 --- a/cppython/data.py +++ b/cppython/data.py @@ -38,7 +38,6 @@ def sync(self) -> None: Raises: PluginError: Plugin error """ - if (sync_data := self.plugins.provider.sync_data(self.plugins.generator)) is None: raise PluginError("The provider doesn't support the generator") @@ -52,5 +51,5 @@ async def download_provider_tools(self) -> None: path.mkdir(parents=True, exist_ok=True) - self.logger.warning("Downloading the %s requirements to %s", self.plugins.provider.name(), path) + self.logger.warning('Downloading the %s requirements to %s', self.plugins.provider.name(), path) await self.plugins.provider.download_tooling(path) diff --git a/cppython/defaults.py b/cppython/defaults.py index afe02dc..e685ea6 100644 --- a/cppython/defaults.py +++ b/cppython/defaults.py @@ -1,6 +1,7 @@ """Defines a SCM subclass that is used as the default SCM if no plugin is found or selected""" from pydantic import DirectoryPath + from cppython.core.plugin_schema.scm import SCM, SCMPluginGroupData, SupportedSCMFeatures from cppython.core.schema import Information @@ -21,7 +22,6 @@ def features(directory: DirectoryPath) -> SupportedSCMFeatures: Returns: The supported features """ - return SupportedSCMFeatures(repository=True) @staticmethod @@ -39,4 +39,4 @@ def version(self, _: DirectoryPath) -> str: Returns: A version """ - return "1.0.0" + return '1.0.0' diff --git a/cppython/plugins/cmake/__init__.py b/cppython/plugins/cmake/__init__.py index 5f28270..e69de29 100644 --- a/cppython/plugins/cmake/__init__.py +++ b/cppython/plugins/cmake/__init__.py @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/cppython/plugins/cmake/builder.py b/cppython/plugins/cmake/builder.py index 72d00a2..73ffadc 100644 --- a/cppython/plugins/cmake/builder.py +++ b/cppython/plugins/cmake/builder.py @@ -17,11 +17,10 @@ def write_provider_preset(self, provider_directory: Path, data: CMakeSyncData) - provider_directory: The base directory to place the preset files data: The providers synchronization data """ - configure_preset = ConfigurePreset(name=data.provider_name, cacheVariables=None) presets = CMakePresets(configurePresets=[configure_preset]) - json_path = provider_directory / f"{data.provider_name}.json" + json_path = provider_directory / f'{data.provider_name}.json' write_model_json(json_path, presets) @@ -36,11 +35,10 @@ def write_cppython_preset( Returns: A file path to the written data """ - - configure_preset = ConfigurePreset(name="cppython", cacheVariables=None) + configure_preset = ConfigurePreset(name='cppython', cacheVariables=None) presets = CMakePresets(configurePresets=[configure_preset]) - cppython_json_path = cppython_preset_directory / "cppython.json" + cppython_json_path = cppython_preset_directory / 'cppython.json' write_model_json(cppython_json_path, presets) return cppython_json_path @@ -55,7 +53,6 @@ def write_root_presets(self, preset_file: Path, _cppython_preset_file: Path) -> Args: preset_file: Preset file to modify """ - initial_root_preset = read_json(preset_file) if (root_preset := deepcopy(initial_root_preset)) != initial_root_preset: diff --git a/cppython/plugins/cmake/plugin.py b/cppython/plugins/cmake/plugin.py index 4e58760..8b031cc 100644 --- a/cppython/plugins/cmake/plugin.py +++ b/cppython/plugins/cmake/plugin.py @@ -33,7 +33,6 @@ def features(directory: Path) -> SupportedGeneratorFeatures: Returns: Supported? """ - return SupportedGeneratorFeatures() @staticmethod @@ -43,7 +42,6 @@ def information() -> Information: Returns: Plugin information """ - return Information() @staticmethod @@ -53,7 +51,6 @@ def sync_types() -> list[type[SyncData]]: Returns: The available types """ - return [CMakeSyncData] def sync(self, sync_data: SyncData) -> None: @@ -62,12 +59,11 @@ def sync(self, sync_data: SyncData) -> None: Args: sync_data: The input data """ - if isinstance(sync_data, CMakeSyncData): - cppython_preset_directory = self.core_data.cppython_data.tool_path / "cppython" + cppython_preset_directory = self.core_data.cppython_data.tool_path / 'cppython' cppython_preset_directory.mkdir(parents=True, exist_ok=True) - provider_directory = cppython_preset_directory / "providers" + provider_directory = cppython_preset_directory / 'providers' provider_directory.mkdir(parents=True, exist_ok=True) self.builder.write_provider_preset(provider_directory, sync_data) diff --git a/cppython/plugins/cmake/resolution.py b/cppython/plugins/cmake/resolution.py index b9d0525..ddae351 100644 --- a/cppython/plugins/cmake/resolution.py +++ b/cppython/plugins/cmake/resolution.py @@ -16,7 +16,6 @@ def resolve_cmake_data(data: dict[str, Any], core_data: CorePluginData) -> CMake Returns: The resolved data """ - parsed_data = CMakeConfiguration(**data) root_directory = core_data.project_data.pyproject_file.parent.absolute() diff --git a/cppython/plugins/cmake/schema.py b/cppython/plugins/cmake/schema.py index f732fcb..b1d9520 100644 --- a/cppython/plugins/cmake/schema.py +++ b/cppython/plugins/cmake/schema.py @@ -26,25 +26,26 @@ class VariableType(Enum): UNINITIALIZED = auto() # Type not yet specified. -class CacheVariable(CPPythonModel, extra="forbid"): +class CacheVariable(CPPythonModel, extra='forbid'): """_summary_""" type: None | VariableType value: bool | str -class ConfigurePreset(CPPythonModel, extra="allow"): +class ConfigurePreset(CPPythonModel, extra='allow'): """Partial Configure Preset specification to allow cache variable injection""" name: str cacheVariables: dict[str, None | bool | str | CacheVariable] | None -class CMakePresets(CPPythonModel, extra="allow"): +class CMakePresets(CPPythonModel, extra='allow'): """The schema for the CMakePresets and CMakeUserPresets files. - The only information needed is the configure preset list for cache variable injection""" + The only information needed is the configure preset list for cache variable injection + """ - configurePresets: Annotated[list[ConfigurePreset], Field(description="The list of configure presets")] = [] + configurePresets: Annotated[list[ConfigurePreset], Field(description='The list of configure presets')] = [] class CMakeSyncData(SyncData): @@ -68,5 +69,5 @@ class CMakeConfiguration(CPPythonModel): Field( description="The CMakePreset.json file that will be searched for the given 'configuration_name'", ), - ] = Path("CMakePresets.json") - configuration_name: Annotated[str, Field(description="The CMake configuration preset to look for and override")] + ] = Path('CMakePresets.json') + configuration_name: Annotated[str, Field(description='The CMake configuration preset to look for and override')] diff --git a/cppython/plugins/git/__init__.py b/cppython/plugins/git/__init__.py index 5f28270..e69de29 100644 --- a/cppython/plugins/git/__init__.py +++ b/cppython/plugins/git/__init__.py @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/cppython/plugins/git/plugin.py b/cppython/plugins/git/plugin.py index 995e5fa..7e22edd 100644 --- a/cppython/plugins/git/plugin.py +++ b/cppython/plugins/git/plugin.py @@ -29,7 +29,6 @@ def features(directory: Path) -> SupportedSCMFeatures: Returns: The supported features """ - is_repository = True try: Repo(str(directory)) @@ -56,7 +55,7 @@ def version(self, directory: Path) -> str: Returns: The git version """ - return "" + return '' def description(self) -> str | None: """Requests extraction of the project description""" diff --git a/cppython/plugins/pdm/plugin.py b/cppython/plugins/pdm/plugin.py index d22e484..428e9cb 100644 --- a/cppython/plugins/pdm/plugin.py +++ b/cppython/plugins/pdm/plugin.py @@ -16,7 +16,7 @@ class CPPythonPlugin(Interface): def __init__(self, _core: Core) -> None: post_install.connect(self.on_post_install, weak=False) - self.logger = getLogger("cppython.interface.pdm") + self.logger = getLogger('cppython.interface.pdm') def write_pyproject(self) -> None: """Write to file""" @@ -32,11 +32,10 @@ def on_post_install(self, project: Project, dry_run: bool, **_kwargs: Any) -> No dry_run: If true, won't perform any actions _kwargs: Sink for unknown arguments """ - pyproject_file = project.root.absolute() / project.PYPROJECT_FILENAME # Attach configuration for CPPythonPlugin callbacks - version = project.pyproject.metadata.get("version") + version = project.pyproject.metadata.get('version') verbosity = project.core.ui.verbosity project_configuration = ProjectConfiguration( @@ -46,7 +45,7 @@ def on_post_install(self, project: Project, dry_run: bool, **_kwargs: Any) -> No self.logger.info("CPPython: Entered 'on_post_install'") if (pdm_pyproject := project.pyproject.read()) is None: - self.logger.info("CPPython: Project data was not available") + self.logger.info('CPPython: Project data was not available') return cppython_project = CPPythonProject(project_configuration, self, pdm_pyproject) diff --git a/cppython/plugins/vcpkg/__init__.py b/cppython/plugins/vcpkg/__init__.py index 5f28270..e69de29 100644 --- a/cppython/plugins/vcpkg/__init__.py +++ b/cppython/plugins/vcpkg/__init__.py @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/cppython/plugins/vcpkg/plugin.py b/cppython/plugins/vcpkg/plugin.py index a0f51dc..b5f8edb 100644 --- a/cppython/plugins/vcpkg/plugin.py +++ b/cppython/plugins/vcpkg/plugin.py @@ -54,7 +54,6 @@ def supported_sync_type(sync_type: type[SyncData]) -> bool: Returns: _description_ """ - return sync_type in CMakeGenerator.sync_types() @staticmethod @@ -73,16 +72,15 @@ def _update_provider(cls, path: Path) -> None: Args: path: The path where the script is located """ - - logger = getLogger("cppython.vcpkg") + logger = getLogger('cppython.vcpkg') try: - if system_name == "nt": - subprocess_call([str(WindowsPath("bootstrap-vcpkg.bat"))], logger=logger, cwd=path, shell=True) - elif system_name == "posix": - subprocess_call(["./" + str(PosixPath("bootstrap-vcpkg.sh"))], logger=logger, cwd=path, shell=True) + if system_name == 'nt': + subprocess_call([str(WindowsPath('bootstrap-vcpkg.bat'))], logger=logger, cwd=path, shell=True) + elif system_name == 'posix': + subprocess_call(['./' + str(PosixPath('bootstrap-vcpkg.sh'))], logger=logger, cwd=path, shell=True) except ProcessError: - logger.error("Unable to bootstrap the vcpkg repository", exc_info=True) + logger.error('Unable to bootstrap the vcpkg repository', exc_info=True) raise def sync_data(self, consumer: SyncConsumer) -> SyncData: @@ -97,13 +95,12 @@ def sync_data(self, consumer: SyncConsumer) -> SyncData: Returns: The synch data object """ - for sync_type in consumer.sync_types(): if sync_type == CMakeSyncData: # toolchain_file = self.core_data.cppython_data.install_path / "scripts/buildsystems/vcpkg.cmake" - return CMakeSyncData(provider_name=TypeName("vcpkg"), top_level_includes=Path("test")) + return CMakeSyncData(provider_name=TypeName('vcpkg'), top_level_includes=Path('test')) - raise NotSupportedError("OOF") + raise NotSupportedError('OOF') @classmethod def tooling_downloaded(cls, path: Path) -> bool: @@ -118,13 +115,12 @@ def tooling_downloaded(cls, path: Path) -> bool: Returns: Whether the tooling has been downloaded or not """ - - logger = getLogger("cppython.vcpkg") + logger = getLogger('cppython.vcpkg') try: # Hide output, given an error output is a logic conditional subprocess_call( - ["git", "rev-parse", "--is-inside-work-tree"], + ['git', 'rev-parse', '--is-inside-work-tree'], logger=logger, suppress=True, cwd=path, @@ -145,17 +141,17 @@ async def download_tooling(cls, directory: Path) -> None: Raises: ProcessError: Failed vcpkg calls """ - logger = getLogger("cppython.vcpkg") + logger = getLogger('cppython.vcpkg') if cls.tooling_downloaded(directory): try: logger.debug("Updating the vcpkg repository at '%s'", directory.absolute()) # The entire history is need for vcpkg 'baseline' information - subprocess_call(["git", "fetch", "origin"], logger=logger, cwd=directory) - subprocess_call(["git", "pull"], logger=logger, cwd=directory) + subprocess_call(['git', 'fetch', 'origin'], logger=logger, cwd=directory) + subprocess_call(['git', 'pull'], logger=logger, cwd=directory) except ProcessError: - logger.exception("Unable to update the vcpkg repository") + logger.exception('Unable to update the vcpkg repository') raise else: try: @@ -163,13 +159,13 @@ async def download_tooling(cls, directory: Path) -> None: # The entire history is need for vcpkg 'baseline' information subprocess_call( - ["git", "clone", "https://github.com/microsoft/vcpkg", "."], + ['git', 'clone', 'https://github.com/microsoft/vcpkg', '.'], logger=logger, cwd=directory, ) except ProcessError: - logger.exception("Unable to clone the vcpkg repository") + logger.exception('Unable to clone the vcpkg repository') raise cls._update_provider(directory) @@ -180,29 +176,28 @@ def install(self) -> None: Raises: ProcessError: Failed vcpkg calls """ - manifest_directory = self.core_data.project_data.pyproject_file.parent manifest = generate_manifest(self.core_data, self.data) # Write out the manifest serialized = json.loads(manifest.model_dump_json(exclude_none=True, by_alias=True)) - with open(manifest_directory / "vcpkg.json", "w", encoding="utf8") as file: + with open(manifest_directory / 'vcpkg.json', 'w', encoding='utf8') as file: json.dump(serialized, file, ensure_ascii=False, indent=4) - executable = self.core_data.cppython_data.install_path / "vcpkg" - logger = getLogger("cppython.vcpkg") + executable = self.core_data.cppython_data.install_path / 'vcpkg' + logger = getLogger('cppython.vcpkg') try: subprocess_call( [ executable, - "install", - f"--x-install-root={self.data.install_directory}", + 'install', + f'--x-install-root={self.data.install_directory}', ], logger=logger, cwd=self.core_data.cppython_data.build_path, ) except ProcessError: - logger.exception("Unable to install project dependencies") + logger.exception('Unable to install project dependencies') raise def update(self) -> None: @@ -216,21 +211,21 @@ def update(self) -> None: # Write out the manifest serialized = json.loads(manifest.model_dump_json(exclude_none=True, by_alias=True)) - with open(manifest_directory / "vcpkg.json", "w", encoding="utf8") as file: + with open(manifest_directory / 'vcpkg.json', 'w', encoding='utf8') as file: json.dump(serialized, file, ensure_ascii=False, indent=4) - executable = self.core_data.cppython_data.install_path / "vcpkg" - logger = getLogger("cppython.vcpkg") + executable = self.core_data.cppython_data.install_path / 'vcpkg' + logger = getLogger('cppython.vcpkg') try: subprocess_call( [ executable, - "install", - f"--x-install-root={self.data.install_directory}", + 'install', + f'--x-install-root={self.data.install_directory}', ], logger=logger, cwd=self.core_data.cppython_data.build_path, ) except ProcessError: - logger.exception("Unable to install project dependencies") + logger.exception('Unable to install project dependencies') raise diff --git a/cppython/plugins/vcpkg/resolution.py b/cppython/plugins/vcpkg/resolution.py index c67fd5f..61229c8 100644 --- a/cppython/plugins/vcpkg/resolution.py +++ b/cppython/plugins/vcpkg/resolution.py @@ -21,11 +21,10 @@ def generate_manifest(core_data: CorePluginData, data: VcpkgData) -> Manifest: Returns: The manifest """ - manifest = { - "name": core_data.pep621_data.name, - "version_string": core_data.pep621_data.version, - "dependencies": data.dependencies, + 'name': core_data.pep621_data.name, + 'version_string': core_data.pep621_data.version, + 'dependencies': data.dependencies, } return Manifest(**manifest) @@ -41,7 +40,6 @@ def resolve_vcpkg_data(data: dict[str, Any], core_data: CorePluginData) -> Vcpkg Returns: The resolved data """ - parsed_data = VcpkgConfiguration(**data) root_directory = core_data.project_data.pyproject_file.parent.absolute() diff --git a/cppython/plugins/vcpkg/schema.py b/cppython/plugins/vcpkg/schema.py index 33b91ec..ef34113 100644 --- a/cppython/plugins/vcpkg/schema.py +++ b/cppython/plugins/vcpkg/schema.py @@ -28,22 +28,22 @@ class VcpkgConfiguration(CPPythonModel): install_directory: Annotated[ Path, Field( - alias="install-directory", - description="The referenced dependencies defined by the local vcpkg.json manifest file", + alias='install-directory', + description='The referenced dependencies defined by the local vcpkg.json manifest file', ), - ] = Path("build") + ] = Path('build') dependencies: Annotated[ - list[VcpkgDependency], Field(description="The directory to store the manifest file, vcpkg.json") + list[VcpkgDependency], Field(description='The directory to store the manifest file, vcpkg.json') ] = [] class Manifest(CPPythonModel): """The manifest schema""" - name: Annotated[str, Field(description="The project name")] + name: Annotated[str, Field(description='The project name')] - version_string: Annotated[str, Field(alias="version-string", description="The arbitrary version string")] = "" + version_string: Annotated[str, Field(alias='version-string', description='The arbitrary version string')] = '' - homepage: Annotated[HttpUrl | None, Field(description="Homepage URL")] = None - dependencies: Annotated[list[VcpkgDependency], Field(description="List of dependencies")] = [] + homepage: Annotated[HttpUrl | None, Field(description='Homepage URL')] = None + dependencies: Annotated[list[VcpkgDependency], Field(description='List of dependencies')] = [] diff --git a/cppython/project.py b/cppython/project.py index 33885ea..2df5950 100644 --- a/cppython/project.py +++ b/cppython/project.py @@ -19,11 +19,11 @@ def __init__( ) -> None: self._enabled = False self._interface = interface - self.logger = logging.getLogger("cppython") + self.logger = logging.getLogger('cppython') builder = Builder(project_configuration, self.logger) - self.logger.info("Initializing project") + self.logger.info('Initializing project') try: pyproject = resolve_model(PyProject, pyproject_data) @@ -39,7 +39,7 @@ def __init__( self._enabled = True - self.logger.info("Initialized project successfully") + self.logger.info('Initialized project successfully') @property def enabled(self) -> bool: @@ -57,19 +57,19 @@ def install(self) -> None: Exception: Raised if failed """ if not self._enabled: - self.logger.info("Skipping install because the project is not enabled") + self.logger.info('Skipping install because the project is not enabled') return - self.logger.info("Installing tools") + self.logger.info('Installing tools') asyncio.run(self._data.download_provider_tools()) - self.logger.info("Installing project") - self.logger.info("Installing %s provider", self._data.plugins.provider.name()) + self.logger.info('Installing project') + self.logger.info('Installing %s provider', self._data.plugins.provider.name()) try: self._data.plugins.provider.install() except Exception as exception: - self.logger.error("Provider %s failed to install", self._data.plugins.provider.name()) + self.logger.error('Provider %s failed to install', self._data.plugins.provider.name()) raise exception self._data.sync() @@ -81,19 +81,19 @@ def update(self) -> None: Exception: Raised if failed """ if not self._enabled: - self.logger.info("Skipping update because the project is not enabled") + self.logger.info('Skipping update because the project is not enabled') return - self.logger.info("Updating tools") + self.logger.info('Updating tools') asyncio.run(self._data.download_provider_tools()) - self.logger.info("Updating project") - self.logger.info("Updating %s provider", self._data.plugins.provider.name()) + self.logger.info('Updating project') + self.logger.info('Updating %s provider', self._data.plugins.provider.name()) try: self._data.plugins.provider.update() except Exception as exception: - self.logger.error("Provider %s failed to update", self._data.plugins.provider.name()) + self.logger.error('Provider %s failed to update', self._data.plugins.provider.name()) raise exception self._data.sync() diff --git a/cppython/schema.py b/cppython/schema.py index 2f43a0c..83380a9 100644 --- a/cppython/schema.py +++ b/cppython/schema.py @@ -15,5 +15,4 @@ def install(self) -> None: @abstractmethod def update(self) -> None: """Updates project dependencies""" - raise NotImplementedError() diff --git a/cppython/test/mock/generator.py b/cppython/test/mock/generator.py index b115415..7046c30 100644 --- a/cppython/test/mock/generator.py +++ b/cppython/test/mock/generator.py @@ -58,7 +58,6 @@ def sync_types() -> list[type[SyncData]]: Returns: _description_ """ - return [MockSyncData] def sync(self, sync_data: SyncData) -> None: diff --git a/cppython/test/mock/provider.py b/cppython/test/mock/provider.py index bfc973a..08beb54 100644 --- a/cppython/test/mock/provider.py +++ b/cppython/test/mock/provider.py @@ -40,7 +40,6 @@ def features(directory: DirectoryPath) -> SupportedProviderFeatures: Returns: The supported features """ - return SupportedProviderFeatures() @staticmethod @@ -62,7 +61,6 @@ def supported_sync_type(sync_type: type[SyncData]) -> bool: Returns: Support """ - return sync_type == MockSyncData def sync_data(self, consumer: SyncConsumer) -> SyncData | None: @@ -74,7 +72,6 @@ def sync_data(self, consumer: SyncConsumer) -> SyncData | None: Returns: The sync data object """ - # This is a mock class, so any generator sync type is OK for sync_type in consumer.sync_types(): match sync_type: diff --git a/cppython/test/mock/scm.py b/cppython/test/mock/scm.py index 8365c8b..af50a89 100644 --- a/cppython/test/mock/scm.py +++ b/cppython/test/mock/scm.py @@ -26,7 +26,6 @@ def features(directory: DirectoryPath) -> SupportedSCMFeatures: Returns: The supported features """ - return SupportedSCMFeatures(repository=True) @staticmethod @@ -47,4 +46,4 @@ def version(self, directory: DirectoryPath) -> str: Returns: A version """ - return "1.0.0" + return '1.0.0' diff --git a/cppython/test/pytest/shared.py b/cppython/test/pytest/shared.py index e5a3fcf..11119cc 100644 --- a/cppython/test/pytest/shared.py +++ b/cppython/test/pytest/shared.py @@ -2,7 +2,6 @@ from abc import ABCMeta from importlib.metadata import entry_points -from pathlib import Path from typing import Any, LiteralString, cast import pytest @@ -38,15 +37,14 @@ class BaseTests[T: Plugin](metaclass=ABCMeta): """Shared testing information for all plugin test classes.""" - @pytest.fixture(name="plugin_type", scope="session") + @pytest.fixture(name='plugin_type', scope='session') def fixture_plugin_type(self) -> type[T]: """A required testing hook that allows type generation""" - - raise NotImplementedError("Override this fixture") + raise NotImplementedError('Override this fixture') @pytest.fixture( - name="cppython_plugin_data", - scope="session", + name='cppython_plugin_data', + scope='session', ) def fixture_cppython_plugin_data(self, cppython_data: CPPythonData, plugin_type: type[T]) -> CPPythonPluginData: """Fixture for created the plugin CPPython table @@ -58,12 +56,11 @@ def fixture_cppython_plugin_data(self, cppython_data: CPPythonData, plugin_type: Returns: The plugin specific CPPython table information """ - return resolve_cppython_plugin(cppython_data, plugin_type) @pytest.fixture( - name="core_plugin_data", - scope="session", + name='core_plugin_data', + scope='session', ) def fixture_core_plugin_data( self, cppython_plugin_data: CPPythonPluginData, project_data: ProjectData, pep621_data: PEP621Data @@ -78,18 +75,16 @@ def fixture_core_plugin_data( Returns: Wrapper Core Type """ - return CorePluginData(cppython_data=cppython_plugin_data, project_data=project_data, pep621_data=pep621_data) - @pytest.fixture(name="plugin_group_name", scope="session") + @pytest.fixture(name='plugin_group_name', scope='session') def fixture_plugin_group_name(self) -> LiteralString: """A required testing hook that allows plugin group name generation Returns: The plugin group name """ - - return "cppython" + return 'cppython' class BaseIntegrationTests[T: Plugin](metaclass=ABCMeta): @@ -102,13 +97,12 @@ def test_entry_point(self, plugin_type: type[T], plugin_group_name: LiteralStrin plugin_type: The type to register plugin_group_name: The group name for the plugin type """ - # We only require the entry point to be registered if the plugin is not a Mocked type - if plugin_type.name() == "mock": - pytest.skip("Mocked plugin type") + if plugin_type.name() == 'mock': + pytest.skip('Mocked plugin type') types = [] - for entry in list(entry_points(group=f"{plugin_group_name}.{plugin_type.group()}")): + for entry in list(entry_points(group=f'{plugin_group_name}.{plugin_type.group()}')): types.append(entry.load()) assert plugin_type in types @@ -119,7 +113,6 @@ def test_name(self, plugin_type: type[Plugin]) -> None: Args: plugin_type: The type to register """ - assert plugin_type.group() assert len(plugin_type.group()) @@ -158,8 +151,8 @@ class PluginTests[T: Plugin](BaseTests[T], metaclass=ABCMeta): @staticmethod @pytest.fixture( - name="plugin", - scope="session", + name='plugin', + scope='session', ) def fixture_plugin( plugin_type: type[T], @@ -174,7 +167,6 @@ def fixture_plugin( Returns: A newly constructed provider """ - plugin = plugin_type(plugin_group_data) return plugin @@ -195,8 +187,8 @@ class DataPluginTests[T: DataPlugin](BaseTests[T], metaclass=ABCMeta): @staticmethod @pytest.fixture( - name="plugin", - scope="session", + name='plugin', + scope='session', ) def fixture_plugin( plugin_type: type[T], @@ -215,7 +207,6 @@ def fixture_plugin( Returns: A newly constructed provider """ - plugin = plugin_type(plugin_group_data, core_plugin_data, plugin_data) return plugin @@ -232,17 +223,16 @@ class DataPluginUnitTests[T: DataPlugin](BaseUnitTests[T], metaclass=ABCMeta): class ProviderTests[T: Provider](DataPluginTests[T], metaclass=ABCMeta): """Shared functionality between the different Provider testing categories""" - @pytest.fixture(name="plugin_configuration_type", scope="session") + @pytest.fixture(name='plugin_configuration_type', scope='session') def fixture_plugin_configuration_type(self) -> type[ProviderPluginGroupData]: """A required testing hook that allows plugin configuration data generation Returns: The configuration type """ - return ProviderPluginGroupData - @pytest.fixture(name="plugin_group_data", scope="session") + @pytest.fixture(name='plugin_group_data', scope='session') def fixture_plugin_group_data( self, project_data: ProjectData, cppython_plugin_data: CPPythonPluginData ) -> ProviderPluginGroupData: @@ -255,12 +245,11 @@ def fixture_plugin_group_data( Returns: The plugin configuration """ - return resolve_provider(project_data=project_data, cppython_data=cppython_plugin_data) @pytest.fixture( - name="provider_type", - scope="session", + name='provider_type', + scope='session', params=provider_variants, ) def fixture_provider_type(self, plugin_type: type[T]) -> type[T]: @@ -275,8 +264,8 @@ def fixture_provider_type(self, plugin_type: type[T]) -> type[T]: return plugin_type @pytest.fixture( - name="generator_type", - scope="session", + name='generator_type', + scope='session', params=generator_variants, ) def fixture_generator_type(self, request: pytest.FixtureRequest) -> type[Generator]: @@ -293,8 +282,8 @@ def fixture_generator_type(self, request: pytest.FixtureRequest) -> type[Generat return generator_type @pytest.fixture( - name="scm_type", - scope="session", + name='scm_type', + scope='session', params=scm_variants, ) def fixture_scm_type(self, request: pytest.FixtureRequest) -> type[SCM]: @@ -314,17 +303,16 @@ def fixture_scm_type(self, request: pytest.FixtureRequest) -> type[SCM]: class GeneratorTests[T: Generator](DataPluginTests[T], metaclass=ABCMeta): """Shared functionality between the different Generator testing categories""" - @pytest.fixture(name="plugin_configuration_type", scope="session") + @pytest.fixture(name='plugin_configuration_type', scope='session') def fixture_plugin_configuration_type(self) -> type[GeneratorPluginGroupData]: """A required testing hook that allows plugin configuration data generation Returns: The configuration type """ - return GeneratorPluginGroupData - @pytest.fixture(name="plugin_group_data", scope="session") + @pytest.fixture(name='plugin_group_data', scope='session') def fixture_plugin_group_data( self, project_data: ProjectData, cppython_plugin_data: CPPythonPluginData ) -> GeneratorPluginGroupData: @@ -337,12 +325,11 @@ def fixture_plugin_group_data( Returns: The plugin configuration """ - return resolve_generator(project_data=project_data, cppython_data=cppython_plugin_data) @pytest.fixture( - name="provider_type", - scope="session", + name='provider_type', + scope='session', params=provider_variants, ) def fixture_provider_type(self, request: pytest.FixtureRequest) -> type[Provider]: @@ -359,8 +346,8 @@ def fixture_provider_type(self, request: pytest.FixtureRequest) -> type[Provider return provider_type @pytest.fixture( - name="generator_type", - scope="session", + name='generator_type', + scope='session', ) def fixture_generator_type(self, plugin_type: type[T]) -> type[T]: """Override @@ -371,12 +358,11 @@ def fixture_generator_type(self, plugin_type: type[T]) -> type[T]: Returns: Plugin type """ - return plugin_type @pytest.fixture( - name="scm_type", - scope="session", + name='scm_type', + scope='session', params=scm_variants, ) def fixture_scm_type(self, request: pytest.FixtureRequest) -> type[SCM]: @@ -396,17 +382,16 @@ def fixture_scm_type(self, request: pytest.FixtureRequest) -> type[SCM]: class SCMTests[T: SCM](PluginTests[T], metaclass=ABCMeta): """Shared functionality between the different SCM testing categories""" - @pytest.fixture(name="plugin_configuration_type", scope="session") + @pytest.fixture(name='plugin_configuration_type', scope='session') def fixture_plugin_configuration_type(self) -> type[SCMPluginGroupData]: """A required testing hook that allows plugin configuration data generation Returns: The configuration type """ - return SCMPluginGroupData - @pytest.fixture(name="plugin_group_data", scope="session") + @pytest.fixture(name='plugin_group_data', scope='session') def fixture_plugin_group_data( self, project_data: ProjectData, cppython_plugin_data: CPPythonPluginData ) -> SCMPluginGroupData: @@ -419,12 +404,11 @@ def fixture_plugin_group_data( Returns: The plugin configuration """ - return resolve_scm(project_data=project_data, cppython_data=cppython_plugin_data) @pytest.fixture( - name="provider_type", - scope="session", + name='provider_type', + scope='session', params=provider_variants, ) def fixture_provider_type(self, request: pytest.FixtureRequest) -> type[Provider]: @@ -441,8 +425,8 @@ def fixture_provider_type(self, request: pytest.FixtureRequest) -> type[Provider return provider_type @pytest.fixture( - name="generator_type", - scope="session", + name='generator_type', + scope='session', params=generator_variants, ) def fixture_generator_type(self, request: pytest.FixtureRequest) -> type[Generator]: @@ -459,8 +443,8 @@ def fixture_generator_type(self, request: pytest.FixtureRequest) -> type[Generat return generator_type @pytest.fixture( - name="scm_type", - scope="session", + name='scm_type', + scope='session', params=scm_variants, ) def fixture_scm_type(self, plugin_type: type[T]) -> type[SCM]: @@ -472,5 +456,4 @@ def fixture_scm_type(self, plugin_type: type[T]) -> type[SCM]: Returns: Variation of a Generator """ - return plugin_type diff --git a/cppython/test/pytest/tests.py b/cppython/test/pytest/tests.py index b302365..a41019d 100644 --- a/cppython/test/pytest/tests.py +++ b/cppython/test/pytest/tests.py @@ -24,10 +24,9 @@ class ProviderIntegrationTests[T: Provider](DataPluginIntegrationTests[T], ProviderTests[T], metaclass=ABCMeta): """Base class for all provider integration tests that test plugin agnostic behavior""" - @pytest.fixture(autouse=True, scope="session") + @pytest.fixture(autouse=True, scope='session') def _fixture_install_dependency(self, plugin: T, install_path: Path) -> None: """Forces the download to only happen once per test session""" - path = install_path / canonicalize_type(type(plugin)).name path.mkdir(parents=True, exist_ok=True) @@ -55,7 +54,7 @@ def test_group_name(self, plugin_type: type[T]) -> None: Args: plugin_type: The type to register """ - assert canonicalize_type(plugin_type).group == "provider" + assert canonicalize_type(plugin_type).group == 'provider' class ProviderUnitTests[T: Provider](DataPluginUnitTests[T], ProviderTests[T], metaclass=ABCMeta): @@ -73,12 +72,13 @@ def test_group_name(self, plugin_type: type[T]) -> None: Args: plugin_type: The type to register """ - assert canonicalize_type(plugin_type).group == "generator" + assert canonicalize_type(plugin_type).group == 'generator' class GeneratorUnitTests[T: Generator](DataPluginUnitTests[T], GeneratorTests[T], metaclass=ABCMeta): """Custom implementations of the Generator class should inherit from this class for its tests. - Base class for all Generator unit tests that test plugin agnostic behavior""" + Base class for all Generator unit tests that test plugin agnostic behavior + """ class SCMIntegrationTests[T: SCM](PluginIntegrationTests[T], SCMTests[T], metaclass=ABCMeta): @@ -90,7 +90,7 @@ def test_group_name(self, plugin_type: type[T]) -> None: Args: plugin_type: The type to register """ - assert canonicalize_type(plugin_type).group == "scm" + assert canonicalize_type(plugin_type).group == 'scm' class SCMUnitTests[T: SCM](PluginUnitTests[T], SCMTests[T], metaclass=ABCMeta): diff --git a/cppython/test/pytest/variants.py b/cppython/test/pytest/variants.py index cfc1a85..3c16992 100644 --- a/cppython/test/pytest/variants.py +++ b/cppython/test/pytest/variants.py @@ -26,7 +26,7 @@ def _pep621_configuration_list() -> list[PEP621Configuration]: variants = [] # Default - variants.append(PEP621Configuration(name="default-test", version="1.0.0")) + variants.append(PEP621Configuration(name='default-test', version='1.0.0')) return variants @@ -53,7 +53,7 @@ def _cppython_global_configuration_list() -> list[CPPythonGlobalConfiguration]: """ variants = [] - data = {"current-check": False} + data = {'current-check': False} # Default variants.append(CPPythonGlobalConfiguration()) @@ -75,7 +75,7 @@ def _project_configuration_list() -> list[ProjectConfiguration]: # NOTE: pyproject_file will be overridden by fixture # Default - variants.append(ProjectConfiguration(pyproject_file=Path("pyproject.toml"), version="0.1.0")) + variants.append(ProjectConfiguration(pyproject_file=Path('pyproject.toml'), version='0.1.0')) return variants diff --git a/cppython/utility/subprocess.py b/cppython/utility/subprocess.py index 2c3976d..6cc0c72 100644 --- a/cppython/utility/subprocess.py +++ b/cppython/utility/subprocess.py @@ -27,15 +27,14 @@ def call( Raises: ProcessError: If the underlying process fails """ - with subprocess.Popen(arguments, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, **kwargs) as process: if process.stdout is None: return with process.stdout as pipe: - for line in iter(pipe.readline, ""): + for line in iter(pipe.readline, ''): if not suppress: logger.log(log_level, line.rstrip()) if process.returncode != 0: - raise ProcessError("Subprocess task failed") + raise ProcessError('Subprocess task failed') diff --git a/cppython/utility/utility.py b/cppython/utility/utility.py index a3634a9..dd76f57 100644 --- a/cppython/utility/utility.py +++ b/cppython/utility/utility.py @@ -3,8 +3,8 @@ import re from typing import Any, NamedTuple, NewType -TypeName = NewType("TypeName", str) -TypeGroup = NewType("TypeGroup", str) +TypeName = NewType('TypeName', str) +TypeGroup = NewType('TypeGroup', str) class TypeID(NamedTuple): @@ -14,7 +14,7 @@ class TypeID(NamedTuple): group: TypeGroup -_canonicalize_regex = re.compile(r"((?<=[a-z])[A-Z]|(? TypeID: @@ -26,10 +26,9 @@ def canonicalize_name(name: str) -> TypeID: Returns: The type identifier """ - - sub = re.sub(_canonicalize_regex, r" \1", name) - values = sub.split(" ") - result = "".join(values[:-1]) + sub = re.sub(_canonicalize_regex, r' \1', name) + values = sub.split(' ') + result = ''.join(values[:-1]) return TypeID(TypeName(result.lower()), TypeGroup(values[-1].lower())) diff --git a/pdm.lock b/pdm.lock index 33c88ba..5b8fc6f 100644 --- a/pdm.lock +++ b/pdm.lock @@ -2,10 +2,10 @@ # It is not intended for manual editing. [metadata] -groups = ["default", "git", "lint", "pdm", "test"] +groups = ["default", "git", "lint", "pdm", "pytest", "test"] strategy = ["inherit_metadata"] lock_version = "4.5.0" -content_hash = "sha256:fbf7d1ffa91e1e0bbdfb8b7914d92efe752e5f47867f4ef352e8dc700d7231f0" +content_hash = "sha256:ec7cf5c33e57f13ee4a6c356b95af82b807b3b121edb465ff9697b46e16bdd3c" [[metadata.targets]] requires_python = ">=3.13" @@ -41,44 +41,6 @@ files = [ {file = "anyio-4.6.2.post1.tar.gz", hash = "sha256:4c8bc31ccdb51c7f7bd251f51c609e038d63e34219b44aa86e47576389880b4c"}, ] -[[package]] -name = "astroid" -version = "3.3.5" -requires_python = ">=3.9.0" -summary = "An abstract syntax tree for Python with inference support." -groups = ["lint"] -dependencies = [ - "typing-extensions>=4.0.0; python_version < \"3.11\"", -] -files = [ - {file = "astroid-3.3.5-py3-none-any.whl", hash = "sha256:a9d1c946ada25098d790e079ba2a1b112157278f3fb7e718ae6a9252f5835dc8"}, - {file = "astroid-3.3.5.tar.gz", hash = "sha256:5cfc40ae9f68311075d27ef68a4841bdc5cc7f6cf86671b49f00607d30188e2d"}, -] - -[[package]] -name = "black" -version = "24.10.0" -requires_python = ">=3.9" -summary = "The uncompromising code formatter." -groups = ["lint"] -dependencies = [ - "click>=8.0.0", - "mypy-extensions>=0.4.3", - "packaging>=22.0", - "pathspec>=0.9.0", - "platformdirs>=2", - "tomli>=1.1.0; python_version < \"3.11\"", - "typing-extensions>=4.0.1; python_version < \"3.11\"", -] -files = [ - {file = "black-24.10.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:1cbacacb19e922a1d75ef2b6ccaefcd6e93a2c05ede32f06a21386a04cedb981"}, - {file = "black-24.10.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1f93102e0c5bb3907451063e08b9876dbeac810e7da5a8bfb7aeb5a9ef89066b"}, - {file = "black-24.10.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ddacb691cdcdf77b96f549cf9591701d8db36b2f19519373d60d31746068dbf2"}, - {file = "black-24.10.0-cp313-cp313-win_amd64.whl", hash = "sha256:680359d932801c76d2e9c9068d05c6b107f2584b2a5b88831c83962eb9984c1b"}, - {file = "black-24.10.0-py3-none-any.whl", hash = "sha256:3bb2b7a1f7b685f85b11fed1ef10f8a9148bceb49853e47a294a3dd963c1dd7d"}, - {file = "black-24.10.0.tar.gz", hash = "sha256:846ea64c97afe3bc677b761787993be4991810ecc7a4a937816dd6bddedc4875"}, -] - [[package]] name = "blinker" version = "1.9.0" @@ -106,7 +68,7 @@ name = "click" version = "8.1.7" requires_python = ">=3.7" summary = "Composable command line interface toolkit" -groups = ["default", "lint"] +groups = ["default"] dependencies = [ "colorama; platform_system == \"Windows\"", "importlib-metadata; python_version < \"3.8\"", @@ -121,7 +83,7 @@ name = "colorama" version = "0.4.6" requires_python = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" summary = "Cross-platform colored terminal text." -groups = ["default", "lint", "test"] +groups = ["default", "pytest", "test"] marker = "sys_platform == \"win32\" or platform_system == \"Windows\"" files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, @@ -207,18 +169,6 @@ files = [ {file = "dep_logic-0.4.9.tar.gz", hash = "sha256:5d455ea2a3da4fea2be6186d886905c57eeeebe3ea7fa967f599cb8e0f01d5c9"}, ] -[[package]] -name = "dill" -version = "0.3.9" -requires_python = ">=3.8" -summary = "serialize all of Python" -groups = ["lint"] -marker = "python_version >= \"3.11\"" -files = [ - {file = "dill-0.3.9-py3-none-any.whl", hash = "sha256:468dff3b89520b474c0397703366b7b95eebe6303f108adf9b19da1f702be87a"}, - {file = "dill-0.3.9.tar.gz", hash = "sha256:81aa267dddf68cbfe8029c42ca9ec6a4ab3b22371d1c450abc54422577b4512c"}, -] - [[package]] name = "distlib" version = "0.3.9" @@ -368,7 +318,7 @@ name = "iniconfig" version = "2.0.0" requires_python = ">=3.7" summary = "brain-dead simple config-ini parsing" -groups = ["test"] +groups = ["pytest", "test"] files = [ {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, @@ -385,17 +335,6 @@ files = [ {file = "installer-0.7.0.tar.gz", hash = "sha256:a26d3e3116289bb08216e0d0f7d925fcef0b0194eedfa0c944bcaaa106c4b631"}, ] -[[package]] -name = "isort" -version = "5.13.2" -requires_python = ">=3.8.0" -summary = "A Python utility / library to sort Python imports." -groups = ["lint"] -files = [ - {file = "isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6"}, - {file = "isort-5.13.2.tar.gz", hash = "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109"}, -] - [[package]] name = "markdown-it-py" version = "3.0.0" @@ -410,17 +349,6 @@ files = [ {file = "markdown_it_py-3.0.0-py3-none-any.whl", hash = "sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1"}, ] -[[package]] -name = "mccabe" -version = "0.7.0" -requires_python = ">=3.6" -summary = "McCabe checker, plugin for flake8" -groups = ["lint"] -files = [ - {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, - {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, -] - [[package]] name = "mdurl" version = "0.1.2" @@ -490,23 +418,12 @@ name = "packaging" version = "24.2" requires_python = ">=3.8" summary = "Core utilities for Python packages" -groups = ["default", "lint", "pdm", "test"] +groups = ["default", "pdm", "pytest", "test"] files = [ {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, ] -[[package]] -name = "pathspec" -version = "0.12.1" -requires_python = ">=3.8" -summary = "Utility library for gitignore style pattern matching of file paths." -groups = ["lint"] -files = [ - {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, - {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, -] - [[package]] name = "pbs-installer" version = "2024.10.16" @@ -561,7 +478,7 @@ name = "platformdirs" version = "4.3.6" requires_python = ">=3.8" summary = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." -groups = ["lint", "pdm"] +groups = ["pdm"] files = [ {file = "platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb"}, {file = "platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907"}, @@ -572,7 +489,7 @@ name = "pluggy" version = "1.5.0" requires_python = ">=3.8" summary = "plugin and hook calling mechanisms for python" -groups = ["test"] +groups = ["pytest", "test"] files = [ {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, @@ -631,30 +548,6 @@ files = [ {file = "pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199"}, ] -[[package]] -name = "pylint" -version = "3.3.1" -requires_python = ">=3.9.0" -summary = "python code static checker" -groups = ["lint"] -dependencies = [ - "astroid<=3.4.0-dev0,>=3.3.4", - "colorama>=0.4.5; sys_platform == \"win32\"", - "dill>=0.2; python_version < \"3.11\"", - "dill>=0.3.6; python_version >= \"3.11\"", - "dill>=0.3.7; python_version >= \"3.12\"", - "isort!=5.13.0,<6,>=4.2.5", - "mccabe<0.8,>=0.6", - "platformdirs>=2.2.0", - "tomli>=1.1.0; python_version < \"3.11\"", - "tomlkit>=0.10.1", - "typing-extensions>=3.10.0; python_version < \"3.10\"", -] -files = [ - {file = "pylint-3.3.1-py3-none-any.whl", hash = "sha256:2f846a466dd023513240bc140ad2dd73bfc080a5d85a710afdb728c420a5a2b9"}, - {file = "pylint-3.3.1.tar.gz", hash = "sha256:9f3dcc87b1203e612b78d91a896407787e708b3f189b5fa0b307712d49ff0c6e"}, -] - [[package]] name = "pyproject-hooks" version = "1.2.0" @@ -671,7 +564,7 @@ name = "pytest" version = "8.3.3" requires_python = ">=3.8" summary = "pytest: simple powerful testing with Python" -groups = ["test"] +groups = ["pytest", "test"] dependencies = [ "colorama; sys_platform == \"win32\"", "exceptiongroup>=1.0.0rc8; python_version < \"3.11\"", @@ -705,7 +598,7 @@ name = "pytest-mock" version = "3.14.0" requires_python = ">=3.8" summary = "Thin-wrapper around the mock package for easier use with pytest" -groups = ["test"] +groups = ["pytest", "test"] dependencies = [ "pytest>=6.2.5", ] @@ -752,6 +645,33 @@ files = [ {file = "rich-13.9.4.tar.gz", hash = "sha256:439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098"}, ] +[[package]] +name = "ruff" +version = "0.7.4" +requires_python = ">=3.7" +summary = "An extremely fast Python linter and code formatter, written in Rust." +groups = ["lint"] +files = [ + {file = "ruff-0.7.4-py3-none-linux_armv6l.whl", hash = "sha256:a4919925e7684a3f18e18243cd6bea7cfb8e968a6eaa8437971f681b7ec51478"}, + {file = "ruff-0.7.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:cfb365c135b830778dda8c04fb7d4280ed0b984e1aec27f574445231e20d6c63"}, + {file = "ruff-0.7.4-py3-none-macosx_11_0_arm64.whl", hash = "sha256:63a569b36bc66fbadec5beaa539dd81e0527cb258b94e29e0531ce41bacc1f20"}, + {file = "ruff-0.7.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0d06218747d361d06fd2fdac734e7fa92df36df93035db3dc2ad7aa9852cb109"}, + {file = "ruff-0.7.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e0cea28d0944f74ebc33e9f934238f15c758841f9f5edd180b5315c203293452"}, + {file = "ruff-0.7.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:80094ecd4793c68b2571b128f91754d60f692d64bc0d7272ec9197fdd09bf9ea"}, + {file = "ruff-0.7.4-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:997512325c6620d1c4c2b15db49ef59543ef9cd0f4aa8065ec2ae5103cedc7e7"}, + {file = "ruff-0.7.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:00b4cf3a6b5fad6d1a66e7574d78956bbd09abfd6c8a997798f01f5da3d46a05"}, + {file = "ruff-0.7.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7dbdc7d8274e1422722933d1edddfdc65b4336abf0b16dfcb9dedd6e6a517d06"}, + {file = "ruff-0.7.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e92dfb5f00eaedb1501b2f906ccabfd67b2355bdf117fea9719fc99ac2145bc"}, + {file = "ruff-0.7.4-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:3bd726099f277d735dc38900b6a8d6cf070f80828877941983a57bca1cd92172"}, + {file = "ruff-0.7.4-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:2e32829c429dd081ee5ba39aef436603e5b22335c3d3fff013cd585806a6486a"}, + {file = "ruff-0.7.4-py3-none-musllinux_1_2_i686.whl", hash = "sha256:662a63b4971807623f6f90c1fb664613f67cc182dc4d991471c23c541fee62dd"}, + {file = "ruff-0.7.4-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:876f5e09eaae3eb76814c1d3b68879891d6fde4824c015d48e7a7da4cf066a3a"}, + {file = "ruff-0.7.4-py3-none-win32.whl", hash = "sha256:75c53f54904be42dd52a548728a5b572344b50d9b2873d13a3f8c5e3b91f5cac"}, + {file = "ruff-0.7.4-py3-none-win_amd64.whl", hash = "sha256:745775c7b39f914238ed1f1b0bebed0b9155a17cd8bc0b08d3c87e4703b990d6"}, + {file = "ruff-0.7.4-py3-none-win_arm64.whl", hash = "sha256:11bff065102c3ae9d3ea4dc9ecdfe5a5171349cdd0787c1fc64761212fc9cf1f"}, + {file = "ruff-0.7.4.tar.gz", hash = "sha256:cd12e35031f5af6b9b93715d8c4f40360070b2041f81273d0527683d5708fce2"}, +] + [[package]] name = "shellingham" version = "1.5.4" @@ -790,7 +710,7 @@ name = "tomlkit" version = "0.13.2" requires_python = ">=3.8" summary = "Style preserving TOML library" -groups = ["lint", "pdm"] +groups = ["pdm"] files = [ {file = "tomlkit-0.13.2-py3-none-any.whl", hash = "sha256:7a974427f6e119197f670fbbbeae7bef749a6c14e793db934baefc1b5f03efde"}, {file = "tomlkit-0.13.2.tar.gz", hash = "sha256:fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79"}, diff --git a/pyproject.toml b/pyproject.toml index 5496363..134fdda 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,10 +51,9 @@ vcpkg = "cppython.plugins.vcpkg.plugin:VcpkgProvider" [dependency-groups] lint = [ - "black>=24.10.0", - "pylint>=3.3.1", - "isort>=5.13.2", + "ruff>=0.7.4", "mypy>=1.13", + "isort>=5.13.2", ] test = [ "pytest>=8.3.3", @@ -71,38 +70,45 @@ testpaths = [ "tests", ] -[tool.black] -line-length = 120 -preview = true - -[tool.isort] -profile = "black" -skip_gitignore = true - [tool.mypy] exclude = "__pypackages__" plugins = ["pydantic.mypy"] strict = true -[tool.pylint.MAIN] -load-plugins = [ - "pylint.extensions.code_style", - "pylint.extensions.typing", - "pylint.extensions.docstyle", - "pylint.extensions.docparams", - "pylint.extensions.private_import", - "pylint.extensions.bad_builtin", +[tool.isort] +profile = "black" + +[tool.ruff] +line-length = 120 +preview = true + +[tool.ruff.lint] +ignore = [ + "D206", + "D300", + "D415", + "E111", + "E114", + "E117", +] +select = [ + "D", # pydocstyle + "F", # Pyflakes + "I", # isort + "PL", # pylint + "UP", # pyupgrade + "E", # pycodestyle + "B", # flake8-bugbear + "SIM", # flake8-simplify ] -[tool.pylint.format] -max-line-length = "120" +[tool.ruff.lint.pydocstyle] +convention = "google" -[tool.pylint.parameter_documentation] -accept-no-param-doc = false -accept-no-raise-doc = false -accept-no-return-doc = false -accept-no-yields-doc = false -default-docstring-type = "google" +[tool.ruff.format] +docstring-code-format = true +indent-style = "space" +quote-style = "single" [tool.coverage.report] skip_empty = true @@ -114,8 +120,8 @@ update = ["--update-all"] source = "scm" [tool.pdm.scripts] -analyze = {shell = "pylint --verbose cppython tests"} -format = {shell = "black --check --verbose ."} +analyze = {shell = "ruff check cppython tests"} +format = {shell = "ruff format"} lint = {composite = ["analyze", "format", "sort-imports", "type-check"]} sort-imports = {shell = "isort --check-only --diff --verbose ."} test = {shell = "pytest --cov=cppython --verbose tests"} diff --git a/tests/__init__.py b/tests/__init__.py index 5f28270..e69de29 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tests/conftest.py b/tests/conftest.py index 27885b9..37bcf33 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -46,7 +46,7 @@ def _cmake_data_list() -> list[CMakeConfiguration]: variants = [] # Default - variants.append(CMakeConfiguration(configuration_name="default")) + variants.append(CMakeConfiguration(configuration_name='default')) # variants.append(CMakeConfiguration(preset_file=Path("inner/CMakePresets.json"), configuration_name="default")) @@ -54,8 +54,8 @@ def _cmake_data_list() -> list[CMakeConfiguration]: @pytest.fixture( - name="install_path", - scope="session", + name='install_path', + scope='session', ) def fixture_install_path(tmp_path_factory: pytest.TempPathFactory) -> Path: """Creates temporary install location @@ -70,8 +70,8 @@ def fixture_install_path(tmp_path_factory: pytest.TempPathFactory) -> Path: @pytest.fixture( - name="pep621_configuration", - scope="session", + name='pep621_configuration', + scope='session', params=pep621_variants, ) def fixture_pep621_configuration(request: pytest.FixtureRequest) -> PEP621Configuration: @@ -83,13 +83,12 @@ def fixture_pep621_configuration(request: pytest.FixtureRequest) -> PEP621Config Returns: PEP621 variant """ - return cast(PEP621Configuration, request.param) @pytest.fixture( - name="pep621_data", - scope="session", + name='pep621_data', + scope='session', ) def fixture_pep621_data( pep621_configuration: PEP621Configuration, project_configuration: ProjectConfiguration @@ -103,13 +102,12 @@ def fixture_pep621_data( Returns: The resolved project table """ - return resolve_pep621(pep621_configuration, project_configuration, None) @pytest.fixture( - name="cppython_local_configuration", - scope="session", + name='cppython_local_configuration', + scope='session', params=cppython_local_variants, ) def fixture_cppython_local_configuration( @@ -129,18 +127,18 @@ def fixture_cppython_local_configuration( data = cppython_local_configuration.model_dump(by_alias=True) # Pin the install location to the base temporary directory - data["install-path"] = install_path + data['install-path'] = install_path # Fill the plugin names with mocked values - data["provider-name"] = "mock" - data["generator-name"] = "mock" + data['provider-name'] = 'mock' + data['generator-name'] = 'mock' return CPPythonLocalConfiguration(**data) @pytest.fixture( - name="cppython_global_configuration", - scope="session", + name='cppython_global_configuration', + scope='session', params=cppython_global_variants, ) def fixture_cppython_global_configuration(request: pytest.FixtureRequest) -> CPPythonGlobalConfiguration: @@ -158,8 +156,8 @@ def fixture_cppython_global_configuration(request: pytest.FixtureRequest) -> CPP @pytest.fixture( - name="plugin_build_data", - scope="session", + name='plugin_build_data', + scope='session', ) def fixture_plugin_build_data( provider_type: type[Provider], @@ -176,13 +174,12 @@ def fixture_plugin_build_data( Returns: The plugin build data """ - return PluginBuildData(generator_type=generator_type, provider_type=provider_type, scm_type=scm_type) @pytest.fixture( - name="plugin_cppython_data", - scope="session", + name='plugin_cppython_data', + scope='session', ) def fixture_plugin_cppython_data( provider_type: type[Provider], @@ -199,15 +196,14 @@ def fixture_plugin_cppython_data( Returns: The plugin data for CPPython resolution """ - return PluginCPPythonData( generator_name=generator_type.name(), provider_name=provider_type.name(), scm_name=scm_type.name() ) @pytest.fixture( - name="cppython_data", - scope="session", + name='cppython_data', + scope='session', ) def fixture_cppython_data( cppython_local_configuration: CPPythonLocalConfiguration, @@ -226,14 +222,13 @@ def fixture_cppython_data( Returns: The resolved CPPython table """ - return resolve_cppython( cppython_local_configuration, cppython_global_configuration, project_data, plugin_cppython_data ) @pytest.fixture( - name="core_data", + name='core_data', ) def fixture_core_data(cppython_data: CPPythonData, project_data: ProjectData) -> CoreData: """Fixture for creating the wrapper CoreData type @@ -245,13 +240,12 @@ def fixture_core_data(cppython_data: CPPythonData, project_data: ProjectData) -> Returns: Wrapper Core Type """ - return CoreData(cppython_data=cppython_data, project_data=project_data) @pytest.fixture( - name="project_configuration", - scope="session", + name='project_configuration', + scope='session', params=project_variants, ) def fixture_project_configuration( @@ -267,13 +261,13 @@ def fixture_project_configuration( Returns: Configuration with temporary directory capabilities """ - tmp_path = tmp_path_factory.mktemp("workspace-") + tmp_path = tmp_path_factory.mktemp('workspace-') configuration = cast(ProjectConfiguration, request.param) - pyproject_file = tmp_path / "pyproject.toml" + pyproject_file = tmp_path / 'pyproject.toml' # Write a dummy file to satisfy the config constraints - with open(pyproject_file, "w", encoding="utf-8"): + with open(pyproject_file, 'w', encoding='utf-8'): pass configuration.pyproject_file = pyproject_file @@ -282,8 +276,8 @@ def fixture_project_configuration( @pytest.fixture( - name="project_data", - scope="session", + name='project_data', + scope='session', ) def fixture_project_data(project_configuration: ProjectConfiguration) -> ProjectData: """Fixture that creates a project space at 'workspace/test_project/pyproject.toml' @@ -292,11 +286,10 @@ def fixture_project_data(project_configuration: ProjectConfiguration) -> Project Returns: A project data object that has populated a function level temporary directory """ - return resolve_project_configuration(project_configuration) -@pytest.fixture(name="project") +@pytest.fixture(name='project') def fixture_project( cppython_local_configuration: CPPythonLocalConfiguration, pep621_configuration: PEP621Configuration ) -> PyProject: @@ -307,14 +300,13 @@ def fixture_project( Returns: All the data as one object """ - tool = ToolData(cppython=cppython_local_configuration) return PyProject(project=pep621_configuration, tool=tool) @pytest.fixture( - name="cmake_data", - scope="session", + name='cmake_data', + scope='session', params=_cmake_data_list(), ) def fixture_cmake_data(request: pytest.FixtureRequest) -> CMakeConfiguration: @@ -326,7 +318,6 @@ def fixture_cmake_data(request: pytest.FixtureRequest) -> CMakeConfiguration: Returns: A configuration type instance """ - return cast(CMakeConfiguration, request.param) @@ -337,12 +328,10 @@ def pytest_generate_tests(metafunc: pytest.Metafunc) -> None: Args: metafunc: Pytest hook data """ - for fixture in metafunc.fixturenames: - match fixture.split("_", 1): - case ["build", directory]: - + match fixture.split('_', 1): + case ['build', directory]: # Parameterizes the paths under tests/build/ where is the fixture suffix - build_data_path = metafunc.config.rootpath / "tests" / "build" / directory - metafunc.parametrize(fixture, [build_data_path], scope="session") + build_data_path = metafunc.config.rootpath / 'tests' / 'build' / directory + metafunc.parametrize(fixture, [build_data_path], scope='session') diff --git a/tests/integration/__init__.py b/tests/integration/__init__.py index 5f28270..e69de29 100644 --- a/tests/integration/__init__.py +++ b/tests/integration/__init__.py @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tests/integration/plugins/__init__.py b/tests/integration/plugins/__init__.py index 5f28270..e69de29 100644 --- a/tests/integration/plugins/__init__.py +++ b/tests/integration/plugins/__init__.py @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tests/integration/plugins/cmake/__init__.py b/tests/integration/plugins/cmake/__init__.py index 5f28270..e69de29 100644 --- a/tests/integration/plugins/cmake/__init__.py +++ b/tests/integration/plugins/cmake/__init__.py @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tests/integration/plugins/cmake/test_generator.py b/tests/integration/plugins/cmake/test_generator.py index 507cb6a..527c01a 100644 --- a/tests/integration/plugins/cmake/test_generator.py +++ b/tests/integration/plugins/cmake/test_generator.py @@ -12,7 +12,7 @@ class TestCPPythonGenerator(GeneratorIntegrationTests[CMakeGenerator]): """The tests for the CMake generator""" - @pytest.fixture(name="plugin_data", scope="session") + @pytest.fixture(name='plugin_data', scope='session') def fixture_plugin_data(self, cmake_data: CMakeConfiguration) -> dict[str, Any]: """A required testing hook that allows data generation @@ -22,10 +22,9 @@ def fixture_plugin_data(self, cmake_data: CMakeConfiguration) -> dict[str, Any]: Returns: The constructed plugin data """ - return cmake_data.model_dump() - @pytest.fixture(name="plugin_type", scope="session") + @pytest.fixture(name='plugin_type', scope='session') def fixture_plugin_type(self) -> type[CMakeGenerator]: """A required testing hook that allows type generation diff --git a/tests/integration/plugins/pdm/__init__.py b/tests/integration/plugins/pdm/__init__.py index 5f28270..e69de29 100644 --- a/tests/integration/plugins/pdm/__init__.py +++ b/tests/integration/plugins/pdm/__init__.py @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tests/integration/plugins/pdm/test_interface.py b/tests/integration/plugins/pdm/test_interface.py index d4ce9bc..0c6c6e3 100644 --- a/tests/integration/plugins/pdm/test_interface.py +++ b/tests/integration/plugins/pdm/test_interface.py @@ -10,7 +10,7 @@ class TestCPPythonInterface: """The tests for the PDM interface""" - @pytest.fixture(name="interface") + @pytest.fixture(name='interface') def fixture_interface(self, plugin_type: type[CPPythonPlugin]) -> CPPythonPlugin: """A hook allowing implementations to override the fixture @@ -20,7 +20,6 @@ def fixture_interface(self, plugin_type: type[CPPythonPlugin]) -> CPPythonPlugin Returns: A newly constructed interface """ - return plugin_type(Core()) def test_entrypoint(self, mocker: MockerFixture) -> None: @@ -29,8 +28,7 @@ def test_entrypoint(self, mocker: MockerFixture) -> None: Args: mocker: Mocker fixture for plugin patch """ - - patch = mocker.patch("cppython.plugins.pdm.plugin.CPPythonPlugin") + patch = mocker.patch('cppython.plugins.pdm.plugin.CPPythonPlugin') core = Core() core.load_plugins() diff --git a/tests/integration/plugins/vcpkg/__init__.py b/tests/integration/plugins/vcpkg/__init__.py index 5f28270..e69de29 100644 --- a/tests/integration/plugins/vcpkg/__init__.py +++ b/tests/integration/plugins/vcpkg/__init__.py @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tests/integration/plugins/vcpkg/test_provider.py b/tests/integration/plugins/vcpkg/test_provider.py index 523c17c..cddaff5 100644 --- a/tests/integration/plugins/vcpkg/test_provider.py +++ b/tests/integration/plugins/vcpkg/test_provider.py @@ -11,7 +11,7 @@ class TestCPPythonProvider(ProviderIntegrationTests[VcpkgProvider]): """The tests for the vcpkg provider""" - @pytest.fixture(name="plugin_data", scope="session") + @pytest.fixture(name='plugin_data', scope='session') def fixture_plugin_data(self) -> dict[str, Any]: """A required testing hook that allows data generation @@ -20,7 +20,7 @@ def fixture_plugin_data(self) -> dict[str, Any]: """ return {} - @pytest.fixture(name="plugin_type", scope="session") + @pytest.fixture(name='plugin_type', scope='session') def fixture_plugin_type(self) -> type[VcpkgProvider]: """A required testing hook that allows type generation diff --git a/tests/integration/test/__init__.py b/tests/integration/test/__init__.py index 5f28270..e69de29 100644 --- a/tests/integration/test/__init__.py +++ b/tests/integration/test/__init__.py @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tests/integration/test/test_generator.py b/tests/integration/test/test_generator.py index 66ab58e..f7d42f4 100644 --- a/tests/integration/test/test_generator.py +++ b/tests/integration/test/test_generator.py @@ -11,17 +11,16 @@ class TestCPPythonGenerator(GeneratorIntegrationTests[MockGenerator]): """The tests for the Mock generator""" - @pytest.fixture(name="plugin_data", scope="session") + @pytest.fixture(name='plugin_data', scope='session') def fixture_plugin_data(self) -> dict[str, Any]: """Returns mock data Returns: An overridden data instance """ - return {} - @pytest.fixture(name="plugin_type", scope="session") + @pytest.fixture(name='plugin_type', scope='session') def fixture_plugin_type(self) -> type[MockGenerator]: """A required testing hook that allows type generation diff --git a/tests/integration/test/test_provider.py b/tests/integration/test/test_provider.py index a88e75a..dbe966f 100644 --- a/tests/integration/test/test_provider.py +++ b/tests/integration/test/test_provider.py @@ -11,17 +11,16 @@ class TestMockProvider(ProviderIntegrationTests[MockProvider]): """The tests for our Mock provider""" - @pytest.fixture(name="plugin_data", scope="session") + @pytest.fixture(name='plugin_data', scope='session') def fixture_plugin_data(self) -> dict[str, Any]: """Returns mock data Returns: An overridden data instance """ - return {} - @pytest.fixture(name="plugin_type", scope="session") + @pytest.fixture(name='plugin_type', scope='session') def fixture_plugin_type(self) -> type[MockProvider]: """A required testing hook that allows type generation diff --git a/tests/integration/test/test_scm.py b/tests/integration/test/test_scm.py index fb5e78b..87f7f95 100644 --- a/tests/integration/test/test_scm.py +++ b/tests/integration/test/test_scm.py @@ -4,24 +4,23 @@ import pytest -from cppython.test.pytest.tests import SCMIntegrationTests from cppython.test.mock.scm import MockSCM +from cppython.test.pytest.tests import SCMIntegrationTests class TestCPPythonSCM(SCMIntegrationTests[MockSCM]): """The tests for the Mock version control""" - @pytest.fixture(name="plugin_data", scope="session") + @pytest.fixture(name='plugin_data', scope='session') def fixture_plugin_data(self) -> dict[str, Any]: """Returns mock data Returns: An overridden data instance """ - return {} - @pytest.fixture(name="plugin_type", scope="session") + @pytest.fixture(name='plugin_type', scope='session') def fixture_plugin_type(self) -> type[MockSCM]: """A required testing hook that allows type generation diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py index 5f28270..e69de29 100644 --- a/tests/unit/__init__.py +++ b/tests/unit/__init__.py @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tests/unit/core/__init__.py b/tests/unit/core/__init__.py index 5f28270..e69de29 100644 --- a/tests/unit/core/__init__.py +++ b/tests/unit/core/__init__.py @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tests/unit/core/test_plugin_schema.py b/tests/unit/core/test_plugin_schema.py index b9266f5..7355845 100644 --- a/tests/unit/core/test_plugin_schema.py +++ b/tests/unit/core/test_plugin_schema.py @@ -1,10 +1,9 @@ """Test plugin schemas""" -from cppython.utility.utility import TypeName - from cppython.core.plugin_schema.generator import SyncConsumer from cppython.core.plugin_schema.provider import SyncProducer from cppython.core.schema import SyncData +from cppython.utility.utility import TypeName class TestSchema: @@ -30,7 +29,6 @@ def sync_types() -> list[type[SyncData]]: Returns: Fulfils protocol """ - return [TestSchema.GeneratorSyncDataSuccess, TestSchema.GeneratorSyncDataFail] def sync(self, sync_data: SyncData) -> None: @@ -39,7 +37,6 @@ def sync(self, sync_data: SyncData) -> None: Args: sync_data: Fulfils protocol """ - if isinstance(sync_data, TestSchema.GeneratorSyncDataSuccess): assert sync_data.success else: @@ -71,13 +68,12 @@ def sync_data(self, consumer: SyncConsumer) -> SyncData | None: """ for sync_type in consumer.sync_types(): if sync_type == TestSchema.GeneratorSyncDataSuccess: - return TestSchema.GeneratorSyncDataSuccess(provider_name=TypeName("Dummy"), success=True) + return TestSchema.GeneratorSyncDataSuccess(provider_name=TypeName('Dummy'), success=True) return None def test_sync_broadcast(self) -> None: """Verifies broadcast support""" - consumer = self.Consumer() producer = self.Producer() @@ -88,22 +84,19 @@ def test_sync_broadcast(self) -> None: def test_sync_production(self) -> None: """Verifies the variant behavior of SyncData""" - producer = self.Producer() consumer = self.Consumer() assert producer.sync_data(consumer) def test_sync_consumption(self) -> None: """Verifies the variant behavior of SyncData""" - consumer = self.Consumer() - data = self.GeneratorSyncDataSuccess(provider_name=TypeName("Dummy"), success=True) + data = self.GeneratorSyncDataSuccess(provider_name=TypeName('Dummy'), success=True) consumer.sync(data) def test_sync_flow(self) -> None: """Verifies the variant behavior of SyncData""" - consumer = self.Consumer() producer = self.Producer() diff --git a/tests/unit/core/test_resolution.py b/tests/unit/core/test_resolution.py index b6bf621..32a89ec 100644 --- a/tests/unit/core/test_resolution.py +++ b/tests/unit/core/test_resolution.py @@ -37,33 +37,30 @@ class TestResolve: def test_pep621_resolve(self) -> None: """Test the PEP621 schema resolve function""" - - data = PEP621Configuration(name="pep621-resolve-test", dynamic=["version"]) - config = ProjectConfiguration(pyproject_file=Path("pyproject.toml"), version="0.1.0") + data = PEP621Configuration(name='pep621-resolve-test', dynamic=['version']) + config = ProjectConfiguration(pyproject_file=Path('pyproject.toml'), version='0.1.0') resolved = resolve_pep621(data, config, None) class_variables = vars(resolved) assert len(class_variables) - assert not None in class_variables.values() + assert None not in class_variables.values() def test_project_resolve(self) -> None: """Tests project configuration resolution""" - - config = ProjectConfiguration(pyproject_file=Path("pyproject.toml"), version="0.1.0") + config = ProjectConfiguration(pyproject_file=Path('pyproject.toml'), version='0.1.0') assert resolve_project_configuration(config) def test_cppython_resolve(self) -> None: """Tests cppython configuration resolution""" - cppython_local_configuration = CPPythonLocalConfiguration() cppython_global_configuration = CPPythonGlobalConfiguration() - config = ProjectConfiguration(pyproject_file=Path("pyproject.toml"), version="0.1.0") + config = ProjectConfiguration(pyproject_file=Path('pyproject.toml'), version='0.1.0') project_data = resolve_project_configuration(config) plugin_build_data = PluginCPPythonData( - generator_name=TypeName("generator"), provider_name=TypeName("provider"), scm_name=TypeName("scm") + generator_name=TypeName('generator'), provider_name=TypeName('provider'), scm_name=TypeName('scm') ) cppython_data = resolve_cppython( @@ -80,36 +77,35 @@ class MockModel(CPPythonModel): field: Annotated[str, Field()] - bad_data = {"field": 4} + bad_data = {'field': 4} with pytest.raises(ConfigException) as error: resolve_model(MockModel, bad_data) assert error.value.error_count == 1 - good_data = {"field": "good"} + good_data = {'field': 'good'} resolve_model(MockModel, good_data) def test_generator_resolve(self) -> None: """Test generator resolution""" - - project_data = ProjectData(pyproject_file=Path("pyproject.toml")) + project_data = ProjectData(pyproject_file=Path('pyproject.toml')) cppython_local_configuration = CPPythonLocalConfiguration() cppython_global_configuration = CPPythonGlobalConfiguration() - config = ProjectConfiguration(pyproject_file=Path("pyproject.toml"), version="0.1.0") + config = ProjectConfiguration(pyproject_file=Path('pyproject.toml'), version='0.1.0') project_data = resolve_project_configuration(config) plugin_build_data = PluginCPPythonData( - generator_name=TypeName("generator"), provider_name=TypeName("provider"), scm_name=TypeName("scm") + generator_name=TypeName('generator'), provider_name=TypeName('provider'), scm_name=TypeName('scm') ) cppython_data = resolve_cppython( cppython_local_configuration, cppython_global_configuration, project_data, plugin_build_data ) - MockGenerator = type("MockGenerator", (Generator,), {}) + MockGenerator = type('MockGenerator', (Generator,), {}) cppython_plugin_data = resolve_cppython_plugin(cppython_data, MockGenerator) @@ -117,23 +113,22 @@ def test_generator_resolve(self) -> None: def test_provider_resolve(self) -> None: """Test provider resolution""" - - project_data = ProjectData(pyproject_file=Path("pyproject.toml")) + project_data = ProjectData(pyproject_file=Path('pyproject.toml')) cppython_local_configuration = CPPythonLocalConfiguration() cppython_global_configuration = CPPythonGlobalConfiguration() - config = ProjectConfiguration(pyproject_file=Path("pyproject.toml"), version="0.1.0") + config = ProjectConfiguration(pyproject_file=Path('pyproject.toml'), version='0.1.0') project_data = resolve_project_configuration(config) plugin_build_data = PluginCPPythonData( - generator_name=TypeName("generator"), provider_name=TypeName("provider"), scm_name=TypeName("scm") + generator_name=TypeName('generator'), provider_name=TypeName('provider'), scm_name=TypeName('scm') ) cppython_data = resolve_cppython( cppython_local_configuration, cppython_global_configuration, project_data, plugin_build_data ) - MockProvider = type("MockProvider", (Provider,), {}) + MockProvider = type('MockProvider', (Provider,), {}) cppython_plugin_data = resolve_cppython_plugin(cppython_data, MockProvider) @@ -141,23 +136,22 @@ def test_provider_resolve(self) -> None: def test_scm_resolve(self) -> None: """Test scm resolution""" - - project_data = ProjectData(pyproject_file=Path("pyproject.toml")) + project_data = ProjectData(pyproject_file=Path('pyproject.toml')) cppython_local_configuration = CPPythonLocalConfiguration() cppython_global_configuration = CPPythonGlobalConfiguration() - config = ProjectConfiguration(pyproject_file=Path("pyproject.toml"), version="0.1.0") + config = ProjectConfiguration(pyproject_file=Path('pyproject.toml'), version='0.1.0') project_data = resolve_project_configuration(config) plugin_build_data = PluginCPPythonData( - generator_name=TypeName("generator"), provider_name=TypeName("provider"), scm_name=TypeName("scm") + generator_name=TypeName('generator'), provider_name=TypeName('provider'), scm_name=TypeName('scm') ) cppython_data = resolve_cppython( cppython_local_configuration, cppython_global_configuration, project_data, plugin_build_data ) - MockSCM = type("MockSCM", (SCM,), {}) + MockSCM = type('MockSCM', (SCM,), {}) cppython_plugin_data = resolve_cppython_plugin(cppython_data, MockSCM) diff --git a/tests/unit/core/test_schema.py b/tests/unit/core/test_schema.py index c279707..805fe2b 100644 --- a/tests/unit/core/test_schema.py +++ b/tests/unit/core/test_schema.py @@ -20,20 +20,18 @@ class TestSchema: class Model(CPPythonModel): """Testing Model""" - aliased_variable: Annotated[bool, Field(alias="aliased-variable", description="Alias test")] = False + aliased_variable: Annotated[bool, Field(alias='aliased-variable', description='Alias test')] = False def test_model_construction(self) -> None: """Verifies that the base model type has the expected construction behaviors""" - - model = self.Model(**{"aliased_variable": True}) + model = self.Model(**{'aliased_variable': True}) assert model.aliased_variable is False - model = self.Model(**{"aliased-variable": True}) + model = self.Model(**{'aliased-variable': True}) assert model.aliased_variable is True def test_model_construction_from_data(self) -> None: """Verifies that the base model type has the expected construction behaviors""" - toml_str = """ aliased_variable = false\n aliased-variable = true @@ -53,9 +51,8 @@ def test_cppython_global(self) -> None: def test_pep621_version(self) -> None: """Tests the dynamic version validation""" - with pytest.raises(ValueError): - PEP621Configuration(name="empty-test") + PEP621Configuration(name='empty-test') with pytest.raises(ValueError): - PEP621Configuration(name="both-test", version="1.0.0", dynamic=["version"]) + PEP621Configuration(name='both-test', version='1.0.0', dynamic=['version']) diff --git a/tests/unit/plugins/__init__.py b/tests/unit/plugins/__init__.py index 5f28270..e69de29 100644 --- a/tests/unit/plugins/__init__.py +++ b/tests/unit/plugins/__init__.py @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tests/unit/plugins/cmake/__init__.py b/tests/unit/plugins/cmake/__init__.py index 5f28270..e69de29 100644 --- a/tests/unit/plugins/cmake/__init__.py +++ b/tests/unit/plugins/cmake/__init__.py @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tests/unit/plugins/cmake/test_generator.py b/tests/unit/plugins/cmake/test_generator.py index 6aee27c..ce582fe 100644 --- a/tests/unit/plugins/cmake/test_generator.py +++ b/tests/unit/plugins/cmake/test_generator.py @@ -20,7 +20,7 @@ class TestCPPythonGenerator(GeneratorUnitTests[CMakeGenerator]): """The tests for the CMake generator""" - @pytest.fixture(name="plugin_data", scope="session") + @pytest.fixture(name='plugin_data', scope='session') def fixture_plugin_data(self, cmake_data: CMakeConfiguration) -> dict[str, Any]: """A required testing hook that allows data generation @@ -30,10 +30,9 @@ def fixture_plugin_data(self, cmake_data: CMakeConfiguration) -> dict[str, Any]: Returns: The constructed plugin data """ - return cmake_data.model_dump() - @pytest.fixture(name="plugin_type", scope="session") + @pytest.fixture(name='plugin_type', scope='session') def fixture_plugin_type(self) -> type[CMakeGenerator]: """A required testing hook that allows type generation @@ -50,11 +49,11 @@ def test_provider_write(self, tmp_path: Path) -> None: """ builder = Builder() - includes_file = tmp_path / "includes.cmake" - with includes_file.open("w", encoding="utf-8") as file: - file.write("example contents") + includes_file = tmp_path / 'includes.cmake' + with includes_file.open('w', encoding='utf-8') as file: + file.write('example contents') - data = CMakeSyncData(provider_name=TypeName("test-provider"), top_level_includes=includes_file) + data = CMakeSyncData(provider_name=TypeName('test-provider'), top_level_includes=includes_file) builder.write_provider_preset(tmp_path, data) def test_cppython_write(self, tmp_path: Path) -> None: @@ -63,17 +62,16 @@ def test_cppython_write(self, tmp_path: Path) -> None: Args: tmp_path: The input path the use """ - builder = Builder() - provider_directory = tmp_path / "providers" + provider_directory = tmp_path / 'providers' provider_directory.mkdir(parents=True, exist_ok=True) - includes_file = provider_directory / "includes.cmake" - with includes_file.open("w", encoding="utf-8") as file: - file.write("example contents") + includes_file = provider_directory / 'includes.cmake' + with includes_file.open('w', encoding='utf-8') as file: + file.write('example contents') - data = CMakeSyncData(provider_name=TypeName("test-provider"), top_level_includes=includes_file) + data = CMakeSyncData(provider_name=TypeName('test-provider'), top_level_includes=includes_file) builder.write_provider_preset(provider_directory, data) builder.write_cppython_preset(tmp_path, provider_directory, data) @@ -84,24 +82,23 @@ def test_root_write(self, tmp_path: Path) -> None: Args: tmp_path: The input path the use """ - builder = Builder() - cppython_preset_directory = tmp_path / "cppython" + cppython_preset_directory = tmp_path / 'cppython' cppython_preset_directory.mkdir(parents=True, exist_ok=True) - provider_directory = cppython_preset_directory / "providers" + provider_directory = cppython_preset_directory / 'providers' provider_directory.mkdir(parents=True, exist_ok=True) - includes_file = provider_directory / "includes.cmake" - with includes_file.open("w", encoding="utf-8") as file: - file.write("example contents") + includes_file = provider_directory / 'includes.cmake' + with includes_file.open('w', encoding='utf-8') as file: + file.write('example contents') - root_file = tmp_path / "CMakePresets.json" + root_file = tmp_path / 'CMakePresets.json' presets = CMakePresets() write_model_json(root_file, presets) - data = CMakeSyncData(provider_name=TypeName("test-provider"), top_level_includes=includes_file) + data = CMakeSyncData(provider_name=TypeName('test-provider'), top_level_includes=includes_file) builder.write_provider_preset(provider_directory, data) cppython_preset_file = builder.write_cppython_preset(cppython_preset_directory, provider_directory, data) @@ -114,27 +111,26 @@ def test_relative_root_write(self, tmp_path: Path) -> None: Args: tmp_path: The input path the use """ - builder = Builder() - cppython_preset_directory = tmp_path / "tool" / "cppython" + cppython_preset_directory = tmp_path / 'tool' / 'cppython' cppython_preset_directory.mkdir(parents=True, exist_ok=True) - provider_directory = cppython_preset_directory / "providers" + provider_directory = cppython_preset_directory / 'providers' provider_directory.mkdir(parents=True, exist_ok=True) - includes_file = provider_directory / "includes.cmake" - with includes_file.open("w", encoding="utf-8") as file: - file.write("example contents") + includes_file = provider_directory / 'includes.cmake' + with includes_file.open('w', encoding='utf-8') as file: + file.write('example contents') - relative_indirection = tmp_path / "nested" + relative_indirection = tmp_path / 'nested' relative_indirection.mkdir(parents=True, exist_ok=True) - root_file = relative_indirection / "CMakePresets.json" + root_file = relative_indirection / 'CMakePresets.json' presets = CMakePresets() write_model_json(root_file, presets) - data = CMakeSyncData(provider_name=TypeName("test-provider"), top_level_includes=includes_file) + data = CMakeSyncData(provider_name=TypeName('test-provider'), top_level_includes=includes_file) builder.write_provider_preset(provider_directory, data) cppython_preset_file = builder.write_cppython_preset(cppython_preset_directory, provider_directory, data) diff --git a/tests/unit/plugins/git/__init__.py b/tests/unit/plugins/git/__init__.py index 5f28270..e69de29 100644 --- a/tests/unit/plugins/git/__init__.py +++ b/tests/unit/plugins/git/__init__.py @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tests/unit/plugins/git/test_version_control.py b/tests/unit/plugins/git/test_version_control.py index 78cf927..e27ba09 100644 --- a/tests/unit/plugins/git/test_version_control.py +++ b/tests/unit/plugins/git/test_version_control.py @@ -9,7 +9,7 @@ class TestGitInterface(SCMUnitTests[GitSCM]): """Unit tests for the Git SCM plugin""" - @pytest.fixture(name="plugin_type", scope="session") + @pytest.fixture(name='plugin_type', scope='session') def fixture_plugin_type(self) -> type[GitSCM]: """A required testing hook that allows type generation diff --git a/tests/unit/plugins/pdm/__init__.py b/tests/unit/plugins/pdm/__init__.py index 5f28270..e69de29 100644 --- a/tests/unit/plugins/pdm/__init__.py +++ b/tests/unit/plugins/pdm/__init__.py @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tests/unit/plugins/pdm/test_interface.py b/tests/unit/plugins/pdm/test_interface.py index d0ea067..01cde7f 100644 --- a/tests/unit/plugins/pdm/test_interface.py +++ b/tests/unit/plugins/pdm/test_interface.py @@ -10,7 +10,7 @@ class TestCPPythonInterface: """The tests for the PDM interface""" - @pytest.fixture(name="interface") + @pytest.fixture(name='interface') def fixture_interface(self, plugin_type: type[CPPythonPlugin]) -> CPPythonPlugin: """A hook allowing implementations to override the fixture @@ -24,7 +24,6 @@ def fixture_interface(self, plugin_type: type[CPPythonPlugin]) -> CPPythonPlugin def test_pdm_project(self) -> None: """Verify that this PDM won't return empty data""" - core = Core() core.load_plugins() pdm_project = Project(core, root_path=None) diff --git a/tests/unit/plugins/vcpkg/__init__.py b/tests/unit/plugins/vcpkg/__init__.py index 5f28270..e69de29 100644 --- a/tests/unit/plugins/vcpkg/__init__.py +++ b/tests/unit/plugins/vcpkg/__init__.py @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tests/unit/plugins/vcpkg/test_provider.py b/tests/unit/plugins/vcpkg/test_provider.py index 620ce6c..1e45f13 100644 --- a/tests/unit/plugins/vcpkg/test_provider.py +++ b/tests/unit/plugins/vcpkg/test_provider.py @@ -5,14 +5,13 @@ import pytest from cppython.plugins.vcpkg.plugin import VcpkgProvider -from cppython.plugins.vcpkg.resolution import generate_manifest from cppython.test.pytest.tests import ProviderUnitTests class TestCPPythonProvider(ProviderUnitTests[VcpkgProvider]): """The tests for the vcpkg Provider""" - @pytest.fixture(name="plugin_data", scope="session") + @pytest.fixture(name='plugin_data', scope='session') def fixture_plugin_data(self) -> dict[str, Any]: """A required testing hook that allows data generation @@ -21,7 +20,7 @@ def fixture_plugin_data(self) -> dict[str, Any]: """ return {} - @pytest.fixture(name="plugin_type", scope="session") + @pytest.fixture(name='plugin_type', scope='session') def fixture_plugin_type(self) -> type[VcpkgProvider]: """A required testing hook that allows type generation diff --git a/tests/unit/test/__init__.py b/tests/unit/test/__init__.py index 5f28270..e69de29 100644 --- a/tests/unit/test/__init__.py +++ b/tests/unit/test/__init__.py @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tests/unit/test/test_fixtures.py b/tests/unit/test/test_fixtures.py index 05f2449..b6c31fb 100644 --- a/tests/unit/test/test_fixtures.py +++ b/tests/unit/test/test_fixtures.py @@ -12,7 +12,6 @@ def test_build_directory(self, build_test_build: Path) -> None: Args: build_test_build: The plugins build folder directory """ - - requirement = build_test_build / "build.txt" + requirement = build_test_build / 'build.txt' assert requirement.exists() diff --git a/tests/unit/test/test_generator.py b/tests/unit/test/test_generator.py index 4fe19ff..9f5234b 100644 --- a/tests/unit/test/test_generator.py +++ b/tests/unit/test/test_generator.py @@ -11,17 +11,16 @@ class TestCPPythonGenerator(GeneratorUnitTests[MockGenerator]): """The tests for the Mock generator""" - @pytest.fixture(name="plugin_data", scope="session") + @pytest.fixture(name='plugin_data', scope='session') def fixture_plugin_data(self) -> dict[str, Any]: """Returns mock data Returns: An overridden data instance """ - return {} - @pytest.fixture(name="plugin_type", scope="session") + @pytest.fixture(name='plugin_type', scope='session') def fixture_plugin_type(self) -> type[MockGenerator]: """A required testing hook that allows type generation diff --git a/tests/unit/test/test_provider.py b/tests/unit/test/test_provider.py index a1c9770..d2d08b1 100644 --- a/tests/unit/test/test_provider.py +++ b/tests/unit/test/test_provider.py @@ -13,17 +13,16 @@ class TestMockProvider(ProviderUnitTests[MockProvider]): """The tests for our Mock provider""" - @pytest.fixture(name="plugin_data", scope="session") + @pytest.fixture(name='plugin_data', scope='session') def fixture_provider_data(self) -> dict[str, Any]: """Returns mock data Returns: An overridden data instance """ - return {} - @pytest.fixture(name="plugin_type", scope="session") + @pytest.fixture(name='plugin_type', scope='session') def fixture_plugin_type(self) -> type[MockProvider]: """A required testing hook that allows type generation @@ -39,7 +38,6 @@ def test_sync_types(self, plugin: MockProvider, mocker: MockerFixture) -> None: plugin: The plugin instance mocker: The pytest-mock fixture """ - mock_generator = mocker.Mock(spec=MockGenerator) mock_generator.sync_types.return_value = MockGenerator.sync_types() diff --git a/tests/unit/test/test_scm.py b/tests/unit/test/test_scm.py index 1af810e..4f86f35 100644 --- a/tests/unit/test/test_scm.py +++ b/tests/unit/test/test_scm.py @@ -11,17 +11,16 @@ class TestCPPythonSCM(SCMUnitTests[MockSCM]): """The tests for the Mock version control""" - @pytest.fixture(name="plugin_data", scope="session") + @pytest.fixture(name='plugin_data', scope='session') def fixture_plugin_data(self) -> dict[str, Any]: """Returns mock data Returns: An overridden data instance """ - return {} - @pytest.fixture(name="plugin_type", scope="session") + @pytest.fixture(name='plugin_type', scope='session') def fixture_plugin_type(self) -> type[MockSCM]: """A required testing hook that allows type generation diff --git a/tests/unit/test_builder.py b/tests/unit/test_builder.py index 21e2761..84b5873 100644 --- a/tests/unit/test_builder.py +++ b/tests/unit/test_builder.py @@ -40,10 +40,10 @@ def test_build( mocker.patch.object( metadata, - "entry_points", - return_value=[metadata.EntryPoint(name="mock", value="mock", group="mock")], + 'entry_points', + return_value=[metadata.EntryPoint(name='mock', value='mock', group='mock')], ) - mocker.patch.object(metadata.EntryPoint, "load", side_effect=[MockGenerator, MockProvider, MockSCM]) + mocker.patch.object(metadata.EntryPoint, 'load', side_effect=[MockGenerator, MockProvider, MockSCM]) assert builder.build(pep621_configuration, cppython_local_configuration) diff --git a/tests/unit/test_console.py b/tests/unit/test_console.py index 617092a..36f82ef 100644 --- a/tests/unit/test_console.py +++ b/tests/unit/test_console.py @@ -12,24 +12,20 @@ class TestConsole: def test_info(self) -> None: """Verifies that the info command functions with CPPython hooks""" - - result = runner.invoke(app, ["info"]) + result = runner.invoke(app, ['info']) assert result.exit_code == 0 def test_list(self) -> None: """Verifies that the list command functions with CPPython hooks""" - - result = runner.invoke(app, ["list"]) + result = runner.invoke(app, ['list']) assert result.exit_code == 0 def test_update(self) -> None: """Verifies that the update command functions with CPPython hooks""" - - result = runner.invoke(app, ["update"]) + result = runner.invoke(app, ['update']) assert result.exit_code == 0 def test_install(self) -> None: """Verifies that the install command functions with CPPython hooks""" - - result = runner.invoke(app, ["install"]) + result = runner.invoke(app, ['install']) assert result.exit_code == 0 diff --git a/tests/unit/test_data.py b/tests/unit/test_data.py index b237551..bbd12b0 100644 --- a/tests/unit/test_data.py +++ b/tests/unit/test_data.py @@ -21,8 +21,8 @@ class TestData: """Various tests for the Data type""" @pytest.fixture( - name="data", - scope="session", + name='data', + scope='session', ) def fixture_data( self, @@ -41,7 +41,6 @@ def fixture_data( Returns: The mock plugins fixture """ - logger = logging.getLogger() builder = Builder(project_configuration, logger) diff --git a/tests/unit/test_project.py b/tests/unit/test_project.py index a746fae..6d0a8c3 100644 --- a/tests/unit/test_project.py +++ b/tests/unit/test_project.py @@ -20,7 +20,7 @@ from cppython.test.mock.provider import MockProvider from cppython.test.mock.scm import MockSCM -pep621 = PEP621Configuration(name="test-project", version="0.1.0") +pep621 = PEP621Configuration(name='test-project', version='0.1.0') class TestProject: @@ -32,13 +32,12 @@ def test_self_construction(self, request: FixtureRequest) -> None: Args: request: The pytest request fixture """ - # Use the CPPython directory as the test data - file = request.config.rootpath / "pyproject.toml" + file = request.config.rootpath / 'pyproject.toml' project_configuration = ProjectConfiguration(pyproject_file=file, version=None) interface = MockInterface() - pyproject_data = tomllib.loads(file.read_text(encoding="utf-8")) + pyproject_data = tomllib.loads(file.read_text(encoding='utf-8')) project = Project(project_configuration, interface, pyproject_data) # Doesn't have the cppython table @@ -50,10 +49,9 @@ def test_missing_tool_table(self, tmp_path: Path) -> None: Args: tmp_path: Temporary directory for dummy data """ + file_path = tmp_path / 'pyproject.toml' - file_path = tmp_path / "pyproject.toml" - - with open(file_path, "a", encoding="utf8"): + with open(file_path, 'a', encoding='utf8'): pass project_configuration = ProjectConfiguration(pyproject_file=file_path, version=None) @@ -70,10 +68,9 @@ def test_missing_cppython_table(self, tmp_path: Path) -> None: Args: tmp_path: Temporary directory for dummy data """ + file_path = tmp_path / 'pyproject.toml' - file_path = tmp_path / "pyproject.toml" - - with open(file_path, "a", encoding="utf8"): + with open(file_path, 'a', encoding='utf8'): pass project_configuration = ProjectConfiguration(pyproject_file=file_path, version=None) @@ -92,17 +89,16 @@ def test_default_cppython_table(self, tmp_path: Path, mocker: MockerFixture) -> tmp_path: Temporary directory for dummy data mocker: Pytest mocker fixture """ - mocker.patch.object( metadata, - "entry_points", - return_value=[metadata.EntryPoint(name="mock", value="mock", group="mock")], + 'entry_points', + return_value=[metadata.EntryPoint(name='mock', value='mock', group='mock')], ) - mocker.patch.object(metadata.EntryPoint, "load", side_effect=[MockGenerator, MockProvider, MockSCM]) + mocker.patch.object(metadata.EntryPoint, 'load', side_effect=[MockGenerator, MockProvider, MockSCM]) - file_path = tmp_path / "pyproject.toml" + file_path = tmp_path / 'pyproject.toml' - with open(file_path, "a", encoding="utf8"): + with open(file_path, 'a', encoding='utf8'): pass project_configuration = ProjectConfiguration(pyproject_file=file_path, version=None) diff --git a/tests/unit/utility/test_plugin.py b/tests/unit/utility/test_plugin.py index 224e9a2..c54fc64 100644 --- a/tests/unit/utility/test_plugin.py +++ b/tests/unit/utility/test_plugin.py @@ -12,9 +12,8 @@ class TestPlugin: def test_plugin(self) -> None: """Test that the plugin functionality works""" - - assert MockPlugin.name() == "mock" - assert MockPlugin.group() == "plugin" + assert MockPlugin.name() == 'mock' + assert MockPlugin.group() == 'plugin' def test_todo(self) -> None: """Another test TODO""" diff --git a/tests/unit/utility/test_utility.py b/tests/unit/utility/test_utility.py index 72e4e86..4d490cd 100644 --- a/tests/unit/utility/test_utility.py +++ b/tests/unit/utility/test_utility.py @@ -13,7 +13,7 @@ from cppython.utility.subprocess import call from cppython.utility.utility import canonicalize_name -cppython_logger = logging.getLogger("cppython") +cppython_logger = logging.getLogger('cppython') cppython_logger.addHandler(StreamHandler()) @@ -28,46 +28,43 @@ class ModelTest(NamedTuple): def test_none(self) -> None: """Verifies that no exception is thrown with an empty string""" + test = canonicalize_name('') - test = canonicalize_name("") - - assert test.group == "" - assert test.name == "" + assert test.group == '' + assert test.name == '' def test_only_group(self) -> None: """Verifies that no exception is thrown when only a group is specified""" + test = canonicalize_name('Group') - test = canonicalize_name("Group") - - assert test.group == "group" - assert test.name == "" + assert test.group == 'group' + assert test.name == '' def test_name_group(self) -> None: """Test that canonicalization works""" + test = canonicalize_name('NameGroup') - test = canonicalize_name("NameGroup") - - assert test.group == "group" - assert test.name == "name" + assert test.group == 'group' + assert test.name == 'name' def test_group_only_caps(self) -> None: """Test that canonicalization works""" - test = canonicalize_name("NameGROUP") + test = canonicalize_name('NameGROUP') - assert test.group == "group" - assert test.name == "name" + assert test.group == 'group' + assert test.name == 'name' def test_name_only_caps(self) -> None: """Test that canonicalization works""" - test = canonicalize_name("NAMEGroup") - assert test.group == "group" - assert test.name == "name" + test = canonicalize_name('NAMEGroup') + assert test.group == 'group' + assert test.name == 'name' def test_name_multi_caps(self) -> None: """Test that caps works""" - test = canonicalize_name("NAmeGroup") - assert test.group == "group" - assert test.name == "name" + test = canonicalize_name('NAmeGroup') + assert test.group == 'group' + assert test.name == 'name' class TestSubprocess: @@ -79,17 +76,16 @@ def test_subprocess_stdout(self, caplog: LogCaptureFixture) -> None: Args: caplog: Fixture for capturing logging input """ - python = Path(executable) with caplog.at_level(logging.INFO): call( - [python, "-c", "import sys; print('Test Out', file = sys.stdout)"], + [python, '-c', "import sys; print('Test Out', file = sys.stdout)"], cppython_logger, ) assert len(caplog.records) == 1 - assert "Test Out" == caplog.records[0].message + assert caplog.records[0].message == 'Test Out' def test_subprocess_stderr(self, caplog: LogCaptureFixture) -> None: """Test subprocess_call @@ -97,17 +93,16 @@ def test_subprocess_stderr(self, caplog: LogCaptureFixture) -> None: Args: caplog: Fixture for capturing logging input """ - python = Path(executable) with caplog.at_level(logging.INFO): call( - [python, "-c", "import sys; print('Test Error', file = sys.stderr)"], + [python, '-c', "import sys; print('Test Error', file = sys.stderr)"], cppython_logger, ) assert len(caplog.records) == 1 - assert "Test Error" == caplog.records[0].message + assert caplog.records[0].message == 'Test Error' def test_subprocess_suppression(self, caplog: LogCaptureFixture) -> None: """Test subprocess_call suppression flag @@ -115,12 +110,11 @@ def test_subprocess_suppression(self, caplog: LogCaptureFixture) -> None: Args: caplog: Fixture for capturing logging input """ - python = Path(executable) with caplog.at_level(logging.INFO): call( - [python, "-c", "import sys; print('Test Out', file = sys.stdout)"], + [python, '-c', "import sys; print('Test Out', file = sys.stdout)"], cppython_logger, suppress=True, ) @@ -132,19 +126,18 @@ def test_subprocess_exit(self, caplog: LogCaptureFixture) -> None: Args: caplog: Fixture for capturing logging input """ - python = Path(executable) with pytest.raises(ProcessError) as exec_info, caplog.at_level(logging.INFO): call( - [python, "-c", "import sys; sys.exit('Test Exit Output')"], + [python, '-c', "import sys; sys.exit('Test Exit Output')"], cppython_logger, ) assert len(caplog.records) == 1 - assert "Test Exit Output" == caplog.records[0].message + assert caplog.records[0].message == 'Test Exit Output' - assert "Subprocess task failed" in str(exec_info.value) + assert 'Subprocess task failed' in str(exec_info.value) def test_subprocess_exception(self, caplog: LogCaptureFixture) -> None: """Test subprocess_call exception output @@ -152,18 +145,17 @@ def test_subprocess_exception(self, caplog: LogCaptureFixture) -> None: Args: caplog: Fixture for capturing logging input """ - python = Path(executable) with pytest.raises(ProcessError) as exec_info, caplog.at_level(logging.INFO): call( - [python, "-c", "import sys; raise Exception('Test Exception Output')"], + [python, '-c', "import sys; raise Exception('Test Exception Output')"], cppython_logger, ) assert len(caplog.records) == 1 - assert "Test Exception Output" == caplog.records[0].message + assert caplog.records[0].message == 'Test Exception Output' - assert "Subprocess task failed" in str(exec_info.value) + assert 'Subprocess task failed' in str(exec_info.value) def test_stderr_exception(self, caplog: LogCaptureFixture) -> None: """Verify print and exit @@ -176,16 +168,16 @@ def test_stderr_exception(self, caplog: LogCaptureFixture) -> None: call( [ python, - "-c", + '-c', "import sys; print('Test Out', file = sys.stdout); sys.exit('Test Exit Out')", ], cppython_logger, ) assert len(caplog.records) == 2 - assert "Test Out" == caplog.records[0].message - assert "Test Exit Out" == caplog.records[1].message + assert caplog.records[0].message == 'Test Out' + assert caplog.records[1].message == 'Test Exit Out' - assert "Subprocess task failed" in str(exec_info.value) + assert 'Subprocess task failed' in str(exec_info.value) def test_stdout_exception(self, caplog: LogCaptureFixture) -> None: """Verify print and exit @@ -198,13 +190,13 @@ def test_stdout_exception(self, caplog: LogCaptureFixture) -> None: call( [ python, - "-c", + '-c', "import sys; print('Test Error', file = sys.stderr); sys.exit('Test Exit Error')", ], cppython_logger, ) assert len(caplog.records) == 2 - assert "Test Error" == caplog.records[0].message - assert "Test Exit Error" == caplog.records[1].message + assert caplog.records[0].message == 'Test Error' + assert caplog.records[1].message == 'Test Exit Error' - assert "Subprocess task failed" in str(exec_info.value) + assert 'Subprocess task failed' in str(exec_info.value) From 31f464fcea9058628caad00afcae4047f5083f2e Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Wed, 20 Nov 2024 16:25:00 -0500 Subject: [PATCH 67/68] Fixing More Errors --- cppython/test/pytest/shared.py | 77 ++++++++++++------- pdm.lock | 13 +++- pyproject.toml | 1 + .../unit/plugins/git/test_version_control.py | 3 +- tests/unit/test/test_scm.py | 6 +- tests/unit/test_builder.py | 4 +- tests/unit/test_console.py | 12 ++- tests/unit/test_data.py | 12 ++- tests/unit/test_project.py | 14 ++-- tests/unit/utility/__init__.py | 10 +++ tests/unit/utility/test_plugin.py | 6 +- tests/unit/utility/test_utility.py | 70 ++++++++++------- 12 files changed, 150 insertions(+), 78 deletions(-) diff --git a/cppython/test/pytest/shared.py b/cppython/test/pytest/shared.py index 11119cc..3363357 100644 --- a/cppython/test/pytest/shared.py +++ b/cppython/test/pytest/shared.py @@ -1,6 +1,6 @@ """Composable test types""" -from abc import ABCMeta +from abc import ABCMeta, abstractmethod from importlib.metadata import entry_points from typing import Any, LiteralString, cast @@ -37,16 +37,18 @@ class BaseTests[T: Plugin](metaclass=ABCMeta): """Shared testing information for all plugin test classes.""" + @abstractmethod @pytest.fixture(name='plugin_type', scope='session') def fixture_plugin_type(self) -> type[T]: """A required testing hook that allows type generation""" raise NotImplementedError('Override this fixture') + @staticmethod @pytest.fixture( name='cppython_plugin_data', scope='session', ) - def fixture_cppython_plugin_data(self, cppython_data: CPPythonData, plugin_type: type[T]) -> CPPythonPluginData: + def fixture_cppython_plugin_data(cppython_data: CPPythonData, plugin_type: type[T]) -> CPPythonPluginData: """Fixture for created the plugin CPPython table Args: @@ -58,12 +60,13 @@ def fixture_cppython_plugin_data(self, cppython_data: CPPythonData, plugin_type: """ return resolve_cppython_plugin(cppython_data, plugin_type) + @staticmethod @pytest.fixture( name='core_plugin_data', scope='session', ) def fixture_core_plugin_data( - self, cppython_plugin_data: CPPythonPluginData, project_data: ProjectData, pep621_data: PEP621Data + cppython_plugin_data: CPPythonPluginData, project_data: ProjectData, pep621_data: PEP621Data ) -> CorePluginData: """Fixture for creating the wrapper CoreData type @@ -77,8 +80,9 @@ def fixture_core_plugin_data( """ return CorePluginData(cppython_data=cppython_plugin_data, project_data=project_data, pep621_data=pep621_data) + @staticmethod @pytest.fixture(name='plugin_group_name', scope='session') - def fixture_plugin_group_name(self) -> LiteralString: + def fixture_plugin_group_name() -> LiteralString: """A required testing hook that allows plugin group name generation Returns: @@ -87,10 +91,11 @@ def fixture_plugin_group_name(self) -> LiteralString: return 'cppython' -class BaseIntegrationTests[T: Plugin](metaclass=ABCMeta): +class BaseIntegrationTests[T: Plugin](BaseTests[T], metaclass=ABCMeta): """Integration testing information for all plugin test classes""" - def test_entry_point(self, plugin_type: type[T], plugin_group_name: LiteralString) -> None: + @staticmethod + def test_entry_point(plugin_type: type[T], plugin_group_name: LiteralString) -> None: """Verify that the plugin was registered Args: @@ -107,7 +112,8 @@ def test_entry_point(self, plugin_type: type[T], plugin_group_name: LiteralStrin assert plugin_type in types - def test_name(self, plugin_type: type[Plugin]) -> None: + @staticmethod + def test_name(plugin_type: type[Plugin]) -> None: """Verifies the the class name allows name extraction Args: @@ -120,10 +126,11 @@ def test_name(self, plugin_type: type[Plugin]) -> None: assert len(plugin_type.name()) -class BaseUnitTests[T: Plugin](metaclass=ABCMeta): +class BaseUnitTests[T: Plugin](BaseTests[T], metaclass=ABCMeta): """Unit testing information for all plugin test classes""" - def test_feature_extraction(self, plugin_type: type[T], project_configuration: ProjectConfiguration) -> None: + @staticmethod + def test_feature_extraction(plugin_type: type[T], project_configuration: ProjectConfiguration) -> None: """Test the feature extraction of a plugin. This method tests the feature extraction functionality of a plugin by asserting that the features @@ -135,7 +142,8 @@ def test_feature_extraction(self, plugin_type: type[T], project_configuration: P """ assert plugin_type.features(project_configuration.pyproject_file.parent) - def test_information(self, plugin_type: type[T]) -> None: + @staticmethod + def test_information(plugin_type: type[T]) -> None: """Test the information method of a plugin. This method asserts that the `information` method of the given plugin type returns a value. @@ -181,9 +189,7 @@ class PluginUnitTests[T: Plugin](BaseUnitTests[T], metaclass=ABCMeta): class DataPluginTests[T: DataPlugin](BaseTests[T], metaclass=ABCMeta): - """Shared testing information for all data plugin test classes. - Not inheriting PluginTests to reduce ancestor count - """ + """Shared testing information for all data plugin test classes.""" @staticmethod @pytest.fixture( @@ -223,8 +229,9 @@ class DataPluginUnitTests[T: DataPlugin](BaseUnitTests[T], metaclass=ABCMeta): class ProviderTests[T: Provider](DataPluginTests[T], metaclass=ABCMeta): """Shared functionality between the different Provider testing categories""" + @staticmethod @pytest.fixture(name='plugin_configuration_type', scope='session') - def fixture_plugin_configuration_type(self) -> type[ProviderPluginGroupData]: + def fixture_plugin_configuration_type() -> type[ProviderPluginGroupData]: """A required testing hook that allows plugin configuration data generation Returns: @@ -232,9 +239,10 @@ def fixture_plugin_configuration_type(self) -> type[ProviderPluginGroupData]: """ return ProviderPluginGroupData + @staticmethod @pytest.fixture(name='plugin_group_data', scope='session') def fixture_plugin_group_data( - self, project_data: ProjectData, cppython_plugin_data: CPPythonPluginData + project_data: ProjectData, cppython_plugin_data: CPPythonPluginData ) -> ProviderPluginGroupData: """Generates plugin configuration data generation from environment configuration @@ -247,12 +255,13 @@ def fixture_plugin_group_data( """ return resolve_provider(project_data=project_data, cppython_data=cppython_plugin_data) + @staticmethod @pytest.fixture( name='provider_type', scope='session', params=provider_variants, ) - def fixture_provider_type(self, plugin_type: type[T]) -> type[T]: + def fixture_provider_type(plugin_type: type[T]) -> type[T]: """Fixture defining all testable variations mock Providers Args: @@ -263,12 +272,13 @@ def fixture_provider_type(self, plugin_type: type[T]) -> type[T]: """ return plugin_type + @staticmethod @pytest.fixture( name='generator_type', scope='session', params=generator_variants, ) - def fixture_generator_type(self, request: pytest.FixtureRequest) -> type[Generator]: + def fixture_generator_type(request: pytest.FixtureRequest) -> type[Generator]: """Fixture defining all testable variations mock Generator Args: @@ -281,12 +291,13 @@ def fixture_generator_type(self, request: pytest.FixtureRequest) -> type[Generat return generator_type + @staticmethod @pytest.fixture( name='scm_type', scope='session', params=scm_variants, ) - def fixture_scm_type(self, request: pytest.FixtureRequest) -> type[SCM]: + def fixture_scm_type(request: pytest.FixtureRequest) -> type[SCM]: """Fixture defining all testable variations mock Generator Args: @@ -303,8 +314,9 @@ def fixture_scm_type(self, request: pytest.FixtureRequest) -> type[SCM]: class GeneratorTests[T: Generator](DataPluginTests[T], metaclass=ABCMeta): """Shared functionality between the different Generator testing categories""" + @staticmethod @pytest.fixture(name='plugin_configuration_type', scope='session') - def fixture_plugin_configuration_type(self) -> type[GeneratorPluginGroupData]: + def fixture_plugin_configuration_type() -> type[GeneratorPluginGroupData]: """A required testing hook that allows plugin configuration data generation Returns: @@ -312,9 +324,10 @@ def fixture_plugin_configuration_type(self) -> type[GeneratorPluginGroupData]: """ return GeneratorPluginGroupData + @staticmethod @pytest.fixture(name='plugin_group_data', scope='session') def fixture_plugin_group_data( - self, project_data: ProjectData, cppython_plugin_data: CPPythonPluginData + project_data: ProjectData, cppython_plugin_data: CPPythonPluginData ) -> GeneratorPluginGroupData: """Generates plugin configuration data generation from environment configuration @@ -327,12 +340,13 @@ def fixture_plugin_group_data( """ return resolve_generator(project_data=project_data, cppython_data=cppython_plugin_data) + @staticmethod @pytest.fixture( name='provider_type', scope='session', params=provider_variants, ) - def fixture_provider_type(self, request: pytest.FixtureRequest) -> type[Provider]: + def fixture_provider_type(request: pytest.FixtureRequest) -> type[Provider]: """Fixture defining all testable variations mock Providers Args: @@ -345,11 +359,12 @@ def fixture_provider_type(self, request: pytest.FixtureRequest) -> type[Provider return provider_type + @staticmethod @pytest.fixture( name='generator_type', scope='session', ) - def fixture_generator_type(self, plugin_type: type[T]) -> type[T]: + def fixture_generator_type(plugin_type: type[T]) -> type[T]: """Override Args: @@ -360,12 +375,13 @@ def fixture_generator_type(self, plugin_type: type[T]) -> type[T]: """ return plugin_type + @staticmethod @pytest.fixture( name='scm_type', scope='session', params=scm_variants, ) - def fixture_scm_type(self, request: pytest.FixtureRequest) -> type[SCM]: + def fixture_scm_type(request: pytest.FixtureRequest) -> type[SCM]: """Fixture defining all testable variations mock Generator Args: @@ -382,8 +398,9 @@ def fixture_scm_type(self, request: pytest.FixtureRequest) -> type[SCM]: class SCMTests[T: SCM](PluginTests[T], metaclass=ABCMeta): """Shared functionality between the different SCM testing categories""" + @staticmethod @pytest.fixture(name='plugin_configuration_type', scope='session') - def fixture_plugin_configuration_type(self) -> type[SCMPluginGroupData]: + def fixture_plugin_configuration_type() -> type[SCMPluginGroupData]: """A required testing hook that allows plugin configuration data generation Returns: @@ -391,9 +408,10 @@ def fixture_plugin_configuration_type(self) -> type[SCMPluginGroupData]: """ return SCMPluginGroupData + @staticmethod @pytest.fixture(name='plugin_group_data', scope='session') def fixture_plugin_group_data( - self, project_data: ProjectData, cppython_plugin_data: CPPythonPluginData + project_data: ProjectData, cppython_plugin_data: CPPythonPluginData ) -> SCMPluginGroupData: """Generates plugin configuration data generation from environment configuration @@ -406,12 +424,13 @@ def fixture_plugin_group_data( """ return resolve_scm(project_data=project_data, cppython_data=cppython_plugin_data) + @staticmethod @pytest.fixture( name='provider_type', scope='session', params=provider_variants, ) - def fixture_provider_type(self, request: pytest.FixtureRequest) -> type[Provider]: + def fixture_provider_type(request: pytest.FixtureRequest) -> type[Provider]: """Fixture defining all testable variations mock Providers Args: @@ -424,12 +443,13 @@ def fixture_provider_type(self, request: pytest.FixtureRequest) -> type[Provider return provider_type + @staticmethod @pytest.fixture( name='generator_type', scope='session', params=generator_variants, ) - def fixture_generator_type(self, request: pytest.FixtureRequest) -> type[Generator]: + def fixture_generator_type(request: pytest.FixtureRequest) -> type[Generator]: """Fixture defining all testable variations mock Generator Args: @@ -442,12 +462,13 @@ def fixture_generator_type(self, request: pytest.FixtureRequest) -> type[Generat return generator_type + @staticmethod @pytest.fixture( name='scm_type', scope='session', params=scm_variants, ) - def fixture_scm_type(self, plugin_type: type[T]) -> type[SCM]: + def fixture_scm_type(plugin_type: type[T]) -> type[SCM]: """Fixture defining all testable variations mock Generator Args: diff --git a/pdm.lock b/pdm.lock index 5b8fc6f..6da657b 100644 --- a/pdm.lock +++ b/pdm.lock @@ -5,7 +5,7 @@ groups = ["default", "git", "lint", "pdm", "pytest", "test"] strategy = ["inherit_metadata"] lock_version = "4.5.0" -content_hash = "sha256:ec7cf5c33e57f13ee4a6c356b95af82b807b3b121edb465ff9697b46e16bdd3c" +content_hash = "sha256:56348598f9d12ee9b21d2682e7ec128491f8508f8444494c469381e44908ab15" [[metadata.targets]] requires_python = ">=3.13" @@ -335,6 +335,17 @@ files = [ {file = "installer-0.7.0.tar.gz", hash = "sha256:a26d3e3116289bb08216e0d0f7d925fcef0b0194eedfa0c944bcaaa106c4b631"}, ] +[[package]] +name = "isort" +version = "5.13.2" +requires_python = ">=3.8.0" +summary = "A Python utility / library to sort Python imports." +groups = ["lint"] +files = [ + {file = "isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6"}, + {file = "isort-5.13.2.tar.gz", hash = "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109"}, +] + [[package]] name = "markdown-it-py" version = "3.0.0" diff --git a/pyproject.toml b/pyproject.toml index 134fdda..b704e34 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -100,6 +100,7 @@ select = [ "E", # pycodestyle "B", # flake8-bugbear "SIM", # flake8-simplify + "PT", # flake8-pytest-style ] [tool.ruff.lint.pydocstyle] diff --git a/tests/unit/plugins/git/test_version_control.py b/tests/unit/plugins/git/test_version_control.py index e27ba09..9319e4f 100644 --- a/tests/unit/plugins/git/test_version_control.py +++ b/tests/unit/plugins/git/test_version_control.py @@ -9,8 +9,9 @@ class TestGitInterface(SCMUnitTests[GitSCM]): """Unit tests for the Git SCM plugin""" + @staticmethod @pytest.fixture(name='plugin_type', scope='session') - def fixture_plugin_type(self) -> type[GitSCM]: + def fixture_plugin_type() -> type[GitSCM]: """A required testing hook that allows type generation Returns: diff --git a/tests/unit/test/test_scm.py b/tests/unit/test/test_scm.py index 4f86f35..38aa4f0 100644 --- a/tests/unit/test/test_scm.py +++ b/tests/unit/test/test_scm.py @@ -11,8 +11,9 @@ class TestCPPythonSCM(SCMUnitTests[MockSCM]): """The tests for the Mock version control""" + @staticmethod @pytest.fixture(name='plugin_data', scope='session') - def fixture_plugin_data(self) -> dict[str, Any]: + def fixture_plugin_data() -> dict[str, Any]: """Returns mock data Returns: @@ -20,8 +21,9 @@ def fixture_plugin_data(self) -> dict[str, Any]: """ return {} + @staticmethod @pytest.fixture(name='plugin_type', scope='session') - def fixture_plugin_type(self) -> type[MockSCM]: + def fixture_plugin_type() -> type[MockSCM]: """A required testing hook that allows type generation Returns: diff --git a/tests/unit/test_builder.py b/tests/unit/test_builder.py index 84b5873..befb64f 100644 --- a/tests/unit/test_builder.py +++ b/tests/unit/test_builder.py @@ -20,8 +20,8 @@ class TestBuilder: """Various tests for the Builder type""" + @staticmethod def test_build( - self, project_configuration: ProjectConfiguration, pep621_configuration: PEP621Configuration, cppython_local_configuration: CPPythonLocalConfiguration, @@ -51,8 +51,8 @@ def test_build( class TestResolver: """Various tests for the Resolver type""" + @staticmethod def test_generate_plugins( - self, project_configuration: ProjectConfiguration, cppython_local_configuration: CPPythonLocalConfiguration, project_data: ProjectData, diff --git a/tests/unit/test_console.py b/tests/unit/test_console.py index 36f82ef..0ea412f 100644 --- a/tests/unit/test_console.py +++ b/tests/unit/test_console.py @@ -10,22 +10,26 @@ class TestConsole: """Various tests for the typer interface""" - def test_info(self) -> None: + @staticmethod + def test_info() -> None: """Verifies that the info command functions with CPPython hooks""" result = runner.invoke(app, ['info']) assert result.exit_code == 0 - def test_list(self) -> None: + @staticmethod + def test_list() -> None: """Verifies that the list command functions with CPPython hooks""" result = runner.invoke(app, ['list']) assert result.exit_code == 0 - def test_update(self) -> None: + @staticmethod + def test_update() -> None: """Verifies that the update command functions with CPPython hooks""" result = runner.invoke(app, ['update']) assert result.exit_code == 0 - def test_install(self) -> None: + @staticmethod + def test_install() -> None: """Verifies that the install command functions with CPPython hooks""" result = runner.invoke(app, ['install']) assert result.exit_code == 0 diff --git a/tests/unit/test_data.py b/tests/unit/test_data.py index bbd12b0..0357d6d 100644 --- a/tests/unit/test_data.py +++ b/tests/unit/test_data.py @@ -20,18 +20,20 @@ class TestData: """Various tests for the Data type""" + @staticmethod @pytest.fixture( name='data', scope='session', ) def fixture_data( - self, project_configuration: ProjectConfiguration, pep621_configuration: PEP621Configuration, cppython_local_configuration: CPPythonLocalConfiguration, ) -> Data: - """Creates a mock plugins fixture. We want all the plugins to use the same data variants at the same time, so we - have to resolve data inside the fixture instead of using other data fixtures + """Creates a mock plugins fixture. + + We want all the plugins to use the same data variants at the same time, so we + have to resolve data inside the fixture instead of using other data fixtures Args: project_configuration: Variant fixture for the project configuration @@ -40,6 +42,7 @@ def fixture_data( Returns: The mock plugins fixture + """ logger = logging.getLogger() builder = Builder(project_configuration, logger) @@ -48,7 +51,8 @@ def fixture_data( return builder.build(pep621_configuration, cppython_local_configuration, plugin_build_data) - def test_sync(self, data: Data) -> None: + @staticmethod + def test_sync(data: Data) -> None: """Verifies that the sync method executes without error Args: diff --git a/tests/unit/test_project.py b/tests/unit/test_project.py index 6d0a8c3..3bc8315 100644 --- a/tests/unit/test_project.py +++ b/tests/unit/test_project.py @@ -4,7 +4,7 @@ from importlib import metadata from pathlib import Path -from pytest import FixtureRequest +import pytest from pytest_mock import MockerFixture from cppython.core.schema import ( @@ -26,7 +26,8 @@ class TestProject: """Various tests for the project object""" - def test_self_construction(self, request: FixtureRequest) -> None: + @staticmethod + def test_self_construction(request: pytest.FixtureRequest) -> None: """The project type should be constructable with this projects configuration Args: @@ -43,7 +44,8 @@ def test_self_construction(self, request: FixtureRequest) -> None: # Doesn't have the cppython table assert not project.enabled - def test_missing_tool_table(self, tmp_path: Path) -> None: + @staticmethod + def test_missing_tool_table(tmp_path: Path) -> None: """The project type should be constructable without the tool table Args: @@ -62,7 +64,8 @@ def test_missing_tool_table(self, tmp_path: Path) -> None: assert not project.enabled - def test_missing_cppython_table(self, tmp_path: Path) -> None: + @staticmethod + def test_missing_cppython_table(tmp_path: Path) -> None: """The project type should be constructable without the cppython table Args: @@ -82,7 +85,8 @@ def test_missing_cppython_table(self, tmp_path: Path) -> None: assert not project.enabled - def test_default_cppython_table(self, tmp_path: Path, mocker: MockerFixture) -> None: + @staticmethod + def test_default_cppython_table(tmp_path: Path, mocker: MockerFixture) -> None: """The project type should be constructable with the default cppython table Args: diff --git a/tests/unit/utility/__init__.py b/tests/unit/utility/__init__.py index e69de29..f9a3da7 100644 --- a/tests/unit/utility/__init__.py +++ b/tests/unit/utility/__init__.py @@ -0,0 +1,10 @@ +"""Unit tests for the utility functions in the CPPython project. + +This module contains tests for various utility functions, including subprocess +calls, logging, and name canonicalization. The tests ensure that the utility +functions behave as expected under different conditions. + +Classes: + TestUtility: Contains tests for general utility functions. + TestSubprocess: Contains tests for subprocess-related functions. +""" diff --git a/tests/unit/utility/test_plugin.py b/tests/unit/utility/test_plugin.py index c54fc64..5b2b258 100644 --- a/tests/unit/utility/test_plugin.py +++ b/tests/unit/utility/test_plugin.py @@ -10,10 +10,8 @@ class MockPlugin(Plugin): class TestPlugin: """Tests the plugin functionality""" - def test_plugin(self) -> None: + @staticmethod + def test_plugin() -> None: """Test that the plugin functionality works""" assert MockPlugin.name() == 'mock' assert MockPlugin.group() == 'plugin' - - def test_todo(self) -> None: - """Another test TODO""" diff --git a/tests/unit/utility/test_utility.py b/tests/unit/utility/test_utility.py index 4d490cd..93692c5 100644 --- a/tests/unit/utility/test_utility.py +++ b/tests/unit/utility/test_utility.py @@ -7,7 +7,6 @@ from typing import NamedTuple import pytest -from pytest import LogCaptureFixture from cppython.utility.exception import ProcessError from cppython.utility.subprocess import call @@ -26,41 +25,47 @@ class ModelTest(NamedTuple): test_path: Path test_int: int - def test_none(self) -> None: + @staticmethod + def test_none() -> None: """Verifies that no exception is thrown with an empty string""" test = canonicalize_name('') - assert test.group == '' - assert test.name == '' + assert not test.group + assert not test.name - def test_only_group(self) -> None: + @staticmethod + def test_only_group() -> None: """Verifies that no exception is thrown when only a group is specified""" test = canonicalize_name('Group') assert test.group == 'group' - assert test.name == '' + assert not test.name - def test_name_group(self) -> None: + @staticmethod + def test_name_group() -> None: """Test that canonicalization works""" test = canonicalize_name('NameGroup') assert test.group == 'group' assert test.name == 'name' - def test_group_only_caps(self) -> None: + @staticmethod + def test_group_only_caps() -> None: """Test that canonicalization works""" test = canonicalize_name('NameGROUP') assert test.group == 'group' assert test.name == 'name' - def test_name_only_caps(self) -> None: + @staticmethod + def test_name_only_caps() -> None: """Test that canonicalization works""" test = canonicalize_name('NAMEGroup') assert test.group == 'group' assert test.name == 'name' - def test_name_multi_caps(self) -> None: + @staticmethod + def test_name_multi_caps() -> None: """Test that caps works""" test = canonicalize_name('NAmeGroup') assert test.group == 'group' @@ -70,7 +75,8 @@ def test_name_multi_caps(self) -> None: class TestSubprocess: """Subprocess testing""" - def test_subprocess_stdout(self, caplog: LogCaptureFixture) -> None: + @staticmethod + def test_subprocess_stdout(caplog: pytest.LogCaptureFixture) -> None: """Test subprocess_call Args: @@ -87,7 +93,8 @@ def test_subprocess_stdout(self, caplog: LogCaptureFixture) -> None: assert len(caplog.records) == 1 assert caplog.records[0].message == 'Test Out' - def test_subprocess_stderr(self, caplog: LogCaptureFixture) -> None: + @staticmethod + def test_subprocess_stderr(caplog: pytest.LogCaptureFixture) -> None: """Test subprocess_call Args: @@ -104,7 +111,8 @@ def test_subprocess_stderr(self, caplog: LogCaptureFixture) -> None: assert len(caplog.records) == 1 assert caplog.records[0].message == 'Test Error' - def test_subprocess_suppression(self, caplog: LogCaptureFixture) -> None: + @staticmethod + def test_subprocess_suppression(caplog: pytest.LogCaptureFixture) -> None: """Test subprocess_call suppression flag Args: @@ -120,7 +128,8 @@ def test_subprocess_suppression(self, caplog: LogCaptureFixture) -> None: ) assert len(caplog.records) == 0 - def test_subprocess_exit(self, caplog: LogCaptureFixture) -> None: + @staticmethod + def test_subprocess_exit(caplog: pytest.LogCaptureFixture) -> None: """Test subprocess_call exception output Args: @@ -134,12 +143,13 @@ def test_subprocess_exit(self, caplog: LogCaptureFixture) -> None: cppython_logger, ) - assert len(caplog.records) == 1 - assert caplog.records[0].message == 'Test Exit Output' + assert len(caplog.records) == 1 + assert caplog.records[0].message == 'Test Exit Output' assert 'Subprocess task failed' in str(exec_info.value) - def test_subprocess_exception(self, caplog: LogCaptureFixture) -> None: + @staticmethod + def test_subprocess_exception(caplog: pytest.LogCaptureFixture) -> None: """Test subprocess_call exception output Args: @@ -152,12 +162,13 @@ def test_subprocess_exception(self, caplog: LogCaptureFixture) -> None: [python, '-c', "import sys; raise Exception('Test Exception Output')"], cppython_logger, ) - assert len(caplog.records) == 1 - assert caplog.records[0].message == 'Test Exception Output' + assert len(caplog.records) == 1 + assert caplog.records[0].message == 'Test Exception Output' assert 'Subprocess task failed' in str(exec_info.value) - def test_stderr_exception(self, caplog: LogCaptureFixture) -> None: + @staticmethod + def test_stderr_exception(caplog: pytest.LogCaptureFixture) -> None: """Verify print and exit Args: @@ -173,13 +184,16 @@ def test_stderr_exception(self, caplog: LogCaptureFixture) -> None: ], cppython_logger, ) - assert len(caplog.records) == 2 - assert caplog.records[0].message == 'Test Out' - assert caplog.records[1].message == 'Test Exit Out' + + LOG_COUNT = 2 + assert len(caplog.records) == LOG_COUNT + assert caplog.records[0].message == 'Test Out' + assert caplog.records[1].message == 'Test Exit Out' assert 'Subprocess task failed' in str(exec_info.value) - def test_stdout_exception(self, caplog: LogCaptureFixture) -> None: + @staticmethod + def test_stdout_exception(caplog: pytest.LogCaptureFixture) -> None: """Verify print and exit Args: @@ -195,8 +209,10 @@ def test_stdout_exception(self, caplog: LogCaptureFixture) -> None: ], cppython_logger, ) - assert len(caplog.records) == 2 - assert caplog.records[0].message == 'Test Error' - assert caplog.records[1].message == 'Test Exit Error' + + LOG_COUNT = 2 + assert len(caplog.records) == LOG_COUNT + assert caplog.records[0].message == 'Test Error' + assert caplog.records[1].message == 'Test Exit Error' assert 'Subprocess task failed' in str(exec_info.value) From 2b7807cdc0a5479767c083a00759858487033f5e Mon Sep 17 00:00:00 2001 From: Asher Norland Date: Wed, 20 Nov 2024 17:44:29 -0500 Subject: [PATCH 68/68] Finish Linting --- cppython/__init__.py | 7 ++++ cppython/builder.py | 16 ++++++--- cppython/console/__init__.py | 6 ++++ cppython/console/entry.py | 2 +- cppython/core/__init__.py | 6 ++++ cppython/core/exception.py | 1 + cppython/core/plugin_schema/__init__.py | 7 ++++ cppython/core/plugin_schema/generator.py | 1 + cppython/core/plugin_schema/provider.py | 6 ++-- cppython/core/plugin_schema/scm.py | 1 + cppython/core/resolution.py | 4 +-- cppython/core/schema.py | 5 ++- cppython/data.py | 1 + cppython/defaults.py | 15 +++++---- cppython/plugins/__init__.py | 7 ++++ cppython/plugins/cmake/__init__.py | 6 ++++ cppython/plugins/cmake/builder.py | 10 ++++-- cppython/plugins/cmake/plugin.py | 6 ++-- cppython/plugins/cmake/schema.py | 1 + cppython/plugins/git/__init__.py | 6 ++++ cppython/plugins/git/plugin.py | 10 +++--- cppython/plugins/pdm/__init__.py | 6 ++++ cppython/plugins/pdm/plugin.py | 3 +- cppython/plugins/vcpkg/__init__.py | 7 ++++ cppython/plugins/vcpkg/plugin.py | 4 ++- cppython/project.py | 1 + cppython/test/__init__.py | 7 ++++ cppython/test/mock/__init__.py | 7 ++++ cppython/test/mock/generator.py | 14 +++----- cppython/test/mock/provider.py | 9 ++--- cppython/test/mock/scm.py | 12 +++---- cppython/test/pytest/__init__.py | 7 ++++ cppython/test/pytest/tests.py | 33 ++++++++++++------- cppython/utility/__init__.py | 6 ++++ cppython/utility/exception.py | 15 +++++++++ pyproject.toml | 2 +- tests/__init__.py | 7 ++++ tests/conftest.py | 14 +++++--- tests/integration/__init__.py | 7 ++++ tests/integration/plugins/__init__.py | 7 ++++ tests/integration/plugins/cmake/__init__.py | 7 ++++ .../plugins/cmake/test_generator.py | 6 ++-- tests/integration/plugins/pdm/__init__.py | 7 ++++ .../integration/plugins/pdm/test_interface.py | 6 ++-- tests/integration/plugins/vcpkg/__init__.py | 7 ++++ .../plugins/vcpkg/test_provider.py | 6 ++-- tests/integration/test/__init__.py | 7 ++++ tests/integration/test/test_generator.py | 6 ++-- tests/integration/test/test_provider.py | 6 ++-- tests/integration/test/test_scm.py | 6 ++-- tests/unit/__init__.py | 7 ++++ tests/unit/core/__init__.py | 7 ++++ tests/unit/core/test_plugin_schema.py | 15 +++++---- tests/unit/core/test_resolution.py | 21 ++++++++---- tests/unit/core/test_schema.py | 13 +++++--- tests/unit/plugins/__init__.py | 7 ++++ tests/unit/plugins/cmake/__init__.py | 7 ++++ tests/unit/plugins/cmake/test_generator.py | 18 ++++++---- tests/unit/plugins/git/__init__.py | 7 ++++ tests/unit/plugins/pdm/__init__.py | 7 ++++ tests/unit/plugins/pdm/test_interface.py | 6 ++-- tests/unit/plugins/vcpkg/__init__.py | 7 ++++ tests/unit/plugins/vcpkg/test_provider.py | 6 ++-- tests/unit/test/__init__.py | 6 ++++ tests/unit/test/test_fixtures.py | 3 +- tests/unit/test/test_generator.py | 6 ++-- tests/unit/test/test_provider.py | 9 +++-- tests/unit/utility/__init__.py | 4 --- 68 files changed, 392 insertions(+), 120 deletions(-) diff --git a/cppython/__init__.py b/cppython/__init__.py index e69de29..6d58322 100644 --- a/cppython/__init__.py +++ b/cppython/__init__.py @@ -0,0 +1,7 @@ +"""The CPPython project. + +This module serves as the entry point for the CPPython project, a Python-based +solution for managing C++ dependencies. It includes core functionality, plugin +interfaces, and utility functions that facilitate the integration and management +of various tools and systems. +""" diff --git a/cppython/builder.py b/cppython/builder.py index 2aa5cb2..adaad8e 100644 --- a/cppython/builder.py +++ b/cppython/builder.py @@ -40,6 +40,7 @@ class Resolver: """The resolution of data sources for the builder""" def __init__(self, project_configuration: ProjectConfiguration, logger: Logger) -> None: + """Initializes the resolver""" self._project_configuration = project_configuration self._logger = logger @@ -78,7 +79,8 @@ def generate_plugins( return PluginBuildData(generator_type=generator_type, provider_type=provider_type, scm_type=scm_type) - def generate_cppython_plugin_data(self, plugin_build_data: PluginBuildData) -> PluginCPPythonData: + @staticmethod + def generate_cppython_plugin_data(plugin_build_data: PluginBuildData) -> PluginCPPythonData: """Generates the CPPython plugin data from the resolved plugins Args: @@ -93,8 +95,9 @@ def generate_cppython_plugin_data(self, plugin_build_data: PluginBuildData) -> P scm_name=plugin_build_data.scm_type.name(), ) + @staticmethod def generate_pep621_data( - self, pep621_configuration: PEP621Configuration, project_configuration: ProjectConfiguration, scm: SCM | None + pep621_configuration: PEP621Configuration, project_configuration: ProjectConfiguration, scm: SCM | None ) -> PEP621Data: """Generates the PEP621 data from configuration sources @@ -108,7 +111,8 @@ def generate_pep621_data( """ return resolve_pep621(pep621_configuration, project_configuration, scm) - def resolve_global_config(self) -> CPPythonGlobalConfiguration: + @staticmethod + def resolve_global_config() -> CPPythonGlobalConfiguration: """Generates the global configuration object Returns: @@ -263,8 +267,9 @@ def select_scm(self, scm_plugins: list[type[SCM]], project_data: ProjectData) -> return DefaultSCM + @staticmethod def solve( - self, generator_types: list[type[Generator]], provider_types: list[type[Provider]] + generator_types: list[type[Generator]], provider_types: list[type[Provider]] ) -> tuple[type[Generator], type[Provider]]: """Selects the first generator and provider that can work together @@ -293,8 +298,8 @@ def solve( return combos[0] + @staticmethod def create_scm( - self, core_data: CoreData, scm_type: type[SCM], ) -> SCM: @@ -389,6 +394,7 @@ class Builder: """Helper class for building CPPython projects""" def __init__(self, project_configuration: ProjectConfiguration, logger: Logger) -> None: + """Initializes the builder""" self._project_configuration = project_configuration self._logger = logger diff --git a/cppython/console/__init__.py b/cppython/console/__init__.py index e69de29..dd8a440 100644 --- a/cppython/console/__init__.py +++ b/cppython/console/__init__.py @@ -0,0 +1,6 @@ +"""Console interface for the CPPython project. + +This module provides a command-line interface (CLI) for interacting with the +CPPython project. It includes commands for managing project configurations, +installing dependencies, and updating project data. +""" diff --git a/cppython/console/entry.py b/cppython/console/entry.py index 5ddb029..fcdd209 100644 --- a/cppython/console/entry.py +++ b/cppython/console/entry.py @@ -24,7 +24,7 @@ def _find_pyproject_file() -> Path: while not path.glob('pyproject.toml'): if path.is_absolute(): - assert False, ( + raise AssertionError( 'This is not a valid project. No pyproject.toml found in the current directory or any of its parents.' ) diff --git a/cppython/core/__init__.py b/cppython/core/__init__.py index e69de29..353b88f 100644 --- a/cppython/core/__init__.py +++ b/cppython/core/__init__.py @@ -0,0 +1,6 @@ +"""Core functionality for the CPPython project. + +This module contains the core components and utilities that form the foundation +of the CPPython project. It includes schema definitions, exception handling, +resolution processes, and utility functions. +""" diff --git a/cppython/core/exception.py b/cppython/core/exception.py index b7ec551..a77bffc 100644 --- a/cppython/core/exception.py +++ b/cppython/core/exception.py @@ -13,6 +13,7 @@ class ConfigException(ValueError): """Raised when there is a configuration error""" def __init__(self, message: str, errors: list[ConfigError]): + """Initializes the exception""" super().__init__(message) self._errors = errors diff --git a/cppython/core/plugin_schema/__init__.py b/cppython/core/plugin_schema/__init__.py index e69de29..65baf09 100644 --- a/cppython/core/plugin_schema/__init__.py +++ b/cppython/core/plugin_schema/__init__.py @@ -0,0 +1,7 @@ +"""Schema definitions for CPPython plugins. + +This module defines the schemas and protocols for CPPython plugins, including +generators, providers, and SCMs. It provides the necessary interfaces and data +structures to ensure consistent communication and functionality between the core +CPPython system and its plugins. +""" diff --git a/cppython/core/plugin_schema/generator.py b/cppython/core/plugin_schema/generator.py index 98a5082..0a81266 100644 --- a/cppython/core/plugin_schema/generator.py +++ b/cppython/core/plugin_schema/generator.py @@ -53,6 +53,7 @@ class Generator(DataPlugin, SyncConsumer, Protocol): def __init__( self, group_data: GeneratorPluginGroupData, core_data: CorePluginData, configuration_data: dict[str, Any] ) -> None: + """Initializes the generator plugin""" raise NotImplementedError @staticmethod diff --git a/cppython/core/plugin_schema/provider.py b/cppython/core/plugin_schema/provider.py index 9d563b5..b818976 100644 --- a/cppython/core/plugin_schema/provider.py +++ b/cppython/core/plugin_schema/provider.py @@ -41,8 +41,9 @@ def supported_sync_type(sync_type: type[SyncData]) -> bool: @abstractmethod def sync_data(self, consumer: SyncConsumer) -> SyncData | None: - """Requests generator information from the provider. The generator is either defined by a provider specific file - or the CPPython configuration table + """Requests generator information from the provider. + + The generator is either defined by a provider specific file or the CPPython configuration table Args: consumer: The consumer @@ -61,6 +62,7 @@ class Provider(DataPlugin, SyncProducer, Protocol): def __init__( self, group_data: ProviderPluginGroupData, core_data: CorePluginData, configuration_data: dict[str, Any] ) -> None: + """Initializes the provider""" raise NotImplementedError @staticmethod diff --git a/cppython/core/plugin_schema/scm.py b/cppython/core/plugin_schema/scm.py index b9afe16..4e5be7c 100644 --- a/cppython/core/plugin_schema/scm.py +++ b/cppython/core/plugin_schema/scm.py @@ -26,6 +26,7 @@ class SCM(Plugin, Protocol): @abstractmethod def __init__(self, group_data: SCMPluginGroupData) -> None: + """Initializes the SCM plugin""" raise NotImplementedError @staticmethod diff --git a/cppython/core/resolution.py b/cppython/core/resolution.py index 17e47c8..03a873c 100644 --- a/cppython/core/resolution.py +++ b/cppython/core/resolution.py @@ -187,8 +187,8 @@ def _write_tool_directory(cppython_data: CPPythonData, directory: Path) -> Direc """Creates directories following a certain format Args: - core_data: The core data - plugin_path: The relative plugin path to use + cppython_data: The cppython data + directory: The directory to create Returns: The written path diff --git a/cppython/core/schema.py b/cppython/core/schema.py index 015225d..e5c566d 100644 --- a/cppython/core/schema.py +++ b/cppython/core/schema.py @@ -86,6 +86,7 @@ class PEP621Data(CPPythonModel): class PEP621Configuration(CPPythonModel): """CPPython relevant PEP 621 conforming data + Because only the partial schema is used, we ignore 'extra' attributes Schema: https://www.python.org/dev/peps/pep-0621/ """ @@ -109,7 +110,7 @@ def dynamic_data(cls, model: 'PEP621Configuration') -> 'PEP621Configuration': Returns: The data """ - for field in model.model_fields.keys(): + for field in model.model_fields: if field == 'dynamic': continue value = getattr(model, field) @@ -198,6 +199,7 @@ class Plugin(SynodicPlugin, Protocol): @abstractmethod def __init__(self, group_data: PluginGroupData) -> None: + """Initializes the plugin""" raise NotImplementedError @staticmethod @@ -247,6 +249,7 @@ class DataPlugin(Plugin, Protocol): def __init__( self, group_data: DataPluginGroupData, core_data: CorePluginData, configuration_data: dict[str, Any] ) -> None: + """Initializes the data plugin""" raise NotImplementedError @staticmethod diff --git a/cppython/data.py b/cppython/data.py index 5b0d7b0..c2c76be 100644 --- a/cppython/data.py +++ b/cppython/data.py @@ -23,6 +23,7 @@ class Data: """Contains and manages the project data""" def __init__(self, core_data: CoreData, plugins: Plugins, logger: Logger) -> None: + """Initializes the data""" self._core_data = core_data self._plugins = plugins self.logger = logger diff --git a/cppython/defaults.py b/cppython/defaults.py index e685ea6..eb00267 100644 --- a/cppython/defaults.py +++ b/cppython/defaults.py @@ -2,7 +2,11 @@ from pydantic import DirectoryPath -from cppython.core.plugin_schema.scm import SCM, SCMPluginGroupData, SupportedSCMFeatures +from cppython.core.plugin_schema.scm import ( + SCM, + SCMPluginGroupData, + SupportedSCMFeatures, +) from cppython.core.schema import Information @@ -10,15 +14,13 @@ class DefaultSCM(SCM): """A default SCM class for when no SCM plugin is selected""" def __init__(self, group_data: SCMPluginGroupData) -> None: + """Initializes the default SCM class""" self.group_data = group_data @staticmethod - def features(directory: DirectoryPath) -> SupportedSCMFeatures: + def features(_: DirectoryPath) -> SupportedSCMFeatures: """Broadcasts the shared features of the SCM plugin to CPPython - Args: - directory: The root directory where features are evaluated - Returns: The supported features """ @@ -33,7 +35,8 @@ def information() -> Information: """ return Information() - def version(self, _: DirectoryPath) -> str: + @staticmethod + def version(_: DirectoryPath) -> str: """Extracts the system's version metadata Returns: diff --git a/cppython/plugins/__init__.py b/cppython/plugins/__init__.py index e69de29..501f55f 100644 --- a/cppython/plugins/__init__.py +++ b/cppython/plugins/__init__.py @@ -0,0 +1,7 @@ +"""Plugins for the CPPython project. + +This module contains various plugins that extend the functionality of the CPPython +project. Each plugin integrates with different tools and systems to provide +additional capabilities, such as dependency management, build system integration, +and version control. +""" diff --git a/cppython/plugins/cmake/__init__.py b/cppython/plugins/cmake/__init__.py index e69de29..41cf2e1 100644 --- a/cppython/plugins/cmake/__init__.py +++ b/cppython/plugins/cmake/__init__.py @@ -0,0 +1,6 @@ +"""The CMake generator plugin for CPPython. + +This module implements the CMake generator plugin, which integrates CPPython with +the CMake build system. It includes functionality for resolving configuration data, +writing presets, and synchronizing project data. +""" diff --git a/cppython/plugins/cmake/builder.py b/cppython/plugins/cmake/builder.py index 73ffadc..ae385ec 100644 --- a/cppython/plugins/cmake/builder.py +++ b/cppython/plugins/cmake/builder.py @@ -10,7 +10,8 @@ class Builder: """Aids in building the information needed for the CMake plugin""" - def write_provider_preset(self, provider_directory: Path, data: CMakeSyncData) -> None: + @staticmethod + def write_provider_preset(provider_directory: Path, data: CMakeSyncData) -> None: """Writes a provider preset from input sync data Args: @@ -24,8 +25,9 @@ def write_provider_preset(self, provider_directory: Path, data: CMakeSyncData) - write_model_json(json_path, presets) + @staticmethod def write_cppython_preset( - self, cppython_preset_directory: Path, _provider_directory: Path, _provider_data: CMakeSyncData + cppython_preset_directory: Path, _provider_directory: Path, _provider_data: CMakeSyncData ) -> Path: """Write the cppython presets which inherit from the provider presets @@ -43,8 +45,10 @@ def write_cppython_preset( write_model_json(cppython_json_path, presets) return cppython_json_path - def write_root_presets(self, preset_file: Path, _cppython_preset_file: Path) -> None: + @staticmethod + def write_root_presets(preset_file: Path, _: Path) -> None: """Read the top level json file and insert the include reference. + Receives a relative path to the tool cmake json file Raises: diff --git a/cppython/plugins/cmake/plugin.py b/cppython/plugins/cmake/plugin.py index 8b031cc..0fbb419 100644 --- a/cppython/plugins/cmake/plugin.py +++ b/cppython/plugins/cmake/plugin.py @@ -18,18 +18,16 @@ class CMakeGenerator(Generator): """CMake generator""" def __init__(self, group_data: GeneratorPluginGroupData, core_data: CorePluginData, data: dict[str, Any]) -> None: + """Initializes the generator""" self.group_data = group_data self.core_data = core_data self.data = resolve_cmake_data(data, core_data) self.builder = Builder() @staticmethod - def features(directory: Path) -> SupportedGeneratorFeatures: + def features(_: Path) -> SupportedGeneratorFeatures: """Queries if CMake is supported - Args: - directory: The input directory to query - Returns: Supported? """ diff --git a/cppython/plugins/cmake/schema.py b/cppython/plugins/cmake/schema.py index b1d9520..2e7cabb 100644 --- a/cppython/plugins/cmake/schema.py +++ b/cppython/plugins/cmake/schema.py @@ -42,6 +42,7 @@ class ConfigurePreset(CPPythonModel, extra='allow'): class CMakePresets(CPPythonModel, extra='allow'): """The schema for the CMakePresets and CMakeUserPresets files. + The only information needed is the configure preset list for cache variable injection """ diff --git a/cppython/plugins/git/__init__.py b/cppython/plugins/git/__init__.py index e69de29..557ca36 100644 --- a/cppython/plugins/git/__init__.py +++ b/cppython/plugins/git/__init__.py @@ -0,0 +1,6 @@ +"""The Git SCM plugin for CPPython. + +This module implements the Git SCM plugin, which provides version control +functionality using Git. It includes features for extracting repository +information, handling version metadata, and managing project descriptions. +""" diff --git a/cppython/plugins/git/plugin.py b/cppython/plugins/git/plugin.py index 7e22edd..5bb6d45 100644 --- a/cppython/plugins/git/plugin.py +++ b/cppython/plugins/git/plugin.py @@ -17,6 +17,7 @@ class GitSCM(SCM): """Git implementation hooks""" def __init__(self, group_data: SCMPluginGroupData) -> None: + """Initializes the plugin""" self.group_data = group_data @staticmethod @@ -46,17 +47,16 @@ def information() -> Information: """ return Information() - def version(self, directory: Path) -> str: + @staticmethod + def version(_: Path) -> str: """Extracts the system's version metadata - Args: - directory: The repository path - Returns: The git version """ return '' - def description(self) -> str | None: + @staticmethod + def description() -> str | None: """Requests extraction of the project description""" return None diff --git a/cppython/plugins/pdm/__init__.py b/cppython/plugins/pdm/__init__.py index e69de29..2db3d2b 100644 --- a/cppython/plugins/pdm/__init__.py +++ b/cppython/plugins/pdm/__init__.py @@ -0,0 +1,6 @@ +"""The PDM interface plugin for CPPython. + +This module implements the PDM interface plugin, which integrates CPPython with +the PDM tool. It includes functionality for handling post-install actions, +writing configuration data, and managing project-specific settings. +""" diff --git a/cppython/plugins/pdm/plugin.py b/cppython/plugins/pdm/plugin.py index 428e9cb..eca64fe 100644 --- a/cppython/plugins/pdm/plugin.py +++ b/cppython/plugins/pdm/plugin.py @@ -14,7 +14,8 @@ class CPPythonPlugin(Interface): """Implementation of the PDM Interface Plugin""" - def __init__(self, _core: Core) -> None: + def __init__(self, _: Core) -> None: + """Initializes the plugin""" post_install.connect(self.on_post_install, weak=False) self.logger = getLogger('cppython.interface.pdm') diff --git a/cppython/plugins/vcpkg/__init__.py b/cppython/plugins/vcpkg/__init__.py index e69de29..4758507 100644 --- a/cppython/plugins/vcpkg/__init__.py +++ b/cppython/plugins/vcpkg/__init__.py @@ -0,0 +1,7 @@ +"""The vcpkg provider plugin for CPPython. + +This module implements the vcpkg provider plugin, which manages C++ dependencies +using the vcpkg package manager. It includes functionality for resolving +configuration data, generating manifests, and handling installation and updates +of dependencies. +""" diff --git a/cppython/plugins/vcpkg/plugin.py b/cppython/plugins/vcpkg/plugin.py index b5f8edb..f5464ab 100644 --- a/cppython/plugins/vcpkg/plugin.py +++ b/cppython/plugins/vcpkg/plugin.py @@ -28,6 +28,7 @@ class VcpkgProvider(Provider): def __init__( self, group_data: ProviderPluginGroupData, core_data: CorePluginData, configuration_data: dict[str, Any] ) -> None: + """Initializes the provider""" self.group_data: ProviderPluginGroupData = group_data self.core_data: CorePluginData = core_data self.data: VcpkgData = resolve_vcpkg_data(configuration_data, core_data) @@ -83,7 +84,8 @@ def _update_provider(cls, path: Path) -> None: logger.error('Unable to bootstrap the vcpkg repository', exc_info=True) raise - def sync_data(self, consumer: SyncConsumer) -> SyncData: + @staticmethod + def sync_data(consumer: SyncConsumer) -> SyncData: """Gathers a data object for the given generator Args: diff --git a/cppython/project.py b/cppython/project.py index 2df5950..40c871f 100644 --- a/cppython/project.py +++ b/cppython/project.py @@ -17,6 +17,7 @@ class Project(API): def __init__( self, project_configuration: ProjectConfiguration, interface: Interface, pyproject_data: dict[str, Any] ) -> None: + """Initializes the project""" self._enabled = False self._interface = interface self.logger = logging.getLogger('cppython') diff --git a/cppython/test/__init__.py b/cppython/test/__init__.py index e69de29..bbf00b9 100644 --- a/cppython/test/__init__.py +++ b/cppython/test/__init__.py @@ -0,0 +1,7 @@ +"""Testing utilities for the CPPython project. + +This module provides various utilities and mock implementations to facilitate +the testing of CPPython plugins and core functionalities. It includes shared +test types, fixtures, and mock classes that simulate real-world scenarios and +edge cases. +""" diff --git a/cppython/test/mock/__init__.py b/cppython/test/mock/__init__.py index e69de29..b7a7809 100644 --- a/cppython/test/mock/__init__.py +++ b/cppython/test/mock/__init__.py @@ -0,0 +1,7 @@ +"""Mock implementations for testing CPPython plugins. + +This module provides mock implementations of various CPPython plugin interfaces, +enabling comprehensive testing of plugin behavior. The mocks include providers, +generators, and SCMs, each designed to simulate real-world scenarios and edge +cases. +""" diff --git a/cppython/test/mock/generator.py b/cppython/test/mock/generator.py index 7046c30..e392ac3 100644 --- a/cppython/test/mock/generator.py +++ b/cppython/test/mock/generator.py @@ -26,17 +26,15 @@ class MockGenerator(Generator): def __init__( self, group_data: GeneratorPluginGroupData, core_data: CorePluginData, configuration_data: dict[str, Any] ) -> None: + """Initializes the mock generator""" self.group_data = group_data self.core_data = core_data self.configuration_data = MockGeneratorData(**configuration_data) @staticmethod - def features(directory: DirectoryPath) -> SupportedGeneratorFeatures: + def features(_: DirectoryPath) -> SupportedGeneratorFeatures: """Broadcasts the shared features of the generator plugin to CPPython - Args: - directory: The root directory where features are evaluated - Returns: The supported features """ @@ -60,9 +58,5 @@ def sync_types() -> list[type[SyncData]]: """ return [MockSyncData] - def sync(self, sync_data: SyncData) -> None: - """Synchronizes generator files and state with the providers input - - Args: - sync_data: List of information gathered from providers - """ + def sync(self, _: SyncData) -> None: + """Synchronizes generator files and state with the providers input""" diff --git a/cppython/test/mock/provider.py b/cppython/test/mock/provider.py index 08beb54..bfc0ef7 100644 --- a/cppython/test/mock/provider.py +++ b/cppython/test/mock/provider.py @@ -26,17 +26,15 @@ class MockProvider(Provider): def __init__( self, group_data: ProviderPluginGroupData, core_data: CorePluginData, configuration_data: dict[str, Any] ) -> None: + """Initializes the mock provider""" self.group_data = group_data self.core_data = core_data self.configuration_data = MockProviderData(**configuration_data) @staticmethod - def features(directory: DirectoryPath) -> SupportedProviderFeatures: + def features(_: DirectoryPath) -> SupportedProviderFeatures: """Broadcasts the shared features of the Provider plugin to CPPython - Args: - directory: The root directory where features are evaluated - Returns: The supported features """ @@ -82,10 +80,13 @@ def sync_data(self, consumer: SyncConsumer) -> SyncData | None: @classmethod async def download_tooling(cls, directory: DirectoryPath) -> None: + """Downloads the provider tooling""" cls.downloaded = directory def install(self) -> None: + """Installs the provider""" pass def update(self) -> None: + """Updates the provider""" pass diff --git a/cppython/test/mock/scm.py b/cppython/test/mock/scm.py index af50a89..9058406 100644 --- a/cppython/test/mock/scm.py +++ b/cppython/test/mock/scm.py @@ -14,15 +14,13 @@ class MockSCM(SCM): """A mock generator class for behavior testing""" def __init__(self, group_data: SCMPluginGroupData) -> None: + """Initializes the mock generator""" self.group_data = group_data @staticmethod - def features(directory: DirectoryPath) -> SupportedSCMFeatures: + def features(_: DirectoryPath) -> SupportedSCMFeatures: """Broadcasts the shared features of the SCM plugin to CPPython - Args: - directory: The root directory where features are evaluated - Returns: The supported features """ @@ -37,12 +35,10 @@ def information() -> Information: """ return Information() - def version(self, directory: DirectoryPath) -> str: + @staticmethod + def version(_: DirectoryPath) -> str: """Extracts the system's version metadata - Args: - directory: The repository path - Returns: A version """ diff --git a/cppython/test/pytest/__init__.py b/cppython/test/pytest/__init__.py index e69de29..a312d6a 100644 --- a/cppython/test/pytest/__init__.py +++ b/cppython/test/pytest/__init__.py @@ -0,0 +1,7 @@ +"""Test harness for CPPython plugins using pytest. + +This module provides a test harness for CPPython plugins, enabling them to be +tested using pytest. It includes shared test types, fixtures, and utilities +that facilitate the testing of plugin interfaces, project configurations, and +plugin-specific features. +""" diff --git a/cppython/test/pytest/tests.py b/cppython/test/pytest/tests.py index a41019d..dd70a62 100644 --- a/cppython/test/pytest/tests.py +++ b/cppython/test/pytest/tests.py @@ -24,15 +24,17 @@ class ProviderIntegrationTests[T: Provider](DataPluginIntegrationTests[T], ProviderTests[T], metaclass=ABCMeta): """Base class for all provider integration tests that test plugin agnostic behavior""" + @staticmethod @pytest.fixture(autouse=True, scope='session') - def _fixture_install_dependency(self, plugin: T, install_path: Path) -> None: + def _fixture_install_dependency(plugin: T, install_path: Path) -> None: """Forces the download to only happen once per test session""" path = install_path / canonicalize_type(type(plugin)).name path.mkdir(parents=True, exist_ok=True) asyncio.run(plugin.download_tooling(path)) - def test_install(self, plugin: T) -> None: + @staticmethod + def test_install(plugin: T) -> None: """Ensure that the vanilla install command functions Args: @@ -40,7 +42,8 @@ def test_install(self, plugin: T) -> None: """ plugin.install() - def test_update(self, plugin: T) -> None: + @staticmethod + def test_update(plugin: T) -> None: """Ensure that the vanilla update command functions Args: @@ -48,7 +51,8 @@ def test_update(self, plugin: T) -> None: """ plugin.update() - def test_group_name(self, plugin_type: type[T]) -> None: + @staticmethod + def test_group_name(plugin_type: type[T]) -> None: """Verifies that the group name is the same as the plugin type Args: @@ -58,15 +62,17 @@ def test_group_name(self, plugin_type: type[T]) -> None: class ProviderUnitTests[T: Provider](DataPluginUnitTests[T], ProviderTests[T], metaclass=ABCMeta): - """Custom implementations of the Provider class should inherit from this class for its tests. - Base class for all provider unit tests that test plugin agnostic behavior + """Base class for all provider unit tests that test plugin agnostic behavior. + + Custom implementations of the Provider class should inherit from this class for its tests. """ class GeneratorIntegrationTests[T: Generator](DataPluginIntegrationTests[T], GeneratorTests[T], metaclass=ABCMeta): """Base class for all scm integration tests that test plugin agnostic behavior""" - def test_group_name(self, plugin_type: type[T]) -> None: + @staticmethod + def test_group_name(plugin_type: type[T]) -> None: """Verifies that the group name is the same as the plugin type Args: @@ -76,15 +82,17 @@ def test_group_name(self, plugin_type: type[T]) -> None: class GeneratorUnitTests[T: Generator](DataPluginUnitTests[T], GeneratorTests[T], metaclass=ABCMeta): - """Custom implementations of the Generator class should inherit from this class for its tests. - Base class for all Generator unit tests that test plugin agnostic behavior + """Base class for all Generator unit tests that test plugin agnostic behavior. + + Custom implementations of the Generator class should inherit from this class for its tests. """ class SCMIntegrationTests[T: SCM](PluginIntegrationTests[T], SCMTests[T], metaclass=ABCMeta): """Base class for all generator integration tests that test plugin agnostic behavior""" - def test_group_name(self, plugin_type: type[T]) -> None: + @staticmethod + def test_group_name(plugin_type: type[T]) -> None: """Verifies that the group name is the same as the plugin type Args: @@ -94,6 +102,7 @@ def test_group_name(self, plugin_type: type[T]) -> None: class SCMUnitTests[T: SCM](PluginUnitTests[T], SCMTests[T], metaclass=ABCMeta): - """Custom implementations of the Generator class should inherit from this class for its tests. - Base class for all Generator unit tests that test plugin agnostic behavior + """Base class for all Generator unit tests that test plugin agnostic behavior. + + Custom implementations of the Generator class should inherit from this class for its tests. """ diff --git a/cppython/utility/__init__.py b/cppython/utility/__init__.py index e69de29..9aead6a 100644 --- a/cppython/utility/__init__.py +++ b/cppython/utility/__init__.py @@ -0,0 +1,6 @@ +"""Utility functions for the CPPython project. + +This module contains various utility functions that assist with different +aspects of the CPPython project. The utilities include subprocess management, +exception handling, and type canonicalization. +""" diff --git a/cppython/utility/exception.py b/cppython/utility/exception.py index 6a64977..2c43681 100644 --- a/cppython/utility/exception.py +++ b/cppython/utility/exception.py @@ -5,6 +5,11 @@ class ProcessError(Exception): """Raised when there is a configuration error""" def __init__(self, error: str) -> None: + """Initializes the error + + Args: + error: The error message + """ self._error = error super().__init__(error) @@ -23,6 +28,11 @@ class PluginError(Exception): """Raised when there is a plugin error""" def __init__(self, error: str) -> None: + """Initializes the error + + Args: + error: The error message + """ self._error = error super().__init__(error) @@ -41,6 +51,11 @@ class NotSupportedError(Exception): """Raised when something is not supported""" def __init__(self, error: str) -> None: + """Initializes the error + + Args: + error: The error message + """ self._error = error super().__init__(error) diff --git a/pyproject.toml b/pyproject.toml index b704e34..f69a6ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -124,7 +124,7 @@ source = "scm" analyze = {shell = "ruff check cppython tests"} format = {shell = "ruff format"} lint = {composite = ["analyze", "format", "sort-imports", "type-check"]} -sort-imports = {shell = "isort --check-only --diff --verbose ."} +sort-imports = {shell = "isort --check-only --diff ."} test = {shell = "pytest --cov=cppython --verbose tests"} type-check = {shell = "mypy ."} diff --git a/tests/__init__.py b/tests/__init__.py index e69de29..73173d5 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -0,0 +1,7 @@ +"""Unit tests for the CPPython project. + +This module contains various unit tests to ensure the correct functionality of +different components within the CPPython project. The tests cover a wide range +of features, including plugin interfaces, project configurations, and utility +functions. +""" diff --git a/tests/conftest.py b/tests/conftest.py index 37bcf33..2e1f173 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -59,8 +59,10 @@ def _cmake_data_list() -> list[CMakeConfiguration]: ) def fixture_install_path(tmp_path_factory: pytest.TempPathFactory) -> Path: """Creates temporary install location + Args: tmp_path_factory: Factory for centralized temporary directories + Returns: A temporary directory """ @@ -251,8 +253,9 @@ def fixture_core_data(cppython_data: CPPythonData, project_data: ProjectData) -> def fixture_project_configuration( request: pytest.FixtureRequest, tmp_path_factory: pytest.TempPathFactory ) -> ProjectConfiguration: - """Project configuration fixture. Here we provide overrides on the input variants so that - we can use a temporary directory for testing purposes. + """Project configuration fixture. + + Here we provide overrides on the input variants so that we can use a temporary directory for testing purposes. Args: request: Parameterized configuration data @@ -281,8 +284,10 @@ def fixture_project_configuration( ) def fixture_project_data(project_configuration: ProjectConfiguration) -> ProjectData: """Fixture that creates a project space at 'workspace/test_project/pyproject.toml' + Args: project_configuration: Project data + Returns: A project data object that has populated a function level temporary directory """ @@ -294,9 +299,11 @@ def fixture_project( cppython_local_configuration: CPPythonLocalConfiguration, pep621_configuration: PEP621Configuration ) -> PyProject: """Parameterized construction of PyProject data + Args: cppython_local_configuration: The parameterized cppython table pep621_configuration: The project table + Returns: All the data as one object """ @@ -322,8 +329,7 @@ def fixture_cmake_data(request: pytest.FixtureRequest) -> CMakeConfiguration: def pytest_generate_tests(metafunc: pytest.Metafunc) -> None: - """Called for each test function. Provides a parametrization of the specified fixtures with the appropriate paths or - lists of paths, allowing pytest to run tests with different sets of data + """Provides custom parameterization for dynamic fixture names. Args: metafunc: Pytest hook data diff --git a/tests/integration/__init__.py b/tests/integration/__init__.py index e69de29..73e5ba0 100644 --- a/tests/integration/__init__.py +++ b/tests/integration/__init__.py @@ -0,0 +1,7 @@ +"""Integration tests for the CPPython project. + +This module contains integration tests to ensure the correct functionality of +different components within the CPPython project. The tests cover a wide range +of features, including plugin interfaces, project configurations, and utility +functions. +""" diff --git a/tests/integration/plugins/__init__.py b/tests/integration/plugins/__init__.py index e69de29..e88b7fb 100644 --- a/tests/integration/plugins/__init__.py +++ b/tests/integration/plugins/__init__.py @@ -0,0 +1,7 @@ +"""Integration tests for the CPPython plugins. + +This module contains integration tests for various CPPython plugins, ensuring that +each plugin behaves as expected under different conditions. The tests cover +different aspects of the plugins' functionality, including data generation, +installation, update processes, and feature extraction. +""" diff --git a/tests/integration/plugins/cmake/__init__.py b/tests/integration/plugins/cmake/__init__.py index e69de29..73a604d 100644 --- a/tests/integration/plugins/cmake/__init__.py +++ b/tests/integration/plugins/cmake/__init__.py @@ -0,0 +1,7 @@ +"""Integration tests for the CMake generator plugin. + +This module contains integration tests for the CMake generator plugin, ensuring that +the plugin behaves as expected under various conditions. The tests cover +different aspects of the plugin's functionality, including preset writing, +data synchronization, and feature extraction. +""" diff --git a/tests/integration/plugins/cmake/test_generator.py b/tests/integration/plugins/cmake/test_generator.py index 527c01a..d3d172d 100644 --- a/tests/integration/plugins/cmake/test_generator.py +++ b/tests/integration/plugins/cmake/test_generator.py @@ -12,8 +12,9 @@ class TestCPPythonGenerator(GeneratorIntegrationTests[CMakeGenerator]): """The tests for the CMake generator""" + @staticmethod @pytest.fixture(name='plugin_data', scope='session') - def fixture_plugin_data(self, cmake_data: CMakeConfiguration) -> dict[str, Any]: + def fixture_plugin_data(cmake_data: CMakeConfiguration) -> dict[str, Any]: """A required testing hook that allows data generation Args: @@ -24,8 +25,9 @@ def fixture_plugin_data(self, cmake_data: CMakeConfiguration) -> dict[str, Any]: """ return cmake_data.model_dump() + @staticmethod @pytest.fixture(name='plugin_type', scope='session') - def fixture_plugin_type(self) -> type[CMakeGenerator]: + def fixture_plugin_type() -> type[CMakeGenerator]: """A required testing hook that allows type generation Returns: diff --git a/tests/integration/plugins/pdm/__init__.py b/tests/integration/plugins/pdm/__init__.py index e69de29..a38eeca 100644 --- a/tests/integration/plugins/pdm/__init__.py +++ b/tests/integration/plugins/pdm/__init__.py @@ -0,0 +1,7 @@ +"""Integration tests for the PDM interface plugin. + +This module contains integration tests for the PDM interface plugin, ensuring that +the plugin behaves as expected under various conditions. The tests cover +different aspects of the plugin's functionality, including project configuration +and integration with the PDM tool. +""" diff --git a/tests/integration/plugins/pdm/test_interface.py b/tests/integration/plugins/pdm/test_interface.py index 0c6c6e3..7a78e3b 100644 --- a/tests/integration/plugins/pdm/test_interface.py +++ b/tests/integration/plugins/pdm/test_interface.py @@ -10,8 +10,9 @@ class TestCPPythonInterface: """The tests for the PDM interface""" + @staticmethod @pytest.fixture(name='interface') - def fixture_interface(self, plugin_type: type[CPPythonPlugin]) -> CPPythonPlugin: + def fixture_interface(plugin_type: type[CPPythonPlugin]) -> CPPythonPlugin: """A hook allowing implementations to override the fixture Args: @@ -22,7 +23,8 @@ def fixture_interface(self, plugin_type: type[CPPythonPlugin]) -> CPPythonPlugin """ return plugin_type(Core()) - def test_entrypoint(self, mocker: MockerFixture) -> None: + @staticmethod + def test_entrypoint(mocker: MockerFixture) -> None: """Verify that this project's plugin hook is setup correctly Args: diff --git a/tests/integration/plugins/vcpkg/__init__.py b/tests/integration/plugins/vcpkg/__init__.py index e69de29..1a0c18e 100644 --- a/tests/integration/plugins/vcpkg/__init__.py +++ b/tests/integration/plugins/vcpkg/__init__.py @@ -0,0 +1,7 @@ +"""Integration tests for the vcpkg provider plugin. + +This module contains integration tests for the vcpkg provider plugin, ensuring that +the plugin behaves as expected under various conditions. The tests cover +different aspects of the plugin's functionality, including data generation, +installation, and update processes. +""" diff --git a/tests/integration/plugins/vcpkg/test_provider.py b/tests/integration/plugins/vcpkg/test_provider.py index cddaff5..1f08637 100644 --- a/tests/integration/plugins/vcpkg/test_provider.py +++ b/tests/integration/plugins/vcpkg/test_provider.py @@ -11,8 +11,9 @@ class TestCPPythonProvider(ProviderIntegrationTests[VcpkgProvider]): """The tests for the vcpkg provider""" + @staticmethod @pytest.fixture(name='plugin_data', scope='session') - def fixture_plugin_data(self) -> dict[str, Any]: + def fixture_plugin_data() -> dict[str, Any]: """A required testing hook that allows data generation Returns: @@ -20,8 +21,9 @@ def fixture_plugin_data(self) -> dict[str, Any]: """ return {} + @staticmethod @pytest.fixture(name='plugin_type', scope='session') - def fixture_plugin_type(self) -> type[VcpkgProvider]: + def fixture_plugin_type() -> type[VcpkgProvider]: """A required testing hook that allows type generation Returns: diff --git a/tests/integration/test/__init__.py b/tests/integration/test/__init__.py index e69de29..4e267f6 100644 --- a/tests/integration/test/__init__.py +++ b/tests/integration/test/__init__.py @@ -0,0 +1,7 @@ +"""Integration tests for the public test harness used by CPPython plugins. + +This module contains integration tests for the public test harness that plugins +can use to ensure their functionality. The tests cover various aspects of the +plugin integration, including entry points, group names, and plugin-specific +features. +""" diff --git a/tests/integration/test/test_generator.py b/tests/integration/test/test_generator.py index f7d42f4..f34820d 100644 --- a/tests/integration/test/test_generator.py +++ b/tests/integration/test/test_generator.py @@ -11,8 +11,9 @@ class TestCPPythonGenerator(GeneratorIntegrationTests[MockGenerator]): """The tests for the Mock generator""" + @staticmethod @pytest.fixture(name='plugin_data', scope='session') - def fixture_plugin_data(self) -> dict[str, Any]: + def fixture_plugin_data() -> dict[str, Any]: """Returns mock data Returns: @@ -20,8 +21,9 @@ def fixture_plugin_data(self) -> dict[str, Any]: """ return {} + @staticmethod @pytest.fixture(name='plugin_type', scope='session') - def fixture_plugin_type(self) -> type[MockGenerator]: + def fixture_plugin_type() -> type[MockGenerator]: """A required testing hook that allows type generation Returns: diff --git a/tests/integration/test/test_provider.py b/tests/integration/test/test_provider.py index dbe966f..71752ab 100644 --- a/tests/integration/test/test_provider.py +++ b/tests/integration/test/test_provider.py @@ -11,8 +11,9 @@ class TestMockProvider(ProviderIntegrationTests[MockProvider]): """The tests for our Mock provider""" + @staticmethod @pytest.fixture(name='plugin_data', scope='session') - def fixture_plugin_data(self) -> dict[str, Any]: + def fixture_plugin_data() -> dict[str, Any]: """Returns mock data Returns: @@ -20,8 +21,9 @@ def fixture_plugin_data(self) -> dict[str, Any]: """ return {} + @staticmethod @pytest.fixture(name='plugin_type', scope='session') - def fixture_plugin_type(self) -> type[MockProvider]: + def fixture_plugin_type() -> type[MockProvider]: """A required testing hook that allows type generation Returns: diff --git a/tests/integration/test/test_scm.py b/tests/integration/test/test_scm.py index 87f7f95..76ab30e 100644 --- a/tests/integration/test/test_scm.py +++ b/tests/integration/test/test_scm.py @@ -11,8 +11,9 @@ class TestCPPythonSCM(SCMIntegrationTests[MockSCM]): """The tests for the Mock version control""" + @staticmethod @pytest.fixture(name='plugin_data', scope='session') - def fixture_plugin_data(self) -> dict[str, Any]: + def fixture_plugin_data() -> dict[str, Any]: """Returns mock data Returns: @@ -20,8 +21,9 @@ def fixture_plugin_data(self) -> dict[str, Any]: """ return {} + @staticmethod @pytest.fixture(name='plugin_type', scope='session') - def fixture_plugin_type(self) -> type[MockSCM]: + def fixture_plugin_type() -> type[MockSCM]: """A required testing hook that allows type generation Returns: diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py index e69de29..73173d5 100644 --- a/tests/unit/__init__.py +++ b/tests/unit/__init__.py @@ -0,0 +1,7 @@ +"""Unit tests for the CPPython project. + +This module contains various unit tests to ensure the correct functionality of +different components within the CPPython project. The tests cover a wide range +of features, including plugin interfaces, project configurations, and utility +functions. +""" diff --git a/tests/unit/core/__init__.py b/tests/unit/core/__init__.py index e69de29..0314681 100644 --- a/tests/unit/core/__init__.py +++ b/tests/unit/core/__init__.py @@ -0,0 +1,7 @@ +"""Unit tests for the core functionality of the CPPython project. + +This module contains unit tests for the core components of the CPPython project, +ensuring that the core functionality behaves as expected under various conditions. +The tests cover different aspects of the core functionality, including schema +validation, resolution processes, and plugin schema handling. +""" diff --git a/tests/unit/core/test_plugin_schema.py b/tests/unit/core/test_plugin_schema.py index 7355845..b367050 100644 --- a/tests/unit/core/test_plugin_schema.py +++ b/tests/unit/core/test_plugin_schema.py @@ -1,5 +1,7 @@ """Test plugin schemas""" +import pytest + from cppython.core.plugin_schema.generator import SyncConsumer from cppython.core.plugin_schema.provider import SyncProducer from cppython.core.schema import SyncData @@ -31,7 +33,8 @@ def sync_types() -> list[type[SyncData]]: """ return [TestSchema.GeneratorSyncDataSuccess, TestSchema.GeneratorSyncDataFail] - def sync(self, sync_data: SyncData) -> None: + @staticmethod + def sync(sync_data: SyncData) -> None: """Fulfils protocol Args: @@ -40,7 +43,7 @@ def sync(self, sync_data: SyncData) -> None: if isinstance(sync_data, TestSchema.GeneratorSyncDataSuccess): assert sync_data.success else: - assert False + pytest.fail('Invalid sync data') class Producer(SyncProducer): """Dummy producer""" @@ -57,7 +60,8 @@ def supported_sync_type(sync_type: type[SyncData]) -> bool: """ return sync_type == TestSchema.GeneratorSyncDataSuccess - def sync_data(self, consumer: SyncConsumer) -> SyncData | None: + @staticmethod + def sync_data(consumer: SyncConsumer) -> SyncData | None: """Fulfils protocol Args: @@ -103,6 +107,5 @@ def test_sync_flow(self) -> None: types = consumer.sync_types() for test in types: - if producer.supported_sync_type(test): - if data := producer.sync_data(consumer): - consumer.sync(data) + if producer.supported_sync_type(test) and (data := producer.sync_data(consumer)): + consumer.sync(data) diff --git a/tests/unit/core/test_resolution.py b/tests/unit/core/test_resolution.py index 32a89ec..d4bf9d0 100644 --- a/tests/unit/core/test_resolution.py +++ b/tests/unit/core/test_resolution.py @@ -35,7 +35,8 @@ class TestResolve: """Test resolution of data""" - def test_pep621_resolve(self) -> None: + @staticmethod + def test_pep621_resolve() -> None: """Test the PEP621 schema resolve function""" data = PEP621Configuration(name='pep621-resolve-test', dynamic=['version']) config = ProjectConfiguration(pyproject_file=Path('pyproject.toml'), version='0.1.0') @@ -46,12 +47,14 @@ def test_pep621_resolve(self) -> None: assert len(class_variables) assert None not in class_variables.values() - def test_project_resolve(self) -> None: + @staticmethod + def test_project_resolve() -> None: """Tests project configuration resolution""" config = ProjectConfiguration(pyproject_file=Path('pyproject.toml'), version='0.1.0') assert resolve_project_configuration(config) - def test_cppython_resolve(self) -> None: + @staticmethod + def test_cppython_resolve() -> None: """Tests cppython configuration resolution""" cppython_local_configuration = CPPythonLocalConfiguration() cppython_global_configuration = CPPythonGlobalConfiguration() @@ -69,7 +72,8 @@ def test_cppython_resolve(self) -> None: assert cppython_data - def test_model_resolve(self) -> None: + @staticmethod + def test_model_resolve() -> None: """Test model resolution""" class MockModel(CPPythonModel): @@ -88,7 +92,8 @@ class MockModel(CPPythonModel): resolve_model(MockModel, good_data) - def test_generator_resolve(self) -> None: + @staticmethod + def test_generator_resolve() -> None: """Test generator resolution""" project_data = ProjectData(pyproject_file=Path('pyproject.toml')) cppython_local_configuration = CPPythonLocalConfiguration() @@ -111,7 +116,8 @@ def test_generator_resolve(self) -> None: assert resolve_generator(project_data, cppython_plugin_data) - def test_provider_resolve(self) -> None: + @staticmethod + def test_provider_resolve() -> None: """Test provider resolution""" project_data = ProjectData(pyproject_file=Path('pyproject.toml')) cppython_local_configuration = CPPythonLocalConfiguration() @@ -134,7 +140,8 @@ def test_provider_resolve(self) -> None: assert resolve_provider(project_data, cppython_plugin_data) - def test_scm_resolve(self) -> None: + @staticmethod + def test_scm_resolve() -> None: """Test scm resolution""" project_data = ProjectData(pyproject_file=Path('pyproject.toml')) cppython_local_configuration = CPPythonLocalConfiguration() diff --git a/tests/unit/core/test_schema.py b/tests/unit/core/test_schema.py index 805fe2b..454812d 100644 --- a/tests/unit/core/test_schema.py +++ b/tests/unit/core/test_schema.py @@ -41,18 +41,21 @@ def test_model_construction_from_data(self) -> None: result = self.Model.model_validate(data) assert result.aliased_variable is True - def test_cppython_local(self) -> None: + @staticmethod + def test_cppython_local() -> None: """Ensures that the CPPython local config data can be defaulted""" CPPythonLocalConfiguration() - def test_cppython_global(self) -> None: + @staticmethod + def test_cppython_global() -> None: """Ensures that the CPPython global config data can be defaulted""" CPPythonGlobalConfiguration() - def test_pep621_version(self) -> None: + @staticmethod + def test_pep621_version() -> None: """Tests the dynamic version validation""" - with pytest.raises(ValueError): + with pytest.raises(ValueError, match="'version' is not a dynamic field. It must be defined"): PEP621Configuration(name='empty-test') - with pytest.raises(ValueError): + with pytest.raises(ValueError, match="'version' is a dynamic field. It must not be defined"): PEP621Configuration(name='both-test', version='1.0.0', dynamic=['version']) diff --git a/tests/unit/plugins/__init__.py b/tests/unit/plugins/__init__.py index e69de29..2a857ac 100644 --- a/tests/unit/plugins/__init__.py +++ b/tests/unit/plugins/__init__.py @@ -0,0 +1,7 @@ +"""Unit tests for the CPPython plugins. + +This module contains unit tests for various CPPython plugins, ensuring that +each plugin behaves as expected under different conditions. The tests cover +different aspects of the plugins' functionality, including data generation, +installation, update processes, and feature extraction. +""" diff --git a/tests/unit/plugins/cmake/__init__.py b/tests/unit/plugins/cmake/__init__.py index e69de29..94d6fa1 100644 --- a/tests/unit/plugins/cmake/__init__.py +++ b/tests/unit/plugins/cmake/__init__.py @@ -0,0 +1,7 @@ +"""Unit tests for the CMake generator plugin. + +This module contains unit tests for the CMake generator plugin, ensuring that +the plugin behaves as expected under various conditions. The tests cover +different aspects of the plugin's functionality, including preset writing, +data synchronization, and feature extraction. +""" diff --git a/tests/unit/plugins/cmake/test_generator.py b/tests/unit/plugins/cmake/test_generator.py index ce582fe..9d5c0ce 100644 --- a/tests/unit/plugins/cmake/test_generator.py +++ b/tests/unit/plugins/cmake/test_generator.py @@ -20,8 +20,9 @@ class TestCPPythonGenerator(GeneratorUnitTests[CMakeGenerator]): """The tests for the CMake generator""" + @staticmethod @pytest.fixture(name='plugin_data', scope='session') - def fixture_plugin_data(self, cmake_data: CMakeConfiguration) -> dict[str, Any]: + def fixture_plugin_data(cmake_data: CMakeConfiguration) -> dict[str, Any]: """A required testing hook that allows data generation Args: @@ -32,8 +33,9 @@ def fixture_plugin_data(self, cmake_data: CMakeConfiguration) -> dict[str, Any]: """ return cmake_data.model_dump() + @staticmethod @pytest.fixture(name='plugin_type', scope='session') - def fixture_plugin_type(self) -> type[CMakeGenerator]: + def fixture_plugin_type() -> type[CMakeGenerator]: """A required testing hook that allows type generation Returns: @@ -41,7 +43,8 @@ def fixture_plugin_type(self) -> type[CMakeGenerator]: """ return CMakeGenerator - def test_provider_write(self, tmp_path: Path) -> None: + @staticmethod + def test_provider_write(tmp_path: Path) -> None: """Verifies that the provider preset writing works as intended Args: @@ -56,7 +59,8 @@ def test_provider_write(self, tmp_path: Path) -> None: data = CMakeSyncData(provider_name=TypeName('test-provider'), top_level_includes=includes_file) builder.write_provider_preset(tmp_path, data) - def test_cppython_write(self, tmp_path: Path) -> None: + @staticmethod + def test_cppython_write(tmp_path: Path) -> None: """Verifies that the cppython preset writing works as intended Args: @@ -76,7 +80,8 @@ def test_cppython_write(self, tmp_path: Path) -> None: builder.write_cppython_preset(tmp_path, provider_directory, data) - def test_root_write(self, tmp_path: Path) -> None: + @staticmethod + def test_root_write(tmp_path: Path) -> None: """Verifies that the root preset writing works as intended Args: @@ -105,7 +110,8 @@ def test_root_write(self, tmp_path: Path) -> None: builder.write_root_presets(root_file, cppython_preset_file) - def test_relative_root_write(self, tmp_path: Path) -> None: + @staticmethod + def test_relative_root_write(tmp_path: Path) -> None: """Verifies that the root preset writing works as intended Args: diff --git a/tests/unit/plugins/git/__init__.py b/tests/unit/plugins/git/__init__.py index e69de29..ba3d660 100644 --- a/tests/unit/plugins/git/__init__.py +++ b/tests/unit/plugins/git/__init__.py @@ -0,0 +1,7 @@ +"""Unit tests for the Git SCM plugin. + +This module contains unit tests for the Git SCM plugin, ensuring that +the plugin behaves as expected under various conditions. The tests cover +different aspects of the plugin's functionality, including feature extraction, +version control operations, and project description handling. +""" diff --git a/tests/unit/plugins/pdm/__init__.py b/tests/unit/plugins/pdm/__init__.py index e69de29..f081a05 100644 --- a/tests/unit/plugins/pdm/__init__.py +++ b/tests/unit/plugins/pdm/__init__.py @@ -0,0 +1,7 @@ +"""Unit tests for the PDM interface plugin. + +This module contains unit tests for the PDM interface plugin, ensuring that +the plugin behaves as expected under various conditions. The tests cover +different aspects of the plugin's functionality, including project configuration +and integration with the PDM tool. +""" diff --git a/tests/unit/plugins/pdm/test_interface.py b/tests/unit/plugins/pdm/test_interface.py index 01cde7f..fd1dccb 100644 --- a/tests/unit/plugins/pdm/test_interface.py +++ b/tests/unit/plugins/pdm/test_interface.py @@ -10,8 +10,9 @@ class TestCPPythonInterface: """The tests for the PDM interface""" + @staticmethod @pytest.fixture(name='interface') - def fixture_interface(self, plugin_type: type[CPPythonPlugin]) -> CPPythonPlugin: + def fixture_interface(plugin_type: type[CPPythonPlugin]) -> CPPythonPlugin: """A hook allowing implementations to override the fixture Args: @@ -22,7 +23,8 @@ def fixture_interface(self, plugin_type: type[CPPythonPlugin]) -> CPPythonPlugin """ return plugin_type(Core()) - def test_pdm_project(self) -> None: + @staticmethod + def test_pdm_project() -> None: """Verify that this PDM won't return empty data""" core = Core() core.load_plugins() diff --git a/tests/unit/plugins/vcpkg/__init__.py b/tests/unit/plugins/vcpkg/__init__.py index e69de29..8b02cf6 100644 --- a/tests/unit/plugins/vcpkg/__init__.py +++ b/tests/unit/plugins/vcpkg/__init__.py @@ -0,0 +1,7 @@ +"""Unit tests for the vcpkg provider plugin. + +This module contains unit tests for the vcpkg provider plugin, ensuring that +the plugin behaves as expected under various conditions. The tests cover +different aspects of the plugin's functionality, including data generation, +installation, and update processes. +""" diff --git a/tests/unit/plugins/vcpkg/test_provider.py b/tests/unit/plugins/vcpkg/test_provider.py index 1e45f13..e73853a 100644 --- a/tests/unit/plugins/vcpkg/test_provider.py +++ b/tests/unit/plugins/vcpkg/test_provider.py @@ -11,8 +11,9 @@ class TestCPPythonProvider(ProviderUnitTests[VcpkgProvider]): """The tests for the vcpkg Provider""" + @staticmethod @pytest.fixture(name='plugin_data', scope='session') - def fixture_plugin_data(self) -> dict[str, Any]: + def fixture_plugin_data() -> dict[str, Any]: """A required testing hook that allows data generation Returns: @@ -20,8 +21,9 @@ def fixture_plugin_data(self) -> dict[str, Any]: """ return {} + @staticmethod @pytest.fixture(name='plugin_type', scope='session') - def fixture_plugin_type(self) -> type[VcpkgProvider]: + def fixture_plugin_type() -> type[VcpkgProvider]: """A required testing hook that allows type generation Returns: diff --git a/tests/unit/test/__init__.py b/tests/unit/test/__init__.py index e69de29..28f02b8 100644 --- a/tests/unit/test/__init__.py +++ b/tests/unit/test/__init__.py @@ -0,0 +1,6 @@ +"""Unit tests for the public test harness used by CPPython plugins. + +This module contains tests for various utility functions, including subprocess +calls, logging, and name canonicalization. The tests ensure that the utility +functions behave as expected under different conditions. +""" diff --git a/tests/unit/test/test_fixtures.py b/tests/unit/test/test_fixtures.py index b6c31fb..2aac2ed 100644 --- a/tests/unit/test/test_fixtures.py +++ b/tests/unit/test/test_fixtures.py @@ -6,7 +6,8 @@ class TestFixtures: """Tests for fixtures""" - def test_build_directory(self, build_test_build: Path) -> None: + @staticmethod + def test_build_directory(build_test_build: Path) -> None: """Verifies that the build data provided is the expected path Args: diff --git a/tests/unit/test/test_generator.py b/tests/unit/test/test_generator.py index 9f5234b..4ca34d9 100644 --- a/tests/unit/test/test_generator.py +++ b/tests/unit/test/test_generator.py @@ -11,8 +11,9 @@ class TestCPPythonGenerator(GeneratorUnitTests[MockGenerator]): """The tests for the Mock generator""" + @staticmethod @pytest.fixture(name='plugin_data', scope='session') - def fixture_plugin_data(self) -> dict[str, Any]: + def fixture_plugin_data() -> dict[str, Any]: """Returns mock data Returns: @@ -20,8 +21,9 @@ def fixture_plugin_data(self) -> dict[str, Any]: """ return {} + @staticmethod @pytest.fixture(name='plugin_type', scope='session') - def fixture_plugin_type(self) -> type[MockGenerator]: + def fixture_plugin_type() -> type[MockGenerator]: """A required testing hook that allows type generation Returns: diff --git a/tests/unit/test/test_provider.py b/tests/unit/test/test_provider.py index d2d08b1..695e688 100644 --- a/tests/unit/test/test_provider.py +++ b/tests/unit/test/test_provider.py @@ -13,8 +13,9 @@ class TestMockProvider(ProviderUnitTests[MockProvider]): """The tests for our Mock provider""" + @staticmethod @pytest.fixture(name='plugin_data', scope='session') - def fixture_provider_data(self) -> dict[str, Any]: + def fixture_provider_data() -> dict[str, Any]: """Returns mock data Returns: @@ -22,8 +23,9 @@ def fixture_provider_data(self) -> dict[str, Any]: """ return {} + @staticmethod @pytest.fixture(name='plugin_type', scope='session') - def fixture_plugin_type(self) -> type[MockProvider]: + def fixture_plugin_type() -> type[MockProvider]: """A required testing hook that allows type generation Returns: @@ -31,7 +33,8 @@ def fixture_plugin_type(self) -> type[MockProvider]: """ return MockProvider - def test_sync_types(self, plugin: MockProvider, mocker: MockerFixture) -> None: + @staticmethod + def test_sync_types(plugin: MockProvider, mocker: MockerFixture) -> None: """Verify that the mock provider can handle the mock generator's sync data Args: diff --git a/tests/unit/utility/__init__.py b/tests/unit/utility/__init__.py index f9a3da7..001920a 100644 --- a/tests/unit/utility/__init__.py +++ b/tests/unit/utility/__init__.py @@ -3,8 +3,4 @@ This module contains tests for various utility functions, including subprocess calls, logging, and name canonicalization. The tests ensure that the utility functions behave as expected under different conditions. - -Classes: - TestUtility: Contains tests for general utility functions. - TestSubprocess: Contains tests for subprocess-related functions. """