diff --git a/poetry.lock b/poetry.lock index 05be3eb7e..7ce809092 100644 --- a/poetry.lock +++ b/poetry.lock @@ -224,20 +224,21 @@ wrapt = {version = ">=1.11,<2", markers = "python_version < \"3.11\""} [[package]] name = "asttokens" -version = "2.4.0" +version = "2.4.1" description = "Annotate AST trees with source code positions" optional = false python-versions = "*" files = [ - {file = "asttokens-2.4.0-py2.py3-none-any.whl", hash = "sha256:cf8fc9e61a86461aa9fb161a14a0841a03c405fa829ac6b202670b3495d2ce69"}, - {file = "asttokens-2.4.0.tar.gz", hash = "sha256:2e0171b991b2c959acc6c49318049236844a5da1d65ba2672c4880c1c894834e"}, + {file = "asttokens-2.4.1-py2.py3-none-any.whl", hash = "sha256:051ed49c3dcae8913ea7cd08e46a606dba30b79993209636c4875bc1d637bc24"}, + {file = "asttokens-2.4.1.tar.gz", hash = "sha256:b03869718ba9a6eb027e134bfdf69f38a236d681c83c160d510768af11254ba0"}, ] [package.dependencies] six = ">=1.12.0" [package.extras] -test = ["astroid", "pytest"] +astroid = ["astroid (>=1,<2)", "astroid (>=2,<4)"] +test = ["astroid (>=1,<2)", "astroid (>=2,<4)", "pytest"] [[package]] name = "astunparse" @@ -1002,13 +1003,13 @@ test = ["pytest (>=6)"] [[package]] name = "executing" -version = "2.0.0" +version = "2.0.1" description = "Get the currently executing AST node of a frame, and other information" optional = false -python-versions = "*" +python-versions = ">=3.5" files = [ - {file = "executing-2.0.0-py2.py3-none-any.whl", hash = "sha256:06df6183df67389625f4e763921c6cf978944721abf3e714000200aab95b0657"}, - {file = "executing-2.0.0.tar.gz", hash = "sha256:0ff053696fdeef426cda5bd18eacd94f82c91f49823a2e9090124212ceea9b08"}, + {file = "executing-2.0.1-py2.py3-none-any.whl", hash = "sha256:eac49ca94516ccc753f9fb5ce82603156e590b27525a8bc32cce8ae302eb61bc"}, + {file = "executing-2.0.1.tar.gz", hash = "sha256:35afe2ce3affba8ee97f2d69927fa823b08b472b7b994e36a52a964b93d16147"}, ] [package.extras] @@ -1016,48 +1017,48 @@ tests = ["asttokens (>=2.1.0)", "coverage", "coverage-enable-subprocess", "ipyth [[package]] name = "fastavro" -version = "1.8.4" +version = "1.9.0" description = "Fast read/write of AVRO files" optional = false python-versions = ">=3.8" files = [ - {file = "fastavro-1.8.4-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:7afe1475e8a967c04e2b0ef4d33bc10bffa66b4fa6e08bd2ee9d91b6768cba2a"}, - {file = "fastavro-1.8.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f5fd73609f3c1ac0d90ae3179d2fb9d788f842245db2656ff9225fce871fc5b7"}, - {file = "fastavro-1.8.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78fdf1ba47e43146af72ac48d7b2247a06c4f2d95dfdaad6129c481014b07a6b"}, - {file = "fastavro-1.8.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d950542b3263653f00b695cbc728b5c60ab9ea6df32a7017ad9a6a67235386e7"}, - {file = "fastavro-1.8.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ce2ccfa9aff8df6da683c48542b7b2a216dde6d3a4d1c505c5e1b8ca2ec0abbb"}, - {file = "fastavro-1.8.4-cp310-cp310-win_amd64.whl", hash = "sha256:f12f9914d6196695d3208ea348145a80d0defefe16b8a226373fe8ce68f66139"}, - {file = "fastavro-1.8.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:d353aec9c000b96c33ad285651a2cba0f87fe50fcdecc6120689996af427194d"}, - {file = "fastavro-1.8.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1eaed91d6e1fb06c172e0aaf4b1ca1fd019c3f4a481e314bf783a4c74f6b7015"}, - {file = "fastavro-1.8.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9293b303955acd34a6f69dd4ef3465bd575dbde0cd3e3f00227a0ba5012430b4"}, - {file = "fastavro-1.8.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:b79baefd61554d9f03c4beaebbe638ef175d0efc1fb01f25e88ee6ae97985ab3"}, - {file = "fastavro-1.8.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:14d7cd3df019d41c66733b8bf5d983af9e1f601d4cb162853a49238a4087d6b0"}, - {file = "fastavro-1.8.4-cp311-cp311-win_amd64.whl", hash = "sha256:c8fb27001b7023910969f15bee2c9205c4e9f40713929d6c1dca8f470fc8fc80"}, - {file = "fastavro-1.8.4-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:e331229acef15f858d9863ced7b629ebef4bd5f80766d367255e51cbf44f8dab"}, - {file = "fastavro-1.8.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:04e26b3ba288bd423f25630a3b9bd70cc61b46c6f6161de35e398a6fc8f260f0"}, - {file = "fastavro-1.8.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6281f4555659ed658b195d1618a637504013e57b680d6cbad7c726e9a4e2cf0b"}, - {file = "fastavro-1.8.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:3201880149e1fb807d616ab46b338a26788173a9f4e8a3396ae145e86af878a1"}, - {file = "fastavro-1.8.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:39771719fa04b8321eeebfb0813eaa2723c20e5bf570bcca3f53f1169099a0d7"}, - {file = "fastavro-1.8.4-cp312-cp312-win_amd64.whl", hash = "sha256:7095ae37a5c46dacb7ef430092e5f94650f576be281487b72050c1cf12e4ee20"}, - {file = "fastavro-1.8.4-cp38-cp38-macosx_11_0_x86_64.whl", hash = "sha256:eb76f5bfcde91cde240c93594dae47670cdf1a95d7e5d0dc3ccdef57c6c1c183"}, - {file = "fastavro-1.8.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:71ebe1cf090f800ca7d4c64d50c81c2a88c56e6ef6aa5eb61ec425e7ae723617"}, - {file = "fastavro-1.8.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e9f0ef601943ea11cd02a59c57f5588cea3e300ac67608f53c904ec7aeddd232"}, - {file = "fastavro-1.8.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:1060318f3ab31bcc4b2184cea3763305b773163381601e304000da81a2f7e11f"}, - {file = "fastavro-1.8.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:01c8c7f22172174f2c2c0922801b552fbca75758f84b0ad3cd6f3e505a76ed05"}, - {file = "fastavro-1.8.4-cp38-cp38-win_amd64.whl", hash = "sha256:bc8a1af80b8face4a41d8526a34b6474a874f7367a900d0b14752eacebb7a2b8"}, - {file = "fastavro-1.8.4-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:687a2f8fa83a76906c4ec35c9d0500e13a567fc631845f0e47646c48233c7725"}, - {file = "fastavro-1.8.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1b921c63fcfb9149a32c40a9cd27b0e900fcda602455cbce4d773300019b9ce2"}, - {file = "fastavro-1.8.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2610a8683b10be7aaa532ddddbcb719883ee2d6f09dafd4a4a7b46d5d719fc07"}, - {file = "fastavro-1.8.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:94448dc749d098f846f6a6d82d59f85483bd6fcdecfb6234daac5f4494ae4156"}, - {file = "fastavro-1.8.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2d39c6b5db7014a3722a7d206310874430486f4895161911b6b6574cb1a6c48f"}, - {file = "fastavro-1.8.4-cp39-cp39-win_amd64.whl", hash = "sha256:3b73472e8da33bcbf08ec989996637aea04eaca71058bb6d45def6fa4168f541"}, - {file = "fastavro-1.8.4.tar.gz", hash = "sha256:dae6118da27e81abf5957dc79a6d778888fc1bbf67645f52959cb2faba95beff"}, + {file = "fastavro-1.9.0-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:00826f295f290ba95f1f68d5c36970b4db7f9245a1b1a33dd9d464a382733894"}, + {file = "fastavro-1.9.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3ff7ac97cfe07ad90fdcca3ea90b14461ba8831bc45f02e13440b6c634f291c8"}, + {file = "fastavro-1.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8c251e7122b436458b8e1151c0613d6dac2b5edb6acbbc35de3b4c5f6ebb80b7"}, + {file = "fastavro-1.9.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:35a32f5d33f91fcb7e8daf7afc82a75c8d7c774cf4d93937b2ad487d28f3f707"}, + {file = "fastavro-1.9.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:228e7c525ff15a9f21f1adb2097ec87888933ef5c8a682c2f1d5d83796e4dd42"}, + {file = "fastavro-1.9.0-cp310-cp310-win_amd64.whl", hash = "sha256:d694bb1c2b20f1703bcb698a74f58f0f503eda8f49cb6d46209c8f3715098348"}, + {file = "fastavro-1.9.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0f044b71d8b0ba6bbd6166be6836c3caeadd26eeaabee70b6ac7c6a9b884f6bf"}, + {file = "fastavro-1.9.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:172d6d5c186ba51ec6eaa98eaaadc8e859b5a56862ae724413424a858619da7f"}, + {file = "fastavro-1.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:07dee19dcc2797a8cb1b410d9e65febb55af2a18d9a7b85465b039d4276b9a29"}, + {file = "fastavro-1.9.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:83402b450f718b690ebd88f1df2ea70609f1192bed1498308d29ac737e992391"}, + {file = "fastavro-1.9.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:b3704847d79377a5b4252ccf6d3a391497cdb8f57017cde2613f92f5274d6261"}, + {file = "fastavro-1.9.0-cp311-cp311-win_amd64.whl", hash = "sha256:602492ea0c458020cd19138ff2b9e97aa187ae01c290183dd9bbb7ff2d2e83c4"}, + {file = "fastavro-1.9.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:1cea6c2508dfb06d65cddb5b90bd6a79d3e481f1d80adc5f6ce6e3dacb4a8773"}, + {file = "fastavro-1.9.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8629d4367373db7d195672834c59c86e2642172bbebd5ec6d83797b39ac4ef01"}, + {file = "fastavro-1.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f45dfc29de276b509c8dbbfa6076ba6562be055c877928d4ffa1cf35b8ec59dc"}, + {file = "fastavro-1.9.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:cc3b2de071e4d6de19974ffd328e63f7c85de2348d614222238fda2b35578b63"}, + {file = "fastavro-1.9.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a0d2570052b4e2d7b46bec4cd74c8b12d8e21cd151f5bfc837da990cb62385c5"}, + {file = "fastavro-1.9.0-cp312-cp312-win_amd64.whl", hash = "sha256:718e5df505029269e7a80afdd7e5f196d24f1473ad47eea41061ce630609f80e"}, + {file = "fastavro-1.9.0-cp38-cp38-macosx_11_0_x86_64.whl", hash = "sha256:6cebcc09c932931e3084c96fe2c666c9cfc8c4043520651fbfeb58575edeb7da"}, + {file = "fastavro-1.9.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb7e3a058a169d2c8bd19dfcbc7ae14c879750ce49fbaf3c436af683991f7eae"}, + {file = "fastavro-1.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c5af71895a01618c98ae7c563ee75b18f721d8a66324d66613bd2fcd8b2f8ac9"}, + {file = "fastavro-1.9.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:db30121ce34f5a0a4c368504a5e2df05449382e8d4918c0b43058ffb1d31d723"}, + {file = "fastavro-1.9.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:48d9214982c0c0f29e583df11781dc6884e8f3f3336b97991c6e7587f509a02b"}, + {file = "fastavro-1.9.0-cp38-cp38-win_amd64.whl", hash = "sha256:3d4a71d39760de455dbe0b2121ea1bbd85fc851e8bab2970d9e9d6d8825277d2"}, + {file = "fastavro-1.9.0-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:f803c33f4fd4e3bfc17bbdbf3c036fbcb92a1f8e6bd19a035800518479ce6b36"}, + {file = "fastavro-1.9.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:00361ea6d5a46813f3758511153fed9698308cae175500ff62562893d3570156"}, + {file = "fastavro-1.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:44fc998387271d57d0e3b29c30049ba903d2aead9471b12c20725284d60dd57e"}, + {file = "fastavro-1.9.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:52e7df50431c21543682afd0ca95c40569c49e4c4599dcb78343f7c24fda6145"}, + {file = "fastavro-1.9.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:215f40921d3f1f229cea89af25533e7be3fde16dd85c55436c15fb1ad067b486"}, + {file = "fastavro-1.9.0-cp39-cp39-win_amd64.whl", hash = "sha256:0c046ed9759d1100df59dc18452901253cff5a37d9e8e8701d0102116c3202cb"}, + {file = "fastavro-1.9.0.tar.gz", hash = "sha256:71aad82b17442dc41223f8351b9f28a60dd877a8e5a7525eaf6342f45f6d23e1"}, ] [package.extras] -codecs = ["lz4", "python-snappy", "zstandard"] +codecs = ["cramjam", "lz4", "zstandard"] lz4 = ["lz4"] -snappy = ["python-snappy"] +snappy = ["cramjam"] zstandard = ["zstandard"] [[package]] @@ -1258,13 +1259,13 @@ six = "*" [[package]] name = "griffe" -version = "0.36.8" +version = "0.36.9" description = "Signatures for entire Python programs. Extract the structure, the frame, the skeleton of your project, to generate API documentation or find breaking changes in your API." optional = false python-versions = ">=3.8" files = [ - {file = "griffe-0.36.8-py3-none-any.whl", hash = "sha256:51560f718cfb9de18f2bc3255bea082922869d96558c4e0322121a7fff02025e"}, - {file = "griffe-0.36.8.tar.gz", hash = "sha256:beb350c6771b1d59c8fcff1f7516af2dd7a2adf18ed16996190744415dfb0659"}, + {file = "griffe-0.36.9-py3-none-any.whl", hash = "sha256:7874febe7cd81e8e47eb7b8130ff9d38c8f3656233c01d2d217d2e898a0925f5"}, + {file = "griffe-0.36.9.tar.gz", hash = "sha256:b4e510bf0ed1fc91c58453c68018a2247c561adec8f5dadc40275afc01f51eac"}, ] [package.dependencies] @@ -1648,13 +1649,13 @@ files = [ [[package]] name = "jsonschema" -version = "4.19.1" +version = "4.19.2" description = "An implementation of JSON Schema validation for Python" optional = false python-versions = ">=3.8" files = [ - {file = "jsonschema-4.19.1-py3-none-any.whl", hash = "sha256:cd5f1f9ed9444e554b38ba003af06c0a8c2868131e56bfbef0550fb450c0330e"}, - {file = "jsonschema-4.19.1.tar.gz", hash = "sha256:ec84cc37cfa703ef7cd4928db24f9cb31428a5d0fa77747b8b51a847458e0bbf"}, + {file = "jsonschema-4.19.2-py3-none-any.whl", hash = "sha256:eee9e502c788e89cb166d4d37f43084e3b64ab405c795c03d343a4dbc2c810fc"}, + {file = "jsonschema-4.19.2.tar.gz", hash = "sha256:c9ff4d7447eed9592c23a12ccee508baf0dd0d59650615e847feb6cdca74f392"}, ] [package.dependencies] @@ -1717,13 +1718,13 @@ test = ["coverage", "ipykernel (>=6.14)", "mypy", "paramiko", "pre-commit", "pyt [[package]] name = "jupyter-core" -version = "5.4.0" +version = "5.5.0" description = "Jupyter core package. A base package on which Jupyter projects rely." optional = false python-versions = ">=3.8" files = [ - {file = "jupyter_core-5.4.0-py3-none-any.whl", hash = "sha256:66e252f675ac04dcf2feb6ed4afb3cd7f68cf92f483607522dc251f32d471571"}, - {file = "jupyter_core-5.4.0.tar.gz", hash = "sha256:e4b98344bb94ee2e3e6c4519a97d001656009f9cb2b7f2baf15b3c205770011d"}, + {file = "jupyter_core-5.5.0-py3-none-any.whl", hash = "sha256:e11e02cd8ae0a9de5c6c44abf5727df9f2581055afe00b22183f621ba3585805"}, + {file = "jupyter_core-5.5.0.tar.gz", hash = "sha256:880b86053bf298a8724994f95e99b99130659022a4f7f45f563084b6223861d3"}, ] [package.dependencies] @@ -1732,7 +1733,7 @@ pywin32 = {version = ">=300", markers = "sys_platform == \"win32\" and platform_ traitlets = ">=5.3" [package.extras] -docs = ["myst-parser", "sphinx-autodoc-typehints", "sphinxcontrib-github-alt", "sphinxcontrib-spelling", "traitlets"] +docs = ["myst-parser", "pydata-sphinx-theme", "sphinx-autodoc-typehints", "sphinxcontrib-github-alt", "sphinxcontrib-spelling", "traitlets"] test = ["ipykernel", "pre-commit", "pytest", "pytest-cov", "pytest-timeout"] [[package]] @@ -2482,13 +2483,13 @@ mkdocs = ">=1.0.3" [[package]] name = "mkdocs-material" -version = "9.4.6" +version = "9.4.7" description = "Documentation that simply works" optional = false python-versions = ">=3.8" files = [ - {file = "mkdocs_material-9.4.6-py3-none-any.whl", hash = "sha256:78802035d5768a78139c84ad7dce0c6493e8f7dc4861727d36ed91d1520a54da"}, - {file = "mkdocs_material-9.4.6.tar.gz", hash = "sha256:09665e60df7ee9e5ff3a54af173f6d45be718b1ee7dd962bcff3102b81fb0c14"}, + {file = "mkdocs_material-9.4.7-py3-none-any.whl", hash = "sha256:4d698d52bb6a6a3c452ab854481c4cdb68453a0420956a6aee2de55fe15fe610"}, + {file = "mkdocs_material-9.4.7.tar.gz", hash = "sha256:e704e001c9ef17291e1d3462c202425217601653e18f68f85d28eff4690e662b"}, ] [package.dependencies] @@ -2497,7 +2498,7 @@ colorama = ">=0.4,<1.0" jinja2 = ">=3.0,<4.0" markdown = ">=3.2,<4.0" mkdocs = ">=1.5.3,<2.0" -mkdocs-material-extensions = ">=1.2,<2.0" +mkdocs-material-extensions = ">=1.3,<2.0" paginate = ">=0.5,<1.0" pygments = ">=2.16,<3.0" pymdown-extensions = ">=10.2,<11.0" @@ -2611,13 +2612,13 @@ test = ["flaky", "ipykernel (>=6.19.3)", "ipython", "ipywidgets", "nbconvert (>= [[package]] name = "nbconvert" -version = "7.9.2" +version = "7.10.0" description = "Converting Jupyter Notebooks" optional = false python-versions = ">=3.8" files = [ - {file = "nbconvert-7.9.2-py3-none-any.whl", hash = "sha256:39fe4b8bdd1b0104fdd86fc8a43a9077ba64c720bda4c6132690d917a0a154ee"}, - {file = "nbconvert-7.9.2.tar.gz", hash = "sha256:e56cc7588acc4f93e2bb5a34ec69028e4941797b2bfaf6462f18a41d1cc258c9"}, + {file = "nbconvert-7.10.0-py3-none-any.whl", hash = "sha256:8cf1d95e569730f136feb85e4bba25bdcf3a63fefb122d854ddff6771c0ac933"}, + {file = "nbconvert-7.10.0.tar.gz", hash = "sha256:4bedff08848626be544de193b7594d98a048073f392178008ff4f171f5e21d26"}, ] [package.dependencies] @@ -2783,61 +2784,61 @@ tests = ["pytest", "pytest-cov", "pytest-pep8"] [[package]] name = "orjson" -version = "3.9.9" +version = "3.9.10" description = "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy" optional = false python-versions = ">=3.8" files = [ - {file = "orjson-3.9.9-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:f28090060a31f4d11221f9ba48b2273b0d04b702f4dcaa197c38c64ce639cc51"}, - {file = "orjson-3.9.9-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8038ba245d0c0a6337cfb6747ea0c51fe18b0cf1a4bc943d530fd66799fae33d"}, - {file = "orjson-3.9.9-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:543b36df56db195739c70d645ecd43e49b44d5ead5f8f645d2782af118249b37"}, - {file = "orjson-3.9.9-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8e7877256b5092f1e4e48fc0f1004728dc6901e7a4ffaa4acb0a9578610aa4ce"}, - {file = "orjson-3.9.9-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:12b83e0d8ba4ca88b894c3e00efc59fe6d53d9ffb5dbbb79d437a466fc1a513d"}, - {file = "orjson-3.9.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1ef06431f021453a47a9abb7f7853f04f031d31fbdfe1cc83e3c6aadde502cce"}, - {file = "orjson-3.9.9-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:0a1a4d9e64597e550428ba091e51a4bcddc7a335c8f9297effbfa67078972b5c"}, - {file = "orjson-3.9.9-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:879d2d1f6085c9c0831cec6716c63aaa89e41d8e036cabb19a315498c173fcc6"}, - {file = "orjson-3.9.9-cp310-none-win32.whl", hash = "sha256:d3f56e41bc79d30fdf077073072f2377d2ebf0b946b01f2009ab58b08907bc28"}, - {file = "orjson-3.9.9-cp310-none-win_amd64.whl", hash = "sha256:ab7bae2b8bf17620ed381e4101aeeb64b3ba2a45fc74c7617c633a923cb0f169"}, - {file = "orjson-3.9.9-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:31d676bc236f6e919d100fb85d0a99812cff1ebffaa58106eaaec9399693e227"}, - {file = "orjson-3.9.9-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:678ffb5c0a6b1518b149cc328c610615d70d9297e351e12c01d0beed5d65360f"}, - {file = "orjson-3.9.9-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a71b0cc21f2c324747bc77c35161e0438e3b5e72db6d3b515310457aba743f7f"}, - {file = "orjson-3.9.9-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ae72621f216d1d990468291b1ec153e1b46e0ed188a86d54e0941f3dabd09ee8"}, - {file = "orjson-3.9.9-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:512e5a41af008e76451f5a344941d61f48dddcf7d7ddd3073deb555de64596a6"}, - {file = "orjson-3.9.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f89dc338a12f4357f5bf1b098d3dea6072fb0b643fd35fec556f4941b31ae27"}, - {file = "orjson-3.9.9-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:957a45fb201c61b78bcf655a16afbe8a36c2c27f18a998bd6b5d8a35e358d4ad"}, - {file = "orjson-3.9.9-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d1c01cf4b8e00c7e98a0a7cf606a30a26c32adf2560be2d7d5d6766d6f474b31"}, - {file = "orjson-3.9.9-cp311-none-win32.whl", hash = "sha256:397a185e5dd7f8ebe88a063fe13e34d61d394ebb8c70a443cee7661b9c89bda7"}, - {file = "orjson-3.9.9-cp311-none-win_amd64.whl", hash = "sha256:24301f2d99d670ded4fb5e2f87643bc7428a54ba49176e38deb2887e42fe82fb"}, - {file = "orjson-3.9.9-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:bd55ea5cce3addc03f8fb0705be0cfed63b048acc4f20914ce5e1375b15a293b"}, - {file = "orjson-3.9.9-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b28c1a65cd13fff5958ab8b350f0921121691464a7a1752936b06ed25c0c7b6e"}, - {file = "orjson-3.9.9-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b97a67c47840467ccf116136450c50b6ed4e16a8919c81a4b4faef71e0a2b3f4"}, - {file = "orjson-3.9.9-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:75b805549cbbcb963e9c9068f1a05abd0ea4c34edc81f8d8ef2edb7e139e5b0f"}, - {file = "orjson-3.9.9-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5424ecbafe57b2de30d3b5736c5d5835064d522185516a372eea069b92786ba6"}, - {file = "orjson-3.9.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0d2cd6ef4726ef1b8c63e30d8287225a383dbd1de3424d287b37c1906d8d2855"}, - {file = "orjson-3.9.9-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:c959550e0705dc9f59de8fca1a316da0d9b115991806b217c82931ac81d75f74"}, - {file = "orjson-3.9.9-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:ece2d8ed4c34903e7f1b64fb1e448a00e919a4cdb104fc713ad34b055b665fca"}, - {file = "orjson-3.9.9-cp312-none-win_amd64.whl", hash = "sha256:f708ca623287186e5876256cb30599308bce9b2757f90d917b7186de54ce6547"}, - {file = "orjson-3.9.9-cp38-cp38-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:335406231f9247f985df045f0c0c8f6b6d5d6b3ff17b41a57c1e8ef1a31b4d04"}, - {file = "orjson-3.9.9-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9d9b5440a5d215d9e1cfd4aee35fd4101a8b8ceb8329f549c16e3894ed9f18b5"}, - {file = "orjson-3.9.9-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e98ca450cb4fb176dd572ce28c6623de6923752c70556be4ef79764505320acb"}, - {file = "orjson-3.9.9-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a3bf6ca6bce22eb89dd0650ef49c77341440def966abcb7a2d01de8453df083a"}, - {file = "orjson-3.9.9-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:eb50d869b3c97c7c5187eda3759e8eb15deb1271d694bc5d6ba7040db9e29036"}, - {file = "orjson-3.9.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fcf06c69ccc78e32d9f28aa382ab2ab08bf54b696dbe00ee566808fdf05da7d"}, - {file = "orjson-3.9.9-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:9a4402e7df1b5c9a4c71c7892e1c8f43f642371d13c73242bda5964be6231f95"}, - {file = "orjson-3.9.9-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b20becf50d4aec7114dc902b58d85c6431b3a59b04caa977e6ce67b6fee0e159"}, - {file = "orjson-3.9.9-cp38-none-win32.whl", hash = "sha256:1f352117eccac268a59fedac884b0518347f5e2b55b9f650c2463dd1e732eb61"}, - {file = "orjson-3.9.9-cp38-none-win_amd64.whl", hash = "sha256:c4eb31a8e8a5e1d9af5aa9e247c2a52ad5cf7e968aaa9aaefdff98cfcc7f2e37"}, - {file = "orjson-3.9.9-cp39-cp39-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:4a308aeac326c2bafbca9abbae1e1fcf682b06e78a54dad0347b760525838d85"}, - {file = "orjson-3.9.9-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e159b97f5676dcdac0d0f75ec856ef5851707f61d262851eb41a30e8fadad7c9"}, - {file = "orjson-3.9.9-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f692e7aabad92fa0fff5b13a846fb586b02109475652207ec96733a085019d80"}, - {file = "orjson-3.9.9-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cffb77cf0cd3cbf20eb603f932e0dde51b45134bdd2d439c9f57924581bb395b"}, - {file = "orjson-3.9.9-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c63eca397127ebf46b59c9c1fb77b30dd7a8fc808ac385e7a58a7e64bae6e106"}, - {file = "orjson-3.9.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:06f0c024a75e8ba5d9101facb4fb5a028cdabe3cdfe081534f2a9de0d5062af2"}, - {file = "orjson-3.9.9-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:8cba20c9815c2a003b8ca4429b0ad4aa87cb6649af41365821249f0fd397148e"}, - {file = "orjson-3.9.9-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:906cac73b7818c20cf0f6a7dde5a6f009c52aecc318416c7af5ea37f15ca7e66"}, - {file = "orjson-3.9.9-cp39-none-win32.whl", hash = "sha256:50232572dd300c49f134838c8e7e0917f29a91f97dbd608d23f2895248464b7f"}, - {file = "orjson-3.9.9-cp39-none-win_amd64.whl", hash = "sha256:920814e02e3dd7af12f0262bbc18b9fe353f75a0d0c237f6a67d270da1a1bb44"}, - {file = "orjson-3.9.9.tar.gz", hash = "sha256:02e693843c2959befdd82d1ebae8b05ed12d1cb821605d5f9fe9f98ca5c9fd2b"}, + {file = "orjson-3.9.10-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:c18a4da2f50050a03d1da5317388ef84a16013302a5281d6f64e4a3f406aabc4"}, + {file = "orjson-3.9.10-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5148bab4d71f58948c7c39d12b14a9005b6ab35a0bdf317a8ade9a9e4d9d0bd5"}, + {file = "orjson-3.9.10-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4cf7837c3b11a2dfb589f8530b3cff2bd0307ace4c301e8997e95c7468c1378e"}, + {file = "orjson-3.9.10-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c62b6fa2961a1dcc51ebe88771be5319a93fd89bd247c9ddf732bc250507bc2b"}, + {file = "orjson-3.9.10-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:deeb3922a7a804755bbe6b5be9b312e746137a03600f488290318936c1a2d4dc"}, + {file = "orjson-3.9.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1234dc92d011d3554d929b6cf058ac4a24d188d97be5e04355f1b9223e98bbe9"}, + {file = "orjson-3.9.10-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:06ad5543217e0e46fd7ab7ea45d506c76f878b87b1b4e369006bdb01acc05a83"}, + {file = "orjson-3.9.10-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:4fd72fab7bddce46c6826994ce1e7de145ae1e9e106ebb8eb9ce1393ca01444d"}, + {file = "orjson-3.9.10-cp310-none-win32.whl", hash = "sha256:b5b7d4a44cc0e6ff98da5d56cde794385bdd212a86563ac321ca64d7f80c80d1"}, + {file = "orjson-3.9.10-cp310-none-win_amd64.whl", hash = "sha256:61804231099214e2f84998316f3238c4c2c4aaec302df12b21a64d72e2a135c7"}, + {file = "orjson-3.9.10-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:cff7570d492bcf4b64cc862a6e2fb77edd5e5748ad715f487628f102815165e9"}, + {file = "orjson-3.9.10-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed8bc367f725dfc5cabeed1ae079d00369900231fbb5a5280cf0736c30e2adf7"}, + {file = "orjson-3.9.10-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c812312847867b6335cfb264772f2a7e85b3b502d3a6b0586aa35e1858528ab1"}, + {file = "orjson-3.9.10-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9edd2856611e5050004f4722922b7b1cd6268da34102667bd49d2a2b18bafb81"}, + {file = "orjson-3.9.10-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:674eb520f02422546c40401f4efaf8207b5e29e420c17051cddf6c02783ff5ca"}, + {file = "orjson-3.9.10-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1d0dc4310da8b5f6415949bd5ef937e60aeb0eb6b16f95041b5e43e6200821fb"}, + {file = "orjson-3.9.10-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e99c625b8c95d7741fe057585176b1b8783d46ed4b8932cf98ee145c4facf499"}, + {file = "orjson-3.9.10-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:ec6f18f96b47299c11203edfbdc34e1b69085070d9a3d1f302810cc23ad36bf3"}, + {file = "orjson-3.9.10-cp311-none-win32.whl", hash = "sha256:ce0a29c28dfb8eccd0f16219360530bc3cfdf6bf70ca384dacd36e6c650ef8e8"}, + {file = "orjson-3.9.10-cp311-none-win_amd64.whl", hash = "sha256:cf80b550092cc480a0cbd0750e8189247ff45457e5a023305f7ef1bcec811616"}, + {file = "orjson-3.9.10-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:602a8001bdf60e1a7d544be29c82560a7b49319a0b31d62586548835bbe2c862"}, + {file = "orjson-3.9.10-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f295efcd47b6124b01255d1491f9e46f17ef40d3d7eabf7364099e463fb45f0f"}, + {file = "orjson-3.9.10-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:92af0d00091e744587221e79f68d617b432425a7e59328ca4c496f774a356071"}, + {file = "orjson-3.9.10-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c5a02360e73e7208a872bf65a7554c9f15df5fe063dc047f79738998b0506a14"}, + {file = "orjson-3.9.10-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:858379cbb08d84fe7583231077d9a36a1a20eb72f8c9076a45df8b083724ad1d"}, + {file = "orjson-3.9.10-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:666c6fdcaac1f13eb982b649e1c311c08d7097cbda24f32612dae43648d8db8d"}, + {file = "orjson-3.9.10-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:3fb205ab52a2e30354640780ce4587157a9563a68c9beaf52153e1cea9aa0921"}, + {file = "orjson-3.9.10-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:7ec960b1b942ee3c69323b8721df2a3ce28ff40e7ca47873ae35bfafeb4555ca"}, + {file = "orjson-3.9.10-cp312-none-win_amd64.whl", hash = "sha256:3e892621434392199efb54e69edfff9f699f6cc36dd9553c5bf796058b14b20d"}, + {file = "orjson-3.9.10-cp38-cp38-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:8b9ba0ccd5a7f4219e67fbbe25e6b4a46ceef783c42af7dbc1da548eb28b6531"}, + {file = "orjson-3.9.10-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2e2ecd1d349e62e3960695214f40939bbfdcaeaaa62ccc638f8e651cf0970e5f"}, + {file = "orjson-3.9.10-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7f433be3b3f4c66016d5a20e5b4444ef833a1f802ced13a2d852c637f69729c1"}, + {file = "orjson-3.9.10-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4689270c35d4bb3102e103ac43c3f0b76b169760aff8bcf2d401a3e0e58cdb7f"}, + {file = "orjson-3.9.10-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4bd176f528a8151a6efc5359b853ba3cc0e82d4cd1fab9c1300c5d957dc8f48c"}, + {file = "orjson-3.9.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3a2ce5ea4f71681623f04e2b7dadede3c7435dfb5e5e2d1d0ec25b35530e277b"}, + {file = "orjson-3.9.10-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:49f8ad582da6e8d2cf663c4ba5bf9f83cc052570a3a767487fec6af839b0e777"}, + {file = "orjson-3.9.10-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:2a11b4b1a8415f105d989876a19b173f6cdc89ca13855ccc67c18efbd7cbd1f8"}, + {file = "orjson-3.9.10-cp38-none-win32.whl", hash = "sha256:a353bf1f565ed27ba71a419b2cd3db9d6151da426b61b289b6ba1422a702e643"}, + {file = "orjson-3.9.10-cp38-none-win_amd64.whl", hash = "sha256:e28a50b5be854e18d54f75ef1bb13e1abf4bc650ab9d635e4258c58e71eb6ad5"}, + {file = "orjson-3.9.10-cp39-cp39-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:ee5926746232f627a3be1cc175b2cfad24d0170d520361f4ce3fa2fd83f09e1d"}, + {file = "orjson-3.9.10-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0a73160e823151f33cdc05fe2cea557c5ef12fdf276ce29bb4f1c571c8368a60"}, + {file = "orjson-3.9.10-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c338ed69ad0b8f8f8920c13f529889fe0771abbb46550013e3c3d01e5174deef"}, + {file = "orjson-3.9.10-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5869e8e130e99687d9e4be835116c4ebd83ca92e52e55810962446d841aba8de"}, + {file = "orjson-3.9.10-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d2c1e559d96a7f94a4f581e2a32d6d610df5840881a8cba8f25e446f4d792df3"}, + {file = "orjson-3.9.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:81a3a3a72c9811b56adf8bcc829b010163bb2fc308877e50e9910c9357e78521"}, + {file = "orjson-3.9.10-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:7f8fb7f5ecf4f6355683ac6881fd64b5bb2b8a60e3ccde6ff799e48791d8f864"}, + {file = "orjson-3.9.10-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c943b35ecdf7123b2d81d225397efddf0bce2e81db2f3ae633ead38e85cd5ade"}, + {file = "orjson-3.9.10-cp39-none-win32.whl", hash = "sha256:fb0b361d73f6b8eeceba47cd37070b5e6c9de5beaeaa63a1cb35c7e1a73ef088"}, + {file = "orjson-3.9.10-cp39-none-win_amd64.whl", hash = "sha256:b90f340cb6397ec7a854157fac03f0c82b744abdd1c0941a024c3c29d1340aff"}, + {file = "orjson-3.9.10.tar.gz", hash = "sha256:9ebbdbd6a046c304b1845e96fbcc5559cd296b4dfd3ad2509e33c4d9ce07d6a1"}, ] [[package]] @@ -3110,13 +3111,13 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-co [[package]] name = "prometheus-client" -version = "0.17.1" +version = "0.18.0" description = "Python client for the Prometheus monitoring system." optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" files = [ - {file = "prometheus_client-0.17.1-py3-none-any.whl", hash = "sha256:e537f37160f6807b8202a6fc4764cdd19bac5480ddd3e0d463c3002b34462101"}, - {file = "prometheus_client-0.17.1.tar.gz", hash = "sha256:21e674f39831ae3f8acde238afd9a27a37d0d2fb5a28ea094f0ce25d2cbf2091"}, + {file = "prometheus_client-0.18.0-py3-none-any.whl", hash = "sha256:8de3ae2755f890826f4b6479e5571d4f74ac17a81345fe69a6778fdb92579184"}, + {file = "prometheus_client-0.18.0.tar.gz", hash = "sha256:35f7a8c22139e2bb7ca5a698e92d38145bc8dc74c1c0bf56f25cca886a764e17"}, ] [package.extras] @@ -4451,13 +4452,13 @@ files = [ [[package]] name = "traitlets" -version = "5.12.0" +version = "5.13.0" description = "Traitlets Python configuration system" optional = false python-versions = ">=3.8" files = [ - {file = "traitlets-5.12.0-py3-none-any.whl", hash = "sha256:81539f07f7aebcde2e4b5ab76727f53eabf18ad155c6ed7979a681411602fa47"}, - {file = "traitlets-5.12.0.tar.gz", hash = "sha256:833273bf645d8ce31dcb613c56999e2e055b1ffe6d09168a164bcd91c36d5d35"}, + {file = "traitlets-5.13.0-py3-none-any.whl", hash = "sha256:baf991e61542da48fe8aef8b779a9ea0aa38d8a54166ee250d5af5ecf4486619"}, + {file = "traitlets-5.13.0.tar.gz", hash = "sha256:9b232b9430c8f57288c1024b34a8f0251ddcc47268927367a0dd3eeaca40deb5"}, ] [package.extras] @@ -4696,13 +4697,13 @@ watchdog = ["watchdog (>=2.3)"] [[package]] name = "wheel" -version = "0.41.2" +version = "0.41.3" description = "A built-package format for Python" optional = false python-versions = ">=3.7" files = [ - {file = "wheel-0.41.2-py3-none-any.whl", hash = "sha256:75909db2664838d015e3d9139004ee16711748a52c8f336b52882266540215d8"}, - {file = "wheel-0.41.2.tar.gz", hash = "sha256:0c5ac5ff2afb79ac23ab82bab027a0be7b5dbcf2e54dc50efe4bf507de1f7985"}, + {file = "wheel-0.41.3-py3-none-any.whl", hash = "sha256:488609bc63a29322326e05560731bf7bfea8e48ad646e1f5e40d366607de0942"}, + {file = "wheel-0.41.3.tar.gz", hash = "sha256:4d4987ce51a49370ea65c0bfd2234e8ce80a12780820d9dc462597a6e60d0841"}, ] [package.extras] @@ -4808,13 +4809,13 @@ h11 = ">=0.9.0,<1" [[package]] name = "xyzservices" -version = "2023.10.0" +version = "2023.10.1" description = "Source of XYZ tiles providers" optional = false python-versions = ">=3.8" files = [ - {file = "xyzservices-2023.10.0-py3-none-any.whl", hash = "sha256:70b9910f6c8e46f6ca92dea21e9b8cf89edf0ead35a870198fb59a7d63579525"}, - {file = "xyzservices-2023.10.0.tar.gz", hash = "sha256:eee203e91955782fd8bfc2f05846830c289139dc0ab4eaf733bfa8f0be71861f"}, + {file = "xyzservices-2023.10.1-py3-none-any.whl", hash = "sha256:6a4c38d3a9f89d3e77153eff9414b36a8ee0850c9e8b85796fd1b2a85b8dfd68"}, + {file = "xyzservices-2023.10.1.tar.gz", hash = "sha256:091229269043bc8258042edbedad4fcb44684b0473ede027b5672ad40dc9fa02"}, ] [[package]] diff --git a/temporian/core/operators/test/BUILD b/temporian/core/operators/test/BUILD index d8be2d49f..e856364fb 100644 --- a/temporian/core/operators/test/BUILD +++ b/temporian/core/operators/test/BUILD @@ -42,19 +42,41 @@ py_test( ) py_test( - name = "test_arithmetic_multi_index", - srcs = ["test_arithmetic_multi_index.py"], + name = "test_filter", + srcs = ["test_filter.py"], srcs_version = "PY3", deps = [ + # already_there/absl/testing:absltest + "//temporian/implementation/numpy/data:io", + "//temporian/test:utils", + ], +) + +py_test( + name = "test_glue", + srcs = ["test_glue.py"], + srcs_version = "PY3", + deps = [ + # already_there/absl/testing:absltest + "//temporian/implementation/numpy/data:io", + "//temporian/test:utils", + ], +) + +py_test( + name = "test_lag", + srcs = ["test_lag.py"], + srcs_version = "PY3", + deps = [ + # already_there/absl/testing:absltest "//temporian/implementation/numpy/data:io", - # "//temporian/core/data:duration", "//temporian/test:utils", ], ) py_test( - name = "test_drop_index", - srcs = ["test_drop_index.py"], + name = "test_leak", + srcs = ["test_leak.py"], srcs_version = "PY3", deps = [ # already_there/absl/testing:absltest @@ -74,6 +96,17 @@ py_test( ], ) +py_test( + name = "test_prefix", + srcs = ["test_prefix.py"], + srcs_version = "PY3", + deps = [ + # already_there/absl/testing:absltest + "//temporian/implementation/numpy/data:io", + "//temporian/test:utils", + ], +) + py_test( name = "test_propagate", srcs = ["test_propagate.py"], @@ -96,6 +129,17 @@ py_test( ], ) +py_test( + name = "test_resample", + srcs = ["test_resample.py"], + srcs_version = "PY3", + deps = [ + # already_there/absl/testing:absltest + "//temporian/implementation/numpy/data:io", + "//temporian/test:utils", + ], +) + py_test( name = "test_select", srcs = ["test_select.py"], @@ -119,14 +163,13 @@ py_test( ) py_test( - name = "until_next_test", - srcs = ["until_next_test.py"], + name = "test_until_next", + srcs = ["test_until_next.py"], srcs_version = "PY3", deps = [ # already_there/absl/testing:absltest - "//temporian/core/data:dtype", - "//temporian/core/data:node", - "//temporian/core/operators:until_next", + "//temporian/implementation/numpy/data:io", + "//temporian/test:utils", ], ) @@ -141,3 +184,25 @@ py_test( "//temporian/core/operators:tick_calendar", ], ) + +py_test( + name = "test_arithmetic_multi_index", + srcs = ["test_arithmetic_multi_index.py"], + srcs_version = "PY3", + deps = [ + "//temporian/implementation/numpy/data:io", + # "//temporian/core/data:duration", + "//temporian/test:utils", + ], +) + +py_test( + name = "test_where", + srcs = ["test_where.py"], + srcs_version = "PY3", + deps = [ + "//temporian/implementation/numpy/data:io", + # "//temporian/core/data:duration", + "//temporian/test:utils", + ], +) diff --git a/temporian/core/operators/test/test_filter.py b/temporian/core/operators/test/test_filter.py new file mode 100644 index 000000000..8e154dde1 --- /dev/null +++ b/temporian/core/operators/test/test_filter.py @@ -0,0 +1,44 @@ +# Copyright 2021 Google LLC. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from absl.testing import absltest +from absl.testing.parameterized import TestCase + +from temporian.implementation.numpy.data.io import event_set +from temporian.test.utils import assertOperatorResult + + +class FilterTest(TestCase): + def test_basic(self): + evset = event_set( + timestamps=[1, 2, 3], features={"x": [4, 5, 6], "y": [7, 8, 9]} + ) + condition = event_set( + timestamps=[1, 2, 3], + features={"c": [True, True, False]}, + same_sampling_as=evset, + ) + + result = evset.filter(condition) + + expected = event_set( + timestamps=[1, 2], + features={"x": [4, 5], "y": [7, 8]}, + ) + + assertOperatorResult(self, result, expected, check_sampling=False) + + +if __name__ == "__main__": + absltest.main() diff --git a/temporian/core/operators/test/test_glue.py b/temporian/core/operators/test/test_glue.py new file mode 100644 index 000000000..87b6aeeb7 --- /dev/null +++ b/temporian/core/operators/test/test_glue.py @@ -0,0 +1,157 @@ +# Copyright 2021 Google LLC. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from absl.testing import absltest +from absl.testing.parameterized import TestCase +from temporian.core.operators.glue import glue + +from temporian.implementation.numpy.data.io import event_set +from temporian.test.utils import assertOperatorResult, f32 + + +class GlueTest(TestCase): + def test_basic(self): + timestamps = [1, 1, 2, 3, 4] + + evset_1 = event_set( + timestamps=timestamps, + features={ + "x": ["a", "a", "a", "a", "b"], + "f1": [10, 11, 12, 13, 14], + }, + indexes=["x"], + ) + evset_2 = event_set( + timestamps=timestamps, + features={ + "x": ["a", "a", "a", "a", "b"], + "f2": [20, 21, 22, 23, 24], + "f3": [30, 31, 32, 33, 34], + }, + indexes=["x"], + same_sampling_as=evset_1, + ) + evset_3 = event_set( + timestamps=timestamps, + features={ + "x": ["a", "a", "a", "a", "b"], + "f4": [40, 41, 42, 43, 44], + }, + indexes=["x"], + same_sampling_as=evset_1, + ) + + result = glue(evset_1, evset_2, evset_3) + + expected = event_set( + timestamps=timestamps, + features={ + "x": ["a", "a", "a", "a", "b"], + "f1": [10, 11, 12, 13, 14], + "f2": [20, 21, 22, 23, 24], + "f3": [30, 31, 32, 33, 34], + "f4": [40, 41, 42, 43, 44], + }, + indexes=["x"], + same_sampling_as=evset_1, + ) + + assertOperatorResult(self, result, expected) + + def test_non_matching_sampling(self): + with self.assertRaisesRegex( + ValueError, + "Arguments should have the same sampling.", + ): + evset_1 = event_set([]) + evset_2 = event_set([0]) + glue(evset_1, evset_2) + + def test_duplicate_feature(self): + with self.assertRaisesRegex( + ValueError, + 'Feature "a" is defined in multiple input EventSetNodes', + ): + evset_1 = event_set([], features={"a": []}) + evset_2 = event_set( + [], features={"a": []}, same_sampling_as=evset_1 + ) + glue(evset_1, evset_2) + + def test_order_unchanged(self): + """Tests that input evsets' order is kept. + + Regression test for failing case where glue misordered its inputs when + more than 10, because of sorted() being called over a list where + "input_10" was interpreted as less than "input_2". + """ + evset_0 = event_set( + timestamps=[1], + features={"f0": [1]}, + ) + evset_1 = evset_0.rename("f1") + evset_2 = evset_0.rename("f2") + evset_3 = evset_0.rename("f3") + evset_4 = evset_0.rename("f4") + evset_5 = evset_0.rename("f5") + evset_6 = evset_0.rename("f6") + evset_7 = evset_0.rename("f7") + evset_8 = evset_0.rename("f8") + + # Test that alphabetical order is not used + evset_9 = evset_0.rename("a") + + evset_10 = event_set( + timestamps=[1], + features={"f10": f32([1])}, + same_sampling_as=evset_0, + ) + + result = glue( + evset_0, + evset_1, + evset_2, + evset_3, + evset_4, + evset_5, + evset_6, + evset_7, + evset_8, + evset_9, + evset_10, + ) + + expected = event_set( + [1], + features={ + "f0": [1], + "f1": [1], + "f2": [1], + "f3": [1], + "f4": [1], + "f5": [1], + "f6": [1], + "f7": [1], + "f8": [1], + "a": [1], + "f10": f32([1]), + }, + same_sampling_as=evset_0, + ) + + assertOperatorResult(self, result, expected) + + +if __name__ == "__main__": + absltest.main() diff --git a/temporian/implementation/numpy/operators/test/lag_test.py b/temporian/core/operators/test/test_lag.py similarity index 59% rename from temporian/implementation/numpy/operators/test/lag_test.py rename to temporian/core/operators/test/test_lag.py index 293fe72c1..6bcbb04f7 100644 --- a/temporian/implementation/numpy/operators/test/lag_test.py +++ b/temporian/core/operators/test/test_lag.py @@ -13,33 +13,29 @@ # limitations under the License. from absl.testing import absltest +from absl.testing.parameterized import TestCase -from temporian.core.operators.lag import LagOperator -from temporian.implementation.numpy.operators.lag import LagNumpyImplementation from temporian.implementation.numpy.data.io import event_set -from temporian.implementation.numpy.operators.test.utils import ( - assertEqualEventSet, - testOperatorAndImp, -) +from temporian.test.utils import assertOperatorResult -class LagNumpyImplementationTest(absltest.TestCase): - def test_base(self) -> None: - input_data = event_set( +class LagTest(TestCase): + def test_basic(self): + evset = event_set( timestamps=[1, 2, 3, 4], features={"x": [4, 5, 6, 7], "y": [1, 1, 2, 2]}, indexes=["y"], ) - expected_result = event_set( + + result = evset.lag(2) + + expected = event_set( timestamps=[1 + 2, 2 + 2, 3 + 2, 4 + 2], features={"x": [4, 5, 6, 7], "y": [1, 1, 2, 2]}, indexes=["y"], ) - op = LagOperator(input=input_data.node(), duration=2) - imp = LagNumpyImplementation(op) - testOperatorAndImp(self, op, imp) - filtered_evset = imp.call(input=input_data)["output"] - assertEqualEventSet(self, filtered_evset, expected_result) + + assertOperatorResult(self, result, expected, check_sampling=False) if __name__ == "__main__": diff --git a/temporian/implementation/numpy/operators/test/leak_test.py b/temporian/core/operators/test/test_leak.py similarity index 57% rename from temporian/implementation/numpy/operators/test/leak_test.py rename to temporian/core/operators/test/test_leak.py index 247be6690..6f7e270e7 100644 --- a/temporian/implementation/numpy/operators/test/leak_test.py +++ b/temporian/core/operators/test/test_leak.py @@ -1,48 +1,42 @@ -# Copyright 2021 Google LLC. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from absl.testing import absltest - -from temporian.core.operators.leak import LeakOperator -from temporian.implementation.numpy.operators.leak import ( - LeakNumpyImplementation, -) -from temporian.implementation.numpy.data.io import event_set -from temporian.implementation.numpy.operators.test.utils import ( - assertEqualEventSet, - testOperatorAndImp, -) - - -class LagNumpyImplementationTest(absltest.TestCase): - def test_base(self) -> None: - input_data = event_set( - timestamps=[1, 2, 3, 4], - features={"x": [4, 5, 6, 7], "y": [1, 1, 2, 2]}, - indexes=["y"], - ) - expected_result = event_set( - timestamps=[1 - 2, 2 - 2, 3 - 2, 4 - 2], - features={"x": [4, 5, 6, 7], "y": [1, 1, 2, 2]}, - indexes=["y"], - ) - op = LeakOperator(input=input_data.node(), duration=2) - imp = LeakNumpyImplementation(op) - testOperatorAndImp(self, op, imp) - filtered_evset = imp.call(input=input_data)["output"] - assertEqualEventSet(self, filtered_evset, expected_result) - - -if __name__ == "__main__": - absltest.main() +# Copyright 2021 Google LLC. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from absl.testing import absltest +from absl.testing.parameterized import TestCase + +from temporian.implementation.numpy.data.io import event_set +from temporian.test.utils import assertOperatorResult + + +class LeakTest(TestCase): + def test_basic(self): + evset = event_set( + timestamps=[1, 2, 3, 4], + features={"x": [4, 5, 6, 7], "y": [1, 1, 2, 2]}, + indexes=["y"], + ) + + result = evset.leak(2) + + expected = event_set( + timestamps=[1 - 2, 2 - 2, 3 - 2, 4 - 2], + features={"x": [4, 5, 6, 7], "y": [1, 1, 2, 2]}, + indexes=["y"], + ) + + assertOperatorResult(self, result, expected, check_sampling=False) + + +if __name__ == "__main__": + absltest.main() diff --git a/temporian/core/operators/test/test_prefix.py b/temporian/core/operators/test/test_prefix.py new file mode 100644 index 000000000..ecd444be7 --- /dev/null +++ b/temporian/core/operators/test/test_prefix.py @@ -0,0 +1,51 @@ +# Copyright 2021 Google LLC. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from absl.testing import absltest +from absl.testing.parameterized import TestCase + +from temporian.implementation.numpy.data.io import event_set +from temporian.test.utils import assertOperatorResult + + +class PrefixTest(TestCase): + def test_basic(self): + evset = event_set( + timestamps=[1, 2, 3], + features={ + "a": [1.0, 2.0, 3.0], + "b": [5, 6, 7], + "x": [1, 1, 2], + }, + indexes=["x"], + ) + + result = evset.prefix("hello_") + + expected = event_set( + timestamps=[1, 2, 3], + features={ + "hello_a": [1.0, 2.0, 3.0], + "hello_b": [5, 6, 7], + "x": [1, 1, 2], + }, + indexes=["x"], + same_sampling_as=evset, + ) + + assertOperatorResult(self, result, expected) + + +if __name__ == "__main__": + absltest.main() diff --git a/temporian/core/operators/test/test_resample.py b/temporian/core/operators/test/test_resample.py new file mode 100644 index 000000000..901d4e9ac --- /dev/null +++ b/temporian/core/operators/test/test_resample.py @@ -0,0 +1,60 @@ +# Copyright 2021 Google LLC. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import math + +from absl.testing import absltest +from absl.testing.parameterized import TestCase + +from temporian.implementation.numpy.data.io import event_set +from temporian.test.utils import assertOperatorResult + + +class ResampleTest(TestCase): + def test_basic(self): + evset = event_set( + timestamps=[1, 5, 8, 9, 1, 1], + features={ + "a": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0], + "b": [5, 6, 7, 8, 9, 10], + "c": ["A", "B", "C", "D", "E", "F"], + "x": [1, 1, 1, 1, 2, 2], + }, + indexes=["x"], + ) + sampling = event_set( + timestamps=[-1, 1, 6, 10, 2, 2, 1], + features={"x": [1, 1, 1, 1, 2, 2, 3]}, + indexes=["x"], + ) + + result = evset.resample(sampling) + + expected = event_set( + timestamps=[-1, 1, 6, 10, 2, 2, 1], + features={ + "a": [math.nan, 1.0, 2.0, 4.0, 6.0, 6.0, math.nan], + "b": [0, 5, 6, 8, 10, 10, 0], + "c": ["", "A", "B", "D", "F", "F", ""], + "x": [1, 1, 1, 1, 2, 2, 3], + }, + indexes=["x"], + same_sampling_as=sampling, + ) + + assertOperatorResult(self, result, expected) + + +if __name__ == "__main__": + absltest.main() diff --git a/temporian/core/operators/test/test_until_next.py b/temporian/core/operators/test/test_until_next.py new file mode 100644 index 000000000..a4ccf9ce7 --- /dev/null +++ b/temporian/core/operators/test/test_until_next.py @@ -0,0 +1,72 @@ +# Copyright 2021 Google LLC. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from absl.testing import absltest + +import math + +from temporian.implementation.numpy.data.io import event_set +from temporian.test.utils import assertOperatorResult + + +class UntilNextTest(absltest.TestCase): + def test_with_timeout(self): + a = event_set(timestamps=[0, 10, 11, 20, 30]) + b = event_set(timestamps=[1, 12, 21, 22, 42]) + + result = a.until_next(sampling=b, timeout=5) + + expected = event_set( + timestamps=[1, 12, 12, 21, 35], + features={ + "until_next": [1, 2, 1, 1, math.nan], + }, + ) + + assertOperatorResult(self, result, expected, check_sampling=False) + + def test_no_sampling(self): + a = event_set(timestamps=[0], features={"x": ["a"]}, indexes=["x"]) + b = event_set(timestamps=[0], features={"x": ["b"]}, indexes=["x"]) + result = a.until_next(sampling=b, timeout=5) + + expected = event_set( + timestamps=[5], + features={"x": ["a"], "until_next": [math.nan]}, + indexes=["x"], + ) + + assertOperatorResult(self, result, expected, check_sampling=False) + + def test_timeout_negative(self): + evset = event_set([]) + sampling = event_set([]) + + with self.assertRaisesRegex( + ValueError, "A duration should be a strictly" + ): + evset.until_next(sampling=sampling, timeout=-5) + + def test_timeout_non_finite(self): + evset = event_set([]) + sampling = event_set([]) + + with self.assertRaisesRegex( + ValueError, "A duration should be a strictly" + ): + evset.until_next(sampling=sampling, timeout=math.nan) + + +if __name__ == "__main__": + absltest.main() diff --git a/temporian/implementation/numpy/operators/test/where_test.py b/temporian/core/operators/test/test_where.py similarity index 62% rename from temporian/implementation/numpy/operators/test/where_test.py rename to temporian/core/operators/test/test_where.py index ec569f52a..abbb78e15 100644 --- a/temporian/implementation/numpy/operators/test/where_test.py +++ b/temporian/core/operators/test/test_where.py @@ -12,21 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. - from absl.testing import absltest +from absl.testing.parameterized import TestCase -from temporian.core.operators.where import Where from temporian.implementation.numpy.data.io import event_set -from temporian.implementation.numpy.operators.where import ( - WhereNumpyImplementation, -) -from temporian.implementation.numpy.operators.test.utils import ( - assertEqualEventSet, - testOperatorAndImp, -) +from temporian.test.utils import assertOperatorResult -class WhereOperatorTest(absltest.TestCase): +class WhereTest(TestCase): def setUp(self): self.evset = event_set( timestamps=[1, 2, 3, 4, 5, 6], @@ -36,13 +29,14 @@ def setUp(self): }, indexes=["idx"], ) - self.node = self.evset.node() def test_both_single_values(self): on_true = "hi" on_false = "goodbye" - expected_output = event_set( + result = self.evset.where(on_true=on_true, on_false=on_false) + + expected = event_set( timestamps=[1, 2, 3, 4, 5, 6], features={ "cond": [ @@ -56,15 +50,10 @@ def test_both_single_values(self): "idx": ["A", "A", "A", "B", "B", "B"], }, indexes=["idx"], + same_sampling_as=self.evset, ) - # Run op - op = Where(input=self.node, on_true=on_true, on_false=on_false) - instance = WhereNumpyImplementation(op) - testOperatorAndImp(self, op, instance) - output = instance.call(input=self.evset)["output"] - - assertEqualEventSet(self, output, expected_output) + assertOperatorResult(self, result, expected) def test_both_evsets(self): sources = event_set( @@ -80,8 +69,9 @@ def test_both_evsets(self): on_true = sources["on_true"] on_false = sources["on_false"] - # SetUp() condition: - # [False, True, False, True, False, False] + result = self.evset.where(on_true=on_true, on_false=on_false) + + # SetUp() condition: [False, True, False, True, False, False] expected_output = event_set( timestamps=[1, 2, 3, 4, 5, 6], features={ @@ -89,21 +79,9 @@ def test_both_evsets(self): "idx": ["A", "A", "A", "B", "B", "B"], }, indexes=["idx"], + same_sampling_as=self.evset, ) - - # Run op - op = Where( - input=self.node, - on_true=on_true.node(), - on_false=on_false.node(), - ) - instance = WhereNumpyImplementation(op) - testOperatorAndImp(self, op, instance) - output = instance.call( - input=self.evset, on_true=on_true, on_false=on_false - )["output"] - - assertEqualEventSet(self, output, expected_output) + assertOperatorResult(self, result, expected_output) def test_true_evset_false_single_value(self): on_false = -10 @@ -117,28 +95,20 @@ def test_true_evset_false_single_value(self): same_sampling_as=self.evset, ) - # SetUp() condition: - # [False, True, False, True, False, False] - expected_output = event_set( + result = self.evset.where(on_true=on_true, on_false=on_false) + + # SetUp() condition: [False, True, False, True, False, False] + expected = event_set( timestamps=[1, 2, 3, 4, 5, 6], features={ "cond": [-10, 6, -10, 8, -10, -10], "idx": ["A", "A", "A", "B", "B", "B"], }, indexes=["idx"], + same_sampling_as=self.evset, ) - # Run op - op = Where( - input=self.node, - on_true=on_true.node(), - on_false=on_false, # single value - ) - instance = WhereNumpyImplementation(op) - testOperatorAndImp(self, op, instance) - output = instance.call(input=self.evset, on_true=on_true)["output"] - - assertEqualEventSet(self, output, expected_output) + assertOperatorResult(self, result, expected) def test_true_single_val_false_evset(self): on_true = 10 @@ -152,8 +122,9 @@ def test_true_single_val_false_evset(self): same_sampling_as=self.evset, ) - # SetUp() condition: - # [False, True, False, True, False, False] + result = self.evset.where(on_true=on_true, on_false=on_false) + + # SetUp() condition: [False, True, False, True, False, False] expected_output = event_set( timestamps=[1, 2, 3, 4, 5, 6], features={ @@ -161,27 +132,14 @@ def test_true_single_val_false_evset(self): "idx": ["A", "A", "A", "B", "B", "B"], }, indexes=["idx"], + same_sampling_as=self.evset, ) - # Run op - op = Where( - input=self.node, - on_true=on_true, # single value (10) - on_false=on_false.node(), - ) - instance = WhereNumpyImplementation(op) - testOperatorAndImp(self, op, instance) - output = instance.call(input=self.evset, on_false=on_false)["output"] - - assertEqualEventSet(self, output, expected_output) + assertOperatorResult(self, result, expected_output) def test_dtype_mismatch_single_values(self): with self.assertRaisesRegex(ValueError, "should have the same dtype"): - _ = Where( - input=self.node, - on_true="A string", - on_false=5, # An integer - ) + self.evset.where(on_true="A string", on_false=5) def test_dtype_mismatch_evsets(self): sources = event_set( @@ -198,11 +156,7 @@ def test_dtype_mismatch_evsets(self): on_false = sources["on_false"] # string with self.assertRaisesRegex(ValueError, "should have the same dtype"): - _ = Where( - input=self.node, - on_true=on_true.node(), - on_false=on_false.node(), - ) + self.evset.where(on_true=on_true, on_false=on_false) def test_dtype_mismatch_evset_to_single_value(self): source_evset = event_set( @@ -217,18 +171,11 @@ def test_dtype_mismatch_evset_to_single_value(self): source_str = "A string" with self.assertRaisesRegex(ValueError, "should have the same dtype"): - _ = Where( - input=self.node, - on_true=source_evset.node(), - on_false=source_str, - ) + self.evset.where(on_true=source_evset, on_false=source_str) + # Reverse on_true/on_false order with self.assertRaisesRegex(ValueError, "should have the same dtype"): - _ = Where( - input=self.node, - on_true=source_str, - on_false=source_evset.node(), - ) + self.evset.where(on_true=source_str, on_false=source_evset) def test_non_boolean_input(self): # Non-boolean condition @@ -241,7 +188,7 @@ def test_non_boolean_input(self): with self.assertRaisesRegex( ValueError, "Input should have only 1 boolean feature" ): - _ = Where(input=non_boolean.node(), on_true=1, on_false=0) + non_boolean.where(on_true=1, on_false=0) def test_multiple_feats(self): multi_feats = event_set( @@ -252,31 +199,20 @@ def test_multiple_feats(self): "f2": [1] * 6, }, ) + # Check input with self.assertRaisesRegex( ValueError, "Input should have only 1 boolean feature" ): - _ = Where( - input=multi_feats.node(), - on_true=1, - on_false=0, - ) + multi_feats.where(on_true=1, on_false=0) # Check on_true with self.assertRaisesRegex(ValueError, "should have only 1 feature"): - _ = Where( - input=multi_feats["cond"].node(), # Correct: Single feature - on_true=multi_feats.node(), # Incorrect: multiple features - on_false=0, - ) + multi_feats["cond"].where(on_true=multi_feats, on_false=0) # Check on_false with self.assertRaisesRegex(ValueError, "should have only 1 feature"): - _ = Where( - input=multi_feats["cond"].node(), # Correct: Single feature - on_true=1, - on_false=multi_feats.node(), # Incorrect - ) + multi_feats["cond"].where(on_true=1, on_false=multi_feats) if __name__ == "__main__": diff --git a/temporian/core/operators/test/until_next_test.py b/temporian/core/operators/test/until_next_test.py deleted file mode 100644 index 7120364bb..000000000 --- a/temporian/core/operators/test/until_next_test.py +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright 2021 Google LLC. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from absl.testing import absltest - -import math - -from temporian.core.data.node import input_node -from temporian.core.operators.until_next import until_next - - -class UntilNextOperatorTest(absltest.TestCase): - def setUp(self): - pass - - def test_basic(self): - node = input_node([]) - sampling = input_node([]) - _ = until_next(input=node, sampling=sampling, timeout=5) - - def test_timeout_negative(self): - node = input_node([]) - sampling = input_node([]) - - with self.assertRaisesRegex( - ValueError, "A duration should be a strictly" - ): - _ = until_next(input=node, sampling=sampling, timeout=-5) - - def test_timeout_non_finite(self): - node = input_node([]) - sampling = input_node([]) - - with self.assertRaisesRegex( - ValueError, "A duration should be a strictly" - ): - _ = until_next(input=node, sampling=sampling, timeout=math.nan) - - -if __name__ == "__main__": - absltest.main() diff --git a/temporian/core/test/event_set_ops_test.py b/temporian/core/test/event_set_ops_test.py index 4f44f5b9b..bb1593f73 100644 --- a/temporian/core/test/event_set_ops_test.py +++ b/temporian/core/test/event_set_ops_test.py @@ -83,44 +83,12 @@ def test_fast_fourier_transform(self): ) ) - def test_filter(self): - self.assertTrue( - isinstance(self.evset.filter(self.evset["a"] > 3), EventSet) - ) - self.assertTrue( - isinstance(self.node.filter(self.node["a"] > 3), EventSetNode) - ) - def test_join(self): self.assertTrue(isinstance(self.evset.join(self.other_evset), EventSet)) self.assertTrue( isinstance(self.node.join(self.other_node), EventSetNode) ) - def test_lag(self): - self.assertTrue(isinstance(self.evset.lag(3), EventSet)) - self.assertTrue(isinstance(self.node.lag(3), EventSetNode)) - - def test_leak(self): - self.assertTrue(isinstance(self.evset.leak(3), EventSet)) - self.assertTrue(isinstance(self.node.leak(3), EventSetNode)) - - def test_map(self): - self.assertTrue(isinstance(self.evset.map(lambda x: x), EventSet)) - self.assertTrue(isinstance(self.node.map(lambda x: x), EventSetNode)) - - def test_prefix(self): - self.assertTrue(isinstance(self.evset.prefix("a"), EventSet)) - self.assertTrue(isinstance(self.node.prefix("a"), EventSetNode)) - - def test_resample(self): - self.assertTrue( - isinstance(self.evset.resample(self.other_evset), EventSet) - ) - self.assertTrue( - isinstance(self.node.resample(self.other_node), EventSetNode) - ) - def test_select(self): self.assertTrue(isinstance(self.evset.select("a"), EventSet)) self.assertTrue(isinstance(self.node.select("a"), EventSetNode)) @@ -151,14 +119,6 @@ def test_filter_moving_count(self): isinstance(self.node.filter_moving_count(5), EventSetNode) ) - def test_until_next(self): - self.assertTrue( - isinstance(self.evset.until_next(self.other_evset, 5), EventSet) - ) - self.assertTrue( - isinstance(self.node.until_next(self.other_node, 5), EventSetNode) - ) - if __name__ == "__main__": absltest.main() diff --git a/temporian/implementation/numpy/operators/test/BUILD b/temporian/implementation/numpy/operators/test/BUILD index 1a7c337c2..75ed9b169 100644 --- a/temporian/implementation/numpy/operators/test/BUILD +++ b/temporian/implementation/numpy/operators/test/BUILD @@ -117,34 +117,6 @@ py_test( ], ) -py_test( - name = "filter_test", - srcs = ["filter_test.py"], - srcs_version = "PY3", - deps = [ - ":utils", - # already_there/absl/testing:absltest - "//temporian/core/operators:filter", - "//temporian/implementation/numpy/data:io", - "//temporian/implementation/numpy/operators:filter", - ], -) - -py_test( - name = "glue_test", - srcs = ["glue_test.py"], - srcs_version = "PY3", - deps = [ - ":utils", - # already_there/absl/testing:absltest - "//temporian/core/data:dtype", - "//temporian/core/data:node", - "//temporian/core/operators:glue", - "//temporian/implementation/numpy/data:io", - "//temporian/implementation/numpy/operators:glue", - ], -) - py_test( name = "unary_test", srcs = ["unary_test.py"], @@ -162,74 +134,6 @@ py_test( ], ) -py_test( - name = "lag_test", - srcs = ["lag_test.py"], - srcs_version = "PY3", - deps = [ - ":utils", - # already_there/absl/testing:absltest - "//temporian/core/operators:lag", - "//temporian/implementation/numpy/data:io", - "//temporian/implementation/numpy/operators:lag", - ], -) - -py_test( - name = "leak_test", - srcs = ["leak_test.py"], - srcs_version = "PY3", - deps = [ - # already_there/absl/testing:absltest - ":utils", - "//temporian/core:evaluation", - "//temporian/core/operators:leak", - "//temporian/implementation/numpy:evaluation", - "//temporian/implementation/numpy/data:io", - "//temporian/implementation/numpy/operators:leak", - ], -) - -py_test( - name = "resample_test", - srcs = ["resample_test.py"], - srcs_version = "PY3", - deps = [ - # already_there/absl/testing:absltest - # already_there/pandas - # already_there/numpy - "//temporian/io:pandas", - ":utils", - "//temporian/core/data:dtype", - "//temporian/core/data:node", - "//temporian/core/data:schema", - "//temporian/core/operators:resample", - "//temporian/implementation/numpy:evaluation", - "//temporian/implementation/numpy/data:io", - "//temporian/implementation/numpy/operators:resample", - ], -) - -py_test( - name = "prefix_test", - srcs = ["prefix_test.py"], - srcs_version = "PY3", - deps = [ - # already_there/absl/testing:absltest - # already_there/pandas - # already_there/numpy - "//temporian/io:pandas", - ":utils", - "//temporian/core/data:dtype", - "//temporian/core/data:node", - "//temporian/core/data:schema", - "//temporian/core/operators:prefix", - "//temporian/implementation/numpy:evaluation", - "//temporian/implementation/numpy/data:io", - "//temporian/implementation/numpy/operators:prefix", - ], -) - py_test( name = "unique_timestamps_test", srcs = ["unique_timestamps_test.py"], @@ -425,35 +329,3 @@ py_test( "//temporian/implementation/numpy/operators:tick_calendar", ], ) - -py_test( - name = "until_next_test", - srcs = ["until_next_test.py"], - srcs_version = "PY3", - deps = [ - # already_there/absl/testing:absltest - ":utils", - "//temporian/core/data:dtype", - "//temporian/core/data:node", - "//temporian/core/data:schema", - "//temporian/implementation/numpy/data:io", - "//temporian/core/operators:until_next", - "//temporian/implementation/numpy/operators:until_next", - ], -) - -py_test( - name = "where_test", - srcs = ["where_test.py"], - srcs_version = "PY3", - deps = [ - # already_there/absl/testing:absltest - ":utils", - "//temporian/core/data:dtype", - "//temporian/core/data:node", - "//temporian/core/data:schema", - "//temporian/implementation/numpy/data:io", - "//temporian/core/operators:where", - "//temporian/implementation/numpy/operators:where", - ], -) diff --git a/temporian/implementation/numpy/operators/test/filter_test.py b/temporian/implementation/numpy/operators/test/filter_test.py deleted file mode 100644 index 0364e996e..000000000 --- a/temporian/implementation/numpy/operators/test/filter_test.py +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright 2021 Google LLC. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from absl.testing import absltest - -from temporian.core.operators.filter import FilterOperator -from temporian.implementation.numpy.operators.filter import ( - FilterNumpyImplementation, -) -from temporian.implementation.numpy.data.io import event_set -from temporian.implementation.numpy.operators.test.utils import ( - assertEqualEventSet, - testOperatorAndImp, -) - - -class FilterOperatorTest(absltest.TestCase): - """Filter operator test.""" - - def test_base(self) -> None: - input_data = event_set( - timestamps=[1, 2, 3], features={"x": [4, 5, 6], "y": [7, 8, 9]} - ) - input_condition = event_set( - timestamps=[1, 2, 3], - features={"c": [True, True, False]}, - same_sampling_as=input_data, - ) - expected_result = event_set( - timestamps=[1, 2], features={"x": [4, 5], "y": [7, 8]} - ) - operator = FilterOperator( - input=input_data.node(), condition=input_condition.node() - ) - impl = FilterNumpyImplementation(operator) - testOperatorAndImp(self, operator, impl) - filtered_evset = impl.call(input=input_data, condition=input_condition)[ - "output" - ] - assertEqualEventSet(self, filtered_evset, expected_result) - - def test_index(self) -> None: - input_data = event_set( - timestamps=[1, 2, 3, 4], - features={"x": [4, 5, 6, 7], "y": [1, 1, 2, 2]}, - indexes=["y"], - ) - input_condition = event_set( - timestamps=[1, 2, 3, 4], - features={"c": [True, True, True, False], "y": [1, 1, 2, 2]}, - indexes=["y"], - same_sampling_as=input_data, - ) - expected_result = event_set( - timestamps=[1, 2, 3], - features={"x": [4, 5, 6], "y": [1, 1, 2]}, - indexes=["y"], - ) - operator = FilterOperator( - input=input_data.node(), condition=input_condition.node() - ) - impl = FilterNumpyImplementation(operator) - testOperatorAndImp(self, operator, impl) - filtered_evset = impl.call(input=input_data, condition=input_condition)[ - "output" - ] - assertEqualEventSet(self, filtered_evset, expected_result) - - -if __name__ == "__main__": - absltest.main() diff --git a/temporian/implementation/numpy/operators/test/glue_test.py b/temporian/implementation/numpy/operators/test/glue_test.py deleted file mode 100644 index 3b87f89a1..000000000 --- a/temporian/implementation/numpy/operators/test/glue_test.py +++ /dev/null @@ -1,171 +0,0 @@ -# Copyright 2021 Google LLC. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from absl.testing import absltest -import numpy as np - -from temporian.core.operators.glue import GlueOperator, glue -from temporian.core.data.node import input_node -from temporian.core.data.dtype import DType -from temporian.implementation.numpy.operators.glue import ( - GlueNumpyImplementation, -) -from temporian.implementation.numpy.data.io import event_set -from temporian.implementation.numpy.operators.test.utils import ( - assertEqualEventSet, - testOperatorAndImp, -) - - -class GlueNumpyImplementationTest(absltest.TestCase): - """Test numpy implementation of glue operator.""" - - def setUp(self) -> None: - pass - - def test_manual_nodes(self): - evset_1 = event_set( - timestamps=[1, 1, 2, 3, 4], - features={ - "user_id": ["user_1", "user_1", "user_1", "user_1", "user_2"], - "feature_1": [10, 11, 12, 13, 14], - }, - indexes=["user_id"], - ) - - evset_2 = event_set( - timestamps=[1, 1, 2, 3, 4], - features={ - "user_id": ["user_1", "user_1", "user_1", "user_1", "user_2"], - "feature_2": [20, 21, 22, 23, 24], - "feature_3": [30, 31, 32, 33, 34], - }, - indexes=["user_id"], - same_sampling_as=evset_1, - ) - - evset_3 = event_set( - timestamps=[1, 1, 2, 3, 4], - features={ - "user_id": ["user_1", "user_1", "user_1", "user_1", "user_2"], - "feature_4": [40, 41, 42, 43, 44], - }, - indexes=["user_id"], - same_sampling_as=evset_1, - ) - - expected_evset = event_set( - timestamps=[1, 1, 2, 3, 4], - features={ - "user_id": ["user_1", "user_1", "user_1", "user_1", "user_2"], - "feature_1": [10, 11, 12, 13, 14], - "feature_2": [20, 21, 22, 23, 24], - "feature_3": [30, 31, 32, 33, 34], - "feature_4": [40, 41, 42, 43, 44], - }, - indexes=["user_id"], - ) - - operator = GlueOperator( - input_0=evset_1.node(), - input_1=evset_2.node(), - input_2=evset_3.node(), - ) - operator.outputs["output"].check_same_sampling(evset_1.node()) - operator.outputs["output"].check_same_sampling(evset_2.node()) - operator.outputs["output"].check_same_sampling(evset_3.node()) - - implementation = GlueNumpyImplementation(operator=operator) - testOperatorAndImp(self, operator, implementation) - output = implementation.call( - input_0=evset_1, input_1=evset_2, input_2=evset_3 - )["output"] - assertEqualEventSet(self, output, expected_evset) - - def test_non_matching_sampling(self): - with self.assertRaisesRegex( - ValueError, - "Arguments should have the same sampling.", - ): - n1 = input_node( - features=[("a", DType.FLOAT64)], indexes=[("x", DType.STRING)] - ) - n2 = input_node( - features=[("b", DType.FLOAT64)], indexes=[("x", DType.STRING)] - ) - _ = GlueOperator(input_0=n1, input_1=n2) - - def test_duplicate_feature(self): - with self.assertRaisesRegex( - ValueError, - 'Feature "a" is defined in multiple input EventSetNodes', - ): - n1 = input_node( - features=[("a", DType.FLOAT64)], indexes=[("x", DType.STRING)] - ) - n2 = input_node( - features=[("a", DType.FLOAT64)], same_sampling_as=n1 - ) - _ = GlueOperator(input_0=n1, input_1=n2) - - def test_order_unchanged(self): - """Tests that input evsets' order is kept. - - Regression test for failing case where glue misordered its inputs when - more than 10, because of sorted() being called over a list where - "input_10" was interpreted as less than "input_2". - """ - evset_0 = event_set( - timestamps=[1], - features={ - "f0": np.asarray([1], dtype=np.int64), - }, - ) - evset_1 = evset_0.rename("f1") - evset_2 = evset_0.rename("f2") - evset_3 = evset_0.rename("f3") - evset_4 = evset_0.rename("f4") - evset_5 = evset_0.rename("f5") - evset_6 = evset_0.rename("f6") - evset_7 = evset_0.rename("f7") - evset_8 = evset_0.rename("f8") - evset_9 = evset_0.rename( - "a" - ) # Test that alphabetical order is not used. - - evset_10 = event_set( - timestamps=[1], - features={ - "f10": np.asarray([1], dtype=np.int32), - }, - same_sampling_as=evset_0, - ) - - glue( - evset_0, - evset_1, - evset_2, - evset_3, - evset_4, - evset_5, - evset_6, - evset_7, - evset_8, - evset_9, - evset_10, - ) - - -if __name__ == "__main__": - absltest.main() diff --git a/temporian/implementation/numpy/operators/test/prefix_test.py b/temporian/implementation/numpy/operators/test/prefix_test.py deleted file mode 100644 index 8af44e762..000000000 --- a/temporian/implementation/numpy/operators/test/prefix_test.py +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright 2021 Google LLC. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import pandas as pd -from absl.testing import absltest - -from temporian.core.operators.prefix import Prefix -from temporian.implementation.numpy.operators.prefix import ( - PrefixNumpyImplementation, -) - -from temporian.io.pandas import from_pandas -from temporian.implementation.numpy.operators.test.utils import ( - assertEqualEventSet, - testOperatorAndImp, -) - - -class PrefixOperatorTest(absltest.TestCase): - def test_base(self): - evset = from_pandas( - pd.DataFrame( - { - "timestamp": [1, 2, 3], - "a": [1.0, 2.0, 3.0], - "b": [5, 6, 7], - "x": [1, 1, 2], - } - ), - indexes=["x"], - ) - node = evset.node() - - expected_output = from_pandas( - pd.DataFrame( - { - "timestamp": [1, 2, 3], - "hello_a": [1.0, 2.0, 3.0], - "hello_b": [5, 6, 7], - "x": [1, 1, 2], - } - ), - indexes=["x"], - ) - - # Run op - op = Prefix(node, "hello_") - op.outputs["output"].check_same_sampling(node) - - instance = PrefixNumpyImplementation(op) - testOperatorAndImp(self, op, instance) - output = instance.call(input=evset)["output"] - assertEqualEventSet(self, output, expected_output) - - -if __name__ == "__main__": - absltest.main() diff --git a/temporian/implementation/numpy/operators/test/resample_test.py b/temporian/implementation/numpy/operators/test/resample_test.py deleted file mode 100644 index 17b9b2bb8..000000000 --- a/temporian/implementation/numpy/operators/test/resample_test.py +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright 2021 Google LLC. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import math -from absl.testing import absltest - -import pandas as pd - -from temporian.core.operators.resample import Resample -from temporian.implementation.numpy.operators.resample import ( - ResampleNumpyImplementation, -) -from temporian.io.pandas import from_pandas - - -class ResampleOperatorTest(absltest.TestCase): - def setUp(self): - pass - - def test_base(self): - evset = from_pandas( - pd.DataFrame( - { - "timestamp": [1, 5, 8, 9, 1, 1], - "a": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0], - "b": [5, 6, 7, 8, 9, 10], - "c": ["A", "B", "C", "D", "E", "F"], - "x": [1, 1, 1, 1, 2, 2], - } - ), - indexes=["x"], - ) - - sampling_evset = from_pandas( - pd.DataFrame( - { - "timestamp": [-1, 1, 6, 10, 2, 2, 1], - "x": [1, 1, 1, 1, 2, 2, 3], - } - ), - indexes=["x"], - ) - - expected_output = from_pandas( - pd.DataFrame( - { - "timestamp": [-1, 1, 6, 10, 2, 2, 1], - "a": [math.nan, 1.0, 2.0, 4.0, 6.0, 6.0, math.nan], - "b": [0, 5, 6, 8, 10, 10, 0], - "c": ["", "A", "B", "D", "F", "F", ""], - "x": [1, 1, 1, 1, 2, 2, 3], - } - ), - indexes=["x"], - ) - - # Run op - op = Resample(input=evset.node(), sampling=sampling_evset.node()) - op.outputs["output"].check_same_sampling(sampling_evset.node()) - instance = ResampleNumpyImplementation(op) - output = instance.call(input=evset, sampling=sampling_evset)["output"] - - print("output:\n", output) - print("expected_output:\n", expected_output) - - self.assertEqual(output, expected_output) - - -if __name__ == "__main__": - absltest.main() diff --git a/temporian/implementation/numpy/operators/test/until_next_test.py b/temporian/implementation/numpy/operators/test/until_next_test.py deleted file mode 100644 index 65a635a45..000000000 --- a/temporian/implementation/numpy/operators/test/until_next_test.py +++ /dev/null @@ -1,83 +0,0 @@ -# Copyright 2021 Google LLC. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from absl.testing import absltest - -import math - -import numpy as np -from temporian.core.operators.until_next import UntilNext -from temporian.implementation.numpy.data.io import event_set -from temporian.implementation.numpy.operators.until_next import ( - UntilNextNumpyImplementation, -) -from temporian.implementation.numpy.operators.test.utils import ( - assertEqualEventSet, - testOperatorAndImp, -) - - -class UntilNextOperatorTest(absltest.TestCase): - def setUp(self): - pass - - def test_with_timeout(self): - a = event_set(timestamps=[0, 10, 11, 20, 30]) - b = event_set(timestamps=[1, 12, 21, 22, 42]) - - expected_output = event_set( - timestamps=[1, 12, 12, 21, 35], - features={ - "until_next": [1, 2, 1, 1, math.nan], - }, - ) - - # Run op - op = UntilNext(input=a.node(), sampling=b.node(), timeout=5) - instance = UntilNextNumpyImplementation(op) - testOperatorAndImp(self, op, instance) - output = instance.call(input=a, sampling=b)["output"] - - assertEqualEventSet(self, output, expected_output) - - def test_no_sampling(self): - a = event_set( - timestamps=[0], - features={"x": ["a"]}, - indexes=["x"], - ) - b = event_set( - timestamps=[0], - features={"x": ["b"]}, - indexes=["x"], - ) - - expected_output = event_set( - timestamps=[5], - features={"x": ["a"], "until_next": [math.nan]}, - indexes=["x"], - ) - - # Run op - op = UntilNext(input=a.node(), sampling=b.node(), timeout=5) - instance = UntilNextNumpyImplementation(op) - testOperatorAndImp(self, op, instance) - output = instance.call(input=a, sampling=b)["output"] - - assertEqualEventSet(self, output, expected_output) - - -if __name__ == "__main__": - absltest.main()