From ff11618c88d343258cef59d0b8288e440aaeea35 Mon Sep 17 00:00:00 2001 From: Brian Thorne Date: Thu, 21 Nov 2024 00:34:35 +1300 Subject: [PATCH] Upgrade cel --- README.md | 15 +++------------ netcheck/context.py | 4 +--- pyproject.toml | 2 +- uv.lock | 46 ++++++++++++++++++++++----------------------- 4 files changed, 28 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 2fedfbf..224b61e 100644 --- a/README.md +++ b/README.md @@ -254,19 +254,10 @@ Kubernetes operator to inject data. Update version in `pyproject.toml`, push to `main` and create a release on GitHub. Pypi release will be carried out by GitHub actions. -Install dev dependencies with Poetry: +Install dev dependencies with `uv`: ```shell -poetry install --with dev -``` - -### Manual Release -To release manually, use Poetry: - -```shell -poetry version patch -poetry build -poetry publish +uv sync ``` ### Testing @@ -274,5 +265,5 @@ poetry publish Pytest is used for testing. ```shell -poetry run pytest +uv run pytest ``` diff --git a/netcheck/context.py b/netcheck/context.py index e743bb5..138652c 100644 --- a/netcheck/context.py +++ b/netcheck/context.py @@ -82,8 +82,6 @@ def __init__(self, directory, *args, **kwargs): # Pre-populate the dictionary with keys for each file in the directory for filename in os.listdir(directory): # We'll use None as a placeholder for the file contents - # We could strip filename extensions, but I think it is clearer not to - # os.path.splitext(filename)[0] self[filename] = None def __getitem__(self, key): @@ -96,5 +94,5 @@ def __getitem__(self, key): def items(self): # Override items() to call __getitem__ for each key - # Required because CEL calls items() when converting to CEL Map type. return [(key, self[key]) for key in self] + diff --git a/pyproject.toml b/pyproject.toml index 9e96207..f3edfa4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ dependencies = [ "typer<1.0,>=0.9", "pydantic<3.0,>=1.10", "rich<14.0.0,>=10.11.0", - "common-expression-language>=0.3.0", + "common-expression-language>=0.3.1", "pyyaml>=6.0.2", ] diff --git a/uv.lock b/uv.lock index 60b41a8..e4bfd90 100644 --- a/uv.lock +++ b/uv.lock @@ -100,30 +100,30 @@ wheels = [ [[package]] name = "common-expression-language" -version = "0.3.0" +version = "0.3.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/2f/5c/09031ca2d146690687e0fab0296923ec72da91a61fe903eac4d14ba570ed/common_expression_language-0.3.0.tar.gz", hash = "sha256:acafc17918148ea673c64a66d2646876b83f5e04e02fc61ff26e7a40e2493622", size = 19682 } +sdist = { url = "https://files.pythonhosted.org/packages/7c/07/ad16c6cb5614764c1503740e3d2952613db7fbc4c48276f197cb55c25988/common_expression_language-0.3.1.tar.gz", hash = "sha256:a12bf8d97a04de0866a866d9dadda0cec988f2130b0b32a93b8e6514deddde5f", size = 20186 } wheels = [ - { url = "https://files.pythonhosted.org/packages/95/fb/019c69deb2e21e7bb9be8ca40c312792e2d532340ff4b79d5a89bb0b8043/common_expression_language-0.3.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:25548c2b932aaecc3f5f3203bc285fb012092b65e3dddbf40d20b996f316ea4b", size = 1174047 }, - { url = "https://files.pythonhosted.org/packages/74/0a/4a2faf62ecedaf35072d94d78ca9f05ba5343b0286964a58318de2ebdd69/common_expression_language-0.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:90dc3e647a059c7baf813b2f9baec361b107a5c2747b089e8bd1fd2d50eceb86", size = 1113573 }, - { url = "https://files.pythonhosted.org/packages/78/2f/57ef25245b0831d2c4ef0083ddf2400d887ce6af4a5291d47d55bbf2f4f2/common_expression_language-0.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:814d35fbaae00752840bd3ecb942f99eb35bae4ce4ca6b6cffb53533935b6f83", size = 1286598 }, - { url = "https://files.pythonhosted.org/packages/82/99/5249e605f473b385cb0343d4ad35b28d8309bdefe7e78ac260dec43e7f9e/common_expression_language-0.3.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e187eff6f7cea2c8ae8142282b404d5b6614c021ae8b59bc232f90a9266f4d5c", size = 1243840 }, - { url = "https://files.pythonhosted.org/packages/93/5c/3af3f10d9275e2ae30ea35a35fbc0410027c9c789f221d6927995951b4e8/common_expression_language-0.3.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:df3e26056c6a65ccf770f53751d4eec8269d9c34303d92ad856a91fc66cf680a", size = 1470523 }, - { url = "https://files.pythonhosted.org/packages/67/6d/c1b35b11089d63f283654c3c9624f2d4fb94794ea2fdd31b7d78326a3a66/common_expression_language-0.3.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1fe2f9b695307045826f68a610b1a52594c02cbc58bd7d3231e09e3e542fe14c", size = 1479345 }, - { url = "https://files.pythonhosted.org/packages/b8/3f/e518127957d5acf606f5603924beeb04ead9ce5d0ff91b857646a2241cbb/common_expression_language-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ccbd8f5bf4b7531c9a2e044f386472b7a229ce9ec5c0c0722deca4624b7307b0", size = 1339987 }, - { url = "https://files.pythonhosted.org/packages/5b/1e/ad9940e2ca8a1ec3c45e2b2421caac1293353a8b0e637680b8654a829a80/common_expression_language-0.3.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:28b46919fe394f65da3109d493a4f167877177365154d81c7451bf66e67c78c1", size = 1351988 }, - { url = "https://files.pythonhosted.org/packages/0c/a4/061f085d0ae55a7d44bd74eec3a4508f02bd450b10c5f5b79432293fc6c0/common_expression_language-0.3.0-cp311-none-win32.whl", hash = "sha256:b4aa24ab5f680abf1df7ba611d51e63d30a913aad3cc34ae5e5b4ed134c785ba", size = 903333 }, - { url = "https://files.pythonhosted.org/packages/b6/34/7bb11c03b16ce64960317931d5fd8b66a019629cf946e701883e3b6032d2/common_expression_language-0.3.0-cp311-none-win_amd64.whl", hash = "sha256:6c5e884866456d1a97d980b0d8a232d650bbdac9ce10e0436ac817d38f7a2d56", size = 1003660 }, - { url = "https://files.pythonhosted.org/packages/96/e5/510dca50091f4b57897bb3e468452b6355a16777789ef319ddac84b24130/common_expression_language-0.3.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:1c9af99c4fdb9640b89ba902a344d0d698a17024343a2353e897d18de509ae79", size = 1174331 }, - { url = "https://files.pythonhosted.org/packages/2e/88/3165f78283d0c79cddcc19571681ac5582b2882d9885a2b5f3f22020b725/common_expression_language-0.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5be9b5f40eed3315942f518147783823a35fa13b434c9921fe82a7b70a03e2e7", size = 1112910 }, - { url = "https://files.pythonhosted.org/packages/60/b3/dec072e1b7fde80b3df7e6202f85417626134d87badc146bbdeef018e256/common_expression_language-0.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1e3e40f39cd92d1ba3a6fe66b22b2b94b5b31c235c8d23dcc9d412f41f1fd738", size = 1287593 }, - { url = "https://files.pythonhosted.org/packages/2d/74/11f3bf0a37498dff4ae6d9c480514588ec3311842fd06c4231b290d835bd/common_expression_language-0.3.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:96d932fe3be242a4a588ff86c00355fae4853980111add34ecabfb87bb16f85a", size = 1243661 }, - { url = "https://files.pythonhosted.org/packages/fe/c4/55514f2d76d9b8e5dc2db6444cb0ad87f345b7d7a970c39932a3b137418f/common_expression_language-0.3.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3dc24ea480a6845dae3eafbdf1a9ad75461d27a71ca1e4444049d17606d5b95b", size = 1472248 }, - { url = "https://files.pythonhosted.org/packages/2c/3d/8e53f7d0ea6a3fe979d4d06df0128da3cf75ddf6cd2f213fc54045e65e08/common_expression_language-0.3.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e37645e6b8589c18d43ffdb1db176130df4b4c3fa242a0bc4ac81831752174b2", size = 1477409 }, - { url = "https://files.pythonhosted.org/packages/0a/db/de2c874348b81aa658cb243d0e03458cc1618b2dfaae0860b14882c79fb9/common_expression_language-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8245ce74dbfbdcd5857b995302f95e25ae7ac8b4a467f2a38e999d7e1bb4f02f", size = 1339593 }, - { url = "https://files.pythonhosted.org/packages/09/86/f8afd16c12bba49f5e684f96f52bf6f6164948451cbfabae555ec4cb6ac0/common_expression_language-0.3.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e022dcf2e1a3ae11d5e8dc6aa9b33dc8efe1b41deee2fe38c8ceae5853bb8daf", size = 1351644 }, - { url = "https://files.pythonhosted.org/packages/52/38/419921362a7e3f17c1689e5ecba880297d7463db52049e532dd71cbfc99e/common_expression_language-0.3.0-cp312-none-win32.whl", hash = "sha256:759dd6589fba9a133e78bb6603d08612287dfe26c446dc45ad2fb8e0b59f5642", size = 904029 }, - { url = "https://files.pythonhosted.org/packages/a0/69/6a76a574a94c90847cec1b7140aa31b6c4bed16c01f9c529228f7f4a9c02/common_expression_language-0.3.0-cp312-none-win_amd64.whl", hash = "sha256:a92da0e8022f989dad9cea4d82aa3d6506f199e79f9d6d1f49529eaf6cf27ef5", size = 1005204 }, + { url = "https://files.pythonhosted.org/packages/18/72/28ffaeea17e30e1efd95f6d6ded4138e9b97e381d62cfa4168c0bf717415/common_expression_language-0.3.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:143f2815869061a11b307ab1967b10f902ace5c5cebc775b43333b0ecd4384c9", size = 1174070 }, + { url = "https://files.pythonhosted.org/packages/94/ef/6480c50e513aca09fd7ba4ec13c0c93f96cf0cccdb21c4c588eed843ec08/common_expression_language-0.3.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:bad4d94115e4d363555f04a64a8574c28e224ced91ff197e6fa53ddaf43eb315", size = 1112783 }, + { url = "https://files.pythonhosted.org/packages/dc/f0/92fc644cc301e11ba7d242c535a429747ffab23a1033e705a9cacfc2bb7d/common_expression_language-0.3.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9ab798d498775f1a0f2fbb64b558463937cf299e44d8c2a9926ddd1bc1962752", size = 1285608 }, + { url = "https://files.pythonhosted.org/packages/1a/44/66952df102b3f923a0bc2465666e033ba9f2b322b1a280180e7a081f22b4/common_expression_language-0.3.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:37f7c41160a55969a5ef4d69a77e7aa139374c9955029df798bf06d2d0335820", size = 1242286 }, + { url = "https://files.pythonhosted.org/packages/4a/8a/4dfc08a08ce0e9d56d51a0642a637b28683a8b22e965cbd845b469c621c3/common_expression_language-0.3.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5858c7b3c954d988d0408f70f1e93c7de79deebd35c0c56767c0d2e8a0b379cb", size = 1493576 }, + { url = "https://files.pythonhosted.org/packages/33/b9/ab11826f4c6ca2de9ab11d26958dc89476d8e81f6e9c90ed45f965048a4f/common_expression_language-0.3.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d90b86dc11628eddbcdbed75992a3b1f7604fe227655ee178f5621c4d8a19c99", size = 1478996 }, + { url = "https://files.pythonhosted.org/packages/44/b1/be4bd66669cc2ea5679703ce0a11ed74187c9e8d54e9d001d15c3b103a90/common_expression_language-0.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f2e743db5f6b48a79d2f44be36acce601b808638ab543d51b992cbd06117b5b", size = 1341818 }, + { url = "https://files.pythonhosted.org/packages/4d/ff/623334aee91d3e379aad73a352c411b8a726065aa3a75922aac0fe06307f/common_expression_language-0.3.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0dc02dcbe42f5af4d47f3028a48e0f29fbfa5ae41abd18e93370b5f91a0cc327", size = 1352198 }, + { url = "https://files.pythonhosted.org/packages/58/33/284c62de5a68632c948db606e889a32fea430bfadc434e16fc480cc76bd8/common_expression_language-0.3.1-cp311-none-win32.whl", hash = "sha256:13df5d38889e7af910f2989b1d29b060bffcc0df2003468b6b72221781d5a585", size = 903562 }, + { url = "https://files.pythonhosted.org/packages/eb/c7/af17272c6d53a505119375028292eb728dcc8842663fad01a26cf5376ed6/common_expression_language-0.3.1-cp311-none-win_amd64.whl", hash = "sha256:511fab3f4b5ea10fa92eeed47943e50bf68828b5315250e268a77e5a247bc33c", size = 1005272 }, + { url = "https://files.pythonhosted.org/packages/15/8a/6ccb7643e35f737a82395a1ac8509f066063999f1b4fbd5a02a4d6579bec/common_expression_language-0.3.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:983a71636a7bf5aeb64bb1f296f328ff0a4e4f14f77cab1a704605afb4544932", size = 1174479 }, + { url = "https://files.pythonhosted.org/packages/81/02/7fa510d16ce2e289fc767a1a509981f0e86d909931d0e8b417354b1443ae/common_expression_language-0.3.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:713b904c7e71902723714b1abc95ce2691b16a5725f9f0fb60ba988d51fd6fb4", size = 1112856 }, + { url = "https://files.pythonhosted.org/packages/6d/a0/7c0e349b0b0a7cfc3e3651007117d8a8ea96103e6f0fc2e3e36a0e70d55d/common_expression_language-0.3.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:54bd1143e5c205a32db5767c1030e901271ea60c88bc971ef21c9132ef967d21", size = 1287364 }, + { url = "https://files.pythonhosted.org/packages/2f/48/69fea661e7c42f189b7147c4406f8b16a2a5909dd53bff030a3b86fed96f/common_expression_language-0.3.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:457f939bceede63bfbe024bb25d65c7b5ae029cb77bdf7ba639b4217ea5dcc6a", size = 1243323 }, + { url = "https://files.pythonhosted.org/packages/3f/97/591719d9a95c5175d5a0a4446101c0b74a0060624fa2e4602184fe9a02d6/common_expression_language-0.3.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f98fce0d2b670f2bebbc0e00e1ed6d93702a49682cbb758b701ef93b03833789", size = 1493288 }, + { url = "https://files.pythonhosted.org/packages/a8/8e/07f6f22e98b981a85e11f4f685d8a6d8babe34f31bea2a950b6a848c4954/common_expression_language-0.3.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8de8c3d03519519fe7f81dce434cb8fdb509ebf1f9853d0d3d998cbaf660bfc7", size = 1477376 }, + { url = "https://files.pythonhosted.org/packages/2c/ab/31befe7bd9b23ba9a28bff1e7e3af5b5859585925b6f38f6d6130f57bf55/common_expression_language-0.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:525486bd31cdea134da83a79d317c656704a0fbaa600abdc9ee4c0aff635c547", size = 1343231 }, + { url = "https://files.pythonhosted.org/packages/e5/72/012a595e30d441bdd4179dca569acde44f668a548e4738e31752a4520f2e/common_expression_language-0.3.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0ddf4ea058adf2f55b6664d2971183ad8b80913eadeac6c18fe255547269c333", size = 1352280 }, + { url = "https://files.pythonhosted.org/packages/64/52/67680944d61ecc740b05d7239cd21674aa5b5d3dd094cfd94fab7084be1a/common_expression_language-0.3.1-cp312-none-win32.whl", hash = "sha256:150d66856d19a6856aab68ecc9d28045f3381931e6e94a7182810d2ffc506511", size = 904093 }, + { url = "https://files.pythonhosted.org/packages/02/f0/cb9266c9821e1715d4fe1f7007f8f38cf880ee3038327cdff0d3022b9d8f/common_expression_language-0.3.1-cp312-none-win_amd64.whl", hash = "sha256:590249a16e8f0e67f3b11b481ed20f98d28d5c8338fa2bdbdd06c31f1cdd7dda", size = 1006039 }, ] [[package]] @@ -240,7 +240,7 @@ dev = [ [package.metadata] requires-dist = [ - { name = "common-expression-language", specifier = ">=0.3.0" }, + { name = "common-expression-language", specifier = ">=0.3.1" }, { name = "dnspython", specifier = ">=2.2,<3.0" }, { name = "pydantic", specifier = ">=1.10,<3.0" }, { name = "pyyaml", specifier = ">=6.0.2" },