From 514156b170ff355b9e8b2c231ee28cd2f1893d1b Mon Sep 17 00:00:00 2001 From: dvp Date: Sun, 12 Mar 2023 13:24:29 +0300 Subject: [PATCH 01/32] build: poetry update --- poetry.lock | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/poetry.lock b/poetry.lock index b03db0b..47c0e2b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -108,25 +108,26 @@ pytz = {version = ">=2015.7", markers = "python_version < \"3.9\""} [[package]] name = "bandit" -version = "1.7.4" +version = "1.7.5" description = "Security oriented static analyser for python code." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "bandit-1.7.4-py3-none-any.whl", hash = "sha256:412d3f259dab4077d0e7f0c11f50f650cc7d10db905d98f6520a95a18049658a"}, - {file = "bandit-1.7.4.tar.gz", hash = "sha256:2d63a8c573417bae338962d4b9b06fbc6080f74ecd955a092849e1e65c717bd2"}, + {file = "bandit-1.7.5-py3-none-any.whl", hash = "sha256:75665181dc1e0096369112541a056c59d1c5f66f9bb74a8d686c3c362b83f549"}, + {file = "bandit-1.7.5.tar.gz", hash = "sha256:bdfc739baa03b880c2d15d0431b31c658ffc348e907fe197e54e0389dd59e11e"}, ] [package.dependencies] colorama = {version = ">=0.3.9", markers = "platform_system == \"Windows\""} GitPython = ">=1.0.1" PyYAML = ">=5.3.1" +rich = "*" stevedore = ">=1.20.0" [package.extras] -test = ["beautifulsoup4 (>=4.8.0)", "coverage (>=4.5.4)", "fixtures (>=3.0.0)", "flake8 (>=4.0.0)", "pylint (==1.9.4)", "stestr (>=2.5.0)", "testscenarios (>=0.5.0)", "testtools (>=2.3.0)", "toml"] -toml = ["toml"] +test = ["beautifulsoup4 (>=4.8.0)", "coverage (>=4.5.4)", "fixtures (>=3.0.0)", "flake8 (>=4.0.0)", "pylint (==1.9.4)", "stestr (>=2.5.0)", "testscenarios (>=0.5.0)", "testtools (>=2.3.0)", "tomli (>=1.1.0)"] +toml = ["tomli (>=1.1.0)"] yaml = ["PyYAML"] [[package]] @@ -1053,14 +1054,14 @@ numpy = ">=1.14.5" [[package]] name = "identify" -version = "2.5.19" +version = "2.5.20" description = "File identification library for Python" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "identify-2.5.19-py2.py3-none-any.whl", hash = "sha256:3ee3533e7f6f5023157fbebbd5687bb4b698ce6f305259e0d24b2d7d9efb72bc"}, - {file = "identify-2.5.19.tar.gz", hash = "sha256:4102ecd051f6884449e7359e55b38ba6cd7aafb6ef27b8e2b38495a5723ea106"}, + {file = "identify-2.5.20-py2.py3-none-any.whl", hash = "sha256:5dfef8a745ca4f2c95f27e9db74cb4c8b6d9916383988e8791f3595868f78a33"}, + {file = "identify-2.5.20.tar.gz", hash = "sha256:c8b288552bc5f05a08aff09af2f58e6976bf8ac87beb38498a0e3d98ba64eb18"}, ] [package.extras] @@ -1545,14 +1546,14 @@ files = [ [[package]] name = "openpyxl" -version = "3.1.1" +version = "3.1.2" description = "A Python library to read/write Excel 2010 xlsx/xlsm files" category = "main" optional = false python-versions = ">=3.6" files = [ - {file = "openpyxl-3.1.1-py2.py3-none-any.whl", hash = "sha256:a0266e033e65f33ee697254b66116a5793c15fc92daf64711080000df4cfe0a8"}, - {file = "openpyxl-3.1.1.tar.gz", hash = "sha256:f06d44e2c973781068bce5ecf860a09bcdb1c7f5ce1facd5e9aa82c92c93ae72"}, + {file = "openpyxl-3.1.2-py2.py3-none-any.whl", hash = "sha256:f91456ead12ab3c6c2e9491cf33ba6d08357d802192379bb482f1033ade496f5"}, + {file = "openpyxl-3.1.2.tar.gz", hash = "sha256:a6f5977418eff3b2d5500d54d9db50c8277a368436f4e4f8ddb1be3422870184"}, ] [package.dependencies] @@ -1733,14 +1734,14 @@ flake8 = ">=5.0.0" [[package]] name = "platformdirs" -version = "3.1.0" +version = "3.1.1" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "platformdirs-3.1.0-py3-none-any.whl", hash = "sha256:13b08a53ed71021350c9e300d4ea8668438fb0046ab3937ac9a29913a1a1350a"}, - {file = "platformdirs-3.1.0.tar.gz", hash = "sha256:accc3665857288317f32c7bebb5a8e482ba717b474f3fc1d18ca7f9214be0cef"}, + {file = "platformdirs-3.1.1-py3-none-any.whl", hash = "sha256:e5986afb596e4bb5bde29a79ac9061aa955b94fca2399b7aaac4090860920dd8"}, + {file = "platformdirs-3.1.1.tar.gz", hash = "sha256:024996549ee88ec1a9aa99ff7f8fc819bb59e2c3477b410d90a16d32d6e707aa"}, ] [package.extras] @@ -2294,8 +2295,6 @@ files = [ {file = "ruamel.yaml.clib-0.2.7-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:045e0626baf1c52e5527bd5db361bc83180faaba2ff586e763d3d5982a876a9e"}, {file = "ruamel.yaml.clib-0.2.7-cp311-cp311-macosx_12_6_arm64.whl", hash = "sha256:721bc4ba4525f53f6a611ec0967bdcee61b31df5a56801281027a3a6d1c2daf5"}, {file = "ruamel.yaml.clib-0.2.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:41d0f1fa4c6830176eef5b276af04c89320ea616655d01327d5ce65e50575c94"}, - {file = "ruamel.yaml.clib-0.2.7-cp311-cp311-win32.whl", hash = "sha256:f6d3d39611ac2e4f62c3128a9eed45f19a6608670c5a2f4f07f24e8de3441d38"}, - {file = "ruamel.yaml.clib-0.2.7-cp311-cp311-win_amd64.whl", hash = "sha256:da538167284de58a52109a9b89b8f6a53ff8437dd6dc26d33b57bf6699153122"}, {file = "ruamel.yaml.clib-0.2.7-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:4b3a93bb9bc662fc1f99c5c3ea8e623d8b23ad22f861eb6fce9377ac07ad6072"}, {file = "ruamel.yaml.clib-0.2.7-cp36-cp36m-macosx_12_0_arm64.whl", hash = "sha256:a234a20ae07e8469da311e182e70ef6b199d0fbeb6c6cc2901204dd87fb867e8"}, {file = "ruamel.yaml.clib-0.2.7-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:15910ef4f3e537eea7fe45f8a5d19997479940d9196f357152a09031c5be59f3"}, @@ -2781,14 +2780,14 @@ typing-extensions = ">=3.7.4" [[package]] name = "urllib3" -version = "1.26.14" +version = "1.26.15" description = "HTTP library with thread-safe connection pooling, file post, and more." category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" files = [ - {file = "urllib3-1.26.14-py2.py3-none-any.whl", hash = "sha256:75edcdc2f7d85b137124a6c3c9fc3933cdeaa12ecb9a6a959f22797a0feca7e1"}, - {file = "urllib3-1.26.14.tar.gz", hash = "sha256:076907bf8fd355cde77728471316625a4d2f7e713c125f51953bb5b3eecf4f72"}, + {file = "urllib3-1.26.15-py2.py3-none-any.whl", hash = "sha256:aa751d169e23c7479ce47a0cb0da579e3ede798f994f5816a74e4f4500dcea42"}, + {file = "urllib3-1.26.15.tar.gz", hash = "sha256:8a388717b9476f934a21484e8c8e61875ab60644d29b9b39e11e4b9dc1c6b305"}, ] [package.extras] From 457e527892dea47fcdaed12032fdbc44b03f1e67 Mon Sep 17 00:00:00 2001 From: dvp Date: Sun, 12 Mar 2023 13:44:51 +0300 Subject: [PATCH 02/32] build: fix reset-pyenv script poetry doesn't see pyenv virtual environment which was just created in the same script. We have to activate the environment before running poetry. --- tools/reset-pyenv | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/reset-pyenv b/tools/reset-pyenv index 0a8e3ba..39c91fc 100755 --- a/tools/reset-pyenv +++ b/tools/reset-pyenv @@ -4,16 +4,18 @@ env="xpypact" pkg="${env//-/_}" +last_python="3.11.2" eval "$(pyenv init -)" -pyenv local "$env" "3.10.10" "3.9.16" "3.8.16" +pyenv local "$last_python" pyenv virtualenv-delete -f "$env" -pyenv virtualenv "3.11.2" "$env" +pyenv virtualenv "$last_python" "$env" pyenv rehash pyenv shell "$env" poetry env info poetry install pyenv shell --unset +pyenv local "$env" "3.10.10" "3.9.16" "3.8.16" pyenv rehash python -c "import ${pkg}; print(${pkg}.__version__)" From 84fbbd36d24c2410e91b94599dc31b629b25c94e Mon Sep 17 00:00:00 2001 From: dvp Date: Sun, 12 Mar 2023 13:45:53 +0300 Subject: [PATCH 03/32] bump: version xpypact 0.1.12a0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c127f76..4997745 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "xpypact" -version = "0.1.11" +version = "0.1.12a0" description = "\"Python tools to work with elements and isotopes\"" authors = ["dvp "] license = "MIT" From 9c0616b31ec5a68fe058ec503f35c99ae26a6010 Mon Sep 17 00:00:00 2001 From: dvp Date: Thu, 16 Mar 2023 20:44:29 +0300 Subject: [PATCH 04/32] dependencies: poetry update --- poetry.lock | 162 +++++++++++++++++++++++++++------------------------- 1 file changed, 83 insertions(+), 79 deletions(-) diff --git a/poetry.lock b/poetry.lock index 47c0e2b..2e0435d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -351,63 +351,63 @@ test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] [[package]] name = "coverage" -version = "7.2.1" +version = "7.2.2" description = "Code coverage measurement for Python" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "coverage-7.2.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:49567ec91fc5e0b15356da07a2feabb421d62f52a9fff4b1ec40e9e19772f5f8"}, - {file = "coverage-7.2.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d2ef6cae70168815ed91388948b5f4fcc69681480a0061114db737f957719f03"}, - {file = "coverage-7.2.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3004765bca3acd9e015794e5c2f0c9a05587f5e698127ff95e9cfba0d3f29339"}, - {file = "coverage-7.2.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cca7c0b7f5881dfe0291ef09ba7bb1582cb92ab0aeffd8afb00c700bf692415a"}, - {file = "coverage-7.2.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b2167d116309f564af56f9aa5e75ef710ef871c5f9b313a83050035097b56820"}, - {file = "coverage-7.2.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:cb5f152fb14857cbe7f3e8c9a5d98979c4c66319a33cad6e617f0067c9accdc4"}, - {file = "coverage-7.2.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:87dc37f16fb5e3a28429e094145bf7c1753e32bb50f662722e378c5851f7fdc6"}, - {file = "coverage-7.2.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:e191a63a05851f8bce77bc875e75457f9b01d42843f8bd7feed2fc26bbe60833"}, - {file = "coverage-7.2.1-cp310-cp310-win32.whl", hash = "sha256:e3ea04b23b114572b98a88c85379e9e9ae031272ba1fb9b532aa934c621626d4"}, - {file = "coverage-7.2.1-cp310-cp310-win_amd64.whl", hash = "sha256:0cf557827be7eca1c38a2480484d706693e7bb1929e129785fe59ec155a59de6"}, - {file = "coverage-7.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:570c21a29493b350f591a4b04c158ce1601e8d18bdcd21db136fbb135d75efa6"}, - {file = "coverage-7.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9e872b082b32065ac2834149dc0adc2a2e6d8203080501e1e3c3c77851b466f9"}, - {file = "coverage-7.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fac6343bae03b176e9b58104a9810df3cdccd5cfed19f99adfa807ffbf43cf9b"}, - {file = "coverage-7.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:abacd0a738e71b20e224861bc87e819ef46fedba2fb01bc1af83dfd122e9c319"}, - {file = "coverage-7.2.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d9256d4c60c4bbfec92721b51579c50f9e5062c21c12bec56b55292464873508"}, - {file = "coverage-7.2.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:80559eaf6c15ce3da10edb7977a1548b393db36cbc6cf417633eca05d84dd1ed"}, - {file = "coverage-7.2.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:0bd7e628f6c3ec4e7d2d24ec0e50aae4e5ae95ea644e849d92ae4805650b4c4e"}, - {file = "coverage-7.2.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:09643fb0df8e29f7417adc3f40aaf379d071ee8f0350ab290517c7004f05360b"}, - {file = "coverage-7.2.1-cp311-cp311-win32.whl", hash = "sha256:1b7fb13850ecb29b62a447ac3516c777b0e7a09ecb0f4bb6718a8654c87dfc80"}, - {file = "coverage-7.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:617a94ada56bbfe547aa8d1b1a2b8299e2ec1ba14aac1d4b26a9f7d6158e1273"}, - {file = "coverage-7.2.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8649371570551d2fd7dee22cfbf0b61f1747cdfb2b7587bb551e4beaaa44cb97"}, - {file = "coverage-7.2.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d2b9b5e70a21474c105a133ba227c61bc95f2ac3b66861143ce39a5ea4b3f84"}, - {file = "coverage-7.2.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ae82c988954722fa07ec5045c57b6d55bc1a0890defb57cf4a712ced65b26ddd"}, - {file = "coverage-7.2.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:861cc85dfbf55a7a768443d90a07e0ac5207704a9f97a8eb753292a7fcbdfcfc"}, - {file = "coverage-7.2.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:0339dc3237c0d31c3b574f19c57985fcbe494280153bbcad33f2cdf469f4ac3e"}, - {file = "coverage-7.2.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:5928b85416a388dd557ddc006425b0c37e8468bd1c3dc118c1a3de42f59e2a54"}, - {file = "coverage-7.2.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8d3843ca645f62c426c3d272902b9de90558e9886f15ddf5efe757b12dd376f5"}, - {file = "coverage-7.2.1-cp37-cp37m-win32.whl", hash = "sha256:6a034480e9ebd4e83d1aa0453fd78986414b5d237aea89a8fdc35d330aa13bae"}, - {file = "coverage-7.2.1-cp37-cp37m-win_amd64.whl", hash = "sha256:6fce673f79a0e017a4dc35e18dc7bb90bf6d307c67a11ad5e61ca8d42b87cbff"}, - {file = "coverage-7.2.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:7f099da6958ddfa2ed84bddea7515cb248583292e16bb9231d151cd528eab657"}, - {file = "coverage-7.2.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:97a3189e019d27e914ecf5c5247ea9f13261d22c3bb0cfcfd2a9b179bb36f8b1"}, - {file = "coverage-7.2.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a81dbcf6c6c877986083d00b834ac1e84b375220207a059ad45d12f6e518a4e3"}, - {file = "coverage-7.2.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:78d2c3dde4c0b9be4b02067185136b7ee4681978228ad5ec1278fa74f5ca3e99"}, - {file = "coverage-7.2.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3a209d512d157379cc9ab697cbdbb4cfd18daa3e7eebaa84c3d20b6af0037384"}, - {file = "coverage-7.2.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:f3d07edb912a978915576a776756069dede66d012baa503022d3a0adba1b6afa"}, - {file = "coverage-7.2.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:8dca3c1706670297851bca1acff9618455122246bdae623be31eca744ade05ec"}, - {file = "coverage-7.2.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b1991a6d64231a3e5bbe3099fb0dd7c9aeaa4275ad0e0aeff4cb9ef885c62ba2"}, - {file = "coverage-7.2.1-cp38-cp38-win32.whl", hash = "sha256:22c308bc508372576ffa3d2dbc4824bb70d28eeb4fcd79d4d1aed663a06630d0"}, - {file = "coverage-7.2.1-cp38-cp38-win_amd64.whl", hash = "sha256:b0c0d46de5dd97f6c2d1b560bf0fcf0215658097b604f1840365296302a9d1fb"}, - {file = "coverage-7.2.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4dd34a935de268a133e4741827ae951283a28c0125ddcdbcbba41c4b98f2dfef"}, - {file = "coverage-7.2.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0f8318ed0f3c376cfad8d3520f496946977abde080439d6689d7799791457454"}, - {file = "coverage-7.2.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:834c2172edff5a08d78e2f53cf5e7164aacabeb66b369f76e7bb367ca4e2d993"}, - {file = "coverage-7.2.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e4d70c853f0546855f027890b77854508bdb4d6a81242a9d804482e667fff6e6"}, - {file = "coverage-7.2.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8a6450da4c7afc4534305b2b7d8650131e130610cea448ff240b6ab73d7eab63"}, - {file = "coverage-7.2.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:99f4dd81b2bb8fc67c3da68b1f5ee1650aca06faa585cbc6818dbf67893c6d58"}, - {file = "coverage-7.2.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:bdd3f2f285ddcf2e75174248b2406189261a79e7fedee2ceeadc76219b6faa0e"}, - {file = "coverage-7.2.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f29351393eb05e6326f044a7b45ed8e38cb4dcc38570d12791f271399dc41431"}, - {file = "coverage-7.2.1-cp39-cp39-win32.whl", hash = "sha256:e2b50ebc2b6121edf352336d503357321b9d8738bb7a72d06fc56153fd3f4cd8"}, - {file = "coverage-7.2.1-cp39-cp39-win_amd64.whl", hash = "sha256:bd5a12239c0006252244f94863f1c518ac256160cd316ea5c47fb1a11b25889a"}, - {file = "coverage-7.2.1-pp37.pp38.pp39-none-any.whl", hash = "sha256:436313d129db7cf5b4ac355dd2bd3f7c7e5294af077b090b85de75f8458b8616"}, - {file = "coverage-7.2.1.tar.gz", hash = "sha256:c77f2a9093ccf329dd523a9b2b3c854c20d2a3d968b6def3b820272ca6732242"}, + {file = "coverage-7.2.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c90e73bdecb7b0d1cea65a08cb41e9d672ac6d7995603d6465ed4914b98b9ad7"}, + {file = "coverage-7.2.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e2926b8abedf750c2ecf5035c07515770944acf02e1c46ab08f6348d24c5f94d"}, + {file = "coverage-7.2.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:57b77b9099f172804e695a40ebaa374f79e4fb8b92f3e167f66facbf92e8e7f5"}, + {file = "coverage-7.2.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:efe1c0adad110bf0ad7fb59f833880e489a61e39d699d37249bdf42f80590169"}, + {file = "coverage-7.2.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2199988e0bc8325d941b209f4fd1c6fa007024b1442c5576f1a32ca2e48941e6"}, + {file = "coverage-7.2.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:81f63e0fb74effd5be736cfe07d710307cc0a3ccb8f4741f7f053c057615a137"}, + {file = "coverage-7.2.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:186e0fc9cf497365036d51d4d2ab76113fb74f729bd25da0975daab2e107fd90"}, + {file = "coverage-7.2.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:420f94a35e3e00a2b43ad5740f935358e24478354ce41c99407cddd283be00d2"}, + {file = "coverage-7.2.2-cp310-cp310-win32.whl", hash = "sha256:38004671848b5745bb05d4d621526fca30cee164db42a1f185615f39dc997292"}, + {file = "coverage-7.2.2-cp310-cp310-win_amd64.whl", hash = "sha256:0ce383d5f56d0729d2dd40e53fe3afeb8f2237244b0975e1427bfb2cf0d32bab"}, + {file = "coverage-7.2.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3eb55b7b26389dd4f8ae911ba9bc8c027411163839dea4c8b8be54c4ee9ae10b"}, + {file = "coverage-7.2.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d2b96123a453a2d7f3995ddb9f28d01fd112319a7a4d5ca99796a7ff43f02af5"}, + {file = "coverage-7.2.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:299bc75cb2a41e6741b5e470b8c9fb78d931edbd0cd009c58e5c84de57c06731"}, + {file = "coverage-7.2.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5e1df45c23d4230e3d56d04414f9057eba501f78db60d4eeecfcb940501b08fd"}, + {file = "coverage-7.2.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:006ed5582e9cbc8115d2e22d6d2144a0725db542f654d9d4fda86793832f873d"}, + {file = "coverage-7.2.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d683d230b5774816e7d784d7ed8444f2a40e7a450e5720d58af593cb0b94a212"}, + {file = "coverage-7.2.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:8efb48fa743d1c1a65ee8787b5b552681610f06c40a40b7ef94a5b517d885c54"}, + {file = "coverage-7.2.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:4c752d5264053a7cf2fe81c9e14f8a4fb261370a7bb344c2a011836a96fb3f57"}, + {file = "coverage-7.2.2-cp311-cp311-win32.whl", hash = "sha256:55272f33da9a5d7cccd3774aeca7a01e500a614eaea2a77091e9be000ecd401d"}, + {file = "coverage-7.2.2-cp311-cp311-win_amd64.whl", hash = "sha256:92ebc1619650409da324d001b3a36f14f63644c7f0a588e331f3b0f67491f512"}, + {file = "coverage-7.2.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5afdad4cc4cc199fdf3e18088812edcf8f4c5a3c8e6cb69127513ad4cb7471a9"}, + {file = "coverage-7.2.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0484d9dd1e6f481b24070c87561c8d7151bdd8b044c93ac99faafd01f695c78e"}, + {file = "coverage-7.2.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d530191aa9c66ab4f190be8ac8cc7cfd8f4f3217da379606f3dd4e3d83feba69"}, + {file = "coverage-7.2.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4ac0f522c3b6109c4b764ffec71bf04ebc0523e926ca7cbe6c5ac88f84faced0"}, + {file = "coverage-7.2.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:ba279aae162b20444881fc3ed4e4f934c1cf8620f3dab3b531480cf602c76b7f"}, + {file = "coverage-7.2.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:53d0fd4c17175aded9c633e319360d41a1f3c6e352ba94edcb0fa5167e2bad67"}, + {file = "coverage-7.2.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8c99cb7c26a3039a8a4ee3ca1efdde471e61b4837108847fb7d5be7789ed8fd9"}, + {file = "coverage-7.2.2-cp37-cp37m-win32.whl", hash = "sha256:5cc0783844c84af2522e3a99b9b761a979a3ef10fb87fc4048d1ee174e18a7d8"}, + {file = "coverage-7.2.2-cp37-cp37m-win_amd64.whl", hash = "sha256:817295f06eacdc8623dc4df7d8b49cea65925030d4e1e2a7c7218380c0072c25"}, + {file = "coverage-7.2.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6146910231ece63facfc5984234ad1b06a36cecc9fd0c028e59ac7c9b18c38c6"}, + {file = "coverage-7.2.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:387fb46cb8e53ba7304d80aadca5dca84a2fbf6fe3faf6951d8cf2d46485d1e5"}, + {file = "coverage-7.2.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:046936ab032a2810dcaafd39cc4ef6dd295df1a7cbead08fe996d4765fca9fe4"}, + {file = "coverage-7.2.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e627dee428a176ffb13697a2c4318d3f60b2ccdde3acdc9b3f304206ec130ccd"}, + {file = "coverage-7.2.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4fa54fb483decc45f94011898727802309a109d89446a3c76387d016057d2c84"}, + {file = "coverage-7.2.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:3668291b50b69a0c1ef9f462c7df2c235da3c4073f49543b01e7eb1dee7dd540"}, + {file = "coverage-7.2.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:7c20b731211261dc9739bbe080c579a1835b0c2d9b274e5fcd903c3a7821cf88"}, + {file = "coverage-7.2.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5764e1f7471cb8f64b8cda0554f3d4c4085ae4b417bfeab236799863703e5de2"}, + {file = "coverage-7.2.2-cp38-cp38-win32.whl", hash = "sha256:4f01911c010122f49a3e9bdc730eccc66f9b72bd410a3a9d3cb8448bb50d65d3"}, + {file = "coverage-7.2.2-cp38-cp38-win_amd64.whl", hash = "sha256:c448b5c9e3df5448a362208b8d4b9ed85305528313fca1b479f14f9fe0d873b8"}, + {file = "coverage-7.2.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bfe7085783cda55e53510482fa7b5efc761fad1abe4d653b32710eb548ebdd2d"}, + {file = "coverage-7.2.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:9d22e94e6dc86de981b1b684b342bec5e331401599ce652900ec59db52940005"}, + {file = "coverage-7.2.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:507e4720791977934bba016101579b8c500fb21c5fa3cd4cf256477331ddd988"}, + {file = "coverage-7.2.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bc4803779f0e4b06a2361f666e76f5c2e3715e8e379889d02251ec911befd149"}, + {file = "coverage-7.2.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db8c2c5ace167fd25ab5dd732714c51d4633f58bac21fb0ff63b0349f62755a8"}, + {file = "coverage-7.2.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4f68ee32d7c4164f1e2c8797535a6d0a3733355f5861e0f667e37df2d4b07140"}, + {file = "coverage-7.2.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:d52f0a114b6a58305b11a5cdecd42b2e7f1ec77eb20e2b33969d702feafdd016"}, + {file = "coverage-7.2.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:797aad79e7b6182cb49c08cc5d2f7aa7b2128133b0926060d0a8889ac43843be"}, + {file = "coverage-7.2.2-cp39-cp39-win32.whl", hash = "sha256:db45eec1dfccdadb179b0f9ca616872c6f700d23945ecc8f21bb105d74b1c5fc"}, + {file = "coverage-7.2.2-cp39-cp39-win_amd64.whl", hash = "sha256:8dbe2647bf58d2c5a6c5bcc685f23b5f371909a5624e9f5cd51436d6a9f6c6ef"}, + {file = "coverage-7.2.2-pp37.pp38.pp39-none-any.whl", hash = "sha256:872d6ce1f5be73f05bea4df498c140b9e7ee5418bfa2cc8204e7f9b817caa968"}, + {file = "coverage-7.2.2.tar.gz", hash = "sha256:36dd42da34fe94ed98c39887b86db9d06777b1c8f860520e21126a75507024f2"}, ] [package.dependencies] @@ -513,14 +513,14 @@ files = [ [[package]] name = "exceptiongroup" -version = "1.1.0" +version = "1.1.1" description = "Backport of PEP 654 (exception groups)" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "exceptiongroup-1.1.0-py3-none-any.whl", hash = "sha256:327cbda3da756e2de031a3107b81ab7b3770a602c4d16ca618298c526f4bec1e"}, - {file = "exceptiongroup-1.1.0.tar.gz", hash = "sha256:bcb67d800a4497e1b404c2dd44fca47d3b7a5e5433dbab67f96c1a685cdfdf23"}, + {file = "exceptiongroup-1.1.1-py3-none-any.whl", hash = "sha256:232c37c63e4f682982c8b6459f33a8981039e5fb8756b2074364e5055c498c9e"}, + {file = "exceptiongroup-1.1.1.tar.gz", hash = "sha256:d484c3090ba2889ae2928419117447a14daf3c1231d5e30d0aae34f354f01785"}, ] [package.extras] @@ -543,19 +543,19 @@ testing = ["pre-commit"] [[package]] name = "filelock" -version = "3.9.0" +version = "3.10.0" description = "A platform independent file lock." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "filelock-3.9.0-py3-none-any.whl", hash = "sha256:f58d535af89bb9ad5cd4df046f741f8553a418c01a7856bf0d173bbc9f6bd16d"}, - {file = "filelock-3.9.0.tar.gz", hash = "sha256:7b319f24340b51f55a2bf7a12ac0755a9b03e718311dac567a0f4f7fabd2f5de"}, + {file = "filelock-3.10.0-py3-none-any.whl", hash = "sha256:e90b34656470756edf8b19656785c5fea73afa1953f3e1b0d645cef11cab3182"}, + {file = "filelock-3.10.0.tar.gz", hash = "sha256:3199fd0d3faea8b911be52b663dfccceb84c95949dd13179aa21436d1a79c4ce"}, ] [package.extras] -docs = ["furo (>=2022.12.7)", "sphinx (>=5.3)", "sphinx-autodoc-typehints (>=1.19.5)"] -testing = ["covdefaults (>=2.2.2)", "coverage (>=7.0.1)", "pytest (>=7.2)", "pytest-cov (>=4)", "pytest-timeout (>=2.1)"] +docs = ["furo (>=2022.12.7)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.22,!=1.23.4)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.2.1)", "pytest (>=7.2.2)", "pytest-cov (>=4)", "pytest-timeout (>=2.1)"] [[package]] name = "flake8" @@ -638,14 +638,14 @@ flake8 = ">=5.0.0" [[package]] name = "flake8-bugbear" -version = "23.2.13" +version = "23.3.12" description = "A plugin for flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "flake8-bugbear-23.2.13.tar.gz", hash = "sha256:39259814a83f33c8409417ee12dd4050c9c0bb4c8707c12fc18ae62b2f3ddee1"}, - {file = "flake8_bugbear-23.2.13-py3-none-any.whl", hash = "sha256:f136bd0ca2684f101168bba2310dec541e11aa6b252260c17dcf58d18069a740"}, + {file = "flake8-bugbear-23.3.12.tar.gz", hash = "sha256:e3e7f74c8a49ad3794a7183353026dabd68c74030d5f46571f84c1fb0eb79363"}, + {file = "flake8_bugbear-23.3.12-py3-none-any.whl", hash = "sha256:beb5c7efcd7ccc2039ef66a77bb8db925e7be3531ff1cb4d0b7030d0e2113d72"}, ] [package.dependencies] @@ -1054,14 +1054,14 @@ numpy = ">=1.14.5" [[package]] name = "identify" -version = "2.5.20" +version = "2.5.21" description = "File identification library for Python" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "identify-2.5.20-py2.py3-none-any.whl", hash = "sha256:5dfef8a745ca4f2c95f27e9db74cb4c8b6d9916383988e8791f3595868f78a33"}, - {file = "identify-2.5.20.tar.gz", hash = "sha256:c8b288552bc5f05a08aff09af2f58e6976bf8ac87beb38498a0e3d98ba64eb18"}, + {file = "identify-2.5.21-py2.py3-none-any.whl", hash = "sha256:69edcaffa8e91ae0f77d397af60f148b6b45a8044b2cc6d99cafa5b04793ff00"}, + {file = "identify-2.5.21.tar.gz", hash = "sha256:7671a05ef9cfaf8ff63b15d45a91a1147a03aaccb2976d4e9bd047cbbc508471"}, ] [package.extras] @@ -2216,14 +2216,14 @@ jupyter = ["ipywidgets (>=7.5.1,<8.0.0)"] [[package]] name = "rstcheck" -version = "6.1.1" +version = "6.1.2" description = "Checks syntax of reStructuredText and code blocks nested within it" category = "dev" optional = false python-versions = ">=3.7,<4.0" files = [ - {file = "rstcheck-6.1.1-py3-none-any.whl", hash = "sha256:edeff9ad0644d12bd250100b677887424193789254c90d95c13375062ee2cbac"}, - {file = "rstcheck-6.1.1.tar.gz", hash = "sha256:8e43485a644e794b8127f8c4868ef62c14ec7919bdda6cb16642157055d32e47"}, + {file = "rstcheck-6.1.2-py3-none-any.whl", hash = "sha256:4aaa46e0debc179f849807c453fa384fd2b75167faf5b1274115730805fab529"}, + {file = "rstcheck-6.1.2.tar.gz", hash = "sha256:f9cb07a72ef9a81d1e32187eae29b00a89421ccba1bde0b1652a08ed0923f61b"}, ] [package.dependencies] @@ -2233,7 +2233,7 @@ typer = {version = ">=0.4.1,<0.8", extras = ["all"]} [package.extras] docs = ["m2r2 (>=0.3.2)", "sphinx", "sphinx-autobuild (==2021.3.14)", "sphinx-click (>=4.0.3,<5.0.0)", "sphinx-rtd-dark-mode (>=1.2.4,<2.0.0)", "sphinx-rtd-theme (<1)", "sphinxcontrib-spelling (>=7.3)"] sphinx = ["sphinx"] -testing = ["coverage-conditional-plugin (>=0.5)", "coverage[toml] (>=6.0)", "pytest (>=6.0)", "pytest-cov (>=3.0)", "pytest-randomly (>=3.0)", "pytest-sugar (>=0.9.5)"] +testing = ["coverage-conditional-plugin (>=0.5)", "coverage[toml] (>=6.0)", "pytest (>=7.2)", "pytest-cov (>=3.0)", "pytest-randomly (>=3.0)", "pytest-sugar (>=0.9.5)"] toml = ["tomli"] [[package]] @@ -2688,19 +2688,23 @@ toml = ">=0.10.2" [[package]] name = "typeguard" -version = "2.13.3" +version = "3.0.1" description = "Run-time type checker for Python" category = "dev" optional = false -python-versions = ">=3.5.3" +python-versions = ">=3.7.4" files = [ - {file = "typeguard-2.13.3-py3-none-any.whl", hash = "sha256:5e3e3be01e887e7eafae5af63d1f36c849aaa94e3a0112097312aabfa16284f1"}, - {file = "typeguard-2.13.3.tar.gz", hash = "sha256:00edaa8da3a133674796cf5ea87d9f4b4c367d77476e185e80251cc13dfbb8c4"}, + {file = "typeguard-3.0.1-py3-none-any.whl", hash = "sha256:15628045c830abf68533247afd2cb04683b5ce6f4e30d5401a5ef6f5182280de"}, + {file = "typeguard-3.0.1.tar.gz", hash = "sha256:beb0e67c5dc76eea4a6d00a6606d444d899589908362960769d0c4a1d32bca70"}, ] +[package.dependencies] +importlib-metadata = {version = ">=3.6", markers = "python_version < \"3.10\""} +typing-extensions = {version = ">=4.4.0", markers = "python_version < \"3.11\""} + [package.extras] -doc = ["sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] -test = ["mypy", "pytest", "typing-extensions"] +doc = ["packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] +test = ["mypy (>=0.991)", "pytest (>=7)"] [[package]] name = "typer" @@ -2797,14 +2801,14 @@ socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] name = "virtualenv" -version = "20.20.0" +version = "20.21.0" description = "Virtual Python Environment builder" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "virtualenv-20.20.0-py3-none-any.whl", hash = "sha256:3c22fa5a7c7aa106ced59934d2c20a2ecb7f49b4130b8bf444178a16b880fa45"}, - {file = "virtualenv-20.20.0.tar.gz", hash = "sha256:a8a4b8ca1e28f864b7514a253f98c1d62b64e31e77325ba279248c65fb4fcef4"}, + {file = "virtualenv-20.21.0-py3-none-any.whl", hash = "sha256:31712f8f2a17bd06234fa97fdf19609e789dd4e3e4bf108c3da71d710651adbc"}, + {file = "virtualenv-20.21.0.tar.gz", hash = "sha256:f50e3e60f990a0757c9b68333c9fdaa72d7188caa417f96af9e52407831a3b68"}, ] [package.dependencies] From 14d463118e00cc97638b3cc6b64aa43741784562 Mon Sep 17 00:00:00 2001 From: dvp Date: Thu, 16 Mar 2023 20:47:02 +0300 Subject: [PATCH 05/32] build: sync with similar mckit-nuclides files --- .github/workflows/release.yml | 4 ++-- .github/workflows/tests.yml | 8 ++++---- pyproject.toml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5700711..4ccfa44 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,14 +71,14 @@ jobs: - name: Publish package on PyPI if: steps.check-version.outputs.tag - uses: pypa/gh-action-pypi-publish@v1.6.4 + uses: pypa/gh-action-pypi-publish@v1.7.1 with: user: __token__ password: ${{ secrets.PYPI_TOKEN }} - name: Publish package on TestPyPI if: "! steps.check-version.outputs.tag" - uses: pypa/gh-action-pypi-publish@v1.6.4 + uses: pypa/gh-action-pypi-publish@v1.7.1 with: user: __token__ password: ${{ secrets.TEST_PYPI_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 693329c..d3e54cc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -55,7 +55,7 @@ jobs: - name: Load poetry cache id: cached-poetry-dependencies - uses: actions/cache@v3.2.6 + uses: actions/cache@v3.3.1 with: path: | .cache/pypoetry @@ -106,7 +106,7 @@ jobs: - name: Load poetry cache id: cached-poetry-dependencies - uses: actions/cache@v3.2.6 + uses: actions/cache@v3.3.1 with: path: | .cache/pypoetry @@ -158,7 +158,7 @@ jobs: - name: Load poetry cache id: cached-poetry-dependencies - uses: actions/cache@v3.2.6 + uses: actions/cache@v3.3.1 with: path: | .cache/pypoetry @@ -201,7 +201,7 @@ jobs: - name: Load poetry cache id: cached-poetry-dependencies - uses: actions/cache@v3.2.6 + uses: actions/cache@v3.3.1 with: path: | .cache/pypoetry diff --git a/pyproject.toml b/pyproject.toml index 4997745..4f8e26f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ classifiers = [ ] [build-system] -requires = ["poetry-core>=1.1.0"] +requires = ["poetry-core >= 1.1.0"] build-backend = "poetry.core.masonry.api" # [tool.poetry.scripts] From 361c87abdcc451b01d62b14a3c2d05cabef296b6 Mon Sep 17 00:00:00 2001 From: dvp Date: Mon, 20 Mar 2023 22:50:54 +0300 Subject: [PATCH 06/32] dependencies: poetry update (dev only) --- poetry.lock | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/poetry.lock b/poetry.lock index 2e0435d..3d38306 100644 --- a/poetry.lock +++ b/poetry.lock @@ -14,14 +14,14 @@ files = [ [[package]] name = "argcomplete" -version = "2.1.1" +version = "2.1.2" description = "Bash tab completion for argparse" category = "dev" optional = false python-versions = ">=3.6" files = [ - {file = "argcomplete-2.1.1-py3-none-any.whl", hash = "sha256:17041f55b8c45099428df6ce6d0d282b892471a78c71375d24f227e21c13f8c5"}, - {file = "argcomplete-2.1.1.tar.gz", hash = "sha256:72e08340852d32544459c0c19aad1b48aa2c3a96de8c6e5742456b4f538ca52f"}, + {file = "argcomplete-2.1.2-py3-none-any.whl", hash = "sha256:4ba9cdaa28c361d251edce884cd50b4b1215d65cdc881bd204426cdde9f52731"}, + {file = "argcomplete-2.1.2.tar.gz", hash = "sha256:fc82ef070c607b1559b5c720529d63b54d9dcf2dcfc2632b10e6372314a34457"}, ] [package.extras] @@ -736,14 +736,14 @@ flake8 = ">=2" [[package]] name = "flake8-comprehensions" -version = "3.10.1" +version = "3.11.0" description = "A flake8 plugin to help you write better list/set/dict comprehensions." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "flake8-comprehensions-3.10.1.tar.gz", hash = "sha256:412052ac4a947f36b891143430fef4859705af11b2572fbb689f90d372cf26ab"}, - {file = "flake8_comprehensions-3.10.1-py3-none-any.whl", hash = "sha256:d763de3c74bc18a79c039a7ec732e0a1985b0c79309ceb51e56401ad0a2cd44e"}, + {file = "flake8_comprehensions-3.11.0-py3-none-any.whl", hash = "sha256:820b6463d4964249b7380432f3aac2f26d4a86c7d52cbe9d53dfd9e1caf01b33"}, + {file = "flake8_comprehensions-3.11.0.tar.gz", hash = "sha256:d06a95fdf2dabf6a7632550fed4a10d0449d00473875b1e4b167ca84d4daee59"}, ] [package.dependencies] @@ -1093,14 +1093,14 @@ files = [ [[package]] name = "importlib-metadata" -version = "6.0.0" +version = "6.1.0" description = "Read metadata from Python packages" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "importlib_metadata-6.0.0-py3-none-any.whl", hash = "sha256:7efb448ec9a5e313a57655d35aa54cd3e01b7e1fbcf72dce1bf06119420f5bad"}, - {file = "importlib_metadata-6.0.0.tar.gz", hash = "sha256:e354bedeb60efa6affdcc8ae121b73544a7aa74156d047311948f6d711cd378d"}, + {file = "importlib_metadata-6.1.0-py3-none-any.whl", hash = "sha256:ff80f3b5394912eb1b108fcfd444dc78b7f1f3e16b16188054bd01cb9cb86f09"}, + {file = "importlib_metadata-6.1.0.tar.gz", hash = "sha256:43ce9281e097583d758c2c708c4376371261a02c34682491a8e98352365aad20"}, ] [package.dependencies] @@ -1766,14 +1766,14 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "pre-commit" -version = "3.1.1" +version = "3.2.0" description = "A framework for managing and maintaining multi-language pre-commit hooks." category = "dev" optional = false python-versions = ">=3.8" files = [ - {file = "pre_commit-3.1.1-py2.py3-none-any.whl", hash = "sha256:b80254e60668e1dd1f5c03a1c9e0413941d61f568a57d745add265945f65bfe8"}, - {file = "pre_commit-3.1.1.tar.gz", hash = "sha256:d63e6537f9252d99f65755ae5b79c989b462d511ebbc481b561db6a297e1e865"}, + {file = "pre_commit-3.2.0-py2.py3-none-any.whl", hash = "sha256:f712d3688102e13c8e66b7d7dbd8934a6dda157e58635d89f7d6fecdca39ce8a"}, + {file = "pre_commit-3.2.0.tar.gz", hash = "sha256:818f0d998059934d0f81bb3667e3ccdc32da6ed7ccaac33e43dc231561ddaaa9"}, ] [package.dependencies] @@ -2744,14 +2744,14 @@ files = [ [[package]] name = "types-setuptools" -version = "67.6.0.0" +version = "67.6.0.5" description = "Typing stubs for setuptools" category = "dev" optional = false python-versions = "*" files = [ - {file = "types-setuptools-67.6.0.0.tar.gz", hash = "sha256:70b5e6a379e9fccf6579871a93ca3301a46252e3ae66957ec64281a2b6a812d9"}, - {file = "types_setuptools-67.6.0.0-py3-none-any.whl", hash = "sha256:d669a80ee8e37eb1697dc31a23d41ea2c48a635464e2c7e6370dda811459b466"}, + {file = "types-setuptools-67.6.0.5.tar.gz", hash = "sha256:3a708e66c7bdc620e4d0439f344c750c57a4340c895a4c3ed2d0fc4ae8eb9962"}, + {file = "types_setuptools-67.6.0.5-py3-none-any.whl", hash = "sha256:dae5a4a659dbb6dba57773440f6e2dbdd8ef282dc136a174a8a59bd33d949945"}, ] [[package]] From fd70b9e6c9148a760609b4213fc6e25b2c05aada Mon Sep 17 00:00:00 2001 From: dvp Date: Wed, 22 Mar 2023 12:09:05 +0300 Subject: [PATCH 07/32] feat: won't scale by mass dose rates Resolved TODO to check if mass or point source is fixed (1g) --- src/xpypact/TimeStep.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/xpypact/TimeStep.py b/src/xpypact/TimeStep.py index 3434522..4d2da25 100644 --- a/src/xpypact/TimeStep.py +++ b/src/xpypact/TimeStep.py @@ -13,7 +13,15 @@ @dataclass class DoseRate: - """Dose rate attributes.""" + """Dose rate attributes. + + Don't scale by mass, for point source mass is always 1g, for contact dose mass is meaningless. + + Attrs: + type: "Plain source" for contact dose or "Point source" + distance: specified for "point source", meters + mass: mass for point source, always 1g + """ type: str = "" distance: float = 0.0 @@ -22,9 +30,8 @@ class DoseRate: def __post_init__(self) -> None: """Correct wrong value coming from FISPACT.""" - # TODO dvp: check behaviour with FISPACT v.5 and try to correct scenarios. if self.mass == 0.0: - # According to FISPACT manual (v.4) + # According to FISPACT manual (both v.4 and v.5 (p.63)) # should be 1 gram always, but FISPACT shows 0 at the first step # and less, than 1 in the following steps. Fixing here. self.mass = 1.0e-3 From 5d2ddf13bf378eaac88a1ca739fbf3008605bda5 Mon Sep 17 00:00:00 2001 From: dvp Date: Wed, 22 Mar 2023 19:21:07 +0300 Subject: [PATCH 08/32] feat: add notebooks for prototyping --- .flake8 | 1 + notebooks/dvp/try_ducdb.ipynb | 2881 +++++++++++++++++++++++++++++++++ notebooks/dvp/try_ducdb.py | 380 +++++ notebooks/poetry.lock | 2509 ++++++++++++++++++++++++++++ notebooks/pyproject.toml | 19 + poetry.lock | 103 +- 6 files changed, 5845 insertions(+), 48 deletions(-) create mode 100644 notebooks/dvp/try_ducdb.ipynb create mode 100644 notebooks/dvp/try_ducdb.py create mode 100644 notebooks/poetry.lock create mode 100644 notebooks/pyproject.toml diff --git a/.flake8 b/.flake8 index a62c9b1..36c9561 100644 --- a/.flake8 +++ b/.flake8 @@ -57,6 +57,7 @@ exclude= *.egg-info .cache .eggs + notebooks/dvp/*.py per-file-ignores = benchmarks/*:S101,DAR101 noxfile.py:ANN,DAR101 diff --git a/notebooks/dvp/try_ducdb.ipynb b/notebooks/dvp/try_ducdb.ipynb new file mode 100644 index 0000000..2e8290f --- /dev/null +++ b/notebooks/dvp/try_ducdb.ipynb @@ -0,0 +1,2881 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "250d384f-b617-4bde-8d6e-5bfea316e21f", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "%config Completer.use_jedi = False" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "49812848-cb6d-487a-bcdf-927e86781ae9", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "import xpypact as xp" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "5e40fc05-d196-4ab9-b4df-ec6166ee5611", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "text/plain": [ + "'0.1.12a0'" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "xp.__version__" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "982fbe50-fd22-499a-98d9-910f6d0c72d7", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "from pathlib import Path" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "bf81c238-8be8-4f93-b3e4-155bb46e21e8", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "root_dir = Path(\"~\", \"dev\", \"xpypact\").expanduser()" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "id": "c0811f45-0503-4302-9890-62803b49cabe", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "json_path = root_dir / \"tests/data/Ag-1.json\"\n", + "assert json_path.exists()" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "57fecf87-b03f-48e4-bfe4-beee3d661355", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "from xpypact.Inventory import Inventory, from_json\n", + "import xpypact.data_arrays as da" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "c13bb091-11ad-4e08-bbad-7cba93475e4b", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "inventory = from_json(json_path)" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "e471ce43-3860-430d-b669-7a1211bb5d06", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "ds = da.create_dataset(inventory)" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "id": "eaa7c75f-119c-493c-b038-dbd615b72c6f", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
<xarray.Dataset>\n",
+       "Dimensions:                 (time_step_number: 2, nuclide: 48, timestamp: 1)\n",
+       "Coordinates:\n",
+       "  * time_step_number        (time_step_number) int64 1 2\n",
+       "  * nuclide                 (nuclide) object MultiIndex\n",
+       "  * element                 (nuclide) object 'Ag' 'Ag' 'Ag' ... 'Ru' 'Ru' 'Ru'\n",
+       "  * mass_number             (nuclide) int64 105 105 106 106 ... 106 102 103 104\n",
+       "  * state                   (nuclide) object '' 'm' '' 'm' '' ... 'm' '' '' ''\n",
+       "    elapsed_time            (time_step_number) float64 0.0 6.312e+07\n",
+       "    zai                     (nuclide) int64 471050 471051 ... 441030 441040\n",
+       "  * timestamp               (timestamp) datetime64[ns] 2020-07-12T23:01:19\n",
+       "Data variables: (12/31)\n",
+       "    irradiation_time        (time_step_number) float64 0.0 6.312e+07\n",
+       "    cooling_time            (time_step_number) float64 0.0 0.0\n",
+       "    duration                (time_step_number) float64 0.0 6.312e+07\n",
+       "    flux                    (time_step_number) float64 0.0 2.445e+10\n",
+       "    total_atoms             (time_step_number) float64 5.578e+21 5.578e+21\n",
+       "    total_activity          (time_step_number) float64 0.0 6.123e+09\n",
+       "    ...                      ...\n",
+       "    nuclide_alpha_heat      (time_step_number, nuclide) float64 nan nan ... 0.0\n",
+       "    nuclide_beta_heat       (time_step_number, nuclide) float64 nan nan ... 0.0\n",
+       "    nuclide_gamma_heat      (time_step_number, nuclide) float64 nan nan ... 0.0\n",
+       "    nuclide_dose            (time_step_number, nuclide) float64 nan nan ... 0.0\n",
+       "    nuclide_ingestion       (time_step_number, nuclide) float64 nan nan ... 0.0\n",
+       "    nuclide_inhalation      (time_step_number, nuclide) float64 nan nan ... 0.0\n",
+       "Attributes:\n",
+       "    run_name:            * Material Ag, fluxes 1\n",
+       "    flux_name:           55.F9.10 11-L2-02W HFS_GLRY_08_U\n",
+       "    dose_rate_type:      Point source\n",
+       "    dose_rate_distance:  1.0
" + ], + "text/plain": [ + "\n", + "Dimensions: (time_step_number: 2, nuclide: 48, timestamp: 1)\n", + "Coordinates:\n", + " * time_step_number (time_step_number) int64 1 2\n", + " * nuclide (nuclide) object MultiIndex\n", + " * element (nuclide) object 'Ag' 'Ag' 'Ag' ... 'Ru' 'Ru' 'Ru'\n", + " * mass_number (nuclide) int64 105 105 106 106 ... 106 102 103 104\n", + " * state (nuclide) object '' 'm' '' 'm' '' ... 'm' '' '' ''\n", + " elapsed_time (time_step_number) float64 0.0 6.312e+07\n", + " zai (nuclide) int64 471050 471051 ... 441030 441040\n", + " * timestamp (timestamp) datetime64[ns] 2020-07-12T23:01:19\n", + "Data variables: (12/31)\n", + " irradiation_time (time_step_number) float64 0.0 6.312e+07\n", + " cooling_time (time_step_number) float64 0.0 0.0\n", + " duration (time_step_number) float64 0.0 6.312e+07\n", + " flux (time_step_number) float64 0.0 2.445e+10\n", + " total_atoms (time_step_number) float64 5.578e+21 5.578e+21\n", + " total_activity (time_step_number) float64 0.0 6.123e+09\n", + " ... ...\n", + " nuclide_alpha_heat (time_step_number, nuclide) float64 nan nan ... 0.0\n", + " nuclide_beta_heat (time_step_number, nuclide) float64 nan nan ... 0.0\n", + " nuclide_gamma_heat (time_step_number, nuclide) float64 nan nan ... 0.0\n", + " nuclide_dose (time_step_number, nuclide) float64 nan nan ... 0.0\n", + " nuclide_ingestion (time_step_number, nuclide) float64 nan nan ... 0.0\n", + " nuclide_inhalation (time_step_number, nuclide) float64 nan nan ... 0.0\n", + "Attributes:\n", + " run_name: * Material Ag, fluxes 1\n", + " flux_name: 55.F9.10 11-L2-02W HFS_GLRY_08_U\n", + " dose_rate_type: Point source\n", + " dose_rate_distance: 1.0" + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ds" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3d2db9b3-09d8-4bf7-bc4b-8ec13cc8105b", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 28, + "id": "79beed07-0f86-485b-be23-97d7e8f33abb", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "import duckdb as db" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "id": "ee7bf9aa-13a8-419d-b39e-c90493094148", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "db_path = root_dir / \"wrk/try-duckdb.duckdb\"\n", + "db_path.parent.mkdir(parents=True, exist_ok=True)" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "id": "99a86bdc-84e1-4cd3-b7b7-4e63b6428086", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "con = db.connect(str(db_path))" + ] + }, + { + "cell_type": "code", + "execution_count": 153, + "id": "d9e1ddfb-398e-4cea-b01d-fb0e53242776", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 153, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# con.execute(\"drop table rundata\")\n", + "# con.execute(\"drop table if exists timestep_gamma\")\n", + "con.execute(\"drop table if exists timestep_nuclide\")\n", + "# con.execute(\"drop table if exists timestep\")\n", + "con.execute(\"drop table nuclide\")\n" + ] + }, + { + "cell_type": "code", + "execution_count": 154, + "id": "c402d3a1-e77a-4b24-accc-a19588ccdf54", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "def create_tables(con):\n", + " sql = \"\"\"\n", + " \n", + " CREATE TABLE IF NOT EXISTS rundata (\n", + " timestamp varchar NOT NULL,\n", + " run_name varchar NOT NULL,\n", + " flux_name varchar NOT NULL,\n", + " dose_rate_type varchar NOT NULL,\n", + " dose_rate_distance real NOT NULL\n", + " );\n", + "\n", + " CREATE TABLE IF NOT EXISTS timestep(\n", + " id integer PRIMARY KEY,\n", + " elapsed_time real not null,\n", + " irradiation_time real not null,\n", + " cooling_time real not null,\n", + " duration real not null,\n", + " flux real not null,\n", + " total_atoms real not null,\n", + " total_activity real not null,\n", + " total_alpha_activity real not null,\n", + " total_beta_activity real not null,\n", + " total_gamma_activity real not null,\n", + " total_mass real not null,\n", + " total_heat real not null,\n", + " total_alpha_heat real not null,\n", + " total_beta_heat real not null,\n", + " total_gamma_heat real not null,\n", + " total_ingest1ion_dose real not null,\n", + " total_inhalation_dose real not null,\n", + " total_dose_rate real not null\n", + " );\n", + " \n", + " CREATE TABLE IF NOT EXISTS nuclide(\n", + " element varchar(2) not null,\n", + " mass_number integer not null check(0 < mass_number), -- A\n", + " state varchar(1) not null,\n", + " zai integer not null check(10010 <= zai) unique,\n", + " half_life real not null check(0 <= half_life),\n", + " primary key(element, mass_number, state)\n", + " );\n", + " \n", + " CREATE TABLE IF NOT EXISTS timestep_nuclide(\n", + " timestep_id integer not null,\n", + " element varchar(2) not null,\n", + " mass_number integer not null,\n", + " state varchar(1) not null,\n", + " atoms real not null,\n", + " grams real not null,\n", + " activity real not null,\n", + " alpha_activity real not null,\n", + " beta_activity real not null,\n", + " gamma_activity real not null,\n", + " heat real not null,\n", + " alpha_heat real not null,\n", + " beta_heat real not null,\n", + " gamma_heat real not null,\n", + " dose real not null,\n", + " ingestion real not null,\n", + " inhalation real not null,\n", + " primary key(timestep_id, element, mass_number, state),\n", + " foreign key(timestep_id) references timestep(id),\n", + " foreign key(element, mass_number, state) references nuclide(element, mass_number, state) \n", + " );\n", + "\n", + " CREATE TABLE IF NOT EXISTS timestep_gamma(\n", + " timestep_id integer not null,\n", + " boundary real not null check(0 <= boundary),\n", + " intensity real not null, \n", + " primary key(timestep_id, boundary),\n", + " foreign key(timestep_id) references timestep(id),\n", + " );\n", + "\"\"\"\n", + " con.execute(sql)" + ] + }, + { + "cell_type": "code", + "execution_count": 155, + "id": "25f6867e-397a-4e98-a363-74b6af739c88", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "create_tables(con)" + ] + }, + { + "cell_type": "code", + "execution_count": 85, + "id": "db019e1c-bebd-4993-a1b5-274cf00a2ceb", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# con.execute(\"delete from rundata\")" + ] + }, + { + "cell_type": "code", + "execution_count": 81, + "id": "29716201-70f8-40d2-8da7-85689714ec32", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "def save_rundata(con, ds):\n", + " sql = \"\"\"\n", + " INSERT INTO rundata values(?, ?, ?, ?, ?)\n", + " \"\"\"\n", + " con.execute(sql, ( \n", + " ds.coords[\"timestamp\"].item(),\n", + " ds.attrs[\"run_name\"],\n", + " ds.attrs[\"flux_name\"],\n", + " ds.attrs[\"dose_rate_type\"],\n", + " ds.attrs[\"dose_rate_distance\"]\n", + " ))\n", + " con.commit()" + ] + }, + { + "cell_type": "code", + "execution_count": 83, + "id": "c789eedd-580c-4383-8bf1-cc943562a3aa", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "save_rundata(con, ds)" + ] + }, + { + "cell_type": "code", + "execution_count": 84, + "id": "1c650134-edf3-44dd-aa90-ddde6a3987a7", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
timestamprun_nameflux_namedose_rate_typedose_rate_distance
01594594879000000000* Material Ag, fluxes 155.F9.10 11-L2-02W HFS_GLRY_08_UPoint source1.0
\n", + "
" + ], + "text/plain": [ + " timestamp run_name \\\n", + "0 1594594879000000000 * Material Ag, fluxes 1 \n", + "\n", + " flux_name dose_rate_type dose_rate_distance \n", + "0 55.F9.10 11-L2-02W HFS_GLRY_08_U Point source 1.0 " + ] + }, + "execution_count": 84, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "con.execute(\"select * from rundata\").df()" + ] + }, + { + "cell_type": "code", + "execution_count": 114, + "id": "cf8661b6-d9cb-4431-8b40-f14072409d5a", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "def save_timesteps(con, ds):\n", + " timesteps_df = ds[\n", + " [\n", + " \"time_step_number\",\n", + " \"elapsed_time\",\n", + " \"irradiation_time\",\n", + " \"cooling_time\",\n", + " \"duration\",\n", + " \"flux\",\n", + " \"total_atoms\",\n", + " \"total_activity\",\n", + " \"total_alpha_activity\",\n", + " \"total_beta_activity\",\n", + " \"total_gamma_activity\",\n", + " \"total_mass\",\n", + " \"total_heat\",\n", + " \"total_alpha_heat\",\n", + " \"total_beta_heat\",\n", + " \"total_gamma_heat\",\n", + " \"total_ingest1ion_dose\",\n", + " \"total_inhalation_dose\",\n", + " \"total_dose_rate\",\n", + " ]\n", + " ].to_pandas().reset_index()\n", + " sql = \"insert into timestep select * from timesteps_df\"\n", + " con.execute(sql)\n", + " con.commit()" + ] + }, + { + "cell_type": "code", + "execution_count": 115, + "id": "78154d84-9df4-417d-a35f-60252575aae6", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "save_timesteps(con, ds)" + ] + }, + { + "cell_type": "code", + "execution_count": 116, + "id": "bf73ee32-d132-418f-8e77-969d779b780a", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idelapsed_timeirradiation_timecooling_timedurationfluxtotal_atomstotal_activitytotal_alpha_activitytotal_beta_activitytotal_gamma_activitytotal_masstotal_heattotal_alpha_heattotal_beta_heattotal_gamma_heattotal_ingest1ion_dosetotal_inhalation_dosetotal_dose_rate
010.00.00.00.00.000000e+005.577957e+210.000000e+000.00.00.00.0009990.0000000.00.000000e+000.000000e+000.0000000.0000000.000000
1263115200.063115200.00.063115200.02.445200e+105.577957e+216.123276e+090.00.00.00.0009990.0000010.09.894924e-071.135242e-070.5446022.3233750.000092
\n", + "
" + ], + "text/plain": [ + " id elapsed_time irradiation_time cooling_time duration flux \\\n", + "0 1 0.0 0.0 0.0 0.0 0.000000e+00 \n", + "1 2 63115200.0 63115200.0 0.0 63115200.0 2.445200e+10 \n", + "\n", + " total_atoms total_activity total_alpha_activity total_beta_activity \\\n", + "0 5.577957e+21 0.000000e+00 0.0 0.0 \n", + "1 5.577957e+21 6.123276e+09 0.0 0.0 \n", + "\n", + " total_gamma_activity total_mass total_heat total_alpha_heat \\\n", + "0 0.0 0.000999 0.000000 0.0 \n", + "1 0.0 0.000999 0.000001 0.0 \n", + "\n", + " total_beta_heat total_gamma_heat total_ingest1ion_dose \\\n", + "0 0.000000e+00 0.000000e+00 0.000000 \n", + "1 9.894924e-07 1.135242e-07 0.544602 \n", + "\n", + " total_inhalation_dose total_dose_rate \n", + "0 0.000000 0.000000 \n", + "1 2.323375 0.000092 " + ] + }, + "execution_count": 116, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "con.execute(\"select * from timestep\").df()" + ] + }, + { + "cell_type": "code", + "execution_count": 131, + "id": "44222193-149a-4661-8eef-00b46d5c6a90", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
elementmass_numberstatezainuclide_half_life
0Ag1054710503.568320e+06
1Ag105m4710514.338000e+02
2Ag1064710601.440000e+03
3Ag106m4710617.309440e+05
4Ag1074710700.000000e+00
5Ag107m4710714.430000e+01
6Ag1084710801.440000e+02
7Ag108m4710811.319110e+10
8Ag1094710900.000000e+00
9Ag109m4710913.970000e+01
10Ag1104711002.456000e+01
11Ag110m4711012.158100e+07
12Ag1114711106.436800e+05
13Ag111m4711116.480000e+01
14Cd1064810602.082800e+26
15Cd1074810702.347200e+04
16Cd1084810801.293860e+25
17Cd1094810903.996860e+07
18Cd1104811000.000000e+00
19Cd1114811100.000000e+00
20Cd111m4811112.924400e+03
21Cd1124811200.000000e+00
22H1100100.000000e+00
23H2100200.000000e+00
24H3100303.891050e+08
25He3200300.000000e+00
26He4200400.000000e+00
27Pd1044610400.000000e+00
28Pd1054610500.000000e+00
29Pd1064610600.000000e+00
30Pd1074610702.051200e+14
31Pd107m4610712.130000e+01
32Pd1084610800.000000e+00
33Pd1094610904.932430e+04
34Pd109m4610912.814000e+02
35Pd1104611001.893460e+25
36Rh1024510209.158400e+07
37Rh102m4510211.797120e+07
38Rh1034510300.000000e+00
39Rh103m4510313.366840e+03
40Rh1044510404.230000e+01
41Rh104m4510412.604000e+02
42Rh1054510501.272960e+05
43Rh1064510603.000000e+01
44Rh106m4510617.920000e+03
45Ru1024410200.000000e+00
46Ru1034410303.392060e+06
47Ru1044410400.000000e+00
\n", + "
" + ], + "text/plain": [ + " element mass_number state zai nuclide_half_life\n", + "0 Ag 105 471050 3.568320e+06\n", + "1 Ag 105 m 471051 4.338000e+02\n", + "2 Ag 106 471060 1.440000e+03\n", + "3 Ag 106 m 471061 7.309440e+05\n", + "4 Ag 107 471070 0.000000e+00\n", + "5 Ag 107 m 471071 4.430000e+01\n", + "6 Ag 108 471080 1.440000e+02\n", + "7 Ag 108 m 471081 1.319110e+10\n", + "8 Ag 109 471090 0.000000e+00\n", + "9 Ag 109 m 471091 3.970000e+01\n", + "10 Ag 110 471100 2.456000e+01\n", + "11 Ag 110 m 471101 2.158100e+07\n", + "12 Ag 111 471110 6.436800e+05\n", + "13 Ag 111 m 471111 6.480000e+01\n", + "14 Cd 106 481060 2.082800e+26\n", + "15 Cd 107 481070 2.347200e+04\n", + "16 Cd 108 481080 1.293860e+25\n", + "17 Cd 109 481090 3.996860e+07\n", + "18 Cd 110 481100 0.000000e+00\n", + "19 Cd 111 481110 0.000000e+00\n", + "20 Cd 111 m 481111 2.924400e+03\n", + "21 Cd 112 481120 0.000000e+00\n", + "22 H 1 10010 0.000000e+00\n", + "23 H 2 10020 0.000000e+00\n", + "24 H 3 10030 3.891050e+08\n", + "25 He 3 20030 0.000000e+00\n", + "26 He 4 20040 0.000000e+00\n", + "27 Pd 104 461040 0.000000e+00\n", + "28 Pd 105 461050 0.000000e+00\n", + "29 Pd 106 461060 0.000000e+00\n", + "30 Pd 107 461070 2.051200e+14\n", + "31 Pd 107 m 461071 2.130000e+01\n", + "32 Pd 108 461080 0.000000e+00\n", + "33 Pd 109 461090 4.932430e+04\n", + "34 Pd 109 m 461091 2.814000e+02\n", + "35 Pd 110 461100 1.893460e+25\n", + "36 Rh 102 451020 9.158400e+07\n", + "37 Rh 102 m 451021 1.797120e+07\n", + "38 Rh 103 451030 0.000000e+00\n", + "39 Rh 103 m 451031 3.366840e+03\n", + "40 Rh 104 451040 4.230000e+01\n", + "41 Rh 104 m 451041 2.604000e+02\n", + "42 Rh 105 451050 1.272960e+05\n", + "43 Rh 106 451060 3.000000e+01\n", + "44 Rh 106 m 451061 7.920000e+03\n", + "45 Ru 102 441020 0.000000e+00\n", + "46 Ru 103 441030 3.392060e+06\n", + "47 Ru 104 441040 0.000000e+00" + ] + }, + "execution_count": 131, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ds[[\"element\", \"mass_number\", \"state\", \"zai\", \"nuclide_half_life\"]].to_pandas().reset_index(drop=True)" + ] + }, + { + "cell_type": "code", + "execution_count": 156, + "id": "c5fdb6e7-00b7-40f1-9d8d-f755dd768a97", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "def save_nuclides(con, ds):\n", + " nuclides_df = ds[[\"element\", \"mass_number\", \"state\", \"zai\", \"nuclide_half_life\"]].to_pandas().reset_index(drop=True)\n", + " sql = \"insert into nuclide select * from nuclides_df\"\n", + " con.execute(sql)\n", + " con.commit()" + ] + }, + { + "cell_type": "code", + "execution_count": 157, + "id": "2cd4e47d-1ec3-493c-b655-8a83917deea5", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "save_nuclides(con, ds)" + ] + }, + { + "cell_type": "code", + "execution_count": 160, + "id": "1f6cbb0e-e893-4d88-a744-989d9b39e0a4", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
elementmass_numberstatezaihalf_life
0Ag1054710503.568320e+06
1Ag105m4710514.338000e+02
2Ag1064710601.440000e+03
3Ag106m4710617.309440e+05
4Ag1074710700.000000e+00
\n", + "
" + ], + "text/plain": [ + " element mass_number state zai half_life\n", + "0 Ag 105 471050 3.568320e+06\n", + "1 Ag 105 m 471051 4.338000e+02\n", + "2 Ag 106 471060 1.440000e+03\n", + "3 Ag 106 m 471061 7.309440e+05\n", + "4 Ag 107 471070 0.000000e+00" + ] + }, + "execution_count": 160, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "con.execute(\"select * from nuclide\").df().head()" + ] + }, + { + "cell_type": "code", + "execution_count": 166, + "id": "01216ae8-6108-4909-a332-44afbe8fb2c3", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
<xarray.Dataset>\n",
+       "Dimensions:                 (time_step_number: 2, nuclide: 48, timestamp: 1)\n",
+       "Coordinates:\n",
+       "  * time_step_number        (time_step_number) int64 1 2\n",
+       "  * nuclide                 (nuclide) object MultiIndex\n",
+       "  * element                 (nuclide) object 'Ag' 'Ag' 'Ag' ... 'Ru' 'Ru' 'Ru'\n",
+       "  * mass_number             (nuclide) int64 105 105 106 106 ... 106 102 103 104\n",
+       "  * state                   (nuclide) object '' 'm' '' 'm' '' ... 'm' '' '' ''\n",
+       "    elapsed_time            (time_step_number) float64 0.0 6.312e+07\n",
+       "    zai                     (nuclide) int64 471050 471051 ... 441030 441040\n",
+       "  * timestamp               (timestamp) datetime64[ns] 2020-07-12T23:01:19\n",
+       "Data variables: (12/31)\n",
+       "    irradiation_time        (time_step_number) float64 0.0 6.312e+07\n",
+       "    cooling_time            (time_step_number) float64 0.0 0.0\n",
+       "    duration                (time_step_number) float64 0.0 6.312e+07\n",
+       "    flux                    (time_step_number) float64 0.0 2.445e+10\n",
+       "    total_atoms             (time_step_number) float64 5.578e+21 5.578e+21\n",
+       "    total_activity          (time_step_number) float64 0.0 6.123e+09\n",
+       "    ...                      ...\n",
+       "    nuclide_alpha_heat      (time_step_number, nuclide) float64 nan nan ... 0.0\n",
+       "    nuclide_beta_heat       (time_step_number, nuclide) float64 nan nan ... 0.0\n",
+       "    nuclide_gamma_heat      (time_step_number, nuclide) float64 nan nan ... 0.0\n",
+       "    nuclide_dose            (time_step_number, nuclide) float64 nan nan ... 0.0\n",
+       "    nuclide_ingestion       (time_step_number, nuclide) float64 nan nan ... 0.0\n",
+       "    nuclide_inhalation      (time_step_number, nuclide) float64 nan nan ... 0.0\n",
+       "Attributes:\n",
+       "    run_name:            * Material Ag, fluxes 1\n",
+       "    flux_name:           55.F9.10 11-L2-02W HFS_GLRY_08_U\n",
+       "    dose_rate_type:      Point source\n",
+       "    dose_rate_distance:  1.0
" + ], + "text/plain": [ + "\n", + "Dimensions: (time_step_number: 2, nuclide: 48, timestamp: 1)\n", + "Coordinates:\n", + " * time_step_number (time_step_number) int64 1 2\n", + " * nuclide (nuclide) object MultiIndex\n", + " * element (nuclide) object 'Ag' 'Ag' 'Ag' ... 'Ru' 'Ru' 'Ru'\n", + " * mass_number (nuclide) int64 105 105 106 106 ... 106 102 103 104\n", + " * state (nuclide) object '' 'm' '' 'm' '' ... 'm' '' '' ''\n", + " elapsed_time (time_step_number) float64 0.0 6.312e+07\n", + " zai (nuclide) int64 471050 471051 ... 441030 441040\n", + " * timestamp (timestamp) datetime64[ns] 2020-07-12T23:01:19\n", + "Data variables: (12/31)\n", + " irradiation_time (time_step_number) float64 0.0 6.312e+07\n", + " cooling_time (time_step_number) float64 0.0 0.0\n", + " duration (time_step_number) float64 0.0 6.312e+07\n", + " flux (time_step_number) float64 0.0 2.445e+10\n", + " total_atoms (time_step_number) float64 5.578e+21 5.578e+21\n", + " total_activity (time_step_number) float64 0.0 6.123e+09\n", + " ... ...\n", + " nuclide_alpha_heat (time_step_number, nuclide) float64 nan nan ... 0.0\n", + " nuclide_beta_heat (time_step_number, nuclide) float64 nan nan ... 0.0\n", + " nuclide_gamma_heat (time_step_number, nuclide) float64 nan nan ... 0.0\n", + " nuclide_dose (time_step_number, nuclide) float64 nan nan ... 0.0\n", + " nuclide_ingestion (time_step_number, nuclide) float64 nan nan ... 0.0\n", + " nuclide_inhalation (time_step_number, nuclide) float64 nan nan ... 0.0\n", + "Attributes:\n", + " run_name: * Material Ag, fluxes 1\n", + " flux_name: 55.F9.10 11-L2-02W HFS_GLRY_08_U\n", + " dose_rate_type: Point source\n", + " dose_rate_distance: 1.0" + ] + }, + "execution_count": 166, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ds" + ] + }, + { + "cell_type": "code", + "execution_count": 203, + "id": "b9679cc0-5621-4367-a4a9-0176745b9a65", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "ename": "ValueError", + "evalue": "cannot remove index(es) 'nuclide', which would corrupt the following index built from coordinates 'nuclide', 'element', 'mass_number', 'state':\nPandasIndex(MultiIndex([('Ag', 105, ''),\n ('Ag', 105, 'm'),\n ('Ag', 106, ''),\n ('Ag', 106, 'm'),\n ('Ag', 107, ''),\n ('Ag', 107, 'm'),\n ('Ag', 108, ''),\n ('Ag', 108, 'm'),\n ('Ag', 109, ''),\n ('Ag', 109, 'm'),\n ('Ag', 110, ''),\n ('Ag', 110, 'm'),\n ('Ag', 111, ''),\n ('Ag', 111, 'm'),\n ('Cd', 106, ''),\n ('Cd', 107, ''),\n ('Cd', 108, ''),\n ('Cd', 109, ''),\n ('Cd', 110, ''),\n ('Cd', 111, ''),\n ('Cd', 111, 'm'),\n ('Cd', 112, ''),\n ( 'H', 1, ''),\n ( 'H', 2, ''),\n ( 'H', 3, ''),\n ('He', 3, ''),\n ('He', 4, ''),\n ('Pd', 104, ''),\n ('Pd', 105, ''),\n ('Pd', 106, ''),\n ('Pd', 107, ''),\n ('Pd', 107, 'm'),\n ('Pd', 108, ''),\n ('Pd', 109, ''),\n ('Pd', 109, 'm'),\n ('Pd', 110, ''),\n ('Rh', 102, ''),\n ('Rh', 102, 'm'),\n ('Rh', 103, ''),\n ('Rh', 103, 'm'),\n ('Rh', 104, ''),\n ('Rh', 104, 'm'),\n ('Rh', 105, ''),\n ('Rh', 106, ''),\n ('Rh', 106, 'm'),\n ('Ru', 102, ''),\n ('Ru', 103, ''),\n ('Ru', 104, '')],\n name='nuclide'))", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[203], line 19\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[43mds\u001b[49m\u001b[43m[\u001b[49m\u001b[43m[\u001b[49m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mtime_step_number\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43melement\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 4\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mmass_number\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 5\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mstate\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 6\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide_atoms\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 7\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide_grams\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 8\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide_activity\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 9\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide_alpha_activity\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 10\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide_beta_activity\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 11\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide_gamma_activity\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 12\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide_heat\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 13\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide_alpha_heat\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 14\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide_beta_heat\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 15\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide_gamma_heat\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 16\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide_dose\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 17\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide_ingestion\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 18\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide_inhalation\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[0;32m---> 19\u001b[0m \u001b[43m]\u001b[49m\u001b[43m]\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mto_array\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdrop_indexes\u001b[49m\u001b[43m(\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mtime_step_number\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 20\u001b[0m \u001b[38;5;66;03m# .reset_coords(names=[\"time_step_number\", \"nuclide\"])\u001b[39;00m\n\u001b[1;32m 21\u001b[0m \u001b[38;5;66;03m# .stack(dimensions={\"tsn\": [\"time_step_number\", \"element\", \"mass_number\", \"state\"]})\u001b[39;00m\n", + "File \u001b[0;32m~/.pyenv/versions/3.11.2/envs/xpypact/lib/python3.11/site-packages/xarray/core/dataarray.py:3017\u001b[0m, in \u001b[0;36mDataArray.drop_indexes\u001b[0;34m(self, coord_names, errors)\u001b[0m\n\u001b[1;32m 2995\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mdrop_indexes\u001b[39m(\n\u001b[1;32m 2996\u001b[0m \u001b[38;5;28mself\u001b[39m: T_DataArray,\n\u001b[1;32m 2997\u001b[0m coord_names: Hashable \u001b[38;5;241m|\u001b[39m Iterable[Hashable],\n\u001b[1;32m 2998\u001b[0m \u001b[38;5;241m*\u001b[39m,\n\u001b[1;32m 2999\u001b[0m errors: ErrorOptions \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mraise\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m 3000\u001b[0m ) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m T_DataArray:\n\u001b[1;32m 3001\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"Drop the indexes assigned to the given coordinates.\u001b[39;00m\n\u001b[1;32m 3002\u001b[0m \n\u001b[1;32m 3003\u001b[0m \u001b[38;5;124;03m Parameters\u001b[39;00m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 3015\u001b[0m \u001b[38;5;124;03m A new dataarray with dropped indexes.\u001b[39;00m\n\u001b[1;32m 3016\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[0;32m-> 3017\u001b[0m ds \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_to_temp_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdrop_indexes\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcoord_names\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43merrors\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43merrors\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 3018\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_from_temp_dataset(ds)\n", + "File \u001b[0;32m~/.pyenv/versions/3.11.2/envs/xpypact/lib/python3.11/site-packages/xarray/core/dataset.py:5155\u001b[0m, in \u001b[0;36mDataset.drop_indexes\u001b[0;34m(self, coord_names, errors)\u001b[0m\n\u001b[1;32m 5150\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m unindexed_coords:\n\u001b[1;32m 5151\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\n\u001b[1;32m 5152\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mthose coordinates do not have an index: \u001b[39m\u001b[38;5;132;01m{\u001b[39;00munindexed_coords\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 5153\u001b[0m )\n\u001b[0;32m-> 5155\u001b[0m \u001b[43massert_no_index_corrupted\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mxindexes\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mcoord_names\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43maction\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mremove index(es)\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 5157\u001b[0m variables \u001b[38;5;241m=\u001b[39m {}\n\u001b[1;32m 5158\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m name, var \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_variables\u001b[38;5;241m.\u001b[39mitems():\n", + "File \u001b[0;32m~/.pyenv/versions/3.11.2/envs/xpypact/lib/python3.11/site-packages/xarray/core/indexes.py:1506\u001b[0m, in \u001b[0;36massert_no_index_corrupted\u001b[0;34m(indexes, coord_names, action)\u001b[0m\n\u001b[1;32m 1504\u001b[0m common_names_str \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m, \u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mjoin(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mk\u001b[38;5;132;01m!r}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;28;01mfor\u001b[39;00m k \u001b[38;5;129;01min\u001b[39;00m common_names)\n\u001b[1;32m 1505\u001b[0m index_names_str \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m, \u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mjoin(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mk\u001b[38;5;132;01m!r}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;28;01mfor\u001b[39;00m k \u001b[38;5;129;01min\u001b[39;00m index_coords)\n\u001b[0;32m-> 1506\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\n\u001b[1;32m 1507\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcannot \u001b[39m\u001b[38;5;132;01m{\u001b[39;00maction\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mcommon_names_str\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m, which would corrupt \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 1508\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mthe following index built from coordinates \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mindex_names_str\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m:\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 1509\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mindex\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 1510\u001b[0m )\n", + "\u001b[0;31mValueError\u001b[0m: cannot remove index(es) 'nuclide', which would corrupt the following index built from coordinates 'nuclide', 'element', 'mass_number', 'state':\nPandasIndex(MultiIndex([('Ag', 105, ''),\n ('Ag', 105, 'm'),\n ('Ag', 106, ''),\n ('Ag', 106, 'm'),\n ('Ag', 107, ''),\n ('Ag', 107, 'm'),\n ('Ag', 108, ''),\n ('Ag', 108, 'm'),\n ('Ag', 109, ''),\n ('Ag', 109, 'm'),\n ('Ag', 110, ''),\n ('Ag', 110, 'm'),\n ('Ag', 111, ''),\n ('Ag', 111, 'm'),\n ('Cd', 106, ''),\n ('Cd', 107, ''),\n ('Cd', 108, ''),\n ('Cd', 109, ''),\n ('Cd', 110, ''),\n ('Cd', 111, ''),\n ('Cd', 111, 'm'),\n ('Cd', 112, ''),\n ( 'H', 1, ''),\n ( 'H', 2, ''),\n ( 'H', 3, ''),\n ('He', 3, ''),\n ('He', 4, ''),\n ('Pd', 104, ''),\n ('Pd', 105, ''),\n ('Pd', 106, ''),\n ('Pd', 107, ''),\n ('Pd', 107, 'm'),\n ('Pd', 108, ''),\n ('Pd', 109, ''),\n ('Pd', 109, 'm'),\n ('Pd', 110, ''),\n ('Rh', 102, ''),\n ('Rh', 102, 'm'),\n ('Rh', 103, ''),\n ('Rh', 103, 'm'),\n ('Rh', 104, ''),\n ('Rh', 104, 'm'),\n ('Rh', 105, ''),\n ('Rh', 106, ''),\n ('Rh', 106, 'm'),\n ('Ru', 102, ''),\n ('Ru', 103, ''),\n ('Ru', 104, '')],\n name='nuclide'))" + ] + } + ], + "source": [ + "ds[[\n", + "\"time_step_number\",\n", + "\"element\",\n", + "\"mass_number\",\n", + "\"state\",\n", + "\"nuclide_atoms\",\n", + "\"nuclide_grams\",\n", + "\"nuclide_activity\",\n", + "\"nuclide_alpha_activity\",\n", + "\"nuclide_beta_activity\",\n", + "\"nuclide_gamma_activity\",\n", + "\"nuclide_heat\",\n", + "\"nuclide_alpha_heat\",\n", + "\"nuclide_beta_heat\",\n", + "\"nuclide_gamma_heat\",\n", + "\"nuclide_dose\",\n", + "\"nuclide_ingestion\",\n", + "\"nuclide_inhalation\",\n", + "]].to_array().drop_indexes([\"time_step_number\", \"nuclide\"])\n", + "# .reset_coords(names=[\"time_step_number\", \"nuclide\"])\n", + "# .stack(dimensions={\"tsn\": [\"time_step_number\", \"element\", \"mass_number\", \"state\"]})" + ] + }, + { + "cell_type": "code", + "execution_count": 186, + "id": "526610bb-be7b-4ce7-8cc9-0bcdb00588f2", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "def save_timestep_nucludes(con, ds):\n", + " timesteps_nuclides_df = ds[[\n", + " \"time_step_number\",\n", + " \"element\",\n", + " \"mass_number\",\n", + " \"state\",\n", + " \"nuclide_atoms\",\n", + " \"nuclide_grams\",\n", + " \"nuclide_activity\",\n", + " \"nuclide_alpha_activity\",\n", + " \"nuclide_beta_activity\",\n", + " \"nuclide_gamma_activity\",\n", + " \"nuclide_heat\",\n", + " \"nuclide_alpha_heat\",\n", + " \"nuclide_beta_heat\",\n", + " \"nuclide_gamma_heat\",\n", + " \"nuclide_dose\",\n", + " \"nuclide_ingestion\",\n", + " \"nuclide_inhalation\",\n", + " ]].to_dataframe().reset_index(drop=True)\n", + " sql = \"insert into timestep_nuclide select * from timesteps_nuclides_df\"\n", + " con.execute(sql)\n", + " con.commit()" + ] + }, + { + "cell_type": "code", + "execution_count": 187, + "id": "de4b9bd0-02e4-48f5-bec3-bb92c67682d0", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "ename": "BinderException", + "evalue": "Binder Error: table timestep_nuclide has 17 columns but 18 values were supplied", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mBinderException\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[187], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43msave_timestep_nucludes\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcon\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mds\u001b[49m\u001b[43m)\u001b[49m\n", + "Cell \u001b[0;32mIn[186], line 22\u001b[0m, in \u001b[0;36msave_timestep_nucludes\u001b[0;34m(con, ds)\u001b[0m\n\u001b[1;32m 2\u001b[0m timesteps_nuclides_df \u001b[38;5;241m=\u001b[39m ds[[\n\u001b[1;32m 3\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtime_step_number\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m 4\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124melement\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 19\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mnuclide_inhalation\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m 20\u001b[0m ]]\u001b[38;5;241m.\u001b[39mto_dataframe()\u001b[38;5;241m.\u001b[39mreset_index(drop\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mTrue\u001b[39;00m)\n\u001b[1;32m 21\u001b[0m sql \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124minsert into timestep_nuclide select * from timesteps_nuclides_df\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m---> 22\u001b[0m \u001b[43mcon\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mexecute\u001b[49m\u001b[43m(\u001b[49m\u001b[43msql\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 23\u001b[0m con\u001b[38;5;241m.\u001b[39mcommit()\n", + "\u001b[0;31mBinderException\u001b[0m: Binder Error: table timestep_nuclide has 17 columns but 18 values were supplied" + ] + } + ], + "source": [ + "save_timestep_nucludes(con, ds)" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "id": "def18203-fed9-472d-a69c-b653dbf9a7b2", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "con.close()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "01b93a4e-7cd9-42cd-9c2f-1ddbe9d83810", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.2" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/notebooks/dvp/try_ducdb.py b/notebooks/dvp/try_ducdb.py new file mode 100644 index 0000000..767a59e --- /dev/null +++ b/notebooks/dvp/try_ducdb.py @@ -0,0 +1,380 @@ +#!/usr/bin/env python +# coding: utf-8 + +# In[1]: + + +get_ipython().run_line_magic("config", "Completer.use_jedi = False") + + +# In[3]: + + +import xpypact as xp + +# In[5]: + + +xp.__version__ + + +# In[11]: + + +from pathlib import Path + +# In[19]: + + +root_dir = Path("~", "dev", "xpypact").expanduser() + + +# In[20]: + + +json_path = root_dir / "tests/data/Ag-1.json" +assert json_path.exists() + + +# In[23]: + + +import xpypact.data_arrays as da + +from xpypact.Inventory import Inventory, from_json + +# In[24]: + + +inventory = from_json(json_path) + + +# In[25]: + + +ds = da.create_dataset(inventory) + + +# In[26]: + + +ds + + +# In[ ]: + + +# In[28]: + + +import duckdb as db + +# In[46]: + + +db_path = root_dir / "wrk/try-duckdb.duckdb" +db_path.parent.mkdir(parents=True, exist_ok=True) + + +# In[48]: + + +con = db.connect(str(db_path)) + + +# In[153]: + + +# con.execute("drop table rundata") +# con.execute("drop table if exists timestep_gamma") +con.execute("drop table if exists timestep_nuclide") +# con.execute("drop table if exists timestep") +con.execute("drop table nuclide") + + +# In[154]: + + +def create_tables(con): + sql = """ + + CREATE TABLE IF NOT EXISTS rundata ( + timestamp varchar NOT NULL, + run_name varchar NOT NULL, + flux_name varchar NOT NULL, + dose_rate_type varchar NOT NULL, + dose_rate_distance real NOT NULL + ); + + CREATE TABLE IF NOT EXISTS timestep( + id integer PRIMARY KEY, + elapsed_time real not null, + irradiation_time real not null, + cooling_time real not null, + duration real not null, + flux real not null, + total_atoms real not null, + total_activity real not null, + total_alpha_activity real not null, + total_beta_activity real not null, + total_gamma_activity real not null, + total_mass real not null, + total_heat real not null, + total_alpha_heat real not null, + total_beta_heat real not null, + total_gamma_heat real not null, + total_ingest1ion_dose real not null, + total_inhalation_dose real not null, + total_dose_rate real not null + ); + + CREATE TABLE IF NOT EXISTS nuclide( + element varchar(2) not null, + mass_number integer not null check(0 < mass_number), -- A + state varchar(1) not null, + zai integer not null check(10010 <= zai) unique, + half_life real not null check(0 <= half_life), + primary key(element, mass_number, state) + ); + + CREATE TABLE IF NOT EXISTS timestep_nuclide( + timestep_id integer not null, + element varchar(2) not null, + mass_number integer not null, + state varchar(1) not null, + atoms real not null, + grams real not null, + activity real not null, + alpha_activity real not null, + beta_activity real not null, + gamma_activity real not null, + heat real not null, + alpha_heat real not null, + beta_heat real not null, + gamma_heat real not null, + dose real not null, + ingestion real not null, + inhalation real not null, + primary key(timestep_id, element, mass_number, state), + foreign key(timestep_id) references timestep(id), + foreign key(element, mass_number, state) references nuclide(element, mass_number, state) + ); + + CREATE TABLE IF NOT EXISTS timestep_gamma( + timestep_id integer not null, + boundary real not null check(0 <= boundary), + intensity real not null, + primary key(timestep_id, boundary), + foreign key(timestep_id) references timestep(id), + ); +""" + con.execute(sql) + + +# In[155]: + + +create_tables(con) + + +# In[85]: + + +# con.execute("delete from rundata") + + +# In[81]: + + +def save_rundata(con, ds): + sql = """ + INSERT INTO rundata values(?, ?, ?, ?, ?) + """ + con.execute( + sql, + ( + ds.coords["timestamp"].item(), + ds.attrs["run_name"], + ds.attrs["flux_name"], + ds.attrs["dose_rate_type"], + ds.attrs["dose_rate_distance"], + ), + ) + con.commit() + + +# In[83]: + + +save_rundata(con, ds) + + +# In[84]: + + +con.execute("select * from rundata").df() + + +# In[114]: + + +def save_timesteps(con, ds): + timesteps_df = ( + ds[ + [ + "time_step_number", + "elapsed_time", + "irradiation_time", + "cooling_time", + "duration", + "flux", + "total_atoms", + "total_activity", + "total_alpha_activity", + "total_beta_activity", + "total_gamma_activity", + "total_mass", + "total_heat", + "total_alpha_heat", + "total_beta_heat", + "total_gamma_heat", + "total_ingest1ion_dose", + "total_inhalation_dose", + "total_dose_rate", + ] + ] + .to_pandas() + .reset_index() + ) + sql = "insert into timestep select * from timesteps_df" + con.execute(sql) + con.commit() + + +# In[115]: + + +save_timesteps(con, ds) + + +# In[116]: + + +con.execute("select * from timestep").df() + + +# In[131]: + + +ds[ + ["element", "mass_number", "state", "zai", "nuclide_half_life"] +].to_pandas().reset_index(drop=True) + + +# In[156]: + + +def save_nuclides(con, ds): + nuclides_df = ( + ds[["element", "mass_number", "state", "zai", "nuclide_half_life"]] + .to_pandas() + .reset_index(drop=True) + ) + sql = "insert into nuclide select * from nuclides_df" + con.execute(sql) + con.commit() + + +# In[157]: + + +save_nuclides(con, ds) + + +# In[160]: + + +con.execute("select * from nuclide").df().head() + + +# In[166]: + + +ds + + +# In[203]: + + +ds[ + [ + """Time_step_number.""", + """Element.""", + """Mass_number.""", + """State.""", + """Nuclide_atoms.""", + """Nuclide_grams.""", + """Nuclide_activity.""", + """Nuclide_alpha_activity.""", + """Nuclide_beta_activity.""", + """Nuclide_gamma_activity.""", + """Nuclide_heat.""", + """Nuclide_alpha_heat.""", + """Nuclide_beta_heat.""", + """Nuclide_gamma_heat.""", + """Nuclide_dose.""", + """Nuclide_ingestion.""", + """Nuclide_inhalation.""", + ] +].to_array().drop_indexes(["time_step_number", "nuclide"]) +# .reset_coords(names=["time_step_number", "nuclide"]) +# .stack(dimensions={"tsn": ["time_step_number", "element", "mass_number", "state"]}) + + +# In[186]: + + +def save_timestep_nucludes(con, ds): + timesteps_nuclides_df = ( + ds[ + [ + "time_step_number", + "element", + "mass_number", + "state", + "nuclide_atoms", + "nuclide_grams", + "nuclide_activity", + "nuclide_alpha_activity", + "nuclide_beta_activity", + "nuclide_gamma_activity", + "nuclide_heat", + "nuclide_alpha_heat", + "nuclide_beta_heat", + "nuclide_gamma_heat", + "nuclide_dose", + "nuclide_ingestion", + "nuclide_inhalation", + ] + ] + .to_dataframe() + .reset_index(drop=True) + ) + sql = "insert into timestep_nuclide select * from timesteps_nuclides_df" + con.execute(sql) + con.commit() + + +# In[187]: + + +save_timestep_nucludes(con, ds) + + +# In[41]: + + +con.close() + + +# In[ ]: diff --git a/notebooks/poetry.lock b/notebooks/poetry.lock new file mode 100644 index 0000000..337f912 --- /dev/null +++ b/notebooks/poetry.lock @@ -0,0 +1,2509 @@ +# This file is automatically @generated by Poetry 1.4.0 and should not be changed by hand. + +[[package]] +name = "aiofiles" +version = "22.1.0" +description = "File support for asyncio." +category = "main" +optional = false +python-versions = ">=3.7,<4.0" +files = [ + {file = "aiofiles-22.1.0-py3-none-any.whl", hash = "sha256:1142fa8e80dbae46bb6339573ad4c8c0841358f79c6eb50a493dceca14621bad"}, + {file = "aiofiles-22.1.0.tar.gz", hash = "sha256:9107f1ca0b2a5553987a94a3c9959fe5b491fdf731389aa5b7b1bd0733e32de6"}, +] + +[[package]] +name = "aiosqlite" +version = "0.18.0" +description = "asyncio bridge to the standard sqlite3 module" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "aiosqlite-0.18.0-py3-none-any.whl", hash = "sha256:c3511b841e3a2c5614900ba1d179f366826857586f78abd75e7cbeb88e75a557"}, + {file = "aiosqlite-0.18.0.tar.gz", hash = "sha256:faa843ef5fb08bafe9a9b3859012d3d9d6f77ce3637899de20606b7fc39aa213"}, +] + +[[package]] +name = "anyio" +version = "3.6.2" +description = "High level compatibility layer for multiple asynchronous event loop implementations" +category = "main" +optional = false +python-versions = ">=3.6.2" +files = [ + {file = "anyio-3.6.2-py3-none-any.whl", hash = "sha256:fbbe32bd270d2a2ef3ed1c5d45041250284e31fc0a4df4a5a6071842051a51e3"}, + {file = "anyio-3.6.2.tar.gz", hash = "sha256:25ea0d673ae30af41a0c442f81cf3b38c7e79fdc7b60335a4c14e05eb0947421"}, +] + +[package.dependencies] +idna = ">=2.8" +sniffio = ">=1.1" + +[package.extras] +doc = ["packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] +test = ["contextlib2", "coverage[toml] (>=4.5)", "hypothesis (>=4.0)", "mock (>=4)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (<0.15)", "uvloop (>=0.15)"] +trio = ["trio (>=0.16,<0.22)"] + +[[package]] +name = "appnope" +version = "0.1.3" +description = "Disable App Nap on macOS >= 10.9" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "appnope-0.1.3-py2.py3-none-any.whl", hash = "sha256:265a455292d0bd8a72453494fa24df5a11eb18373a60c7c0430889f22548605e"}, + {file = "appnope-0.1.3.tar.gz", hash = "sha256:02bd91c4de869fbb1e1c50aafc4098827a7a54ab2f39d9dcba6c9547ed920e24"}, +] + +[[package]] +name = "argon2-cffi" +version = "21.3.0" +description = "The secure Argon2 password hashing algorithm." +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "argon2-cffi-21.3.0.tar.gz", hash = "sha256:d384164d944190a7dd7ef22c6aa3ff197da12962bd04b17f64d4e93d934dba5b"}, + {file = "argon2_cffi-21.3.0-py3-none-any.whl", hash = "sha256:8c976986f2c5c0e5000919e6de187906cfd81fb1c72bf9d88c01177e77da7f80"}, +] + +[package.dependencies] +argon2-cffi-bindings = "*" + +[package.extras] +dev = ["cogapp", "coverage[toml] (>=5.0.2)", "furo", "hypothesis", "pre-commit", "pytest", "sphinx", "sphinx-notfound-page", "tomli"] +docs = ["furo", "sphinx", "sphinx-notfound-page"] +tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pytest"] + +[[package]] +name = "argon2-cffi-bindings" +version = "21.2.0" +description = "Low-level CFFI bindings for Argon2" +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "argon2-cffi-bindings-21.2.0.tar.gz", hash = "sha256:bb89ceffa6c791807d1305ceb77dbfacc5aa499891d2c55661c6459651fc39e3"}, + {file = "argon2_cffi_bindings-21.2.0-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:ccb949252cb2ab3a08c02024acb77cfb179492d5701c7cbdbfd776124d4d2367"}, + {file = "argon2_cffi_bindings-21.2.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9524464572e12979364b7d600abf96181d3541da11e23ddf565a32e70bd4dc0d"}, + {file = "argon2_cffi_bindings-21.2.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b746dba803a79238e925d9046a63aa26bf86ab2a2fe74ce6b009a1c3f5c8f2ae"}, + {file = "argon2_cffi_bindings-21.2.0-cp36-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:58ed19212051f49a523abb1dbe954337dc82d947fb6e5a0da60f7c8471a8476c"}, + {file = "argon2_cffi_bindings-21.2.0-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:bd46088725ef7f58b5a1ef7ca06647ebaf0eb4baff7d1d0d177c6cc8744abd86"}, + {file = "argon2_cffi_bindings-21.2.0-cp36-abi3-musllinux_1_1_i686.whl", hash = "sha256:8cd69c07dd875537a824deec19f978e0f2078fdda07fd5c42ac29668dda5f40f"}, + {file = "argon2_cffi_bindings-21.2.0-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:f1152ac548bd5b8bcecfb0b0371f082037e47128653df2e8ba6e914d384f3c3e"}, + {file = "argon2_cffi_bindings-21.2.0-cp36-abi3-win32.whl", hash = "sha256:603ca0aba86b1349b147cab91ae970c63118a0f30444d4bc80355937c950c082"}, + {file = "argon2_cffi_bindings-21.2.0-cp36-abi3-win_amd64.whl", hash = "sha256:b2ef1c30440dbbcba7a5dc3e319408b59676e2e039e2ae11a8775ecf482b192f"}, + {file = "argon2_cffi_bindings-21.2.0-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:e415e3f62c8d124ee16018e491a009937f8cf7ebf5eb430ffc5de21b900dad93"}, + {file = "argon2_cffi_bindings-21.2.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:3e385d1c39c520c08b53d63300c3ecc28622f076f4c2b0e6d7e796e9f6502194"}, + {file = "argon2_cffi_bindings-21.2.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2c3e3cc67fdb7d82c4718f19b4e7a87123caf8a93fde7e23cf66ac0337d3cb3f"}, + {file = "argon2_cffi_bindings-21.2.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6a22ad9800121b71099d0fb0a65323810a15f2e292f2ba450810a7316e128ee5"}, + {file = "argon2_cffi_bindings-21.2.0-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f9f8b450ed0547e3d473fdc8612083fd08dd2120d6ac8f73828df9b7d45bb351"}, + {file = "argon2_cffi_bindings-21.2.0-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:93f9bf70084f97245ba10ee36575f0c3f1e7d7724d67d8e5b08e61787c320ed7"}, + {file = "argon2_cffi_bindings-21.2.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:3b9ef65804859d335dc6b31582cad2c5166f0c3e7975f324d9ffaa34ee7e6583"}, + {file = "argon2_cffi_bindings-21.2.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d4966ef5848d820776f5f562a7d45fdd70c2f330c961d0d745b784034bd9f48d"}, + {file = "argon2_cffi_bindings-21.2.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:20ef543a89dee4db46a1a6e206cd015360e5a75822f76df533845c3cbaf72670"}, + {file = "argon2_cffi_bindings-21.2.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ed2937d286e2ad0cc79a7087d3c272832865f779430e0cc2b4f3718d3159b0cb"}, + {file = "argon2_cffi_bindings-21.2.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:5e00316dabdaea0b2dd82d141cc66889ced0cdcbfa599e8b471cf22c620c329a"}, +] + +[package.dependencies] +cffi = ">=1.0.1" + +[package.extras] +dev = ["cogapp", "pre-commit", "pytest", "wheel"] +tests = ["pytest"] + +[[package]] +name = "arrow" +version = "1.2.3" +description = "Better dates & times for Python" +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "arrow-1.2.3-py3-none-any.whl", hash = "sha256:5a49ab92e3b7b71d96cd6bfcc4df14efefc9dfa96ea19045815914a6ab6b1fe2"}, + {file = "arrow-1.2.3.tar.gz", hash = "sha256:3934b30ca1b9f292376d9db15b19446088d12ec58629bc3f0da28fd55fb633a1"}, +] + +[package.dependencies] +python-dateutil = ">=2.7.0" + +[[package]] +name = "asttokens" +version = "2.2.1" +description = "Annotate AST trees with source code positions" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "asttokens-2.2.1-py2.py3-none-any.whl", hash = "sha256:6b0ac9e93fb0335014d382b8fa9b3afa7df546984258005da0b9e7095b3deb1c"}, + {file = "asttokens-2.2.1.tar.gz", hash = "sha256:4622110b2a6f30b77e1473affaa97e711bc2f07d3f10848420ff1898edbe94f3"}, +] + +[package.dependencies] +six = "*" + +[package.extras] +test = ["astroid", "pytest"] + +[[package]] +name = "attrs" +version = "22.2.0" +description = "Classes Without Boilerplate" +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "attrs-22.2.0-py3-none-any.whl", hash = "sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836"}, + {file = "attrs-22.2.0.tar.gz", hash = "sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99"}, +] + +[package.extras] +cov = ["attrs[tests]", "coverage-enable-subprocess", "coverage[toml] (>=5.3)"] +dev = ["attrs[docs,tests]"] +docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope.interface"] +tests = ["attrs[tests-no-zope]", "zope.interface"] +tests-no-zope = ["cloudpickle", "cloudpickle", "hypothesis", "hypothesis", "mypy (>=0.971,<0.990)", "mypy (>=0.971,<0.990)", "pympler", "pympler", "pytest (>=4.3.0)", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-mypy-plugins", "pytest-xdist[psutil]", "pytest-xdist[psutil]"] + +[[package]] +name = "babel" +version = "2.12.1" +description = "Internationalization utilities" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "Babel-2.12.1-py3-none-any.whl", hash = "sha256:b4246fb7677d3b98f501a39d43396d3cafdc8eadb045f4a31be01863f655c610"}, + {file = "Babel-2.12.1.tar.gz", hash = "sha256:cc2d99999cd01d44420ae725a21c9e3711b3aadc7976d6147f622d8581963455"}, +] + +[[package]] +name = "backcall" +version = "0.2.0" +description = "Specifications for callback functions passed in to an API" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "backcall-0.2.0-py2.py3-none-any.whl", hash = "sha256:fbbce6a29f263178a1f7915c1940bde0ec2b2a967566fe1c65c1dfb7422bd255"}, + {file = "backcall-0.2.0.tar.gz", hash = "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e"}, +] + +[[package]] +name = "beautifulsoup4" +version = "4.12.0" +description = "Screen-scraping library" +category = "main" +optional = false +python-versions = ">=3.6.0" +files = [ + {file = "beautifulsoup4-4.12.0-py3-none-any.whl", hash = "sha256:2130a5ad7f513200fae61a17abb5e338ca980fa28c439c0571014bc0217e9591"}, + {file = "beautifulsoup4-4.12.0.tar.gz", hash = "sha256:c5fceeaec29d09c84970e47c65f2f0efe57872f7cff494c9691a26ec0ff13234"}, +] + +[package.dependencies] +soupsieve = ">1.2" + +[package.extras] +html5lib = ["html5lib"] +lxml = ["lxml"] + +[[package]] +name = "bleach" +version = "6.0.0" +description = "An easy safelist-based HTML-sanitizing tool." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "bleach-6.0.0-py3-none-any.whl", hash = "sha256:33c16e3353dbd13028ab4799a0f89a83f113405c766e9c122df8a06f5b85b3f4"}, + {file = "bleach-6.0.0.tar.gz", hash = "sha256:1a1a85c1595e07d8db14c5f09f09e6433502c51c595970edc090551f0db99414"}, +] + +[package.dependencies] +six = ">=1.9.0" +webencodings = "*" + +[package.extras] +css = ["tinycss2 (>=1.1.0,<1.2)"] + +[[package]] +name = "certifi" +version = "2022.12.7" +description = "Python package for providing Mozilla's CA Bundle." +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "certifi-2022.12.7-py3-none-any.whl", hash = "sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18"}, + {file = "certifi-2022.12.7.tar.gz", hash = "sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3"}, +] + +[[package]] +name = "cffi" +version = "1.15.1" +description = "Foreign Function Interface for Python calling C code." +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "cffi-1.15.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914"}, + {file = "cffi-1.15.1-cp27-cp27m-win32.whl", hash = "sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3"}, + {file = "cffi-1.15.1-cp27-cp27m-win_amd64.whl", hash = "sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e"}, + {file = "cffi-1.15.1-cp310-cp310-win32.whl", hash = "sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2"}, + {file = "cffi-1.15.1-cp310-cp310-win_amd64.whl", hash = "sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8"}, + {file = "cffi-1.15.1-cp311-cp311-win32.whl", hash = "sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d"}, + {file = "cffi-1.15.1-cp311-cp311-win_amd64.whl", hash = "sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104"}, + {file = "cffi-1.15.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e"}, + {file = "cffi-1.15.1-cp36-cp36m-win32.whl", hash = "sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf"}, + {file = "cffi-1.15.1-cp36-cp36m-win_amd64.whl", hash = "sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497"}, + {file = "cffi-1.15.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426"}, + {file = "cffi-1.15.1-cp37-cp37m-win32.whl", hash = "sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9"}, + {file = "cffi-1.15.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045"}, + {file = "cffi-1.15.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192"}, + {file = "cffi-1.15.1-cp38-cp38-win32.whl", hash = "sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314"}, + {file = "cffi-1.15.1-cp38-cp38-win_amd64.whl", hash = "sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3"}, + {file = "cffi-1.15.1-cp39-cp39-win32.whl", hash = "sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee"}, + {file = "cffi-1.15.1-cp39-cp39-win_amd64.whl", hash = "sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c"}, + {file = "cffi-1.15.1.tar.gz", hash = "sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9"}, +] + +[package.dependencies] +pycparser = "*" + +[[package]] +name = "charset-normalizer" +version = "3.1.0" +description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." +category = "main" +optional = false +python-versions = ">=3.7.0" +files = [ + {file = "charset-normalizer-3.1.0.tar.gz", hash = "sha256:34e0a2f9c370eb95597aae63bf85eb5e96826d81e3dcf88b8886012906f509b5"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e0ac8959c929593fee38da1c2b64ee9778733cdf03c482c9ff1d508b6b593b2b"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d7fc3fca01da18fbabe4625d64bb612b533533ed10045a2ac3dd194bfa656b60"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:04eefcee095f58eaabe6dc3cc2262f3bcd776d2c67005880894f447b3f2cb9c1"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:20064ead0717cf9a73a6d1e779b23d149b53daf971169289ed2ed43a71e8d3b0"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1435ae15108b1cb6fffbcea2af3d468683b7afed0169ad718451f8db5d1aff6f"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c84132a54c750fda57729d1e2599bb598f5fa0344085dbde5003ba429a4798c0"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75f2568b4189dda1c567339b48cba4ac7384accb9c2a7ed655cd86b04055c795"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:11d3bcb7be35e7b1bba2c23beedac81ee893ac9871d0ba79effc7fc01167db6c"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:891cf9b48776b5c61c700b55a598621fdb7b1e301a550365571e9624f270c203"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:5f008525e02908b20e04707a4f704cd286d94718f48bb33edddc7d7b584dddc1"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:b06f0d3bf045158d2fb8837c5785fe9ff9b8c93358be64461a1089f5da983137"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:49919f8400b5e49e961f320c735388ee686a62327e773fa5b3ce6721f7e785ce"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:22908891a380d50738e1f978667536f6c6b526a2064156203d418f4856d6e86a"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-win32.whl", hash = "sha256:12d1a39aa6b8c6f6248bb54550efcc1c38ce0d8096a146638fd4738e42284448"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:65ed923f84a6844de5fd29726b888e58c62820e0769b76565480e1fdc3d062f8"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9a3267620866c9d17b959a84dd0bd2d45719b817245e49371ead79ed4f710d19"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6734e606355834f13445b6adc38b53c0fd45f1a56a9ba06c2058f86893ae8017"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f8303414c7b03f794347ad062c0516cee0e15f7a612abd0ce1e25caf6ceb47df"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aaf53a6cebad0eae578f062c7d462155eada9c172bd8c4d250b8c1d8eb7f916a"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3dc5b6a8ecfdc5748a7e429782598e4f17ef378e3e272eeb1340ea57c9109f41"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e1b25e3ad6c909f398df8921780d6a3d120d8c09466720226fc621605b6f92b1"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0ca564606d2caafb0abe6d1b5311c2649e8071eb241b2d64e75a0d0065107e62"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b82fab78e0b1329e183a65260581de4375f619167478dddab510c6c6fb04d9b6"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:bd7163182133c0c7701b25e604cf1611c0d87712e56e88e7ee5d72deab3e76b5"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:11d117e6c63e8f495412d37e7dc2e2fff09c34b2d09dbe2bee3c6229577818be"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:cf6511efa4801b9b38dc5546d7547d5b5c6ef4b081c60b23e4d941d0eba9cbeb"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:abc1185d79f47c0a7aaf7e2412a0eb2c03b724581139193d2d82b3ad8cbb00ac"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cb7b2ab0188829593b9de646545175547a70d9a6e2b63bf2cd87a0a391599324"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-win32.whl", hash = "sha256:c36bcbc0d5174a80d6cccf43a0ecaca44e81d25be4b7f90f0ed7bcfbb5a00909"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:cca4def576f47a09a943666b8f829606bcb17e2bc2d5911a46c8f8da45f56755"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0c95f12b74681e9ae127728f7e5409cbbef9cd914d5896ef238cc779b8152373"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fca62a8301b605b954ad2e9c3666f9d97f63872aa4efcae5492baca2056b74ab"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ac0aa6cd53ab9a31d397f8303f92c42f534693528fafbdb997c82bae6e477ad9"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c3af8e0f07399d3176b179f2e2634c3ce9c1301379a6b8c9c9aeecd481da494f"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3a5fc78f9e3f501a1614a98f7c54d3969f3ad9bba8ba3d9b438c3bc5d047dd28"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:628c985afb2c7d27a4800bfb609e03985aaecb42f955049957814e0491d4006d"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:74db0052d985cf37fa111828d0dd230776ac99c740e1a758ad99094be4f1803d"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:1e8fcdd8f672a1c4fc8d0bd3a2b576b152d2a349782d1eb0f6b8e52e9954731d"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:04afa6387e2b282cf78ff3dbce20f0cc071c12dc8f685bd40960cc68644cfea6"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:dd5653e67b149503c68c4018bf07e42eeed6b4e956b24c00ccdf93ac79cdff84"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d2686f91611f9e17f4548dbf050e75b079bbc2a82be565832bc8ea9047b61c8c"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-win32.whl", hash = "sha256:4155b51ae05ed47199dc5b2a4e62abccb274cee6b01da5b895099b61b1982974"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-win_amd64.whl", hash = "sha256:322102cdf1ab682ecc7d9b1c5eed4ec59657a65e1c146a0da342b78f4112db23"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e633940f28c1e913615fd624fcdd72fdba807bf53ea6925d6a588e84e1151531"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:3a06f32c9634a8705f4ca9946d667609f52cf130d5548881401f1eb2c39b1e2c"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7381c66e0561c5757ffe616af869b916c8b4e42b367ab29fedc98481d1e74e14"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3573d376454d956553c356df45bb824262c397c6e26ce43e8203c4c540ee0acb"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e89df2958e5159b811af9ff0f92614dabf4ff617c03a4c1c6ff53bf1c399e0e1"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:78cacd03e79d009d95635e7d6ff12c21eb89b894c354bd2b2ed0b4763373693b"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:de5695a6f1d8340b12a5d6d4484290ee74d61e467c39ff03b39e30df62cf83a0"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1c60b9c202d00052183c9be85e5eaf18a4ada0a47d188a83c8f5c5b23252f649"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:f645caaf0008bacf349875a974220f1f1da349c5dbe7c4ec93048cdc785a3326"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ea9f9c6034ea2d93d9147818f17c2a0860d41b71c38b9ce4d55f21b6f9165a11"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:80d1543d58bd3d6c271b66abf454d437a438dff01c3e62fdbcd68f2a11310d4b"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:73dc03a6a7e30b7edc5b01b601e53e7fc924b04e1835e8e407c12c037e81adbd"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6f5c2e7bc8a4bf7c426599765b1bd33217ec84023033672c1e9a8b35eaeaaaf8"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-win32.whl", hash = "sha256:12a2b561af122e3d94cdb97fe6fb2bb2b82cef0cdca131646fdb940a1eda04f0"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:3160a0fd9754aab7d47f95a6b63ab355388d890163eb03b2d2b87ab0a30cfa59"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:38e812a197bf8e71a59fe55b757a84c1f946d0ac114acafaafaf21667a7e169e"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6baf0baf0d5d265fa7944feb9f7451cc316bfe30e8df1a61b1bb08577c554f31"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:8f25e17ab3039b05f762b0a55ae0b3632b2e073d9c8fc88e89aca31a6198e88f"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3747443b6a904001473370d7810aa19c3a180ccd52a7157aacc264a5ac79265e"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b116502087ce8a6b7a5f1814568ccbd0e9f6cfd99948aa59b0e241dc57cf739f"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d16fd5252f883eb074ca55cb622bc0bee49b979ae4e8639fff6ca3ff44f9f854"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:21fa558996782fc226b529fdd2ed7866c2c6ec91cee82735c98a197fae39f706"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6f6c7a8a57e9405cad7485f4c9d3172ae486cfef1344b5ddd8e5239582d7355e"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ac3775e3311661d4adace3697a52ac0bab17edd166087d493b52d4f4f553f9f0"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:10c93628d7497c81686e8e5e557aafa78f230cd9e77dd0c40032ef90c18f2230"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:6f4f4668e1831850ebcc2fd0b1cd11721947b6dc7c00bf1c6bd3c929ae14f2c7"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:0be65ccf618c1e7ac9b849c315cc2e8a8751d9cfdaa43027d4f6624bd587ab7e"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:53d0a3fa5f8af98a1e261de6a3943ca631c526635eb5817a87a59d9a57ebf48f"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-win32.whl", hash = "sha256:a04f86f41a8916fe45ac5024ec477f41f886b3c435da2d4e3d2709b22ab02af1"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:830d2948a5ec37c386d3170c483063798d7879037492540f10a475e3fd6f244b"}, + {file = "charset_normalizer-3.1.0-py3-none-any.whl", hash = "sha256:3d9098b479e78c85080c98e1e35ff40b4a31d8953102bb0fd7d1b6f8a2111a3d"}, +] + +[[package]] +name = "colorama" +version = "0.4.6" +description = "Cross-platform colored terminal text." +category = "main" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +files = [ + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] + +[[package]] +name = "comm" +version = "0.1.3" +description = "Jupyter Python Comm implementation, for usage in ipykernel, xeus-python etc." +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "comm-0.1.3-py3-none-any.whl", hash = "sha256:16613c6211e20223f215fc6d3b266a247b6e2641bf4e0a3ad34cb1aff2aa3f37"}, + {file = "comm-0.1.3.tar.gz", hash = "sha256:a61efa9daffcfbe66fd643ba966f846a624e4e6d6767eda9cf6e993aadaab93e"}, +] + +[package.dependencies] +traitlets = ">=5.3" + +[package.extras] +lint = ["black (>=22.6.0)", "mdformat (>0.7)", "mdformat-gfm (>=0.3.5)", "ruff (>=0.0.156)"] +test = ["pytest"] +typing = ["mypy (>=0.990)"] + +[[package]] +name = "debugpy" +version = "1.6.6" +description = "An implementation of the Debug Adapter Protocol for Python" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "debugpy-1.6.6-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:0ea1011e94416e90fb3598cc3ef5e08b0a4dd6ce6b9b33ccd436c1dffc8cd664"}, + {file = "debugpy-1.6.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dff595686178b0e75580c24d316aa45a8f4d56e2418063865c114eef651a982e"}, + {file = "debugpy-1.6.6-cp310-cp310-win32.whl", hash = "sha256:87755e173fcf2ec45f584bb9d61aa7686bb665d861b81faa366d59808bbd3494"}, + {file = "debugpy-1.6.6-cp310-cp310-win_amd64.whl", hash = "sha256:72687b62a54d9d9e3fb85e7a37ea67f0e803aaa31be700e61d2f3742a5683917"}, + {file = "debugpy-1.6.6-cp37-cp37m-macosx_10_15_x86_64.whl", hash = "sha256:78739f77c58048ec006e2b3eb2e0cd5a06d5f48c915e2fc7911a337354508110"}, + {file = "debugpy-1.6.6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:23c29e40e39ad7d869d408ded414f6d46d82f8a93b5857ac3ac1e915893139ca"}, + {file = "debugpy-1.6.6-cp37-cp37m-win32.whl", hash = "sha256:7aa7e103610e5867d19a7d069e02e72eb2b3045b124d051cfd1538f1d8832d1b"}, + {file = "debugpy-1.6.6-cp37-cp37m-win_amd64.whl", hash = "sha256:f6383c29e796203a0bba74a250615ad262c4279d398e89d895a69d3069498305"}, + {file = "debugpy-1.6.6-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:23363e6d2a04d726bbc1400bd4e9898d54419b36b2cdf7020e3e215e1dcd0f8e"}, + {file = "debugpy-1.6.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9b5d1b13d7c7bf5d7cf700e33c0b8ddb7baf030fcf502f76fc061ddd9405d16c"}, + {file = "debugpy-1.6.6-cp38-cp38-win32.whl", hash = "sha256:70ab53918fd907a3ade01909b3ed783287ede362c80c75f41e79596d5ccacd32"}, + {file = "debugpy-1.6.6-cp38-cp38-win_amd64.whl", hash = "sha256:c05349890804d846eca32ce0623ab66c06f8800db881af7a876dc073ac1c2225"}, + {file = "debugpy-1.6.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a771739902b1ae22a120dbbb6bd91b2cae6696c0e318b5007c5348519a4211c6"}, + {file = "debugpy-1.6.6-cp39-cp39-win32.whl", hash = "sha256:549ae0cb2d34fc09d1675f9b01942499751d174381b6082279cf19cdb3c47cbe"}, + {file = "debugpy-1.6.6-cp39-cp39-win_amd64.whl", hash = "sha256:de4a045fbf388e120bb6ec66501458d3134f4729faed26ff95de52a754abddb1"}, + {file = "debugpy-1.6.6-py2.py3-none-any.whl", hash = "sha256:be596b44448aac14eb3614248c91586e2bc1728e020e82ef3197189aae556115"}, + {file = "debugpy-1.6.6.zip", hash = "sha256:b9c2130e1c632540fbf9c2c88341493797ddf58016e7cba02e311de9b0a96b67"}, +] + +[[package]] +name = "decorator" +version = "5.1.1" +description = "Decorators for Humans" +category = "main" +optional = false +python-versions = ">=3.5" +files = [ + {file = "decorator-5.1.1-py3-none-any.whl", hash = "sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186"}, + {file = "decorator-5.1.1.tar.gz", hash = "sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330"}, +] + +[[package]] +name = "defusedxml" +version = "0.7.1" +description = "XML bomb protection for Python stdlib modules" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +files = [ + {file = "defusedxml-0.7.1-py2.py3-none-any.whl", hash = "sha256:a352e7e428770286cc899e2542b6cdaedb2b4953ff269a210103ec58f6198a61"}, + {file = "defusedxml-0.7.1.tar.gz", hash = "sha256:1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69"}, +] + +[[package]] +name = "duckdb" +version = "0.7.1" +description = "DuckDB embedded database" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "duckdb-0.7.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3e0170be6cc315c179169dfa3e06485ef7009ef8ce399cd2908f29105ef2c67b"}, + {file = "duckdb-0.7.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6360d41023e726646507d5479ba60960989a09f04527b36abeef3643c61d8c48"}, + {file = "duckdb-0.7.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:578c269d7aa27184e8d45421694f89deda3f41fe6bd2a8ce48b262b9fc975326"}, + {file = "duckdb-0.7.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:36aae9a923c9f78da1cf3fcf75873f62d32ea017d4cef7c706d16d3eca527ca2"}, + {file = "duckdb-0.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:630e0122a02f19bb1fafae00786350b2c31ae8422fce97c827bd3686e7c386af"}, + {file = "duckdb-0.7.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:9b9ca2d294725e523ce207bc37f28787478ae6f7a223e2cf3a213a2d498596c3"}, + {file = "duckdb-0.7.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0bd89f388205b6c99b62650169efe9a02933555ee1d46ddf79fbd0fb9e62652b"}, + {file = "duckdb-0.7.1-cp310-cp310-win32.whl", hash = "sha256:a9e987565a268fd8da9f65e54621d28f39c13105b8aee34c96643074babe6d9c"}, + {file = "duckdb-0.7.1-cp310-cp310-win_amd64.whl", hash = "sha256:5d986b5ad1307b069309f9707c0c5051323e29865aefa059eb6c3b22dc9751b6"}, + {file = "duckdb-0.7.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:54606dfd24d7181d3098030ca6858f6be52f3ccbf42fff05f7587f2d9cdf4343"}, + {file = "duckdb-0.7.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bd9367ae650b6605ffe00412183cf0edb688a5fc9fbb03ed757e8310e7ec3b6c"}, + {file = "duckdb-0.7.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:aaf33aeb543c7816bd915cd10141866d54f92f698e1b5712de9d8b7076da19df"}, + {file = "duckdb-0.7.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2e56b0329c38c0356b40449917bab6fce6ac27d356257b9a9da613d2a0f064e0"}, + {file = "duckdb-0.7.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:604b8b476d6cc6bf91625d8c2722ef9c50c402b3d64bc518c838d6c279e6d93b"}, + {file = "duckdb-0.7.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:32a268508c6d7fdc99d5442736051de74c28a5166c4cc3dcbbf35d383299b941"}, + {file = "duckdb-0.7.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:90794406fa2111414877ee9db154fef940911f3920c312c1cf69947621737c8d"}, + {file = "duckdb-0.7.1-cp311-cp311-win32.whl", hash = "sha256:bf20c5ee62cbbf10b39ebdfd70d454ce914e70545c7cb6cb78cb5befef96328a"}, + {file = "duckdb-0.7.1-cp311-cp311-win_amd64.whl", hash = "sha256:bb2700785cab37cd1e7a76c4547a5ab0f8a7c28ad3f3e4d02a8fae52be223090"}, + {file = "duckdb-0.7.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:b09741cfa31388b8f9cdf5c5200e0995d55a5b54d2d1a75b54784e2f5c042f7f"}, + {file = "duckdb-0.7.1-cp36-cp36m-win32.whl", hash = "sha256:766e6390f7ace7f1e322085c2ca5d0ad94767bde78a38d168253d2b0b4d5cd5c"}, + {file = "duckdb-0.7.1-cp36-cp36m-win_amd64.whl", hash = "sha256:6a3f3315e2b553db3463f07324f62dfebaf3b97656a87558e59e2f1f816eaf15"}, + {file = "duckdb-0.7.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:278edb8c912d836b3b77fd1695887e1dbd736137c3912478af3608c9d7307bb0"}, + {file = "duckdb-0.7.1-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e189b558d10b58fe6ed85ce79f728e143eb4115db1e63147a44db613cd4dd0d9"}, + {file = "duckdb-0.7.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b91ec3544ee4dc9e6abbdf2669475d5adedaaea51987c67acf161673e6b7443"}, + {file = "duckdb-0.7.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:3fe3f3dbd62b76a773144eef31aa29794578c359da932e77fef04516535318ca"}, + {file = "duckdb-0.7.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:1e78c7f59325e99f0b3d9fe7c2bad4aaadf42d2c7711925cc26331d7647a91b2"}, + {file = "duckdb-0.7.1-cp37-cp37m-win32.whl", hash = "sha256:bc2a12d9f4fc8ef2fd1022d610287c9fc9972ea06b7510fc87387f1fa256a390"}, + {file = "duckdb-0.7.1-cp37-cp37m-win_amd64.whl", hash = "sha256:53e3db1bc0f445ee48b23cde47bfba08c7fa5a69976c740ec8cdf89543d2405d"}, + {file = "duckdb-0.7.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:1247cc11bac17f2585d11681329806c86295e32242f84a10a604665e697d5c81"}, + {file = "duckdb-0.7.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:5feaff16a012075b49dfa09d4cb24455938d6b0e06b08e1404ec00089119dba2"}, + {file = "duckdb-0.7.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b411a0c361eab9b26dcd0d0c7a0d1bc0ad6b214068555de7e946fbdd2619961a"}, + {file = "duckdb-0.7.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c7c76d8694ecdb579241ecfeaf03c51d640b984dbbe8e1d9f919089ebf3cdea6"}, + {file = "duckdb-0.7.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:193b896eed44d8751a755ccf002a137630020af0bc3505affa21bf19fdc90df3"}, + {file = "duckdb-0.7.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:7da132ee452c80a3784b8daffd86429fa698e1b0e3ecb84660db96d36c27ad55"}, + {file = "duckdb-0.7.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5fd08c97c3e8cb5bec3822cf78b966b489213dcaab24b25c05a99f7caf8db467"}, + {file = "duckdb-0.7.1-cp38-cp38-win32.whl", hash = "sha256:9cb956f94fa55c4782352dac7cc7572a58312bd7ce97332bb14591d6059f0ea4"}, + {file = "duckdb-0.7.1-cp38-cp38-win_amd64.whl", hash = "sha256:289a5f65213e66d320ebcd51a94787e7097b9d1c3492d01a121a2c809812bf19"}, + {file = "duckdb-0.7.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:8085ad58c9b5854ee3820804fa1797e6b3134429c1506c3faab3cb96e71b07e9"}, + {file = "duckdb-0.7.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b47c19d1f2f662a5951fc6c5f6939d0d3b96689604b529cdcffd9afdcc95bff2"}, + {file = "duckdb-0.7.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6a611f598226fd634b7190f509cc6dd668132ffe436b0a6b43847b4b32b99e4a"}, + {file = "duckdb-0.7.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6730f03b5b78f3943b752c90bdf37b62ae3ac52302282a942cc675825b4a8dc9"}, + {file = "duckdb-0.7.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fe23e938d29cd8ea6953d77dc828b7f5b95a4dbc7cd7fe5bcc3531da8cec3dba"}, + {file = "duckdb-0.7.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:feffe503c2e2a99480e1e5e15176f37796b3675e4dadad446fe7c2cc672aed3c"}, + {file = "duckdb-0.7.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:72fceb06f5bf24ad6bb5974c60d397a7a7e61b3d847507a22276de076f3392e2"}, + {file = "duckdb-0.7.1-cp39-cp39-win32.whl", hash = "sha256:c4d5217437d20d05fe23317bbc161befa1f9363f3622887cd1d2f4719b407936"}, + {file = "duckdb-0.7.1-cp39-cp39-win_amd64.whl", hash = "sha256:066885e1883464ce3b7d1fd844f9431227dcffe1ee39bfd2a05cd6d53f304557"}, + {file = "duckdb-0.7.1.tar.gz", hash = "sha256:a7db6da0366b239ea1e4541fcc19556b286872f5015c9a54c2e347146e25a2ad"}, +] + +[[package]] +name = "et-xmlfile" +version = "1.1.0" +description = "An implementation of lxml.xmlfile for the standard library" +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "et_xmlfile-1.1.0-py3-none-any.whl", hash = "sha256:a2ba85d1d6a74ef63837eed693bcb89c3f752169b0e3e7ae5b16ca5e1b3deada"}, + {file = "et_xmlfile-1.1.0.tar.gz", hash = "sha256:8eb9e2bc2f8c97e37a2dc85a09ecdcdec9d8a396530a6d5a33b30b9a92da0c5c"}, +] + +[[package]] +name = "executing" +version = "1.2.0" +description = "Get the currently executing AST node of a frame, and other information" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "executing-1.2.0-py2.py3-none-any.whl", hash = "sha256:0314a69e37426e3608aada02473b4161d4caf5a4b244d1d0c48072b8fee7bacc"}, + {file = "executing-1.2.0.tar.gz", hash = "sha256:19da64c18d2d851112f09c287f8d3dbbdf725ab0e569077efb6cdcbd3497c107"}, +] + +[package.extras] +tests = ["asttokens", "littleutils", "pytest", "rich"] + +[[package]] +name = "fastjsonschema" +version = "2.16.3" +description = "Fastest Python implementation of JSON schema" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "fastjsonschema-2.16.3-py3-none-any.whl", hash = "sha256:04fbecc94300436f628517b05741b7ea009506ce8f946d40996567c669318490"}, + {file = "fastjsonschema-2.16.3.tar.gz", hash = "sha256:4a30d6315a68c253cfa8f963b9697246315aa3db89f98b97235e345dedfb0b8e"}, +] + +[package.extras] +devel = ["colorama", "json-spec", "jsonschema", "pylint", "pytest", "pytest-benchmark", "pytest-cache", "validictory"] + +[[package]] +name = "fqdn" +version = "1.5.1" +description = "Validates fully-qualified domain names against RFC 1123, so that they are acceptable to modern bowsers" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0, !=3.1, !=3.2, !=3.3, !=3.4, <4" +files = [ + {file = "fqdn-1.5.1-py3-none-any.whl", hash = "sha256:3a179af3761e4df6eb2e026ff9e1a3033d3587bf980a0b1b2e1e5d08d7358014"}, + {file = "fqdn-1.5.1.tar.gz", hash = "sha256:105ed3677e767fb5ca086a0c1f4bb66ebc3c100be518f0e0d755d9eae164d89f"}, +] + +[[package]] +name = "h5netcdf" +version = "1.1.0" +description = "netCDF4 via h5py" +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "h5netcdf-1.1.0-py2.py3-none-any.whl", hash = "sha256:338e65212cee129e4508a49994f230a3083910fbf20454bb57aa1ca99687ad34"}, + {file = "h5netcdf-1.1.0.tar.gz", hash = "sha256:932c3b573bed7370ebfc9e802cd60f1a4da5236efb11b36eeff897324d76bf56"}, +] + +[package.dependencies] +h5py = "*" +packaging = "*" + +[[package]] +name = "h5py" +version = "3.8.0" +description = "Read and write HDF5 files from Python" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "h5py-3.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:533d7dad466ddb7e3b30af274b630eb7c1a6e4ddf01d1c373a0334dc2152110a"}, + {file = "h5py-3.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c873ba9fd4fa875ad62ce0e4891725e257a8fe7f5abdbc17e51a5d54819be55c"}, + {file = "h5py-3.8.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:98a240cd4c1bfd568aaa52ec42d263131a2582dab82d74d3d42a0d954cac12be"}, + {file = "h5py-3.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c3389b63222b1c7a158bb7fe69d11ca00066740ec5574596d47a2fe5317f563a"}, + {file = "h5py-3.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:7f3350fc0a8407d668b13247861c2acd23f7f5fe7d060a3ad9b0820f5fcbcae0"}, + {file = "h5py-3.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:db03e3f2c716205fbdabb34d0848459840585225eb97b4f08998c743821ca323"}, + {file = "h5py-3.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:36761693efbe53df179627a775476dcbc37727d6e920958277a7efbc18f1fb73"}, + {file = "h5py-3.8.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4a506fc223def428f4329e7e1f9fe1c8c593eab226e7c0942c8d75308ad49950"}, + {file = "h5py-3.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:33b15aae79e9147aebe1d0e54099cbcde8d65e3e227cd5b59e49b1272aa0e09d"}, + {file = "h5py-3.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:9f6f6ffadd6bfa9b2c5b334805eb4b19ca0a5620433659d8f7fb86692c40a359"}, + {file = "h5py-3.8.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8f55d9c6c84d7d09c79fb85979e97b81ec6071cc776a97eb6b96f8f6ec767323"}, + {file = "h5py-3.8.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b685453e538b2b5934c58a644ac3f3b3d0cec1a01b6fb26d57388e9f9b674ad0"}, + {file = "h5py-3.8.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:377865821fe80ad984d003723d6f8890bd54ceeb5981b43c0313b9df95411b30"}, + {file = "h5py-3.8.0-cp37-cp37m-win_amd64.whl", hash = "sha256:0fef76e10b9216657fa37e7edff6d8be0709b25bd5066474c229b56cf0098df9"}, + {file = "h5py-3.8.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:26ffc344ec9984d2cd3ca0265007299a8bac8d85c1ad48f4639d8d3aed2af171"}, + {file = "h5py-3.8.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:bacaa1c16810dd2b3e4417f8e730971b7c4d53d234de61fe4a918db78e80e1e4"}, + {file = "h5py-3.8.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bae730580ae928de409d63cbe4fdca4c82c3ad2bed30511d19d34e995d63c77e"}, + {file = "h5py-3.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f47f757d1b76f0ecb8aa0508ec8d1b390df67a8b67ee2515dc1b046f3a1596ea"}, + {file = "h5py-3.8.0-cp38-cp38-win_amd64.whl", hash = "sha256:f891b17e3a3e974e93f9e34e7cca9f530806543571ce078998676a555837d91d"}, + {file = "h5py-3.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:290e00fa2de74a10688d1bac98d5a9cdd43f14f58e562c580b5b3dfbd358ecae"}, + {file = "h5py-3.8.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:03890b1c123d024fb0239a3279737d5432498c1901c354f8b10d8221d1d16235"}, + {file = "h5py-3.8.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b7865de06779b14d98068da387333ad9bf2756b5b579cc887fac169bc08f87c3"}, + {file = "h5py-3.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:49bc857635f935fa30e92e61ac1e87496df8f260a6945a3235e43a9890426866"}, + {file = "h5py-3.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:5fd2252d1fc364ba0e93dd0b7089f4906b66805cb4e6aca7fa8874ac08649647"}, + {file = "h5py-3.8.0.tar.gz", hash = "sha256:6fead82f0c4000cf38d53f9c030780d81bfa0220218aee13b90b7701c937d95f"}, +] + +[package.dependencies] +numpy = ">=1.14.5" + +[[package]] +name = "idna" +version = "3.4" +description = "Internationalized Domain Names in Applications (IDNA)" +category = "main" +optional = false +python-versions = ">=3.5" +files = [ + {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, + {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, +] + +[[package]] +name = "importlib-metadata" +version = "6.1.0" +description = "Read metadata from Python packages" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "importlib_metadata-6.1.0-py3-none-any.whl", hash = "sha256:ff80f3b5394912eb1b108fcfd444dc78b7f1f3e16b16188054bd01cb9cb86f09"}, + {file = "importlib_metadata-6.1.0.tar.gz", hash = "sha256:43ce9281e097583d758c2c708c4376371261a02c34682491a8e98352365aad20"}, +] + +[package.dependencies] +zipp = ">=0.5" + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +perf = ["ipython"] +testing = ["flake8 (<5)", "flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)"] + +[[package]] +name = "ipykernel" +version = "6.22.0" +description = "IPython Kernel for Jupyter" +category = "main" +optional = false +python-versions = ">=3.8" +files = [ + {file = "ipykernel-6.22.0-py3-none-any.whl", hash = "sha256:1ae6047c1277508933078163721bbb479c3e7292778a04b4bacf0874550977d6"}, + {file = "ipykernel-6.22.0.tar.gz", hash = "sha256:302558b81f1bc22dc259fb2a0c5c7cf2f4c0bdb21b50484348f7bafe7fb71421"}, +] + +[package.dependencies] +appnope = {version = "*", markers = "platform_system == \"Darwin\""} +comm = ">=0.1.1" +debugpy = ">=1.6.5" +ipython = ">=7.23.1" +jupyter-client = ">=6.1.12" +jupyter-core = ">=4.12,<5.0.0 || >=5.1.0" +matplotlib-inline = ">=0.1" +nest-asyncio = "*" +packaging = "*" +psutil = "*" +pyzmq = ">=20" +tornado = ">=6.1" +traitlets = ">=5.4.0" + +[package.extras] +cov = ["coverage[toml]", "curio", "matplotlib", "pytest-cov", "trio"] +docs = ["myst-parser", "pydata-sphinx-theme", "sphinx", "sphinx-autodoc-typehints", "sphinxcontrib-github-alt", "sphinxcontrib-spelling", "trio"] +pyqt5 = ["pyqt5"] +pyside6 = ["pyside6"] +test = ["flaky", "ipyparallel", "pre-commit", "pytest (>=7.0)", "pytest-asyncio", "pytest-cov", "pytest-timeout"] + +[[package]] +name = "ipython" +version = "8.11.0" +description = "IPython: Productive Interactive Computing" +category = "main" +optional = false +python-versions = ">=3.8" +files = [ + {file = "ipython-8.11.0-py3-none-any.whl", hash = "sha256:5b54478e459155a326bf5f42ee4f29df76258c0279c36f21d71ddb560f88b156"}, + {file = "ipython-8.11.0.tar.gz", hash = "sha256:735cede4099dbc903ee540307b9171fbfef4aa75cfcacc5a273b2cda2f02be04"}, +] + +[package.dependencies] +appnope = {version = "*", markers = "sys_platform == \"darwin\""} +backcall = "*" +colorama = {version = "*", markers = "sys_platform == \"win32\""} +decorator = "*" +jedi = ">=0.16" +matplotlib-inline = "*" +pexpect = {version = ">4.3", markers = "sys_platform != \"win32\""} +pickleshare = "*" +prompt-toolkit = ">=3.0.30,<3.0.37 || >3.0.37,<3.1.0" +pygments = ">=2.4.0" +stack-data = "*" +traitlets = ">=5" + +[package.extras] +all = ["black", "curio", "docrepr", "ipykernel", "ipyparallel", "ipywidgets", "matplotlib", "matplotlib (!=3.2.0)", "nbconvert", "nbformat", "notebook", "numpy (>=1.21)", "pandas", "pytest (<7)", "pytest (<7.1)", "pytest-asyncio", "qtconsole", "setuptools (>=18.5)", "sphinx (>=1.3)", "sphinx-rtd-theme", "stack-data", "testpath", "trio", "typing-extensions"] +black = ["black"] +doc = ["docrepr", "ipykernel", "matplotlib", "pytest (<7)", "pytest (<7.1)", "pytest-asyncio", "setuptools (>=18.5)", "sphinx (>=1.3)", "sphinx-rtd-theme", "stack-data", "testpath", "typing-extensions"] +kernel = ["ipykernel"] +nbconvert = ["nbconvert"] +nbformat = ["nbformat"] +notebook = ["ipywidgets", "notebook"] +parallel = ["ipyparallel"] +qtconsole = ["qtconsole"] +test = ["pytest (<7.1)", "pytest-asyncio", "testpath"] +test-extra = ["curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.21)", "pandas", "pytest (<7.1)", "pytest-asyncio", "testpath", "trio"] + +[[package]] +name = "ipython-genutils" +version = "0.2.0" +description = "Vestigial utilities from IPython" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "ipython_genutils-0.2.0-py2.py3-none-any.whl", hash = "sha256:72dd37233799e619666c9f639a9da83c34013a73e8bbc79a7a6348d93c61fab8"}, + {file = "ipython_genutils-0.2.0.tar.gz", hash = "sha256:eb2e116e75ecef9d4d228fdc66af54269afa26ab4463042e33785b887c628ba8"}, +] + +[[package]] +name = "isoduration" +version = "20.11.0" +description = "Operations with ISO 8601 durations" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "isoduration-20.11.0-py3-none-any.whl", hash = "sha256:b2904c2a4228c3d44f409c8ae8e2370eb21a26f7ac2ec5446df141dde3452042"}, + {file = "isoduration-20.11.0.tar.gz", hash = "sha256:ac2f9015137935279eac671f94f89eb00584f940f5dc49462a0c4ee692ba1bd9"}, +] + +[package.dependencies] +arrow = ">=0.15.0" + +[[package]] +name = "jedi" +version = "0.18.2" +description = "An autocompletion tool for Python that can be used for text editors." +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "jedi-0.18.2-py2.py3-none-any.whl", hash = "sha256:203c1fd9d969ab8f2119ec0a3342e0b49910045abe6af0a3ae83a5764d54639e"}, + {file = "jedi-0.18.2.tar.gz", hash = "sha256:bae794c30d07f6d910d32a7048af09b5a39ed740918da923c6b780790ebac612"}, +] + +[package.dependencies] +parso = ">=0.8.0,<0.9.0" + +[package.extras] +docs = ["Jinja2 (==2.11.3)", "MarkupSafe (==1.1.1)", "Pygments (==2.8.1)", "alabaster (==0.7.12)", "babel (==2.9.1)", "chardet (==4.0.0)", "commonmark (==0.8.1)", "docutils (==0.17.1)", "future (==0.18.2)", "idna (==2.10)", "imagesize (==1.2.0)", "mock (==1.0.1)", "packaging (==20.9)", "pyparsing (==2.4.7)", "pytz (==2021.1)", "readthedocs-sphinx-ext (==2.1.4)", "recommonmark (==0.5.0)", "requests (==2.25.1)", "six (==1.15.0)", "snowballstemmer (==2.1.0)", "sphinx (==1.8.5)", "sphinx-rtd-theme (==0.4.3)", "sphinxcontrib-serializinghtml (==1.1.4)", "sphinxcontrib-websupport (==1.2.4)", "urllib3 (==1.26.4)"] +qa = ["flake8 (==3.8.3)", "mypy (==0.782)"] +testing = ["Django (<3.1)", "attrs", "colorama", "docopt", "pytest (<7.0.0)"] + +[[package]] +name = "jinja2" +version = "3.1.2" +description = "A very fast and expressive template engine." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, + {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, +] + +[package.dependencies] +MarkupSafe = ">=2.0" + +[package.extras] +i18n = ["Babel (>=2.7)"] + +[[package]] +name = "json5" +version = "0.9.11" +description = "A Python implementation of the JSON5 data format." +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "json5-0.9.11-py2.py3-none-any.whl", hash = "sha256:1aa54b80b5e507dfe31d12b7743a642e2ffa6f70bf73b8e3d7d1d5fba83d99bd"}, + {file = "json5-0.9.11.tar.gz", hash = "sha256:4f1e196acc55b83985a51318489f345963c7ba84aa37607e49073066c562e99b"}, +] + +[package.extras] +dev = ["hypothesis"] + +[[package]] +name = "jsonpointer" +version = "2.3" +description = "Identify specific nodes in a JSON document (RFC 6901)" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "jsonpointer-2.3-py2.py3-none-any.whl", hash = "sha256:51801e558539b4e9cd268638c078c6c5746c9ac96bc38152d443400e4f3793e9"}, + {file = "jsonpointer-2.3.tar.gz", hash = "sha256:97cba51526c829282218feb99dab1b1e6bdf8efd1c43dc9d57be093c0d69c99a"}, +] + +[[package]] +name = "jsonschema" +version = "4.17.3" +description = "An implementation of JSON Schema validation for Python" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "jsonschema-4.17.3-py3-none-any.whl", hash = "sha256:a870ad254da1a8ca84b6a2905cac29d265f805acc57af304784962a2aa6508f6"}, + {file = "jsonschema-4.17.3.tar.gz", hash = "sha256:0f864437ab8b6076ba6707453ef8f98a6a0d512a80e93f8abdb676f737ecb60d"}, +] + +[package.dependencies] +attrs = ">=17.4.0" +fqdn = {version = "*", optional = true, markers = "extra == \"format-nongpl\""} +idna = {version = "*", optional = true, markers = "extra == \"format-nongpl\""} +isoduration = {version = "*", optional = true, markers = "extra == \"format-nongpl\""} +jsonpointer = {version = ">1.13", optional = true, markers = "extra == \"format-nongpl\""} +pyrsistent = ">=0.14.0,<0.17.0 || >0.17.0,<0.17.1 || >0.17.1,<0.17.2 || >0.17.2" +rfc3339-validator = {version = "*", optional = true, markers = "extra == \"format-nongpl\""} +rfc3986-validator = {version = ">0.1.0", optional = true, markers = "extra == \"format-nongpl\""} +uri-template = {version = "*", optional = true, markers = "extra == \"format-nongpl\""} +webcolors = {version = ">=1.11", optional = true, markers = "extra == \"format-nongpl\""} + +[package.extras] +format = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3987", "uri-template", "webcolors (>=1.11)"] +format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "uri-template", "webcolors (>=1.11)"] + +[[package]] +name = "jupyter-client" +version = "8.1.0" +description = "Jupyter protocol implementation and client libraries" +category = "main" +optional = false +python-versions = ">=3.8" +files = [ + {file = "jupyter_client-8.1.0-py3-none-any.whl", hash = "sha256:d5b8e739d7816944be50f81121a109788a3d92732ecf1ad1e4dadebc948818fe"}, + {file = "jupyter_client-8.1.0.tar.gz", hash = "sha256:3fbab64100a0dcac7701b1e0f1a4412f1ccb45546ff2ad9bc4fcbe4e19804811"}, +] + +[package.dependencies] +importlib-metadata = {version = ">=4.8.3", markers = "python_version < \"3.10\""} +jupyter-core = ">=4.12,<5.0.0 || >=5.1.0" +python-dateutil = ">=2.8.2" +pyzmq = ">=23.0" +tornado = ">=6.2" +traitlets = ">=5.3" + +[package.extras] +docs = ["ipykernel", "myst-parser", "pydata-sphinx-theme", "sphinx (>=4)", "sphinx-autodoc-typehints", "sphinxcontrib-github-alt", "sphinxcontrib-spelling"] +test = ["codecov", "coverage", "ipykernel (>=6.14)", "mypy", "paramiko", "pre-commit", "pytest", "pytest-cov", "pytest-jupyter[client] (>=0.4.1)", "pytest-timeout"] + +[[package]] +name = "jupyter-core" +version = "5.3.0" +description = "Jupyter core package. A base package on which Jupyter projects rely." +category = "main" +optional = false +python-versions = ">=3.8" +files = [ + {file = "jupyter_core-5.3.0-py3-none-any.whl", hash = "sha256:d4201af84559bc8c70cead287e1ab94aeef3c512848dde077b7684b54d67730d"}, + {file = "jupyter_core-5.3.0.tar.gz", hash = "sha256:6db75be0c83edbf1b7c9f91ec266a9a24ef945da630f3120e1a0046dc13713fc"}, +] + +[package.dependencies] +platformdirs = ">=2.5" +pywin32 = {version = ">=300", markers = "sys_platform == \"win32\" and platform_python_implementation != \"PyPy\""} +traitlets = ">=5.3" + +[package.extras] +docs = ["myst-parser", "sphinx-autodoc-typehints", "sphinxcontrib-github-alt", "sphinxcontrib-spelling", "traitlets"] +test = ["ipykernel", "pre-commit", "pytest", "pytest-cov", "pytest-timeout"] + +[[package]] +name = "jupyter-events" +version = "0.6.3" +description = "Jupyter Event System library" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "jupyter_events-0.6.3-py3-none-any.whl", hash = "sha256:57a2749f87ba387cd1bfd9b22a0875b889237dbf2edc2121ebb22bde47036c17"}, + {file = "jupyter_events-0.6.3.tar.gz", hash = "sha256:9a6e9995f75d1b7146b436ea24d696ce3a35bfa8bfe45e0c33c334c79464d0b3"}, +] + +[package.dependencies] +jsonschema = {version = ">=3.2.0", extras = ["format-nongpl"]} +python-json-logger = ">=2.0.4" +pyyaml = ">=5.3" +rfc3339-validator = "*" +rfc3986-validator = ">=0.1.1" +traitlets = ">=5.3" + +[package.extras] +cli = ["click", "rich"] +docs = ["jupyterlite-sphinx", "myst-parser", "pydata-sphinx-theme", "sphinxcontrib-spelling"] +test = ["click", "coverage", "pre-commit", "pytest (>=7.0)", "pytest-asyncio (>=0.19.0)", "pytest-console-scripts", "pytest-cov", "rich"] + +[[package]] +name = "jupyter-server" +version = "2.5.0" +description = "The backend—i.e. core services, APIs, and REST endpoints—to Jupyter web applications." +category = "main" +optional = false +python-versions = ">=3.8" +files = [ + {file = "jupyter_server-2.5.0-py3-none-any.whl", hash = "sha256:e6bc1e9e96d7c55b9ce9699ff6cb9a910581fe7349e27c40389acb67632e24c0"}, + {file = "jupyter_server-2.5.0.tar.gz", hash = "sha256:9fde612791f716fd34d610cd939704a9639643744751ba66e7ee8fdc9cead07e"}, +] + +[package.dependencies] +anyio = ">=3.1.0" +argon2-cffi = "*" +jinja2 = "*" +jupyter-client = ">=7.4.4" +jupyter-core = ">=4.12,<5.0.0 || >=5.1.0" +jupyter-events = ">=0.4.0" +jupyter-server-terminals = "*" +nbconvert = ">=6.4.4" +nbformat = ">=5.3.0" +packaging = "*" +prometheus-client = "*" +pywinpty = {version = "*", markers = "os_name == \"nt\""} +pyzmq = ">=24" +send2trash = "*" +terminado = ">=0.8.3" +tornado = ">=6.2.0" +traitlets = ">=5.6.0" +websocket-client = "*" + +[package.extras] +docs = ["docutils (<0.20)", "ipykernel", "jinja2", "jupyter-client", "jupyter-server", "mistune (<1.0.0)", "myst-parser", "nbformat", "prometheus-client", "pydata-sphinx-theme", "send2trash", "sphinx-autodoc-typehints", "sphinxcontrib-github-alt", "sphinxcontrib-openapi", "sphinxcontrib-spelling", "sphinxemoji", "tornado", "typing-extensions"] +test = ["ipykernel", "pre-commit", "pytest (>=7.0)", "pytest-console-scripts", "pytest-jupyter[server] (>=0.4)", "pytest-timeout", "requests"] + +[[package]] +name = "jupyter-server-fileid" +version = "0.8.0" +description = "" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "jupyter_server_fileid-0.8.0-py3-none-any.whl", hash = "sha256:6092ef114eddccf6cba69c0f0feb612c2f476f2e9467828809edb854c18806bb"}, + {file = "jupyter_server_fileid-0.8.0.tar.gz", hash = "sha256:1e0816d0857f490fadea11348570f0cba03f70f315c9842225aecfa45882b6af"}, +] + +[package.dependencies] +jupyter-events = ">=0.5.0" +jupyter-server = ">=1.15,<3" + +[package.extras] +cli = ["click"] +test = ["jupyter-server[test] (>=1.15,<3)", "pytest", "pytest-cov"] + +[[package]] +name = "jupyter-server-terminals" +version = "0.4.4" +description = "A Jupyter Server Extension Providing Terminals." +category = "main" +optional = false +python-versions = ">=3.8" +files = [ + {file = "jupyter_server_terminals-0.4.4-py3-none-any.whl", hash = "sha256:75779164661cec02a8758a5311e18bb8eb70c4e86c6b699403100f1585a12a36"}, + {file = "jupyter_server_terminals-0.4.4.tar.gz", hash = "sha256:57ab779797c25a7ba68e97bcfb5d7740f2b5e8a83b5e8102b10438041a7eac5d"}, +] + +[package.dependencies] +pywinpty = {version = ">=2.0.3", markers = "os_name == \"nt\""} +terminado = ">=0.8.3" + +[package.extras] +docs = ["jinja2", "jupyter-server", "mistune (<3.0)", "myst-parser", "nbformat", "packaging", "pydata-sphinx-theme", "sphinxcontrib-github-alt", "sphinxcontrib-openapi", "sphinxcontrib-spelling", "sphinxemoji", "tornado"] +test = ["coverage", "jupyter-server (>=2.0.0)", "pytest (>=7.0)", "pytest-cov", "pytest-jupyter[server] (>=0.5.3)", "pytest-timeout"] + +[[package]] +name = "jupyter-server-ydoc" +version = "0.8.0" +description = "A Jupyter Server Extension Providing Y Documents." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "jupyter_server_ydoc-0.8.0-py3-none-any.whl", hash = "sha256:969a3a1a77ed4e99487d60a74048dc9fa7d3b0dcd32e60885d835bbf7ba7be11"}, + {file = "jupyter_server_ydoc-0.8.0.tar.gz", hash = "sha256:a6fe125091792d16c962cc3720c950c2b87fcc8c3ecf0c54c84e9a20b814526c"}, +] + +[package.dependencies] +jupyter-server-fileid = ">=0.6.0,<1" +jupyter-ydoc = ">=0.2.0,<0.4.0" +ypy-websocket = ">=0.8.2,<0.9.0" + +[package.extras] +test = ["coverage", "jupyter-server[test] (>=2.0.0a0)", "pytest (>=7.0)", "pytest-cov", "pytest-timeout", "pytest-tornasync"] + +[[package]] +name = "jupyter-ydoc" +version = "0.2.3" +description = "Document structures for collaborative editing using Ypy" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "jupyter_ydoc-0.2.3-py3-none-any.whl", hash = "sha256:3ac51abfe378c6aeb62a449e8f0241bede1205f0199b0d27429140cbba950f79"}, + {file = "jupyter_ydoc-0.2.3.tar.gz", hash = "sha256:98db7785215873c64d7dfcb1b741f41df11994c4b3d7e2957e004b392d6f11ea"}, +] + +[package.dependencies] +importlib-metadata = {version = ">=3.6", markers = "python_version < \"3.10\""} +y-py = ">=0.5.3,<0.6.0" + +[package.extras] +dev = ["click", "jupyter-releaser"] +test = ["pre-commit", "pytest", "pytest-asyncio", "websockets (>=10.0)", "ypy-websocket (>=0.3.1,<0.4.0)"] + +[[package]] +name = "jupyterlab" +version = "3.6.2" +description = "JupyterLab computational environment" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "jupyterlab-3.6.2-py3-none-any.whl", hash = "sha256:6c87c5910f886a14009352bc63f640961b206f73ed650dcf94d65f9dfcb30f95"}, + {file = "jupyterlab-3.6.2.tar.gz", hash = "sha256:e55bc40c36c2a52b76cf301138507a5488eb769137dd39d9f31a6259a00c6b03"}, +] + +[package.dependencies] +ipython = "*" +jinja2 = ">=2.1" +jupyter-core = "*" +jupyter-server = ">=1.16.0,<3" +jupyter-server-ydoc = ">=0.8.0,<0.9.0" +jupyter-ydoc = ">=0.2.3,<0.3.0" +jupyterlab-server = ">=2.19,<3.0" +nbclassic = "*" +notebook = "<7" +packaging = "*" +tomli = {version = "*", markers = "python_version < \"3.11\""} +tornado = ">=6.1.0" + +[package.extras] +test = ["check-manifest", "coverage", "jupyterlab-server[test]", "pre-commit", "pytest (>=6.0)", "pytest-check-links (>=0.5)", "pytest-console-scripts", "pytest-cov", "pytest-jupyter (>=0.5.3)", "requests", "requests-cache", "virtualenv"] + +[[package]] +name = "jupyterlab-pygments" +version = "0.2.2" +description = "Pygments theme using JupyterLab CSS variables" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "jupyterlab_pygments-0.2.2-py2.py3-none-any.whl", hash = "sha256:2405800db07c9f770863bcf8049a529c3dd4d3e28536638bd7c1c01d2748309f"}, + {file = "jupyterlab_pygments-0.2.2.tar.gz", hash = "sha256:7405d7fde60819d905a9fa8ce89e4cd830e318cdad22a0030f7a901da705585d"}, +] + +[[package]] +name = "jupyterlab-server" +version = "2.20.0" +description = "A set of server components for JupyterLab and JupyterLab like applications." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "jupyterlab_server-2.20.0-py3-none-any.whl", hash = "sha256:0203f96913187a9e7a6c8cef3556b499d2be67f014ad4ce9b76c8dcdcadb2367"}, + {file = "jupyterlab_server-2.20.0.tar.gz", hash = "sha256:75e81a8ef23f561b70f5c9a76de2ab9ebb291358b371d6260f51af7e347da719"}, +] + +[package.dependencies] +babel = ">=2.10" +importlib-metadata = {version = ">=4.8.3", markers = "python_version < \"3.10\""} +jinja2 = ">=3.0.3" +json5 = ">=0.9.0" +jsonschema = ">=4.17.3" +jupyter-server = ">=1.21,<3" +packaging = ">=21.3" +requests = ">=2.28" + +[package.extras] +docs = ["autodoc-traits", "docutils (<0.20)", "jinja2 (<3.2.0)", "mistune (<3)", "myst-parser", "pydata-sphinx-theme", "sphinx", "sphinx-copybutton", "sphinxcontrib-openapi"] +openapi = ["openapi-core (>=0.16.1,<0.17.0)", "ruamel-yaml"] +test = ["codecov", "ipykernel", "jupyterlab-server[openapi]", "openapi-spec-validator (>=0.5.1,<0.6.0)", "pytest (>=7.0)", "pytest-console-scripts", "pytest-cov", "pytest-jupyter[server] (>=0.6.2)", "pytest-timeout", "requests-mock", "sphinxcontrib-spelling", "strict-rfc3339", "werkzeug"] + +[[package]] +name = "markupsafe" +version = "2.1.2" +description = "Safely add untrusted strings to HTML/XML markup." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "MarkupSafe-2.1.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:665a36ae6f8f20a4676b53224e33d456a6f5a72657d9c83c2aa00765072f31f7"}, + {file = "MarkupSafe-2.1.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:340bea174e9761308703ae988e982005aedf427de816d1afe98147668cc03036"}, + {file = "MarkupSafe-2.1.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22152d00bf4a9c7c83960521fc558f55a1adbc0631fbb00a9471e097b19d72e1"}, + {file = "MarkupSafe-2.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:28057e985dace2f478e042eaa15606c7efccb700797660629da387eb289b9323"}, + {file = "MarkupSafe-2.1.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca244fa73f50a800cf8c3ebf7fd93149ec37f5cb9596aa8873ae2c1d23498601"}, + {file = "MarkupSafe-2.1.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d9d971ec1e79906046aa3ca266de79eac42f1dbf3612a05dc9368125952bd1a1"}, + {file = "MarkupSafe-2.1.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:7e007132af78ea9df29495dbf7b5824cb71648d7133cf7848a2a5dd00d36f9ff"}, + {file = "MarkupSafe-2.1.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7313ce6a199651c4ed9d7e4cfb4aa56fe923b1adf9af3b420ee14e6d9a73df65"}, + {file = "MarkupSafe-2.1.2-cp310-cp310-win32.whl", hash = "sha256:c4a549890a45f57f1ebf99c067a4ad0cb423a05544accaf2b065246827ed9603"}, + {file = "MarkupSafe-2.1.2-cp310-cp310-win_amd64.whl", hash = "sha256:835fb5e38fd89328e9c81067fd642b3593c33e1e17e2fdbf77f5676abb14a156"}, + {file = "MarkupSafe-2.1.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:2ec4f2d48ae59bbb9d1f9d7efb9236ab81429a764dedca114f5fdabbc3788013"}, + {file = "MarkupSafe-2.1.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:608e7073dfa9e38a85d38474c082d4281f4ce276ac0010224eaba11e929dd53a"}, + {file = "MarkupSafe-2.1.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:65608c35bfb8a76763f37036547f7adfd09270fbdbf96608be2bead319728fcd"}, + {file = "MarkupSafe-2.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2bfb563d0211ce16b63c7cb9395d2c682a23187f54c3d79bfec33e6705473c6"}, + {file = "MarkupSafe-2.1.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:da25303d91526aac3672ee6d49a2f3db2d9502a4a60b55519feb1a4c7714e07d"}, + {file = "MarkupSafe-2.1.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:9cad97ab29dfc3f0249b483412c85c8ef4766d96cdf9dcf5a1e3caa3f3661cf1"}, + {file = "MarkupSafe-2.1.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:085fd3201e7b12809f9e6e9bc1e5c96a368c8523fad5afb02afe3c051ae4afcc"}, + {file = "MarkupSafe-2.1.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:1bea30e9bf331f3fef67e0a3877b2288593c98a21ccb2cf29b74c581a4eb3af0"}, + {file = "MarkupSafe-2.1.2-cp311-cp311-win32.whl", hash = "sha256:7df70907e00c970c60b9ef2938d894a9381f38e6b9db73c5be35e59d92e06625"}, + {file = "MarkupSafe-2.1.2-cp311-cp311-win_amd64.whl", hash = "sha256:e55e40ff0cc8cc5c07996915ad367fa47da6b3fc091fdadca7f5403239c5fec3"}, + {file = "MarkupSafe-2.1.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a6e40afa7f45939ca356f348c8e23048e02cb109ced1eb8420961b2f40fb373a"}, + {file = "MarkupSafe-2.1.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cf877ab4ed6e302ec1d04952ca358b381a882fbd9d1b07cccbfd61783561f98a"}, + {file = "MarkupSafe-2.1.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:63ba06c9941e46fa389d389644e2d8225e0e3e5ebcc4ff1ea8506dce646f8c8a"}, + {file = "MarkupSafe-2.1.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f1cd098434e83e656abf198f103a8207a8187c0fc110306691a2e94a78d0abb2"}, + {file = "MarkupSafe-2.1.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:55f44b440d491028addb3b88f72207d71eeebfb7b5dbf0643f7c023ae1fba619"}, + {file = "MarkupSafe-2.1.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:a6f2fcca746e8d5910e18782f976489939d54a91f9411c32051b4aab2bd7c513"}, + {file = "MarkupSafe-2.1.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:0b462104ba25f1ac006fdab8b6a01ebbfbce9ed37fd37fd4acd70c67c973e460"}, + {file = "MarkupSafe-2.1.2-cp37-cp37m-win32.whl", hash = "sha256:7668b52e102d0ed87cb082380a7e2e1e78737ddecdde129acadb0eccc5423859"}, + {file = "MarkupSafe-2.1.2-cp37-cp37m-win_amd64.whl", hash = "sha256:6d6607f98fcf17e534162f0709aaad3ab7a96032723d8ac8750ffe17ae5a0666"}, + {file = "MarkupSafe-2.1.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:a806db027852538d2ad7555b203300173dd1b77ba116de92da9afbc3a3be3eed"}, + {file = "MarkupSafe-2.1.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:a4abaec6ca3ad8660690236d11bfe28dfd707778e2442b45addd2f086d6ef094"}, + {file = "MarkupSafe-2.1.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f03a532d7dee1bed20bc4884194a16160a2de9ffc6354b3878ec9682bb623c54"}, + {file = "MarkupSafe-2.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4cf06cdc1dda95223e9d2d3c58d3b178aa5dacb35ee7e3bbac10e4e1faacb419"}, + {file = "MarkupSafe-2.1.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:22731d79ed2eb25059ae3df1dfc9cb1546691cc41f4e3130fe6bfbc3ecbbecfa"}, + {file = "MarkupSafe-2.1.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:f8ffb705ffcf5ddd0e80b65ddf7bed7ee4f5a441ea7d3419e861a12eaf41af58"}, + {file = "MarkupSafe-2.1.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:8db032bf0ce9022a8e41a22598eefc802314e81b879ae093f36ce9ddf39ab1ba"}, + {file = "MarkupSafe-2.1.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:2298c859cfc5463f1b64bd55cb3e602528db6fa0f3cfd568d3605c50678f8f03"}, + {file = "MarkupSafe-2.1.2-cp38-cp38-win32.whl", hash = "sha256:50c42830a633fa0cf9e7d27664637532791bfc31c731a87b202d2d8ac40c3ea2"}, + {file = "MarkupSafe-2.1.2-cp38-cp38-win_amd64.whl", hash = "sha256:bb06feb762bade6bf3c8b844462274db0c76acc95c52abe8dbed28ae3d44a147"}, + {file = "MarkupSafe-2.1.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:99625a92da8229df6d44335e6fcc558a5037dd0a760e11d84be2260e6f37002f"}, + {file = "MarkupSafe-2.1.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8bca7e26c1dd751236cfb0c6c72d4ad61d986e9a41bbf76cb445f69488b2a2bd"}, + {file = "MarkupSafe-2.1.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40627dcf047dadb22cd25ea7ecfe9cbf3bbbad0482ee5920b582f3809c97654f"}, + {file = "MarkupSafe-2.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:40dfd3fefbef579ee058f139733ac336312663c6706d1163b82b3003fb1925c4"}, + {file = "MarkupSafe-2.1.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:090376d812fb6ac5f171e5938e82e7f2d7adc2b629101cec0db8b267815c85e2"}, + {file = "MarkupSafe-2.1.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2e7821bffe00aa6bd07a23913b7f4e01328c3d5cc0b40b36c0bd81d362faeb65"}, + {file = "MarkupSafe-2.1.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:c0a33bc9f02c2b17c3ea382f91b4db0e6cde90b63b296422a939886a7a80de1c"}, + {file = "MarkupSafe-2.1.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:b8526c6d437855442cdd3d87eede9c425c4445ea011ca38d937db299382e6fa3"}, + {file = "MarkupSafe-2.1.2-cp39-cp39-win32.whl", hash = "sha256:137678c63c977754abe9086a3ec011e8fd985ab90631145dfb9294ad09c102a7"}, + {file = "MarkupSafe-2.1.2-cp39-cp39-win_amd64.whl", hash = "sha256:0576fe974b40a400449768941d5d0858cc624e3249dfd1e0c33674e5c7ca7aed"}, + {file = "MarkupSafe-2.1.2.tar.gz", hash = "sha256:abcabc8c2b26036d62d4c746381a6f7cf60aafcc653198ad678306986b09450d"}, +] + +[[package]] +name = "matplotlib-inline" +version = "0.1.6" +description = "Inline Matplotlib backend for Jupyter" +category = "main" +optional = false +python-versions = ">=3.5" +files = [ + {file = "matplotlib-inline-0.1.6.tar.gz", hash = "sha256:f887e5f10ba98e8d2b150ddcf4702c1e5f8b3a20005eb0f74bfdbd360ee6f304"}, + {file = "matplotlib_inline-0.1.6-py3-none-any.whl", hash = "sha256:f1f41aab5328aa5aaea9b16d083b128102f8712542f819fe7e6a420ff581b311"}, +] + +[package.dependencies] +traitlets = "*" + +[[package]] +name = "mckit-nuclides" +version = "0.2.1" +description = "Python tools to work with elements and isotopes" +category = "main" +optional = false +python-versions = ">=3.8,<4.0" +files = [ + {file = "mckit_nuclides-0.2.1-py3-none-any.whl", hash = "sha256:da23103ccf0af001096d00ec2d8d4005d3081952c49f2699642e9232e3eaafb0"}, + {file = "mckit_nuclides-0.2.1.tar.gz", hash = "sha256:099f88bb0f7d197a8fa6fe67ee8732988e1cfd4cfe01a2763c13933f8777666c"}, +] + +[package.dependencies] +numpy = ">=1.24.2" +openpyxl = ">=3.0.9" +pandas = ">=1.4.1" + +[[package]] +name = "mistune" +version = "2.0.5" +description = "A sane Markdown parser with useful plugins and renderers" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "mistune-2.0.5-py2.py3-none-any.whl", hash = "sha256:bad7f5d431886fcbaf5f758118ecff70d31f75231b34024a1341120340a65ce8"}, + {file = "mistune-2.0.5.tar.gz", hash = "sha256:0246113cb2492db875c6be56974a7c893333bf26cd92891c85f63151cee09d34"}, +] + +[[package]] +name = "multipledispatch" +version = "0.6.0" +description = "Multiple dispatch" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "multipledispatch-0.6.0-py2-none-any.whl", hash = "sha256:407e6d8c5fa27075968ba07c4db3ef5f02bea4e871e959570eeb69ee39a6565b"}, + {file = "multipledispatch-0.6.0-py3-none-any.whl", hash = "sha256:a55c512128fb3f7c2efd2533f2550accb93c35f1045242ef74645fc92a2c3cba"}, + {file = "multipledispatch-0.6.0.tar.gz", hash = "sha256:a7ab1451fd0bf9b92cab3edbd7b205622fb767aeefb4fb536c2e3de9e0a38bea"}, +] + +[package.dependencies] +six = "*" + +[[package]] +name = "nbclassic" +version = "0.5.3" +description = "Jupyter Notebook as a Jupyter Server extension." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "nbclassic-0.5.3-py3-none-any.whl", hash = "sha256:e849277872d9ffd8fe4b39a8038d01ba82d6a1def9ce11b1b3c26c9546ed5131"}, + {file = "nbclassic-0.5.3.tar.gz", hash = "sha256:889772a7ba524eb781d2901f396540bcad41151e1f7e043f12ebc14a6540d342"}, +] + +[package.dependencies] +argon2-cffi = "*" +ipykernel = "*" +ipython-genutils = "*" +jinja2 = "*" +jupyter-client = ">=6.1.1" +jupyter-core = ">=4.6.1" +jupyter-server = ">=1.8" +nbconvert = ">=5" +nbformat = "*" +nest-asyncio = ">=1.5" +notebook-shim = ">=0.1.0" +prometheus-client = "*" +pyzmq = ">=17" +Send2Trash = ">=1.8.0" +terminado = ">=0.8.3" +tornado = ">=6.1" +traitlets = ">=4.2.1" + +[package.extras] +docs = ["myst-parser", "nbsphinx", "sphinx", "sphinx-rtd-theme", "sphinxcontrib-github-alt"] +json-logging = ["json-logging"] +test = ["coverage", "nbval", "pytest", "pytest-cov", "pytest-jupyter", "pytest-playwright", "pytest-tornasync", "requests", "requests-unixsocket", "testpath"] + +[[package]] +name = "nbclient" +version = "0.7.2" +description = "A client library for executing notebooks. Formerly nbconvert's ExecutePreprocessor." +category = "main" +optional = false +python-versions = ">=3.7.0" +files = [ + {file = "nbclient-0.7.2-py3-none-any.whl", hash = "sha256:d97ac6257de2794f5397609df754fcbca1a603e94e924eb9b99787c031ae2e7c"}, + {file = "nbclient-0.7.2.tar.gz", hash = "sha256:884a3f4a8c4fc24bb9302f263e0af47d97f0d01fe11ba714171b320c8ac09547"}, +] + +[package.dependencies] +jupyter-client = ">=6.1.12" +jupyter-core = ">=4.12,<5.0.0 || >=5.1.0" +nbformat = ">=5.1" +traitlets = ">=5.3" + +[package.extras] +dev = ["pre-commit"] +docs = ["autodoc-traits", "mock", "moto", "myst-parser", "nbclient[test]", "sphinx (>=1.7)", "sphinx-book-theme"] +test = ["ipykernel", "ipython", "ipywidgets", "nbconvert (>=7.0.0)", "pytest (>=7.0)", "pytest-asyncio", "pytest-cov (>=4.0)", "testpath", "xmltodict"] + +[[package]] +name = "nbconvert" +version = "7.2.10" +description = "Converting Jupyter Notebooks" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "nbconvert-7.2.10-py3-none-any.whl", hash = "sha256:e41118f81698d3d59b3c7c2887937446048f741aba6c367c1c1a77810b3e2d08"}, + {file = "nbconvert-7.2.10.tar.gz", hash = "sha256:8eed67bd8314f3ec87c4351c2f674af3a04e5890ab905d6bd927c05aec1cf27d"}, +] + +[package.dependencies] +beautifulsoup4 = "*" +bleach = "*" +defusedxml = "*" +importlib-metadata = {version = ">=3.6", markers = "python_version < \"3.10\""} +jinja2 = ">=3.0" +jupyter-core = ">=4.7" +jupyterlab-pygments = "*" +markupsafe = ">=2.0" +mistune = ">=2.0.3,<3" +nbclient = ">=0.5.0" +nbformat = ">=5.1" +packaging = "*" +pandocfilters = ">=1.4.1" +pygments = ">=2.4.1" +tinycss2 = "*" +traitlets = ">=5.0" + +[package.extras] +all = ["nbconvert[docs,qtpdf,serve,test,webpdf]"] +docs = ["ipykernel", "ipython", "myst-parser", "nbsphinx (>=0.2.12)", "pydata-sphinx-theme", "sphinx (==5.0.2)", "sphinxcontrib-spelling"] +qtpdf = ["nbconvert[qtpng]"] +qtpng = ["pyqtwebengine (>=5.15)"] +serve = ["tornado (>=6.1)"] +test = ["ipykernel", "ipywidgets (>=7)", "pre-commit", "pytest", "pytest-dependency"] +webpdf = ["pyppeteer (>=1,<1.1)"] + +[[package]] +name = "nbformat" +version = "5.8.0" +description = "The Jupyter Notebook format" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "nbformat-5.8.0-py3-none-any.whl", hash = "sha256:d910082bd3e0bffcf07eabf3683ed7dda0727a326c446eeb2922abe102e65162"}, + {file = "nbformat-5.8.0.tar.gz", hash = "sha256:46dac64c781f1c34dfd8acba16547024110348f9fc7eab0f31981c2a3dc48d1f"}, +] + +[package.dependencies] +fastjsonschema = "*" +jsonschema = ">=2.6" +jupyter-core = "*" +traitlets = ">=5.1" + +[package.extras] +docs = ["myst-parser", "pydata-sphinx-theme", "sphinx", "sphinxcontrib-github-alt", "sphinxcontrib-spelling"] +test = ["pep440", "pre-commit", "pytest", "testpath"] + +[[package]] +name = "nest-asyncio" +version = "1.5.6" +description = "Patch asyncio to allow nested event loops" +category = "main" +optional = false +python-versions = ">=3.5" +files = [ + {file = "nest_asyncio-1.5.6-py3-none-any.whl", hash = "sha256:b9a953fb40dceaa587d109609098db21900182b16440652454a146cffb06e8b8"}, + {file = "nest_asyncio-1.5.6.tar.gz", hash = "sha256:d267cc1ff794403f7df692964d1d2a3fa9418ffea2a3f6859a439ff482fef290"}, +] + +[[package]] +name = "notebook" +version = "6.5.3" +description = "A web-based notebook environment for interactive computing" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "notebook-6.5.3-py3-none-any.whl", hash = "sha256:50a334ad9d60b30cb759405168ef6fc3d60350ab5439fb1631544bb09dcb2cce"}, + {file = "notebook-6.5.3.tar.gz", hash = "sha256:b12bee3292211d85dd7e588a790ddce30cb3e8fbcfa1e803522a207f60819e05"}, +] + +[package.dependencies] +argon2-cffi = "*" +ipykernel = "*" +ipython-genutils = "*" +jinja2 = "*" +jupyter-client = ">=5.3.4" +jupyter-core = ">=4.6.1" +nbclassic = ">=0.4.7" +nbconvert = ">=5" +nbformat = "*" +nest-asyncio = ">=1.5" +prometheus-client = "*" +pyzmq = ">=17" +Send2Trash = ">=1.8.0" +terminado = ">=0.8.3" +tornado = ">=6.1" +traitlets = ">=4.2.1" + +[package.extras] +docs = ["myst-parser", "nbsphinx", "sphinx", "sphinx-rtd-theme", "sphinxcontrib-github-alt"] +json-logging = ["json-logging"] +test = ["coverage", "nbval", "pytest", "pytest-cov", "requests", "requests-unixsocket", "selenium (==4.1.5)", "testpath"] + +[[package]] +name = "notebook-shim" +version = "0.2.2" +description = "A shim layer for notebook traits and config" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "notebook_shim-0.2.2-py3-none-any.whl", hash = "sha256:9c6c30f74c4fbea6fce55c1be58e7fd0409b1c681b075dcedceb005db5026949"}, + {file = "notebook_shim-0.2.2.tar.gz", hash = "sha256:090e0baf9a5582ff59b607af523ca2db68ff216da0c69956b62cab2ef4fc9c3f"}, +] + +[package.dependencies] +jupyter-server = ">=1.8,<3" + +[package.extras] +test = ["pytest", "pytest-console-scripts", "pytest-tornasync"] + +[[package]] +name = "numpy" +version = "1.24.2" +description = "Fundamental package for array computing in Python" +category = "main" +optional = false +python-versions = ">=3.8" +files = [ + {file = "numpy-1.24.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:eef70b4fc1e872ebddc38cddacc87c19a3709c0e3e5d20bf3954c147b1dd941d"}, + {file = "numpy-1.24.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e8d2859428712785e8a8b7d2b3ef0a1d1565892367b32f915c4a4df44d0e64f5"}, + {file = "numpy-1.24.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6524630f71631be2dabe0c541e7675db82651eb998496bbe16bc4f77f0772253"}, + {file = "numpy-1.24.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a51725a815a6188c662fb66fb32077709a9ca38053f0274640293a14fdd22978"}, + {file = "numpy-1.24.2-cp310-cp310-win32.whl", hash = "sha256:2620e8592136e073bd12ee4536149380695fbe9ebeae845b81237f986479ffc9"}, + {file = "numpy-1.24.2-cp310-cp310-win_amd64.whl", hash = "sha256:97cf27e51fa078078c649a51d7ade3c92d9e709ba2bfb97493007103c741f1d0"}, + {file = "numpy-1.24.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:7de8fdde0003f4294655aa5d5f0a89c26b9f22c0a58790c38fae1ed392d44a5a"}, + {file = "numpy-1.24.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4173bde9fa2a005c2c6e2ea8ac1618e2ed2c1c6ec8a7657237854d42094123a0"}, + {file = "numpy-1.24.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4cecaed30dc14123020f77b03601559fff3e6cd0c048f8b5289f4eeabb0eb281"}, + {file = "numpy-1.24.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9a23f8440561a633204a67fb44617ce2a299beecf3295f0d13c495518908e910"}, + {file = "numpy-1.24.2-cp311-cp311-win32.whl", hash = "sha256:e428c4fbfa085f947b536706a2fc349245d7baa8334f0c5723c56a10595f9b95"}, + {file = "numpy-1.24.2-cp311-cp311-win_amd64.whl", hash = "sha256:557d42778a6869c2162deb40ad82612645e21d79e11c1dc62c6e82a2220ffb04"}, + {file = "numpy-1.24.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d0a2db9d20117bf523dde15858398e7c0858aadca7c0f088ac0d6edd360e9ad2"}, + {file = "numpy-1.24.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:c72a6b2f4af1adfe193f7beb91ddf708ff867a3f977ef2ec53c0ffb8283ab9f5"}, + {file = "numpy-1.24.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c29e6bd0ec49a44d7690ecb623a8eac5ab8a923bce0bea6293953992edf3a76a"}, + {file = "numpy-1.24.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2eabd64ddb96a1239791da78fa5f4e1693ae2dadc82a76bc76a14cbb2b966e96"}, + {file = "numpy-1.24.2-cp38-cp38-win32.whl", hash = "sha256:e3ab5d32784e843fc0dd3ab6dcafc67ef806e6b6828dc6af2f689be0eb4d781d"}, + {file = "numpy-1.24.2-cp38-cp38-win_amd64.whl", hash = "sha256:76807b4063f0002c8532cfeac47a3068a69561e9c8715efdad3c642eb27c0756"}, + {file = "numpy-1.24.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4199e7cfc307a778f72d293372736223e39ec9ac096ff0a2e64853b866a8e18a"}, + {file = "numpy-1.24.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:adbdce121896fd3a17a77ab0b0b5eedf05a9834a18699db6829a64e1dfccca7f"}, + {file = "numpy-1.24.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:889b2cc88b837d86eda1b17008ebeb679d82875022200c6e8e4ce6cf549b7acb"}, + {file = "numpy-1.24.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f64bb98ac59b3ea3bf74b02f13836eb2e24e48e0ab0145bbda646295769bd780"}, + {file = "numpy-1.24.2-cp39-cp39-win32.whl", hash = "sha256:63e45511ee4d9d976637d11e6c9864eae50e12dc9598f531c035265991910468"}, + {file = "numpy-1.24.2-cp39-cp39-win_amd64.whl", hash = "sha256:a77d3e1163a7770164404607b7ba3967fb49b24782a6ef85d9b5f54126cc39e5"}, + {file = "numpy-1.24.2-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:92011118955724465fb6853def593cf397b4a1367495e0b59a7e69d40c4eb71d"}, + {file = "numpy-1.24.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f9006288bcf4895917d02583cf3411f98631275bc67cce355a7f39f8c14338fa"}, + {file = "numpy-1.24.2-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:150947adbdfeceec4e5926d956a06865c1c690f2fd902efede4ca6fe2e657c3f"}, + {file = "numpy-1.24.2.tar.gz", hash = "sha256:003a9f530e880cb2cd177cba1af7220b9aa42def9c4afc2a2fc3ee6be7eb2b22"}, +] + +[[package]] +name = "openpyxl" +version = "3.1.2" +description = "A Python library to read/write Excel 2010 xlsx/xlsm files" +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "openpyxl-3.1.2-py2.py3-none-any.whl", hash = "sha256:f91456ead12ab3c6c2e9491cf33ba6d08357d802192379bb482f1033ade496f5"}, + {file = "openpyxl-3.1.2.tar.gz", hash = "sha256:a6f5977418eff3b2d5500d54d9db50c8277a368436f4e4f8ddb1be3422870184"}, +] + +[package.dependencies] +et-xmlfile = "*" + +[[package]] +name = "orjson" +version = "3.8.8" +description = "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "orjson-3.8.8-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:18fcdea75d8b571dc9b185652b81397b62878ae7934fd62e6a0103a5b8448e34"}, + {file = "orjson-3.8.8-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:306618884929b596e2e083f82b5617da812df25b0c467542371f1d51f0c5a6f5"}, + {file = "orjson-3.8.8-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:edc65ddb6ae6f8fbb2bbf78ac98f75b729c9eeb0776d5508dd76d3a948dda1dd"}, + {file = "orjson-3.8.8-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e6a6d55e01bce74516dff15302627a13b1f4edcb1c3942dd660978dee423ccf2"}, + {file = "orjson-3.8.8-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:28075c4b502d792fb6703e983d456b2a30d5d6f332d26092eb312dc782e64c64"}, + {file = "orjson-3.8.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9eda4c37e48ff549763183a1549c10eec6ea40439520b17d09359cd74a425069"}, + {file = "orjson-3.8.8-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:a3eac485a15493164867729f44e1e1247b3094ff19d37708e8cdc9c88a93c623"}, + {file = "orjson-3.8.8-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:88bf40e5468444c04374d1b8f1877cebbaef6bb7406cb6b4a34a570c5cbb87bc"}, + {file = "orjson-3.8.8-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:747bd4e09d8aa61e1ff677a7dd1cffd28a5d13c22f3769123c58ec988bf1b83d"}, + {file = "orjson-3.8.8-cp310-none-win_amd64.whl", hash = "sha256:dd7d86c5f5f820ac9d4783477e86eb984b63bdb32359935609eb33cf65049c54"}, + {file = "orjson-3.8.8-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:52293a6097750c2d434737966fe6e2a1ed489ac70cc8e584f5944af83de0b787"}, + {file = "orjson-3.8.8-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:9322450f392dceb49810d2f820b1932af22d66f67f1d45c31f160067dd06359f"}, + {file = "orjson-3.8.8-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:68d59e3ae84a9b6f14b45a89f7fde4a08a87ea5eb76bfc854b354640de8156f5"}, + {file = "orjson-3.8.8-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:022347dad2253081eaa25366834bb8b06a5aceb0e83b39c6b0aa865759e49d69"}, + {file = "orjson-3.8.8-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ddfcc54793e266056fe1c257d0804c336bca1c5c1ee7979d674e1fc19cfb0a6a"}, + {file = "orjson-3.8.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:449d8ed1e0e6b24e9df5a06b59fd66ea7f7293e141257069601ae8ff9fad705c"}, + {file = "orjson-3.8.8-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:0204bc414bc6f7a595211569840b422d96649fd8686efa1fbbcb12eed5dd9521"}, + {file = "orjson-3.8.8-cp311-none-win_amd64.whl", hash = "sha256:e991a5c2c5f2f299c77e1d07ef2812ff5b68e1d97a2aab01aca29cf756473aa3"}, + {file = "orjson-3.8.8-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:2006d9c046bbf335c951f61e016a27bd4f17323dd116f601e4a8a11739cd0a62"}, + {file = "orjson-3.8.8-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:4553d85bad4cbd634a40b7b5d36daaa197a6025f9ce3e2165b371e528759093d"}, + {file = "orjson-3.8.8-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:57ee45d2cc6c11c50afb5a0c09d7cd559aea76c77250dbe996be6a03464d4a50"}, + {file = "orjson-3.8.8-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:02f5b5db1e424706eb9f70f1c25699ff4cef16fadfc64af5b70f8628eafe4771"}, + {file = "orjson-3.8.8-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4d7c9f3b1598a1ccd806ef02257a76a00c7ede09662ddb54eec2b4bd92874254"}, + {file = "orjson-3.8.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b90d171932b6a9d50e79fa2762cb303e3556bbf25c08bb316fe346ec58af9c19"}, + {file = "orjson-3.8.8-cp37-cp37m-manylinux_2_28_x86_64.whl", hash = "sha256:28dfe774c345130f1117c4d023644ec52d9d50e3eaadb9bd1c668d91dc109bb5"}, + {file = "orjson-3.8.8-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:8f84116fcc3714e7ba3cbeb1b11ac5e4549e7d2726c50142f8299fff9dea7d53"}, + {file = "orjson-3.8.8-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:f989f8580db86166aaaa938ccd1597ba1817e3f5df14c047baafe783e3d24173"}, + {file = "orjson-3.8.8-cp37-none-win_amd64.whl", hash = "sha256:66045850f286090800a18662d81d44f88c3fcb60ea3a9947d5caeab5d1efc92e"}, + {file = "orjson-3.8.8-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:2c2c5f3d3bbd61dba646e2b9c54a0dd7941b03fba49726bd31c1c23fedf0b9aa"}, + {file = "orjson-3.8.8-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:9cb36d4a14f3a911369219d5abc19b907bc41ed2730f7bfe0847b0fd3e834c87"}, + {file = "orjson-3.8.8-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:343124f84da0a33c83ee106a98b3e3c42767c88323d4a2809683cbe83816e8be"}, + {file = "orjson-3.8.8-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:24ad122d8dd057acf2a9965a2ffc1bc12fb310ae1cfe2912db930cbb9ef7eaba"}, + {file = "orjson-3.8.8-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c2f28a92a9bcb4e8635524b20db1b539bda8613872f306b36cdfd9d3577d03ac"}, + {file = "orjson-3.8.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:81d3c5b253eebfc4a61cea1f255a576cb2b889afa99f4510f30ec13201d4f457"}, + {file = "orjson-3.8.8-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:317164f7d4c0540a6eb8b0a0faeec84ef011d359da05188423db762b65f84e1d"}, + {file = "orjson-3.8.8-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:5e7e39357371d4ae5649f33c01886508a4c8e5fa5c7344554af041dc0f004c01"}, + {file = "orjson-3.8.8-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:60fefd4bbd796b4296f478e705fe2c2c7defd28da98d3017743eb87c3238a380"}, + {file = "orjson-3.8.8-cp38-none-win_amd64.whl", hash = "sha256:0dc4a52f1087baeec6b58248fd6b01f17c124fb99f6f770596851ea434a7be0b"}, + {file = "orjson-3.8.8-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:a6bcb449537a99f55c5f05187bac00b4549a795e89c10dcca0d7629548852357"}, + {file = "orjson-3.8.8-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:9c98dc791aa44268ba7f6e21124cf885c813b155316c6bf257560571d243fe15"}, + {file = "orjson-3.8.8-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1b2abf93b727a6af7c5ec8816168cbdff39c716af18ced425dd50ae46d69765c"}, + {file = "orjson-3.8.8-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:23447d38375a19d57975d4e32d9ce9f533803c197fd4292e10d3234c052037a8"}, + {file = "orjson-3.8.8-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4c2e19d2b46cc93c7218bf8180807bf922ff61dc9883458a06edc66d22970fff"}, + {file = "orjson-3.8.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e480d74d7bf415e6548a364669404119a85dbe0e3c6cd5f7cb4c7003eac20164"}, + {file = "orjson-3.8.8-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:8e0bff5656b99dd975cae2e5230b39e5909d06c0692fd1f6f06dc46f1fe705d0"}, + {file = "orjson-3.8.8-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:56bb6eb7a254eec3b15feba9b20f4172ccbe6ea50a54cf66cbc8e1e4a19585c2"}, + {file = "orjson-3.8.8-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:1af1cfad5d90b68e15fd625c889c4f9f91d7a88f49512cdb89f01c3881e0c9d9"}, + {file = "orjson-3.8.8-cp39-none-win_amd64.whl", hash = "sha256:d5514dfe200356a1d5a6039e00dca78d87d063f3da1eb6a371253e5a8b7ab5b0"}, + {file = "orjson-3.8.8.tar.gz", hash = "sha256:c096d7a523bae6ffb9c4a228ba4691d66113f0f2231579dc945523fbef09c6da"}, +] + +[[package]] +name = "packaging" +version = "23.0" +description = "Core utilities for Python packages" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "packaging-23.0-py3-none-any.whl", hash = "sha256:714ac14496c3e68c99c29b00845f7a2b85f3bb6f1078fd9f72fd20f0570002b2"}, + {file = "packaging-23.0.tar.gz", hash = "sha256:b6ad297f8907de0fa2fe1ccbd26fdaf387f5f47c7275fedf8cce89f99446cf97"}, +] + +[[package]] +name = "pandas" +version = "1.5.3" +description = "Powerful data structures for data analysis, time series, and statistics" +category = "main" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pandas-1.5.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3749077d86e3a2f0ed51367f30bf5b82e131cc0f14260c4d3e499186fccc4406"}, + {file = "pandas-1.5.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:972d8a45395f2a2d26733eb8d0f629b2f90bebe8e8eddbb8829b180c09639572"}, + {file = "pandas-1.5.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:50869a35cbb0f2e0cd5ec04b191e7b12ed688874bd05dd777c19b28cbea90996"}, + {file = "pandas-1.5.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c3ac844a0fe00bfaeb2c9b51ab1424e5c8744f89860b138434a363b1f620f354"}, + {file = "pandas-1.5.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7a0a56cef15fd1586726dace5616db75ebcfec9179a3a55e78f72c5639fa2a23"}, + {file = "pandas-1.5.3-cp310-cp310-win_amd64.whl", hash = "sha256:478ff646ca42b20376e4ed3fa2e8d7341e8a63105586efe54fa2508ee087f328"}, + {file = "pandas-1.5.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6973549c01ca91ec96199e940495219c887ea815b2083722821f1d7abfa2b4dc"}, + {file = "pandas-1.5.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c39a8da13cede5adcd3be1182883aea1c925476f4e84b2807a46e2775306305d"}, + {file = "pandas-1.5.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f76d097d12c82a535fda9dfe5e8dd4127952b45fea9b0276cb30cca5ea313fbc"}, + {file = "pandas-1.5.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e474390e60ed609cec869b0da796ad94f420bb057d86784191eefc62b65819ae"}, + {file = "pandas-1.5.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5f2b952406a1588ad4cad5b3f55f520e82e902388a6d5a4a91baa8d38d23c7f6"}, + {file = "pandas-1.5.3-cp311-cp311-win_amd64.whl", hash = "sha256:bc4c368f42b551bf72fac35c5128963a171b40dce866fb066540eeaf46faa003"}, + {file = "pandas-1.5.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:14e45300521902689a81f3f41386dc86f19b8ba8dd5ac5a3c7010ef8d2932813"}, + {file = "pandas-1.5.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:9842b6f4b8479e41968eced654487258ed81df7d1c9b7b870ceea24ed9459b31"}, + {file = "pandas-1.5.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:26d9c71772c7afb9d5046e6e9cf42d83dd147b5cf5bcb9d97252077118543792"}, + {file = "pandas-1.5.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5fbcb19d6fceb9e946b3e23258757c7b225ba450990d9ed63ccceeb8cae609f7"}, + {file = "pandas-1.5.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:565fa34a5434d38e9d250af3c12ff931abaf88050551d9fbcdfafca50d62babf"}, + {file = "pandas-1.5.3-cp38-cp38-win32.whl", hash = "sha256:87bd9c03da1ac870a6d2c8902a0e1fd4267ca00f13bc494c9e5a9020920e1d51"}, + {file = "pandas-1.5.3-cp38-cp38-win_amd64.whl", hash = "sha256:41179ce559943d83a9b4bbacb736b04c928b095b5f25dd2b7389eda08f46f373"}, + {file = "pandas-1.5.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c74a62747864ed568f5a82a49a23a8d7fe171d0c69038b38cedf0976831296fa"}, + {file = "pandas-1.5.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c4c00e0b0597c8e4f59e8d461f797e5d70b4d025880516a8261b2817c47759ee"}, + {file = "pandas-1.5.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a50d9a4336a9621cab7b8eb3fb11adb82de58f9b91d84c2cd526576b881a0c5a"}, + {file = "pandas-1.5.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dd05f7783b3274aa206a1af06f0ceed3f9b412cf665b7247eacd83be41cf7bf0"}, + {file = "pandas-1.5.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9f69c4029613de47816b1bb30ff5ac778686688751a5e9c99ad8c7031f6508e5"}, + {file = "pandas-1.5.3-cp39-cp39-win32.whl", hash = "sha256:7cec0bee9f294e5de5bbfc14d0573f65526071029d036b753ee6507d2a21480a"}, + {file = "pandas-1.5.3-cp39-cp39-win_amd64.whl", hash = "sha256:dfd681c5dc216037e0b0a2c821f5ed99ba9f03ebcf119c7dac0e9a7b960b9ec9"}, + {file = "pandas-1.5.3.tar.gz", hash = "sha256:74a3fd7e5a7ec052f183273dc7b0acd3a863edf7520f5d3a1765c04ffdb3b0b1"}, +] + +[package.dependencies] +numpy = [ + {version = ">=1.20.3", markers = "python_version < \"3.10\""}, + {version = ">=1.21.0", markers = "python_version >= \"3.10\""}, + {version = ">=1.23.2", markers = "python_version >= \"3.11\""}, +] +python-dateutil = ">=2.8.1" +pytz = ">=2020.1" + +[package.extras] +test = ["hypothesis (>=5.5.3)", "pytest (>=6.0)", "pytest-xdist (>=1.31)"] + +[[package]] +name = "pandocfilters" +version = "1.5.0" +description = "Utilities for writing pandoc filters in python" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "pandocfilters-1.5.0-py2.py3-none-any.whl", hash = "sha256:33aae3f25fd1a026079f5d27bdd52496f0e0803b3469282162bafdcbdf6ef14f"}, + {file = "pandocfilters-1.5.0.tar.gz", hash = "sha256:0b679503337d233b4339a817bfc8c50064e2eff681314376a47cb582305a7a38"}, +] + +[[package]] +name = "parso" +version = "0.8.3" +description = "A Python Parser" +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "parso-0.8.3-py2.py3-none-any.whl", hash = "sha256:c001d4636cd3aecdaf33cbb40aebb59b094be2a74c556778ef5576c175e19e75"}, + {file = "parso-0.8.3.tar.gz", hash = "sha256:8c07be290bb59f03588915921e29e8a50002acaf2cdc5fa0e0114f91709fafa0"}, +] + +[package.extras] +qa = ["flake8 (==3.8.3)", "mypy (==0.782)"] +testing = ["docopt", "pytest (<6.0.0)"] + +[[package]] +name = "pexpect" +version = "4.8.0" +description = "Pexpect allows easy control of interactive console applications." +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "pexpect-4.8.0-py2.py3-none-any.whl", hash = "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937"}, + {file = "pexpect-4.8.0.tar.gz", hash = "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c"}, +] + +[package.dependencies] +ptyprocess = ">=0.5" + +[[package]] +name = "pickleshare" +version = "0.7.5" +description = "Tiny 'shelve'-like database with concurrency support" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "pickleshare-0.7.5-py2.py3-none-any.whl", hash = "sha256:9649af414d74d4df115d5d718f82acb59c9d418196b7b4290ed47a12ce62df56"}, + {file = "pickleshare-0.7.5.tar.gz", hash = "sha256:87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca"}, +] + +[[package]] +name = "platformdirs" +version = "3.1.1" +description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "platformdirs-3.1.1-py3-none-any.whl", hash = "sha256:e5986afb596e4bb5bde29a79ac9061aa955b94fca2399b7aaac4090860920dd8"}, + {file = "platformdirs-3.1.1.tar.gz", hash = "sha256:024996549ee88ec1a9aa99ff7f8fc819bb59e2c3477b410d90a16d32d6e707aa"}, +] + +[package.extras] +docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.22,!=1.23.4)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.2.2)", "pytest (>=7.2.1)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] + +[[package]] +name = "prometheus-client" +version = "0.16.0" +description = "Python client for the Prometheus monitoring system." +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "prometheus_client-0.16.0-py3-none-any.whl", hash = "sha256:0836af6eb2c8f4fed712b2f279f6c0a8bbab29f9f4aa15276b91c7cb0d1616ab"}, + {file = "prometheus_client-0.16.0.tar.gz", hash = "sha256:a03e35b359f14dd1630898543e2120addfdeacd1a6069c1367ae90fd93ad3f48"}, +] + +[package.extras] +twisted = ["twisted"] + +[[package]] +name = "prompt-toolkit" +version = "3.0.38" +description = "Library for building powerful interactive command lines in Python" +category = "main" +optional = false +python-versions = ">=3.7.0" +files = [ + {file = "prompt_toolkit-3.0.38-py3-none-any.whl", hash = "sha256:45ea77a2f7c60418850331366c81cf6b5b9cf4c7fd34616f733c5427e6abbb1f"}, + {file = "prompt_toolkit-3.0.38.tar.gz", hash = "sha256:23ac5d50538a9a38c8bde05fecb47d0b403ecd0662857a86f886f798563d5b9b"}, +] + +[package.dependencies] +wcwidth = "*" + +[[package]] +name = "psutil" +version = "5.9.4" +description = "Cross-platform lib for process and system monitoring in Python." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "psutil-5.9.4-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:c1ca331af862803a42677c120aff8a814a804e09832f166f226bfd22b56feee8"}, + {file = "psutil-5.9.4-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:68908971daf802203f3d37e78d3f8831b6d1014864d7a85937941bb35f09aefe"}, + {file = "psutil-5.9.4-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:3ff89f9b835100a825b14c2808a106b6fdcc4b15483141482a12c725e7f78549"}, + {file = "psutil-5.9.4-cp27-cp27m-win32.whl", hash = "sha256:852dd5d9f8a47169fe62fd4a971aa07859476c2ba22c2254d4a1baa4e10b95ad"}, + {file = "psutil-5.9.4-cp27-cp27m-win_amd64.whl", hash = "sha256:9120cd39dca5c5e1c54b59a41d205023d436799b1c8c4d3ff71af18535728e94"}, + {file = "psutil-5.9.4-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:6b92c532979bafc2df23ddc785ed116fced1f492ad90a6830cf24f4d1ea27d24"}, + {file = "psutil-5.9.4-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:efeae04f9516907be44904cc7ce08defb6b665128992a56957abc9b61dca94b7"}, + {file = "psutil-5.9.4-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:54d5b184728298f2ca8567bf83c422b706200bcbbfafdc06718264f9393cfeb7"}, + {file = "psutil-5.9.4-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:16653106f3b59386ffe10e0bad3bb6299e169d5327d3f187614b1cb8f24cf2e1"}, + {file = "psutil-5.9.4-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:54c0d3d8e0078b7666984e11b12b88af2db11d11249a8ac8920dd5ef68a66e08"}, + {file = "psutil-5.9.4-cp36-abi3-win32.whl", hash = "sha256:149555f59a69b33f056ba1c4eb22bb7bf24332ce631c44a319cec09f876aaeff"}, + {file = "psutil-5.9.4-cp36-abi3-win_amd64.whl", hash = "sha256:fd8522436a6ada7b4aad6638662966de0d61d241cb821239b2ae7013d41a43d4"}, + {file = "psutil-5.9.4-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:6001c809253a29599bc0dfd5179d9f8a5779f9dffea1da0f13c53ee568115e1e"}, + {file = "psutil-5.9.4.tar.gz", hash = "sha256:3d7f9739eb435d4b1338944abe23f49584bde5395f27487d2ee25ad9a8774a62"}, +] + +[package.extras] +test = ["enum34", "ipaddress", "mock", "pywin32", "wmi"] + +[[package]] +name = "ptyprocess" +version = "0.7.0" +description = "Run a subprocess in a pseudo terminal" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, + {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, +] + +[[package]] +name = "pure-eval" +version = "0.2.2" +description = "Safely evaluate AST nodes without side effects" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "pure_eval-0.2.2-py3-none-any.whl", hash = "sha256:01eaab343580944bc56080ebe0a674b39ec44a945e6d09ba7db3cb8cec289350"}, + {file = "pure_eval-0.2.2.tar.gz", hash = "sha256:2b45320af6dfaa1750f543d714b6d1c520a1688dec6fd24d339063ce0aaa9ac3"}, +] + +[package.extras] +tests = ["pytest"] + +[[package]] +name = "pycparser" +version = "2.21" +description = "C parser in Python" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, + {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, +] + +[[package]] +name = "pygments" +version = "2.14.0" +description = "Pygments is a syntax highlighting package written in Python." +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "Pygments-2.14.0-py3-none-any.whl", hash = "sha256:fa7bd7bd2771287c0de303af8bfdfc731f51bd2c6a47ab69d117138893b82717"}, + {file = "Pygments-2.14.0.tar.gz", hash = "sha256:b3ed06a9e8ac9a9aae5a6f5dbe78a8a58655d17b43b93c078f094ddc476ae297"}, +] + +[package.extras] +plugins = ["importlib-metadata"] + +[[package]] +name = "pyrsistent" +version = "0.19.3" +description = "Persistent/Functional/Immutable data structures" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pyrsistent-0.19.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:20460ac0ea439a3e79caa1dbd560344b64ed75e85d8703943e0b66c2a6150e4a"}, + {file = "pyrsistent-0.19.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4c18264cb84b5e68e7085a43723f9e4c1fd1d935ab240ce02c0324a8e01ccb64"}, + {file = "pyrsistent-0.19.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4b774f9288dda8d425adb6544e5903f1fb6c273ab3128a355c6b972b7df39dcf"}, + {file = "pyrsistent-0.19.3-cp310-cp310-win32.whl", hash = "sha256:5a474fb80f5e0d6c9394d8db0fc19e90fa540b82ee52dba7d246a7791712f74a"}, + {file = "pyrsistent-0.19.3-cp310-cp310-win_amd64.whl", hash = "sha256:49c32f216c17148695ca0e02a5c521e28a4ee6c5089f97e34fe24163113722da"}, + {file = "pyrsistent-0.19.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:f0774bf48631f3a20471dd7c5989657b639fd2d285b861237ea9e82c36a415a9"}, + {file = "pyrsistent-0.19.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3ab2204234c0ecd8b9368dbd6a53e83c3d4f3cab10ecaf6d0e772f456c442393"}, + {file = "pyrsistent-0.19.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e42296a09e83028b3476f7073fcb69ffebac0e66dbbfd1bd847d61f74db30f19"}, + {file = "pyrsistent-0.19.3-cp311-cp311-win32.whl", hash = "sha256:64220c429e42a7150f4bfd280f6f4bb2850f95956bde93c6fda1b70507af6ef3"}, + {file = "pyrsistent-0.19.3-cp311-cp311-win_amd64.whl", hash = "sha256:016ad1afadf318eb7911baa24b049909f7f3bb2c5b1ed7b6a8f21db21ea3faa8"}, + {file = "pyrsistent-0.19.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c4db1bd596fefd66b296a3d5d943c94f4fac5bcd13e99bffe2ba6a759d959a28"}, + {file = "pyrsistent-0.19.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aeda827381f5e5d65cced3024126529ddc4289d944f75e090572c77ceb19adbf"}, + {file = "pyrsistent-0.19.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:42ac0b2f44607eb92ae88609eda931a4f0dfa03038c44c772e07f43e738bcac9"}, + {file = "pyrsistent-0.19.3-cp37-cp37m-win32.whl", hash = "sha256:e8f2b814a3dc6225964fa03d8582c6e0b6650d68a232df41e3cc1b66a5d2f8d1"}, + {file = "pyrsistent-0.19.3-cp37-cp37m-win_amd64.whl", hash = "sha256:c9bb60a40a0ab9aba40a59f68214eed5a29c6274c83b2cc206a359c4a89fa41b"}, + {file = "pyrsistent-0.19.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:a2471f3f8693101975b1ff85ffd19bb7ca7dd7c38f8a81701f67d6b4f97b87d8"}, + {file = "pyrsistent-0.19.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cc5d149f31706762c1f8bda2e8c4f8fead6e80312e3692619a75301d3dbb819a"}, + {file = "pyrsistent-0.19.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3311cb4237a341aa52ab8448c27e3a9931e2ee09561ad150ba94e4cfd3fc888c"}, + {file = "pyrsistent-0.19.3-cp38-cp38-win32.whl", hash = "sha256:f0e7c4b2f77593871e918be000b96c8107da48444d57005b6a6bc61fb4331b2c"}, + {file = "pyrsistent-0.19.3-cp38-cp38-win_amd64.whl", hash = "sha256:c147257a92374fde8498491f53ffa8f4822cd70c0d85037e09028e478cababb7"}, + {file = "pyrsistent-0.19.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:b735e538f74ec31378f5a1e3886a26d2ca6351106b4dfde376a26fc32a044edc"}, + {file = "pyrsistent-0.19.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99abb85579e2165bd8522f0c0138864da97847875ecbd45f3e7e2af569bfc6f2"}, + {file = "pyrsistent-0.19.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3a8cb235fa6d3fd7aae6a4f1429bbb1fec1577d978098da1252f0489937786f3"}, + {file = "pyrsistent-0.19.3-cp39-cp39-win32.whl", hash = "sha256:c74bed51f9b41c48366a286395c67f4e894374306b197e62810e0fdaf2364da2"}, + {file = "pyrsistent-0.19.3-cp39-cp39-win_amd64.whl", hash = "sha256:878433581fc23e906d947a6814336eee031a00e6defba224234169ae3d3d6a98"}, + {file = "pyrsistent-0.19.3-py3-none-any.whl", hash = "sha256:ccf0d6bd208f8111179f0c26fdf84ed7c3891982f2edaeae7422575f47e66b64"}, + {file = "pyrsistent-0.19.3.tar.gz", hash = "sha256:1a2994773706bbb4995c31a97bc94f1418314923bd1048c6d964837040376440"}, +] + +[[package]] +name = "python-dateutil" +version = "2.8.2" +description = "Extensions to the standard Python datetime module" +category = "main" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +files = [ + {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, + {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, +] + +[package.dependencies] +six = ">=1.5" + +[[package]] +name = "python-json-logger" +version = "2.0.7" +description = "A python library adding a json log formatter" +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "python-json-logger-2.0.7.tar.gz", hash = "sha256:23e7ec02d34237c5aa1e29a070193a4ea87583bb4e7f8fd06d3de8264c4b2e1c"}, + {file = "python_json_logger-2.0.7-py3-none-any.whl", hash = "sha256:f380b826a991ebbe3de4d897aeec42760035ac760345e57b812938dc8b35e2bd"}, +] + +[[package]] +name = "pytz" +version = "2022.7.1" +description = "World timezone definitions, modern and historical" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "pytz-2022.7.1-py2.py3-none-any.whl", hash = "sha256:78f4f37d8198e0627c5f1143240bb0206b8691d8d7ac6d78fee88b78733f8c4a"}, + {file = "pytz-2022.7.1.tar.gz", hash = "sha256:01a0681c4b9684a28304615eba55d1ab31ae00bf68ec157ec3708a8182dbbcd0"}, +] + +[[package]] +name = "pywin32" +version = "305" +description = "Python for Window Extensions" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "pywin32-305-cp310-cp310-win32.whl", hash = "sha256:421f6cd86e84bbb696d54563c48014b12a23ef95a14e0bdba526be756d89f116"}, + {file = "pywin32-305-cp310-cp310-win_amd64.whl", hash = "sha256:73e819c6bed89f44ff1d690498c0a811948f73777e5f97c494c152b850fad478"}, + {file = "pywin32-305-cp310-cp310-win_arm64.whl", hash = "sha256:742eb905ce2187133a29365b428e6c3b9001d79accdc30aa8969afba1d8470f4"}, + {file = "pywin32-305-cp311-cp311-win32.whl", hash = "sha256:19ca459cd2e66c0e2cc9a09d589f71d827f26d47fe4a9d09175f6aa0256b51c2"}, + {file = "pywin32-305-cp311-cp311-win_amd64.whl", hash = "sha256:326f42ab4cfff56e77e3e595aeaf6c216712bbdd91e464d167c6434b28d65990"}, + {file = "pywin32-305-cp311-cp311-win_arm64.whl", hash = "sha256:4ecd404b2c6eceaca52f8b2e3e91b2187850a1ad3f8b746d0796a98b4cea04db"}, + {file = "pywin32-305-cp36-cp36m-win32.whl", hash = "sha256:48d8b1659284f3c17b68587af047d110d8c44837736b8932c034091683e05863"}, + {file = "pywin32-305-cp36-cp36m-win_amd64.whl", hash = "sha256:13362cc5aa93c2beaf489c9c9017c793722aeb56d3e5166dadd5ef82da021fe1"}, + {file = "pywin32-305-cp37-cp37m-win32.whl", hash = "sha256:a55db448124d1c1484df22fa8bbcbc45c64da5e6eae74ab095b9ea62e6d00496"}, + {file = "pywin32-305-cp37-cp37m-win_amd64.whl", hash = "sha256:109f98980bfb27e78f4df8a51a8198e10b0f347257d1e265bb1a32993d0c973d"}, + {file = "pywin32-305-cp38-cp38-win32.whl", hash = "sha256:9dd98384da775afa009bc04863426cb30596fd78c6f8e4e2e5bbf4edf8029504"}, + {file = "pywin32-305-cp38-cp38-win_amd64.whl", hash = "sha256:56d7a9c6e1a6835f521788f53b5af7912090674bb84ef5611663ee1595860fc7"}, + {file = "pywin32-305-cp39-cp39-win32.whl", hash = "sha256:9d968c677ac4d5cbdaa62fd3014ab241718e619d8e36ef8e11fb930515a1e918"}, + {file = "pywin32-305-cp39-cp39-win_amd64.whl", hash = "sha256:50768c6b7c3f0b38b7fb14dd4104da93ebced5f1a50dc0e834594bff6fbe1271"}, +] + +[[package]] +name = "pywinpty" +version = "2.0.10" +description = "Pseudo terminal support for Windows from Python." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pywinpty-2.0.10-cp310-none-win_amd64.whl", hash = "sha256:4c7d06ad10f6e92bc850a467f26d98f4f30e73d2fe5926536308c6ae0566bc16"}, + {file = "pywinpty-2.0.10-cp311-none-win_amd64.whl", hash = "sha256:7ffbd66310b83e42028fc9df7746118978d94fba8c1ebf15a7c1275fdd80b28a"}, + {file = "pywinpty-2.0.10-cp37-none-win_amd64.whl", hash = "sha256:38cb924f2778b5751ef91a75febd114776b3af0ae411bc667be45dd84fc881d3"}, + {file = "pywinpty-2.0.10-cp38-none-win_amd64.whl", hash = "sha256:902d79444b29ad1833b8d5c3c9aabdfd428f4f068504430df18074007c8c0de8"}, + {file = "pywinpty-2.0.10-cp39-none-win_amd64.whl", hash = "sha256:3c46aef80dd50979aff93de199e4a00a8ee033ba7a03cadf0a91fed45f0c39d7"}, + {file = "pywinpty-2.0.10.tar.gz", hash = "sha256:cdbb5694cf8c7242c2ecfaca35c545d31fa5d5814c3d67a4e628f803f680ebea"}, +] + +[[package]] +name = "pyyaml" +version = "6.0" +description = "YAML parser and emitter for Python" +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "PyYAML-6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53"}, + {file = "PyYAML-6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c"}, + {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc"}, + {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b"}, + {file = "PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5"}, + {file = "PyYAML-6.0-cp310-cp310-win32.whl", hash = "sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513"}, + {file = "PyYAML-6.0-cp310-cp310-win_amd64.whl", hash = "sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a"}, + {file = "PyYAML-6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d4b0ba9512519522b118090257be113b9468d804b19d63c71dbcf4a48fa32358"}, + {file = "PyYAML-6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:81957921f441d50af23654aa6c5e5eaf9b06aba7f0a19c18a538dc7ef291c5a1"}, + {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:afa17f5bc4d1b10afd4466fd3a44dc0e245382deca5b3c353d8b757f9e3ecb8d"}, + {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dbad0e9d368bb989f4515da330b88a057617d16b6a8245084f1b05400f24609f"}, + {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:432557aa2c09802be39460360ddffd48156e30721f5e8d917f01d31694216782"}, + {file = "PyYAML-6.0-cp311-cp311-win32.whl", hash = "sha256:bfaef573a63ba8923503d27530362590ff4f576c626d86a9fed95822a8255fd7"}, + {file = "PyYAML-6.0-cp311-cp311-win_amd64.whl", hash = "sha256:01b45c0191e6d66c470b6cf1b9531a771a83c1c4208272ead47a3ae4f2f603bf"}, + {file = "PyYAML-6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86"}, + {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f"}, + {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92"}, + {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4"}, + {file = "PyYAML-6.0-cp36-cp36m-win32.whl", hash = "sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293"}, + {file = "PyYAML-6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57"}, + {file = "PyYAML-6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c"}, + {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0"}, + {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4"}, + {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:231710d57adfd809ef5d34183b8ed1eeae3f76459c18fb4a0b373ad56bedcdd9"}, + {file = "PyYAML-6.0-cp37-cp37m-win32.whl", hash = "sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737"}, + {file = "PyYAML-6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d"}, + {file = "PyYAML-6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b"}, + {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba"}, + {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34"}, + {file = "PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287"}, + {file = "PyYAML-6.0-cp38-cp38-win32.whl", hash = "sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78"}, + {file = "PyYAML-6.0-cp38-cp38-win_amd64.whl", hash = "sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07"}, + {file = "PyYAML-6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b"}, + {file = "PyYAML-6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174"}, + {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803"}, + {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3"}, + {file = "PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0"}, + {file = "PyYAML-6.0-cp39-cp39-win32.whl", hash = "sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb"}, + {file = "PyYAML-6.0-cp39-cp39-win_amd64.whl", hash = "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c"}, + {file = "PyYAML-6.0.tar.gz", hash = "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"}, +] + +[[package]] +name = "pyzmq" +version = "25.0.2" +description = "Python bindings for 0MQ" +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "pyzmq-25.0.2-cp310-cp310-macosx_10_15_universal2.whl", hash = "sha256:ac178e666c097c8d3deb5097b58cd1316092fc43e8ef5b5fdb259b51da7e7315"}, + {file = "pyzmq-25.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:659e62e1cbb063151c52f5b01a38e1df6b54feccfa3e2509d44c35ca6d7962ee"}, + {file = "pyzmq-25.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8280ada89010735a12b968ec3ea9a468ac2e04fddcc1cede59cb7f5178783b9c"}, + {file = "pyzmq-25.0.2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a9b5eeb5278a8a636bb0abdd9ff5076bcbb836cd2302565df53ff1fa7d106d54"}, + {file = "pyzmq-25.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9a2e5fe42dfe6b73ca120b97ac9f34bfa8414feb15e00e37415dbd51cf227ef6"}, + {file = "pyzmq-25.0.2-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:827bf60e749e78acb408a6c5af6688efbc9993e44ecc792b036ec2f4b4acf485"}, + {file = "pyzmq-25.0.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:7b504ae43d37e282301da586529e2ded8b36d4ee2cd5e6db4386724ddeaa6bbc"}, + {file = "pyzmq-25.0.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:cb1f69a0a2a2b1aae8412979dd6293cc6bcddd4439bf07e4758d864ddb112354"}, + {file = "pyzmq-25.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:2b9c9cc965cdf28381e36da525dcb89fc1571d9c54800fdcd73e3f73a2fc29bd"}, + {file = "pyzmq-25.0.2-cp310-cp310-win32.whl", hash = "sha256:24abbfdbb75ac5039205e72d6c75f10fc39d925f2df8ff21ebc74179488ebfca"}, + {file = "pyzmq-25.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:6a821a506822fac55d2df2085a52530f68ab15ceed12d63539adc32bd4410f6e"}, + {file = "pyzmq-25.0.2-cp311-cp311-macosx_10_15_universal2.whl", hash = "sha256:9af0bb0277e92f41af35e991c242c9c71920169d6aa53ade7e444f338f4c8128"}, + {file = "pyzmq-25.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:54a96cf77684a3a537b76acfa7237b1e79a8f8d14e7f00e0171a94b346c5293e"}, + {file = "pyzmq-25.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88649b19ede1cab03b96b66c364cbbf17c953615cdbc844f7f6e5f14c5e5261c"}, + {file = "pyzmq-25.0.2-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:715cff7644a80a7795953c11b067a75f16eb9fc695a5a53316891ebee7f3c9d5"}, + {file = "pyzmq-25.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:312b3f0f066b4f1d17383aae509bacf833ccaf591184a1f3c7a1661c085063ae"}, + {file = "pyzmq-25.0.2-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:d488c5c8630f7e782e800869f82744c3aca4aca62c63232e5d8c490d3d66956a"}, + {file = "pyzmq-25.0.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:38d9f78d69bcdeec0c11e0feb3bc70f36f9b8c44fc06e5d06d91dc0a21b453c7"}, + {file = "pyzmq-25.0.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:3059a6a534c910e1d5d068df42f60d434f79e6cc6285aa469b384fa921f78cf8"}, + {file = "pyzmq-25.0.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:6526d097b75192f228c09d48420854d53dfbc7abbb41b0e26f363ccb26fbc177"}, + {file = "pyzmq-25.0.2-cp311-cp311-win32.whl", hash = "sha256:5c5fbb229e40a89a2fe73d0c1181916f31e30f253cb2d6d91bea7927c2e18413"}, + {file = "pyzmq-25.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:ed15e3a2c3c2398e6ae5ce86d6a31b452dfd6ad4cd5d312596b30929c4b6e182"}, + {file = "pyzmq-25.0.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:032f5c8483c85bf9c9ca0593a11c7c749d734ce68d435e38c3f72e759b98b3c9"}, + {file = "pyzmq-25.0.2-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:374b55516393bfd4d7a7daa6c3b36d6dd6a31ff9d2adad0838cd6a203125e714"}, + {file = "pyzmq-25.0.2-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:08bfcc21b5997a9be4fefa405341320d8e7f19b4d684fb9c0580255c5bd6d695"}, + {file = "pyzmq-25.0.2-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:1a843d26a8da1b752c74bc019c7b20e6791ee813cd6877449e6a1415589d22ff"}, + {file = "pyzmq-25.0.2-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:b48616a09d7df9dbae2f45a0256eee7b794b903ddc6d8657a9948669b345f220"}, + {file = "pyzmq-25.0.2-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:d4427b4a136e3b7f85516c76dd2e0756c22eec4026afb76ca1397152b0ca8145"}, + {file = "pyzmq-25.0.2-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:26b0358e8933990502f4513c991c9935b6c06af01787a36d133b7c39b1df37fa"}, + {file = "pyzmq-25.0.2-cp36-cp36m-win32.whl", hash = "sha256:c8fedc3ccd62c6b77dfe6f43802057a803a411ee96f14e946f4a76ec4ed0e117"}, + {file = "pyzmq-25.0.2-cp36-cp36m-win_amd64.whl", hash = "sha256:2da6813b7995b6b1d1307329c73d3e3be2fd2d78e19acfc4eff2e27262732388"}, + {file = "pyzmq-25.0.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a35960c8b2f63e4ef67fd6731851030df68e4b617a6715dd11b4b10312d19fef"}, + {file = "pyzmq-25.0.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eef2a0b880ab40aca5a878933376cb6c1ec483fba72f7f34e015c0f675c90b20"}, + {file = "pyzmq-25.0.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:85762712b74c7bd18e340c3639d1bf2f23735a998d63f46bb6584d904b5e401d"}, + {file = "pyzmq-25.0.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:64812f29d6eee565e129ca14b0c785744bfff679a4727137484101b34602d1a7"}, + {file = "pyzmq-25.0.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:510d8e55b3a7cd13f8d3e9121edf0a8730b87d925d25298bace29a7e7bc82810"}, + {file = "pyzmq-25.0.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:b164cc3c8acb3d102e311f2eb6f3c305865ecb377e56adc015cb51f721f1dda6"}, + {file = "pyzmq-25.0.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:28fdb9224a258134784a9cf009b59265a9dde79582fb750d4e88a6bcbc6fa3dc"}, + {file = "pyzmq-25.0.2-cp37-cp37m-win32.whl", hash = "sha256:dd771a440effa1c36d3523bc6ba4e54ff5d2e54b4adcc1e060d8f3ca3721d228"}, + {file = "pyzmq-25.0.2-cp37-cp37m-win_amd64.whl", hash = "sha256:9bdc40efb679b9dcc39c06d25629e55581e4c4f7870a5e88db4f1c51ce25e20d"}, + {file = "pyzmq-25.0.2-cp38-cp38-macosx_10_15_universal2.whl", hash = "sha256:1f82906a2d8e4ee310f30487b165e7cc8ed09c009e4502da67178b03083c4ce0"}, + {file = "pyzmq-25.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:21ec0bf4831988af43c8d66ba3ccd81af2c5e793e1bf6790eb2d50e27b3c570a"}, + {file = "pyzmq-25.0.2-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:abbce982a17c88d2312ec2cf7673985d444f1beaac6e8189424e0a0e0448dbb3"}, + {file = "pyzmq-25.0.2-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:9e1d2f2d86fc75ed7f8845a992c5f6f1ab5db99747fb0d78b5e4046d041164d2"}, + {file = "pyzmq-25.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a2e92ff20ad5d13266bc999a29ed29a3b5b101c21fdf4b2cf420c09db9fb690e"}, + {file = "pyzmq-25.0.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:edbbf06cc2719889470a8d2bf5072bb00f423e12de0eb9ffec946c2c9748e149"}, + {file = "pyzmq-25.0.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:77942243ff4d14d90c11b2afd8ee6c039b45a0be4e53fb6fa7f5e4fd0b59da39"}, + {file = "pyzmq-25.0.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ab046e9cb902d1f62c9cc0eca055b1d11108bdc271caf7c2171487298f229b56"}, + {file = "pyzmq-25.0.2-cp38-cp38-win32.whl", hash = "sha256:ad761cfbe477236802a7ab2c080d268c95e784fe30cafa7e055aacd1ca877eb0"}, + {file = "pyzmq-25.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:8560756318ec7c4c49d2c341012167e704b5a46d9034905853c3d1ade4f55bee"}, + {file = "pyzmq-25.0.2-cp39-cp39-macosx_10_15_universal2.whl", hash = "sha256:ab2c056ac503f25a63f6c8c6771373e2a711b98b304614151dfb552d3d6c81f6"}, + {file = "pyzmq-25.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:cca8524b61c0eaaa3505382dc9b9a3bc8165f1d6c010fdd1452c224225a26689"}, + {file = "pyzmq-25.0.2-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:cfb9f7eae02d3ac42fbedad30006b7407c984a0eb4189a1322241a20944d61e5"}, + {file = "pyzmq-25.0.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:5eaeae038c68748082137d6896d5c4db7927e9349237ded08ee1bbd94f7361c9"}, + {file = "pyzmq-25.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4a31992a8f8d51663ebf79df0df6a04ffb905063083d682d4380ab8d2c67257c"}, + {file = "pyzmq-25.0.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:6a979e59d2184a0c8f2ede4b0810cbdd86b64d99d9cc8a023929e40dce7c86cc"}, + {file = "pyzmq-25.0.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:1f124cb73f1aa6654d31b183810febc8505fd0c597afa127c4f40076be4574e0"}, + {file = "pyzmq-25.0.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:65c19a63b4a83ae45d62178b70223adeee5f12f3032726b897431b6553aa25af"}, + {file = "pyzmq-25.0.2-cp39-cp39-win32.whl", hash = "sha256:83d822e8687621bed87404afc1c03d83fa2ce39733d54c2fd52d8829edb8a7ff"}, + {file = "pyzmq-25.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:24683285cc6b7bf18ad37d75b9db0e0fefe58404e7001f1d82bf9e721806daa7"}, + {file = "pyzmq-25.0.2-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:4a4b4261eb8f9ed71f63b9eb0198dd7c934aa3b3972dac586d0ef502ba9ab08b"}, + {file = "pyzmq-25.0.2-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:62ec8d979f56c0053a92b2b6a10ff54b9ec8a4f187db2b6ec31ee3dd6d3ca6e2"}, + {file = "pyzmq-25.0.2-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:affec1470351178e892121b3414c8ef7803269f207bf9bef85f9a6dd11cde264"}, + {file = "pyzmq-25.0.2-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ffc71111433bd6ec8607a37b9211f4ef42e3d3b271c6d76c813669834764b248"}, + {file = "pyzmq-25.0.2-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:6fadc60970714d86eff27821f8fb01f8328dd36bebd496b0564a500fe4a9e354"}, + {file = "pyzmq-25.0.2-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:269968f2a76c0513490aeb3ba0dc3c77b7c7a11daa894f9d1da88d4a0db09835"}, + {file = "pyzmq-25.0.2-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:f7c8b8368e84381ae7c57f1f5283b029c888504aaf4949c32e6e6fb256ec9bf0"}, + {file = "pyzmq-25.0.2-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:25e6873a70ad5aa31e4a7c41e5e8c709296edef4a92313e1cd5fc87bbd1874e2"}, + {file = "pyzmq-25.0.2-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b733076ff46e7db5504c5e7284f04a9852c63214c74688bdb6135808531755a3"}, + {file = "pyzmq-25.0.2-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:a6f6ae12478fdc26a6d5fdb21f806b08fa5403cd02fd312e4cb5f72df078f96f"}, + {file = "pyzmq-25.0.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:67da1c213fbd208906ab3470cfff1ee0048838365135a9bddc7b40b11e6d6c89"}, + {file = "pyzmq-25.0.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:531e36d9fcd66f18de27434a25b51d137eb546931033f392e85674c7a7cea853"}, + {file = "pyzmq-25.0.2-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:34a6fddd159ff38aa9497b2e342a559f142ab365576284bc8f77cb3ead1f79c5"}, + {file = "pyzmq-25.0.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b491998ef886662c1f3d49ea2198055a9a536ddf7430b051b21054f2a5831800"}, + {file = "pyzmq-25.0.2-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:5d496815074e3e3d183fe2c7fcea2109ad67b74084c254481f87b64e04e9a471"}, + {file = "pyzmq-25.0.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:56a94ab1d12af982b55ca96c6853db6ac85505e820d9458ac76364c1998972f4"}, + {file = "pyzmq-25.0.2.tar.gz", hash = "sha256:6b8c1bbb70e868dc88801aa532cae6bd4e3b5233784692b786f17ad2962e5149"}, +] + +[package.dependencies] +cffi = {version = "*", markers = "implementation_name == \"pypy\""} + +[[package]] +name = "requests" +version = "2.28.2" +description = "Python HTTP for Humans." +category = "main" +optional = false +python-versions = ">=3.7, <4" +files = [ + {file = "requests-2.28.2-py3-none-any.whl", hash = "sha256:64299f4909223da747622c030b781c0d7811e359c37124b4bd368fb8c6518baa"}, + {file = "requests-2.28.2.tar.gz", hash = "sha256:98b1b2782e3c6c4904938b84c0eb932721069dfdb9134313beff7c83c2df24bf"}, +] + +[package.dependencies] +certifi = ">=2017.4.17" +charset-normalizer = ">=2,<4" +idna = ">=2.5,<4" +urllib3 = ">=1.21.1,<1.27" + +[package.extras] +socks = ["PySocks (>=1.5.6,!=1.5.7)"] +use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] + +[[package]] +name = "rfc3339-validator" +version = "0.1.4" +description = "A pure python RFC3339 validator" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +files = [ + {file = "rfc3339_validator-0.1.4-py2.py3-none-any.whl", hash = "sha256:24f6ec1eda14ef823da9e36ec7113124b39c04d50a4d3d3a3c2859577e7791fa"}, + {file = "rfc3339_validator-0.1.4.tar.gz", hash = "sha256:138a2abdf93304ad60530167e51d2dfb9549521a836871b88d7f4695d0022f6b"}, +] + +[package.dependencies] +six = "*" + +[[package]] +name = "rfc3986-validator" +version = "0.1.1" +description = "Pure python rfc3986 validator" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +files = [ + {file = "rfc3986_validator-0.1.1-py2.py3-none-any.whl", hash = "sha256:2f235c432ef459970b4306369336b9d5dbdda31b510ca1e327636e01f528bfa9"}, + {file = "rfc3986_validator-0.1.1.tar.gz", hash = "sha256:3d44bde7921b3b9ec3ae4e3adca370438eccebc676456449b145d533b240d055"}, +] + +[[package]] +name = "send2trash" +version = "1.8.0" +description = "Send file to trash natively under Mac OS X, Windows and Linux." +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "Send2Trash-1.8.0-py3-none-any.whl", hash = "sha256:f20eaadfdb517eaca5ce077640cb261c7d2698385a6a0f072a4a5447fd49fa08"}, + {file = "Send2Trash-1.8.0.tar.gz", hash = "sha256:d2c24762fd3759860a0aff155e45871447ea58d2be6bdd39b5c8f966a0c99c2d"}, +] + +[package.extras] +nativelib = ["pyobjc-framework-Cocoa", "pywin32"] +objc = ["pyobjc-framework-Cocoa"] +win32 = ["pywin32"] + +[[package]] +name = "six" +version = "1.16.0" +description = "Python 2 and 3 compatibility utilities" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, +] + +[[package]] +name = "sniffio" +version = "1.3.0" +description = "Sniff out which async library your code is running under" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "sniffio-1.3.0-py3-none-any.whl", hash = "sha256:eecefdce1e5bbfb7ad2eeaabf7c1eeb404d7757c379bd1f7e5cce9d8bf425384"}, + {file = "sniffio-1.3.0.tar.gz", hash = "sha256:e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101"}, +] + +[[package]] +name = "soupsieve" +version = "2.4" +description = "A modern CSS selector implementation for Beautiful Soup." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "soupsieve-2.4-py3-none-any.whl", hash = "sha256:49e5368c2cda80ee7e84da9dbe3e110b70a4575f196efb74e51b94549d921955"}, + {file = "soupsieve-2.4.tar.gz", hash = "sha256:e28dba9ca6c7c00173e34e4ba57448f0688bb681b7c5e8bf4971daafc093d69a"}, +] + +[[package]] +name = "stack-data" +version = "0.6.2" +description = "Extract data from python stack frames and tracebacks for informative displays" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "stack_data-0.6.2-py3-none-any.whl", hash = "sha256:cbb2a53eb64e5785878201a97ed7c7b94883f48b87bfb0bbe8b623c74679e4a8"}, + {file = "stack_data-0.6.2.tar.gz", hash = "sha256:32d2dd0376772d01b6cb9fc996f3c8b57a357089dec328ed4b6553d037eaf815"}, +] + +[package.dependencies] +asttokens = ">=2.1.0" +executing = ">=1.2.0" +pure-eval = "*" + +[package.extras] +tests = ["cython", "littleutils", "pygments", "pytest", "typeguard"] + +[[package]] +name = "terminado" +version = "0.17.1" +description = "Tornado websocket backend for the Xterm.js Javascript terminal emulator library." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "terminado-0.17.1-py3-none-any.whl", hash = "sha256:8650d44334eba354dd591129ca3124a6ba42c3d5b70df5051b6921d506fdaeae"}, + {file = "terminado-0.17.1.tar.gz", hash = "sha256:6ccbbcd3a4f8a25a5ec04991f39a0b8db52dfcd487ea0e578d977e6752380333"}, +] + +[package.dependencies] +ptyprocess = {version = "*", markers = "os_name != \"nt\""} +pywinpty = {version = ">=1.1.0", markers = "os_name == \"nt\""} +tornado = ">=6.1.0" + +[package.extras] +docs = ["myst-parser", "pydata-sphinx-theme", "sphinx"] +test = ["pre-commit", "pytest (>=7.0)", "pytest-timeout"] + +[[package]] +name = "tinycss2" +version = "1.2.1" +description = "A tiny CSS parser" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tinycss2-1.2.1-py3-none-any.whl", hash = "sha256:2b80a96d41e7c3914b8cda8bc7f705a4d9c49275616e886103dd839dfc847847"}, + {file = "tinycss2-1.2.1.tar.gz", hash = "sha256:8cff3a8f066c2ec677c06dbc7b45619804a6938478d9d73c284b29d14ecb0627"}, +] + +[package.dependencies] +webencodings = ">=0.4" + +[package.extras] +doc = ["sphinx", "sphinx_rtd_theme"] +test = ["flake8", "isort", "pytest"] + +[[package]] +name = "tomli" +version = "2.0.1" +description = "A lil' TOML parser" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, +] + +[[package]] +name = "tornado" +version = "6.2" +description = "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed." +category = "main" +optional = false +python-versions = ">= 3.7" +files = [ + {file = "tornado-6.2-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:20f638fd8cc85f3cbae3c732326e96addff0a15e22d80f049e00121651e82e72"}, + {file = "tornado-6.2-cp37-abi3-macosx_10_9_x86_64.whl", hash = "sha256:87dcafae3e884462f90c90ecc200defe5e580a7fbbb4365eda7c7c1eb809ebc9"}, + {file = "tornado-6.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ba09ef14ca9893954244fd872798b4ccb2367c165946ce2dd7376aebdde8e3ac"}, + {file = "tornado-6.2-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b8150f721c101abdef99073bf66d3903e292d851bee51910839831caba341a75"}, + {file = "tornado-6.2-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d3a2f5999215a3a06a4fc218026cd84c61b8b2b40ac5296a6db1f1451ef04c1e"}, + {file = "tornado-6.2-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:5f8c52d219d4995388119af7ccaa0bcec289535747620116a58d830e7c25d8a8"}, + {file = "tornado-6.2-cp37-abi3-musllinux_1_1_i686.whl", hash = "sha256:6fdfabffd8dfcb6cf887428849d30cf19a3ea34c2c248461e1f7d718ad30b66b"}, + {file = "tornado-6.2-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:1d54d13ab8414ed44de07efecb97d4ef7c39f7438cf5e976ccd356bebb1b5fca"}, + {file = "tornado-6.2-cp37-abi3-win32.whl", hash = "sha256:5c87076709343557ef8032934ce5f637dbb552efa7b21d08e89ae7619ed0eb23"}, + {file = "tornado-6.2-cp37-abi3-win_amd64.whl", hash = "sha256:e5f923aa6a47e133d1cf87d60700889d7eae68988704e20c75fb2d65677a8e4b"}, + {file = "tornado-6.2.tar.gz", hash = "sha256:9b630419bde84ec666bfd7ea0a4cb2a8a651c2d5cccdbdd1972a0c859dfc3c13"}, +] + +[[package]] +name = "traitlets" +version = "5.9.0" +description = "Traitlets Python configuration system" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "traitlets-5.9.0-py3-none-any.whl", hash = "sha256:9e6ec080259b9a5940c797d58b613b5e31441c2257b87c2e795c5228ae80d2d8"}, + {file = "traitlets-5.9.0.tar.gz", hash = "sha256:f6cde21a9c68cf756af02035f72d5a723bf607e862e7be33ece505abf4a3bad9"}, +] + +[package.extras] +docs = ["myst-parser", "pydata-sphinx-theme", "sphinx"] +test = ["argcomplete (>=2.0)", "pre-commit", "pytest", "pytest-mock"] + +[[package]] +name = "uri-template" +version = "1.2.0" +description = "RFC 6570 URI Template Processor" +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "uri_template-1.2.0-py3-none-any.whl", hash = "sha256:f1699c77b73b925cf4937eae31ab282a86dc885c333f2e942513f08f691fc7db"}, + {file = "uri_template-1.2.0.tar.gz", hash = "sha256:934e4d09d108b70eb8a24410af8615294d09d279ce0e7cbcdaef1bd21f932b06"}, +] + +[package.extras] +dev = ["flake8 (<4.0.0)", "flake8-annotations", "flake8-bugbear", "flake8-commas", "flake8-comprehensions", "flake8-continuation", "flake8-datetimez", "flake8-docstrings", "flake8-import-order", "flake8-literal", "flake8-noqa", "flake8-requirements", "flake8-type-annotations", "flake8-use-fstring", "mypy", "pep8-naming"] + +[[package]] +name = "urllib3" +version = "1.26.15" +description = "HTTP library with thread-safe connection pooling, file post, and more." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +files = [ + {file = "urllib3-1.26.15-py2.py3-none-any.whl", hash = "sha256:aa751d169e23c7479ce47a0cb0da579e3ede798f994f5816a74e4f4500dcea42"}, + {file = "urllib3-1.26.15.tar.gz", hash = "sha256:8a388717b9476f934a21484e8c8e61875ab60644d29b9b39e11e4b9dc1c6b305"}, +] + +[package.extras] +brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)", "brotlipy (>=0.6.0)"] +secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress", "pyOpenSSL (>=0.14)", "urllib3-secure-extra"] +socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] + +[[package]] +name = "wcwidth" +version = "0.2.6" +description = "Measures the displayed width of unicode strings in a terminal" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "wcwidth-0.2.6-py2.py3-none-any.whl", hash = "sha256:795b138f6875577cd91bba52baf9e445cd5118fd32723b460e30a0af30ea230e"}, + {file = "wcwidth-0.2.6.tar.gz", hash = "sha256:a5220780a404dbe3353789870978e472cfe477761f06ee55077256e509b156d0"}, +] + +[[package]] +name = "webcolors" +version = "1.12" +description = "A library for working with color names and color values formats defined by HTML and CSS." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "webcolors-1.12-py3-none-any.whl", hash = "sha256:d98743d81d498a2d3eaf165196e65481f0d2ea85281463d856b1e51b09f62dce"}, + {file = "webcolors-1.12.tar.gz", hash = "sha256:16d043d3a08fd6a1b1b7e3e9e62640d09790dce80d2bdd4792a175b35fe794a9"}, +] + +[[package]] +name = "webencodings" +version = "0.5.1" +description = "Character encoding aliases for legacy web content" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78"}, + {file = "webencodings-0.5.1.tar.gz", hash = "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"}, +] + +[[package]] +name = "websocket-client" +version = "1.5.1" +description = "WebSocket client for Python with low level API options" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "websocket-client-1.5.1.tar.gz", hash = "sha256:3f09e6d8230892547132177f575a4e3e73cfdf06526e20cc02aa1c3b47184d40"}, + {file = "websocket_client-1.5.1-py3-none-any.whl", hash = "sha256:cdf5877568b7e83aa7cf2244ab56a3213de587bbe0ce9d8b9600fc77b455d89e"}, +] + +[package.extras] +docs = ["Sphinx (>=3.4)", "sphinx-rtd-theme (>=0.5)"] +optional = ["python-socks", "wsaccel"] +test = ["websockets"] + +[[package]] +name = "xarray" +version = "2023.2.0" +description = "N-D labeled arrays and datasets in Python" +category = "main" +optional = false +python-versions = ">=3.9" +files = [ + {file = "xarray-2023.2.0-py3-none-any.whl", hash = "sha256:9fb925e47deb68e2486c8d80d13e3ad97ff6f0e02a26d622c0b6559be707c22e"}, + {file = "xarray-2023.2.0.tar.gz", hash = "sha256:aa760500a2d8f8be8efd8f3b27a94b2af3b0a8c2c037347d595eaf6ff09d8a77"}, +] + +[package.dependencies] +numpy = ">=1.21" +packaging = ">=21.3" +pandas = ">=1.4" + +[package.extras] +accel = ["bottleneck", "flox", "numbagg", "scipy"] +complete = ["bottleneck", "cfgrib", "cftime", "dask[complete]", "flox", "fsspec", "h5netcdf", "matplotlib", "nc-time-axis", "netCDF4", "numbagg", "pooch", "pydap", "rasterio", "scipy", "seaborn", "zarr"] +docs = ["bottleneck", "cfgrib", "cftime", "dask[complete]", "flox", "fsspec", "h5netcdf", "ipykernel", "ipython", "jupyter-client", "matplotlib", "nbsphinx", "nc-time-axis", "netCDF4", "numbagg", "pooch", "pydap", "rasterio", "scanpydoc", "scipy", "seaborn", "sphinx-autosummary-accessors", "sphinx-rtd-theme", "zarr"] +io = ["cfgrib", "cftime", "fsspec", "h5netcdf", "netCDF4", "pooch", "pydap", "rasterio", "scipy", "zarr"] +parallel = ["dask[complete]"] +viz = ["matplotlib", "nc-time-axis", "seaborn"] + +[[package]] +name = "xpypact" +version = "0.1.12a0" +description = "\"Python tools to work with elements and isotopes\"" +category = "main" +optional = false +python-versions = ">=3.8,<4.0" +files = [] +develop = false + +[package.dependencies] +h5netcdf = ">=0.13.1" +mckit-nuclides = ">=0.1.1" +multipledispatch = ">=0.6.0" +numpy = ">=1.24.2" +openpyxl = ">=3.0.9" +orjson = ">=3.6.7" +pandas = ">=1.4.1" +xarray = ">=2022.3.0" + +[package.source] +type = "directory" +url = ".." + +[[package]] +name = "y-py" +version = "0.5.9" +description = "Python bindings for the Y-CRDT built from yrs (Rust)" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "y_py-0.5.9-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:afa9a11aa2880dd8689894f3269b653e6d3bd1956963d5329be9a5bf021dab62"}, + {file = "y_py-0.5.9-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:e370ce076781adea161b04d2f666e8b4f89bc7e8927ef842fbb0283d3bfa73e0"}, + {file = "y_py-0.5.9-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b67dad339f9b6701f74ff7a6e901c7909eca4eea02cf955b28d87a42650bd1be"}, + {file = "y_py-0.5.9-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ae82a6d9cbaff8cb7505e81b5b7f9cd7756bb7e7110aef7914375fe56b012a90"}, + {file = "y_py-0.5.9-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c7ca64a2a97f708569dcabd55865915943e30267bf6d26c4d212d005951efe62"}, + {file = "y_py-0.5.9-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:55098440e32339c2dc3d652fb36bb77a4927dee5fd4ab0cb1fe12fdd163fd4f5"}, + {file = "y_py-0.5.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc9052a814e8b7ec756371a191f38de68b956437e0bb429c2dd503e658f298f9"}, + {file = "y_py-0.5.9-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:95d13b38c9055d607565b77cbae12e2bf0c1671c5cb8f2ee2e1230d41d2d6d34"}, + {file = "y_py-0.5.9-cp310-none-win32.whl", hash = "sha256:5dbd8d177ec7b9fef4a7b6d22eb2f8d5606fd5aac31cf2eab0dc18f0b3504c7c"}, + {file = "y_py-0.5.9-cp310-none-win_amd64.whl", hash = "sha256:d373c6bb8e21d5f7ec0833b76fa1ab480086ada602ef5bbf4724a25a21a00b6a"}, + {file = "y_py-0.5.9-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:f8f238144a302f17eb26b122cad9382fcff5ec6653b8a562130b9a5e44010098"}, + {file = "y_py-0.5.9-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:25637e3d011ca6f877a24f3083ff2549d1d619406d7e8a1455c445527205046c"}, + {file = "y_py-0.5.9-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2ffebe5e62cbfee6e24593927dedba77dc13ac4cfb9c822074ab566b1fb63d59"}, + {file = "y_py-0.5.9-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b0ed760e6aa5316227a0ba2d5d29634a4ef2d72c8bc55169ac01664e17e4b536"}, + {file = "y_py-0.5.9-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:91be189fae8ba242528333e266e38d65cae3d9a09fe45867fab8578a3ddf2ea2"}, + {file = "y_py-0.5.9-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c3ae6d22b7cc599220a26b06da6ead9fd582eea5fdb6273b06fa3f060d0a26a7"}, + {file = "y_py-0.5.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:065f90501cf008375d70be6ce72dd41745e09d088f0b545f5f914d2c3f04f7ae"}, + {file = "y_py-0.5.9-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:742c486d5b792c4ad76e09426161302edddca85efe826fa01dcee50907326cd7"}, + {file = "y_py-0.5.9-cp311-none-win32.whl", hash = "sha256:2692c808bf28f797f8d693f45dc86563ac3b1626579f67ce9546dca69644d687"}, + {file = "y_py-0.5.9-cp311-none-win_amd64.whl", hash = "sha256:c1f5f287cc7ae127ed6a2fb1546e631b316a41d087d7d2db9caa3e5f59906dcf"}, + {file = "y_py-0.5.9-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:9a59603cf42c20d02ee5add2e3d0ce48e89c480a2a02f642fb77f142c4f37958"}, + {file = "y_py-0.5.9-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b44473bb32217c78e18db66f497f6c8be33e339bab5f52398bb2468c904d5140"}, + {file = "y_py-0.5.9-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1906f13e8d5ebfbd9c7948f57bc6f6f53b451b19c99350f42a0f648147a8acfe"}, + {file = "y_py-0.5.9-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:202b2a3e42e0a1eaedee26f8a3bc73cd9f994c4c2b15511ea56b9838178eb380"}, + {file = "y_py-0.5.9-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:13b9d2959d9a26536b6ad118fb026ff19bd79da52e4addf6f3a562e7c01d516e"}, + {file = "y_py-0.5.9-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ff3ddedaa95284f4f22a92b362f658f3d92f272d8c0fa009051bd5490c4d5a04"}, + {file = "y_py-0.5.9-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:85585e669d7679126e4a04e4bc0a063a641175a74eecfe47539e8da3e5b1da6e"}, + {file = "y_py-0.5.9-cp37-none-win32.whl", hash = "sha256:caf9b1feb69379d424a1d3d7c899b8e0389a3fb3131d39c3c03dcc3d4a93dbdc"}, + {file = "y_py-0.5.9-cp37-none-win_amd64.whl", hash = "sha256:7353af0e9c1f42fbf0ab340e253eeb333d58c890fa91d3eadb1b9adaf9336732"}, + {file = "y_py-0.5.9-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:ed0fd5265905cc7e23709479bc152d69f4972dec32fa322d20cb77f749707e78"}, + {file = "y_py-0.5.9-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:db1ac7f2d1862eb4c448cf76183399d555a63dbe2452bafecb1c2f691e36d687"}, + {file = "y_py-0.5.9-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fa685f7e43ce490dfb1e392ac48f584b75cd21f05dc526c160d15308236ce8a0"}, + {file = "y_py-0.5.9-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c42f3a6cd20153925b00c49af855a3277989d411bb8ea849095be943ee160821"}, + {file = "y_py-0.5.9-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:753aaae817d658a1e9d271663439d8e83d9d8effa45590ecdcadc600c7cf77e3"}, + {file = "y_py-0.5.9-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cc8e5f38842a4b043c9592bfa9a740147ddb8fac2d7a5b7bf6d52466c090ec23"}, + {file = "y_py-0.5.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ecd3cb0d13ac92e7b9235d1024dba9af0788161246f12dcf1f635d634ccb206a"}, + {file = "y_py-0.5.9-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9983e99e3a61452b39ffce98206c7e4c6d260f4e917c8fe53fb54aaf25df89a3"}, + {file = "y_py-0.5.9-cp38-none-win32.whl", hash = "sha256:63ef8e5b76cd54578a7fd5f72d8c698d9ccd7c555c7900ebfd38a24d397c3b15"}, + {file = "y_py-0.5.9-cp38-none-win_amd64.whl", hash = "sha256:fe70d0134fe2115c08866f0cac0eb5c0788093872b5026eb438a74e1ebafd659"}, + {file = "y_py-0.5.9-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:05f805b58422d5d7c8e7e8e2141d1c3cac4daaa4557ae6a9b84b141fe8d6289e"}, + {file = "y_py-0.5.9-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:a7977eeaceaeb0dfffcc5643c985c337ebc33a0b1d792ae0a9b1331cdd97366f"}, + {file = "y_py-0.5.9-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:800e73d2110b97a74c52db2c8ce03a78e96f0d66a7e0c87d8254170a67c2db0e"}, + {file = "y_py-0.5.9-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:add793f5f5c7c7a3eb1b09ffc771bdaae10a0bd482a370bf696b83f8dee8d1b4"}, + {file = "y_py-0.5.9-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f8b67ae37af8aac6160fda66c0f73bcdf65c06da9022eb76192c3fc45cfab994"}, + {file = "y_py-0.5.9-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2532ea5aefb223fd688c93860199d348a7601d814aac9e8784d816314588ddeb"}, + {file = "y_py-0.5.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:df78a0409dca11554a4b6442d7a8e61f762c3cfc78d55d98352392869a6b9ae0"}, + {file = "y_py-0.5.9-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d2da2a9e28dceab4832945a745cad507579f52b4d0c9e2f54ae156eb56875861"}, + {file = "y_py-0.5.9-cp39-none-win32.whl", hash = "sha256:fdafb93bfd5532b13a53c4090675bcd31724160017ecc73e492dc1211bc0377a"}, + {file = "y_py-0.5.9-cp39-none-win_amd64.whl", hash = "sha256:73200c59bb253b880825466717941ac57267f2f685b053e183183cb6fe82874d"}, + {file = "y_py-0.5.9-pp38-pypy38_pp73-macosx_10_7_x86_64.whl", hash = "sha256:af6df5ec1d66ee2d962026635d60e84ad35fc01b2a1e36b993360c0ce60ae349"}, + {file = "y_py-0.5.9-pp38-pypy38_pp73-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:0c0e333c20b0a6ce4a5851203d45898ab93f16426c342420b931e190c5b71d3d"}, + {file = "y_py-0.5.9-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f7434c77cd23592973ed63341b8d337e6aebaba5ed40d7f22e2d43dfd0c3a56e"}, + {file = "y_py-0.5.9-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e30fe2491d095c6d695a2c96257967fd3e2497f0f777030c8492d03c18d46e2a"}, + {file = "y_py-0.5.9-pp38-pypy38_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a57d81260e048caacf43a2f851766687f53e8a8356df6947fb0eee7336a7e2de"}, + {file = "y_py-0.5.9-pp38-pypy38_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8d4dfc276f988175baaa4ab321c3321a16ce33db3356c9bc5f4dea0db3de55aa"}, + {file = "y_py-0.5.9-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cb68445414940efe547291340e91604c7b8379b60822678ef29f4fc2a0e11c62"}, + {file = "y_py-0.5.9-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:cd6f373dbf592ad83aaf95c16abebc8678928e49bd509ebd593259e1908345ae"}, + {file = "y_py-0.5.9-pp39-pypy39_pp73-macosx_10_7_x86_64.whl", hash = "sha256:76b3480e7037ac9390c450e2aff9e46e2c9e61520c0d88afe228110ec728adc5"}, + {file = "y_py-0.5.9-pp39-pypy39_pp73-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:9484a3fc33f812234e58a5ee834b42bb0a628054d61b5c06c323aa56c12e557d"}, + {file = "y_py-0.5.9-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f6d87d0c2e87990bc00c049742d36a5dbbb1510949459af17198728890ee748a"}, + {file = "y_py-0.5.9-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fce5feb57f6231376eb10d1fb68c60da106ffa0b520b3129471c466eff0304cc"}, + {file = "y_py-0.5.9-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:27c1e9a866146d250e9e16d99fe22a40c82f5b592ab85da97e5679fc3841c7ce"}, + {file = "y_py-0.5.9-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d722d6a27230c1f395535da5cee6a9a16497c6343afd262c846090075c083009"}, + {file = "y_py-0.5.9-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1f54625b9ed4e787872c45d3044dcfd04c0da4258d9914f3d32308830b35246c"}, + {file = "y_py-0.5.9-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9513ae81fcc805671ae134c4c7421ca322acf92ce8b33817e1775ea8c0176973"}, + {file = "y_py-0.5.9.tar.gz", hash = "sha256:50cfa0532bcee27edb8c64743b49570e28bb76a00cd384ead1d84b6f052d9368"}, +] + +[[package]] +name = "ypy-websocket" +version = "0.8.2" +description = "WebSocket connector for Ypy" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "ypy_websocket-0.8.2-py3-none-any.whl", hash = "sha256:9049d5a7d61c26c2b5a39757c9ffcbe2274bf3553adeea8de7fe1c04671d4145"}, + {file = "ypy_websocket-0.8.2.tar.gz", hash = "sha256:491b2cc4271df4dde9be83017c15f4532b597dc43148472eb20c5aeb838a5b46"}, +] + +[package.dependencies] +aiofiles = ">=22.1.0,<23" +aiosqlite = ">=0.17.0,<1" +y-py = ">=0.5.3,<0.6.0" + +[package.extras] +test = ["mypy", "pre-commit", "pytest", "pytest-asyncio", "websockets (>=10.0)"] + +[[package]] +name = "zipp" +version = "3.15.0" +description = "Backport of pathlib-compatible object wrapper for zip files" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "zipp-3.15.0-py3-none-any.whl", hash = "sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556"}, + {file = "zipp-3.15.0.tar.gz", hash = "sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b"}, +] + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] + +[metadata] +lock-version = "2.0" +python-versions = ">=3.9,<3.12" +content-hash = "0979b7111ec8555c13d5f47ebc73c05c11679a7deecfc7adacc27dc1b05b5354" diff --git a/notebooks/pyproject.toml b/notebooks/pyproject.toml new file mode 100644 index 0000000..86b88d2 --- /dev/null +++ b/notebooks/pyproject.toml @@ -0,0 +1,19 @@ +[tool.poetry] +name = "xpypact-notebooks" +version = "0.1.0" +description = "Analyzing and prototyping with xpypact." +authors = ["dvp2015"] +license = "MIT" +readme = "README.md" +packages = [{include = "xpypact_notebooks"}] + +[tool.poetry.dependencies] +python = ">=3.9,<3.12" +jupyterlab = "^3.6.2" +duckdb = "^0.7.1" +xpypact = {path = "/home/dvp/dev/xpypact"} + + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" diff --git a/poetry.lock b/poetry.lock index 3d38306..a390b1e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -736,14 +736,14 @@ flake8 = ">=2" [[package]] name = "flake8-comprehensions" -version = "3.11.0" +version = "3.11.1" description = "A flake8 plugin to help you write better list/set/dict comprehensions." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "flake8_comprehensions-3.11.0-py3-none-any.whl", hash = "sha256:820b6463d4964249b7380432f3aac2f26d4a86c7d52cbe9d53dfd9e1caf01b33"}, - {file = "flake8_comprehensions-3.11.0.tar.gz", hash = "sha256:d06a95fdf2dabf6a7632550fed4a10d0449d00473875b1e4b167ca84d4daee59"}, + {file = "flake8_comprehensions-3.11.1-py3-none-any.whl", hash = "sha256:d1e27f4099900c61fb156cbb7461e0e49702385fd388326e1a892d04b069c48e"}, + {file = "flake8_comprehensions-3.11.1.tar.gz", hash = "sha256:31d6386c125e325d7c84290d71f5354295dbbf5a8d47259708fa349aa0969523"}, ] [package.dependencies] @@ -1561,56 +1561,61 @@ et-xmlfile = "*" [[package]] name = "orjson" -version = "3.8.7" +version = "3.8.8" description = "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "orjson-3.8.7-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:f98c82850b7b4b7e27785ca43706fa86c893cdb88d54576bbb9b0d9c1070e421"}, - {file = "orjson-3.8.7-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:1dee503c6c1a0659c5b46f5f39d9ca9d3657b11ca8bb4af8506086df416887d9"}, - {file = "orjson-3.8.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cc4fa83831f42ce5c938f8cefc2e175fa1df6f661fdeaba3badf26d2b8cfcf73"}, - {file = "orjson-3.8.7-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9e432c6c9c8b97ad825276d5795286f7cc9689f377a97e3b7ecf14918413303f"}, - {file = "orjson-3.8.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ee519964a5a0efb9633f38b1129fd242807c5c57162844efeeaab1c8de080051"}, - {file = "orjson-3.8.7-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:109b539ce5bf60a121454d008fa67c3b67e5a3249e47d277012645922cf74bd0"}, - {file = "orjson-3.8.7-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:ad4d441fbde4133af6fee37f67dbf23181b9c537ecc317346ec8c3b4c8ec7705"}, - {file = "orjson-3.8.7-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:89dc786419e1ce2588345f58dd6a434e6728bce66b94989644234bcdbe39b603"}, - {file = "orjson-3.8.7-cp310-none-win_amd64.whl", hash = "sha256:697abde7350fb8076d44bcb6b4ab3ce415ae2b5a9bb91efc460e5ab0d96bb5d3"}, - {file = "orjson-3.8.7-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:1c19f47b35b9966a3abadf341b18ee4a860431bf2b00fd8d58906d51cf78aa70"}, - {file = "orjson-3.8.7-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:3ffaabb380cd0ee187b4fc362516df6bf739808130b1339445c7d8878fca36e7"}, - {file = "orjson-3.8.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d88837002c5a8af970745b8e0ca1b0fdb06aafbe7f1279e110d338ea19f3d23"}, - {file = "orjson-3.8.7-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ff60187d1b7e0bfab376b6002b08c560b7de06c87cf3a8ac639ecf58f84c5f3b"}, - {file = "orjson-3.8.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0110970aed35dec293f30ed1e09f8604afd5d15c5ef83de7f6c427619b3ba47b"}, - {file = "orjson-3.8.7-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:51b275475d4e36118b65ad56f9764056a09d985c5d72e64579bf8816f1356a5e"}, - {file = "orjson-3.8.7-cp311-none-win_amd64.whl", hash = "sha256:63144d27735f3b60f079f247ac9a289d80dfe49a7f03880dfa0c0ba64d6491d5"}, - {file = "orjson-3.8.7-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:a16273d77db746bb1789a2bbfded81148a60743fd6f9d5185e02d92e3732fa18"}, - {file = "orjson-3.8.7-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:5bb32259ea22cc9dd47a6fdc4b8f9f1e2f798fcf56c7c1122a7df0f4c5d33bf3"}, - {file = "orjson-3.8.7-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ad02e9102d4ba67db30a136e631e32aeebd1dce26c9f5942a457b02df131c5d0"}, - {file = "orjson-3.8.7-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:dbcfcec2b7ac52deb7be3685b551addc28ee8fa454ef41f8b714df6ba0e32a27"}, - {file = "orjson-3.8.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e1a0e5504a5fc86083cc210c6946e8d61e13fe9f1d7a7bf81b42f7050a49d4fb"}, - {file = "orjson-3.8.7-cp37-cp37m-manylinux_2_28_x86_64.whl", hash = "sha256:7bd4fd37adb03b1f2a1012d43c9f95973a02164e131dfe3ff804d7e180af5653"}, - {file = "orjson-3.8.7-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:188ed9f9a781333ad802af54c55d5a48991e292239aef41bd663b6e314377eb8"}, - {file = "orjson-3.8.7-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:cc52f58c688cb10afd810280e450f56fbcb27f52c053463e625c8335c95db0dc"}, - {file = "orjson-3.8.7-cp37-none-win_amd64.whl", hash = "sha256:403c8c84ac8a02c40613b0493b74d5256379e65196d39399edbf2ed3169cbeb5"}, - {file = "orjson-3.8.7-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:7d6ac5f8a2a17095cd927c4d52abbb38af45918e0d3abd60fb50cfd49d71ae24"}, - {file = "orjson-3.8.7-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:0295a7bfd713fa89231fd0822c995c31fc2343c59a1d13aa1b8b6651335654f5"}, - {file = "orjson-3.8.7-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:feb32aaaa34cf2f891eb793ad320d4bb6731328496ae59b6c9eb1b620c42b529"}, - {file = "orjson-3.8.7-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7a3ab1a473894e609b6f1d763838c6689ba2b97620c256a32c4d9f10595ac179"}, - {file = "orjson-3.8.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2e8c430d82b532c5ab95634e034bbf6ca7432ffe175a3e63eadd493e00b3a555"}, - {file = "orjson-3.8.7-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:366cc75f7e09106f9dac95a675aef413367b284f25507d21e55bd7f45f445e80"}, - {file = "orjson-3.8.7-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:84d154d07e8b17d97e990d5d710b719a031738eb1687d8a05b9089f0564ff3e0"}, - {file = "orjson-3.8.7-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:06180014afcfdc167ca984b312218aa62ce20093965c437c5f9166764cb65ef7"}, - {file = "orjson-3.8.7-cp38-none-win_amd64.whl", hash = "sha256:41244431ba13f2e6ef22b52c5cf0202d17954489f4a3c0505bd28d0e805c3546"}, - {file = "orjson-3.8.7-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:b20f29fa8371b8023f1791df035a2c3ccbd98baa429ac3114fc104768f7db6f8"}, - {file = "orjson-3.8.7-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:226bfc1da2f21ee74918cee2873ea9a0fec1a8830e533cb287d192d593e99d02"}, - {file = "orjson-3.8.7-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e75c11023ac29e29fd3e75038d0e8dd93f9ea24d7b9a5e871967a8921a88df24"}, - {file = "orjson-3.8.7-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:78604d3acfd7cd502f6381eea0c42281fe2b74755b334074ab3ebc0224100be1"}, - {file = "orjson-3.8.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e7129a6847f0494aa1427167486ef6aea2e835ba05f6c627df522692ee228f65"}, - {file = "orjson-3.8.7-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:1a1a8f4980059f48483782c608145b0f74538c266e01c183d9bcd9f8b71dbada"}, - {file = "orjson-3.8.7-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d60304172a33705ce4bd25a6261ab84bed2dab0b3d3b79672ea16c7648af4832"}, - {file = "orjson-3.8.7-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:4f733062d84389c32c0492e5a4929056fac217034a94523debe0430bcc602cda"}, - {file = "orjson-3.8.7-cp39-none-win_amd64.whl", hash = "sha256:010e2970ec9e826c332819e0da4b14b29b19641da0f1a6af4cec91629ef9b988"}, - {file = "orjson-3.8.7.tar.gz", hash = "sha256:8460c8810652dba59c38c80d27c325b5092d189308d8d4f3e688dbd8d4f3b2dc"}, + {file = "orjson-3.8.8-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:18fcdea75d8b571dc9b185652b81397b62878ae7934fd62e6a0103a5b8448e34"}, + {file = "orjson-3.8.8-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:306618884929b596e2e083f82b5617da812df25b0c467542371f1d51f0c5a6f5"}, + {file = "orjson-3.8.8-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:edc65ddb6ae6f8fbb2bbf78ac98f75b729c9eeb0776d5508dd76d3a948dda1dd"}, + {file = "orjson-3.8.8-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e6a6d55e01bce74516dff15302627a13b1f4edcb1c3942dd660978dee423ccf2"}, + {file = "orjson-3.8.8-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:28075c4b502d792fb6703e983d456b2a30d5d6f332d26092eb312dc782e64c64"}, + {file = "orjson-3.8.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9eda4c37e48ff549763183a1549c10eec6ea40439520b17d09359cd74a425069"}, + {file = "orjson-3.8.8-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:a3eac485a15493164867729f44e1e1247b3094ff19d37708e8cdc9c88a93c623"}, + {file = "orjson-3.8.8-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:88bf40e5468444c04374d1b8f1877cebbaef6bb7406cb6b4a34a570c5cbb87bc"}, + {file = "orjson-3.8.8-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:747bd4e09d8aa61e1ff677a7dd1cffd28a5d13c22f3769123c58ec988bf1b83d"}, + {file = "orjson-3.8.8-cp310-none-win_amd64.whl", hash = "sha256:dd7d86c5f5f820ac9d4783477e86eb984b63bdb32359935609eb33cf65049c54"}, + {file = "orjson-3.8.8-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:52293a6097750c2d434737966fe6e2a1ed489ac70cc8e584f5944af83de0b787"}, + {file = "orjson-3.8.8-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:9322450f392dceb49810d2f820b1932af22d66f67f1d45c31f160067dd06359f"}, + {file = "orjson-3.8.8-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:68d59e3ae84a9b6f14b45a89f7fde4a08a87ea5eb76bfc854b354640de8156f5"}, + {file = "orjson-3.8.8-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:022347dad2253081eaa25366834bb8b06a5aceb0e83b39c6b0aa865759e49d69"}, + {file = "orjson-3.8.8-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ddfcc54793e266056fe1c257d0804c336bca1c5c1ee7979d674e1fc19cfb0a6a"}, + {file = "orjson-3.8.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:449d8ed1e0e6b24e9df5a06b59fd66ea7f7293e141257069601ae8ff9fad705c"}, + {file = "orjson-3.8.8-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:0204bc414bc6f7a595211569840b422d96649fd8686efa1fbbcb12eed5dd9521"}, + {file = "orjson-3.8.8-cp311-none-win_amd64.whl", hash = "sha256:e991a5c2c5f2f299c77e1d07ef2812ff5b68e1d97a2aab01aca29cf756473aa3"}, + {file = "orjson-3.8.8-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:2006d9c046bbf335c951f61e016a27bd4f17323dd116f601e4a8a11739cd0a62"}, + {file = "orjson-3.8.8-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:4553d85bad4cbd634a40b7b5d36daaa197a6025f9ce3e2165b371e528759093d"}, + {file = "orjson-3.8.8-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:57ee45d2cc6c11c50afb5a0c09d7cd559aea76c77250dbe996be6a03464d4a50"}, + {file = "orjson-3.8.8-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:02f5b5db1e424706eb9f70f1c25699ff4cef16fadfc64af5b70f8628eafe4771"}, + {file = "orjson-3.8.8-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4d7c9f3b1598a1ccd806ef02257a76a00c7ede09662ddb54eec2b4bd92874254"}, + {file = "orjson-3.8.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b90d171932b6a9d50e79fa2762cb303e3556bbf25c08bb316fe346ec58af9c19"}, + {file = "orjson-3.8.8-cp37-cp37m-manylinux_2_28_x86_64.whl", hash = "sha256:28dfe774c345130f1117c4d023644ec52d9d50e3eaadb9bd1c668d91dc109bb5"}, + {file = "orjson-3.8.8-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:8f84116fcc3714e7ba3cbeb1b11ac5e4549e7d2726c50142f8299fff9dea7d53"}, + {file = "orjson-3.8.8-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:f989f8580db86166aaaa938ccd1597ba1817e3f5df14c047baafe783e3d24173"}, + {file = "orjson-3.8.8-cp37-none-win_amd64.whl", hash = "sha256:66045850f286090800a18662d81d44f88c3fcb60ea3a9947d5caeab5d1efc92e"}, + {file = "orjson-3.8.8-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:2c2c5f3d3bbd61dba646e2b9c54a0dd7941b03fba49726bd31c1c23fedf0b9aa"}, + {file = "orjson-3.8.8-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:9cb36d4a14f3a911369219d5abc19b907bc41ed2730f7bfe0847b0fd3e834c87"}, + {file = "orjson-3.8.8-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:343124f84da0a33c83ee106a98b3e3c42767c88323d4a2809683cbe83816e8be"}, + {file = "orjson-3.8.8-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:24ad122d8dd057acf2a9965a2ffc1bc12fb310ae1cfe2912db930cbb9ef7eaba"}, + {file = "orjson-3.8.8-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c2f28a92a9bcb4e8635524b20db1b539bda8613872f306b36cdfd9d3577d03ac"}, + {file = "orjson-3.8.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:81d3c5b253eebfc4a61cea1f255a576cb2b889afa99f4510f30ec13201d4f457"}, + {file = "orjson-3.8.8-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:317164f7d4c0540a6eb8b0a0faeec84ef011d359da05188423db762b65f84e1d"}, + {file = "orjson-3.8.8-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:5e7e39357371d4ae5649f33c01886508a4c8e5fa5c7344554af041dc0f004c01"}, + {file = "orjson-3.8.8-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:60fefd4bbd796b4296f478e705fe2c2c7defd28da98d3017743eb87c3238a380"}, + {file = "orjson-3.8.8-cp38-none-win_amd64.whl", hash = "sha256:0dc4a52f1087baeec6b58248fd6b01f17c124fb99f6f770596851ea434a7be0b"}, + {file = "orjson-3.8.8-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:a6bcb449537a99f55c5f05187bac00b4549a795e89c10dcca0d7629548852357"}, + {file = "orjson-3.8.8-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:9c98dc791aa44268ba7f6e21124cf885c813b155316c6bf257560571d243fe15"}, + {file = "orjson-3.8.8-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1b2abf93b727a6af7c5ec8816168cbdff39c716af18ced425dd50ae46d69765c"}, + {file = "orjson-3.8.8-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:23447d38375a19d57975d4e32d9ce9f533803c197fd4292e10d3234c052037a8"}, + {file = "orjson-3.8.8-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4c2e19d2b46cc93c7218bf8180807bf922ff61dc9883458a06edc66d22970fff"}, + {file = "orjson-3.8.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e480d74d7bf415e6548a364669404119a85dbe0e3c6cd5f7cb4c7003eac20164"}, + {file = "orjson-3.8.8-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:8e0bff5656b99dd975cae2e5230b39e5909d06c0692fd1f6f06dc46f1fe705d0"}, + {file = "orjson-3.8.8-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:56bb6eb7a254eec3b15feba9b20f4172ccbe6ea50a54cf66cbc8e1e4a19585c2"}, + {file = "orjson-3.8.8-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:1af1cfad5d90b68e15fd625c889c4f9f91d7a88f49512cdb89f01c3881e0c9d9"}, + {file = "orjson-3.8.8-cp39-none-win_amd64.whl", hash = "sha256:d5514dfe200356a1d5a6039e00dca78d87d063f3da1eb6a371253e5a8b7ab5b0"}, + {file = "orjson-3.8.8.tar.gz", hash = "sha256:c096d7a523bae6ffb9c4a228ba4691d66113f0f2231579dc945523fbef09c6da"}, ] [[package]] @@ -2295,6 +2300,8 @@ files = [ {file = "ruamel.yaml.clib-0.2.7-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:045e0626baf1c52e5527bd5db361bc83180faaba2ff586e763d3d5982a876a9e"}, {file = "ruamel.yaml.clib-0.2.7-cp311-cp311-macosx_12_6_arm64.whl", hash = "sha256:721bc4ba4525f53f6a611ec0967bdcee61b31df5a56801281027a3a6d1c2daf5"}, {file = "ruamel.yaml.clib-0.2.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:41d0f1fa4c6830176eef5b276af04c89320ea616655d01327d5ce65e50575c94"}, + {file = "ruamel.yaml.clib-0.2.7-cp311-cp311-win32.whl", hash = "sha256:f6d3d39611ac2e4f62c3128a9eed45f19a6608670c5a2f4f07f24e8de3441d38"}, + {file = "ruamel.yaml.clib-0.2.7-cp311-cp311-win_amd64.whl", hash = "sha256:da538167284de58a52109a9b89b8f6a53ff8437dd6dc26d33b57bf6699153122"}, {file = "ruamel.yaml.clib-0.2.7-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:4b3a93bb9bc662fc1f99c5c3ea8e623d8b23ad22f861eb6fce9377ac07ad6072"}, {file = "ruamel.yaml.clib-0.2.7-cp36-cp36m-macosx_12_0_arm64.whl", hash = "sha256:a234a20ae07e8469da311e182e70ef6b199d0fbeb6c6cc2901204dd87fb867e8"}, {file = "ruamel.yaml.clib-0.2.7-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:15910ef4f3e537eea7fe45f8a5d19997479940d9196f357152a09031c5be59f3"}, From 0cfad4ea7917bbf52328db6782018aa499c8760e Mon Sep 17 00:00:00 2001 From: dvp Date: Thu, 23 Mar 2023 12:29:18 +0300 Subject: [PATCH 09/32] feat: continue notebook for prototyping with duckdb --- notebooks/dvp/try_ducdb.ipynb | 4748 +++++++++++++++++++-------------- notebooks/dvp/try_ducdb.py | 314 ++- 2 files changed, 2846 insertions(+), 2216 deletions(-) diff --git a/notebooks/dvp/try_ducdb.ipynb b/notebooks/dvp/try_ducdb.ipynb index 2e8290f..4ea1a3d 100644 --- a/notebooks/dvp/try_ducdb.ipynb +++ b/notebooks/dvp/try_ducdb.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 233, "id": "250d384f-b617-4bde-8d6e-5bfea316e21f", "metadata": { "tags": [] @@ -14,7 +14,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 234, "id": "49812848-cb6d-487a-bcdf-927e86781ae9", "metadata": { "tags": [] @@ -26,7 +26,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 235, "id": "5e40fc05-d196-4ab9-b4df-ec6166ee5611", "metadata": { "tags": [] @@ -38,7 +38,7 @@ "'0.1.12a0'" ] }, - "execution_count": 5, + "execution_count": 235, "metadata": {}, "output_type": "execute_result" } @@ -49,7 +49,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 236, "id": "982fbe50-fd22-499a-98d9-910f6d0c72d7", "metadata": { "tags": [] @@ -61,7 +61,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 237, "id": "bf81c238-8be8-4f93-b3e4-155bb46e21e8", "metadata": { "tags": [] @@ -73,20 +73,20 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 238, "id": "c0811f45-0503-4302-9890-62803b49cabe", "metadata": { "tags": [] }, "outputs": [], "source": [ - "json_path = root_dir / \"tests/data/Ag-1.json\"\n", + "json_path = root_dir / \"wrk/Alloy718-Co04-104_2_1_1.json\"\n", "assert json_path.exists()" ] }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 239, "id": "57fecf87-b03f-48e4-bfe4-beee3d661355", "metadata": { "tags": [] @@ -99,7 +99,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 240, "id": "c13bb091-11ad-4e08-bbad-7cba93475e4b", "metadata": { "tags": [] @@ -111,7 +111,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 241, "id": "e471ce43-3860-430d-b669-7a1211bb5d06", "metadata": { "tags": [] @@ -123,7 +123,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 242, "id": "eaa7c75f-119c-493c-b038-dbd615b72c6f", "metadata": { "tags": [] @@ -496,389 +496,610 @@ " fill: currentColor;\n", "}\n", "
<xarray.Dataset>\n",
-       "Dimensions:                 (time_step_number: 2, nuclide: 48, timestamp: 1)\n",
+       "Dimensions:                 (time_step_number: 65, nuclide: 215,\n",
+       "                             gamma_boundaries: 25, timestamp: 1)\n",
        "Coordinates:\n",
-       "  * time_step_number        (time_step_number) int64 1 2\n",
+       "  * time_step_number        (time_step_number) int64 1 2 3 4 5 ... 62 63 64 65\n",
        "  * nuclide                 (nuclide) object MultiIndex\n",
-       "  * element                 (nuclide) object 'Ag' 'Ag' 'Ag' ... 'Ru' 'Ru' 'Ru'\n",
-       "  * mass_number             (nuclide) int64 105 105 106 106 ... 106 102 103 104\n",
-       "  * state                   (nuclide) object '' 'm' '' 'm' '' ... 'm' '' '' ''\n",
-       "    elapsed_time            (time_step_number) float64 0.0 6.312e+07\n",
-       "    zai                     (nuclide) int64 471050 471051 ... 441030 441040\n",
-       "  * timestamp               (timestamp) datetime64[ns] 2020-07-12T23:01:19\n",
-       "Data variables: (12/31)\n",
-       "    irradiation_time        (time_step_number) float64 0.0 6.312e+07\n",
-       "    cooling_time            (time_step_number) float64 0.0 0.0\n",
-       "    duration                (time_step_number) float64 0.0 6.312e+07\n",
-       "    flux                    (time_step_number) float64 0.0 2.445e+10\n",
-       "    total_atoms             (time_step_number) float64 5.578e+21 5.578e+21\n",
-       "    total_activity          (time_step_number) float64 0.0 6.123e+09\n",
+       "  * element                 (nuclide) object 'Al' 'Al' 'Al' ... 'Zr' 'Zr' 'Zr'\n",
+       "  * mass_number             (nuclide) int64 26 27 28 29 30 40 ... 93 94 95 96 97\n",
+       "  * state                   (nuclide) object '' '' '' '' '' ... '' '' '' '' ''\n",
+       "  * gamma_boundaries        (gamma_boundaries) float64 1e-11 0.01 ... 14.0 20.0\n",
+       "    elapsed_time            (time_step_number) float64 0.0 6.312e+07 ... 3.2e+10\n",
+       "    zai                     (nuclide) int64 130260 130270 ... 400960 400970\n",
+       "  * timestamp               (timestamp) datetime64[ns] 2022-02-21T01:52:47\n",
+       "Data variables: (12/32)\n",
+       "    irradiation_time        (time_step_number) float64 0.0 ... 4.207e+08\n",
+       "    cooling_time            (time_step_number) float64 0.0 0.0 ... 3.158e+10\n",
+       "    duration                (time_step_number) float64 0.0 ... 2.84e+10\n",
+       "    flux                    (time_step_number) float64 0.0 2.445e+10 ... 0.0 0.0\n",
+       "    total_atoms             (time_step_number) float64 1.045e+22 ... 1.045e+22\n",
+       "    total_activity          (time_step_number) float64 0.01099 ... 3.152e+04\n",
        "    ...                      ...\n",
-       "    nuclide_alpha_heat      (time_step_number, nuclide) float64 nan nan ... 0.0\n",
-       "    nuclide_beta_heat       (time_step_number, nuclide) float64 nan nan ... 0.0\n",
-       "    nuclide_gamma_heat      (time_step_number, nuclide) float64 nan nan ... 0.0\n",
-       "    nuclide_dose            (time_step_number, nuclide) float64 nan nan ... 0.0\n",
-       "    nuclide_ingestion       (time_step_number, nuclide) float64 nan nan ... 0.0\n",
-       "    nuclide_inhalation      (time_step_number, nuclide) float64 nan nan ... 0.0\n",
+       "    nuclide_beta_heat       (time_step_number, nuclide) float64 nan 0.0 ... nan\n",
+       "    nuclide_gamma_heat      (time_step_number, nuclide) float64 nan 0.0 ... nan\n",
+       "    nuclide_dose            (time_step_number, nuclide) float64 nan 0.0 ... nan\n",
+       "    nuclide_ingestion       (time_step_number, nuclide) float64 nan 0.0 ... nan\n",
+       "    nuclide_inhalation      (time_step_number, nuclide) float64 nan 0.0 ... nan\n",
+       "    gamma                   (time_step_number, gamma_boundaries) float64 0.0 ...\n",
        "Attributes:\n",
-       "    run_name:            * Material Ag, fluxes 1\n",
-       "    flux_name:           55.F9.10 11-L2-02W HFS_GLRY_08_U\n",
+       "    run_name:            * Material Alloy718-Co04, fluxes 104_2_1_1\n",
+       "    flux_name:           90-degrees bend\n",
        "    dose_rate_type:      Point source\n",
-       "    dose_rate_distance:  1.0
    • time_step_number
      PandasIndex
      PandasIndex(Int64Index([ 1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
      +       "            18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,\n",
      +       "            35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,\n",
      +       "            52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65],\n",
      +       "           dtype='int64', name='time_step_number'))
    • nuclide
      element
      mass_number
      state
      PandasMultiIndex
      PandasIndex(MultiIndex([('Al', 26,  ''),\n",
      +       "            ('Al', 27,  ''),\n",
      +       "            ('Al', 28,  ''),\n",
      +       "            ('Al', 29,  ''),\n",
      +       "            ('Al', 30,  ''),\n",
      +       "            ('Ar', 40,  ''),\n",
      +       "            ( 'B', 10,  ''),\n",
      +       "            ( 'B', 11,  ''),\n",
      +       "            ('Be',  9,  ''),\n",
      +       "            ('Be', 10,  ''),\n",
      +       "            ...\n",
      +       "            ('Zr', 89,  ''),\n",
      +       "            ('Zr', 89, 'm'),\n",
      +       "            ('Zr', 90,  ''),\n",
      +       "            ('Zr', 91,  ''),\n",
      +       "            ('Zr', 92,  ''),\n",
      +       "            ('Zr', 93,  ''),\n",
      +       "            ('Zr', 94,  ''),\n",
      +       "            ('Zr', 95,  ''),\n",
      +       "            ('Zr', 96,  ''),\n",
      +       "            ('Zr', 97,  '')],\n",
      +       "           name='nuclide', length=215))
    • gamma_boundaries
      PandasIndex
      PandasIndex(Float64Index([9.999999747378751e-12,                  0.01,\n",
      +       "                               0.02,  0.049999999999999996,\n",
      +       "                0.09999999999999999,   0.19999999999999998,\n",
      +       "                                0.3,   0.39999999999999997,\n",
      +       "                                0.6,    0.7999999999999999,\n",
      +       "                                1.0,                  1.22,\n",
      +       "                               1.44,                  1.66,\n",
      +       "                                2.0,                   2.5,\n",
      +       "                                3.0,                   4.0,\n",
      +       "                                5.0,                   6.5,\n",
      +       "                                8.0,                  10.0,\n",
      +       "                               12.0,                  14.0,\n",
      +       "                               20.0],\n",
      +       "             dtype='float64', name='gamma_boundaries'))
    • timestamp
      PandasIndex
      PandasIndex(DatetimeIndex(['2022-02-21 01:52:47'], dtype='datetime64[ns]', name='timestamp', freq='D'))
  • run_name :
    * Material Alloy718-Co04, fluxes 104_2_1_1
    flux_name :
    90-degrees bend
    dose_rate_type :
    Point source
    dose_rate_distance :
    1.0
  • " ], "text/plain": [ "\n", - "Dimensions: (time_step_number: 2, nuclide: 48, timestamp: 1)\n", + "Dimensions: (time_step_number: 65, nuclide: 215,\n", + " gamma_boundaries: 25, timestamp: 1)\n", "Coordinates:\n", - " * time_step_number (time_step_number) int64 1 2\n", + " * time_step_number (time_step_number) int64 1 2 3 4 5 ... 62 63 64 65\n", " * nuclide (nuclide) object MultiIndex\n", - " * element (nuclide) object 'Ag' 'Ag' 'Ag' ... 'Ru' 'Ru' 'Ru'\n", - " * mass_number (nuclide) int64 105 105 106 106 ... 106 102 103 104\n", - " * state (nuclide) object '' 'm' '' 'm' '' ... 'm' '' '' ''\n", - " elapsed_time (time_step_number) float64 0.0 6.312e+07\n", - " zai (nuclide) int64 471050 471051 ... 441030 441040\n", - " * timestamp (timestamp) datetime64[ns] 2020-07-12T23:01:19\n", - "Data variables: (12/31)\n", - " irradiation_time (time_step_number) float64 0.0 6.312e+07\n", - " cooling_time (time_step_number) float64 0.0 0.0\n", - " duration (time_step_number) float64 0.0 6.312e+07\n", - " flux (time_step_number) float64 0.0 2.445e+10\n", - " total_atoms (time_step_number) float64 5.578e+21 5.578e+21\n", - " total_activity (time_step_number) float64 0.0 6.123e+09\n", + " * element (nuclide) object 'Al' 'Al' 'Al' ... 'Zr' 'Zr' 'Zr'\n", + " * mass_number (nuclide) int64 26 27 28 29 30 40 ... 93 94 95 96 97\n", + " * state (nuclide) object '' '' '' '' '' ... '' '' '' '' ''\n", + " * gamma_boundaries (gamma_boundaries) float64 1e-11 0.01 ... 14.0 20.0\n", + " elapsed_time (time_step_number) float64 0.0 6.312e+07 ... 3.2e+10\n", + " zai (nuclide) int64 130260 130270 ... 400960 400970\n", + " * timestamp (timestamp) datetime64[ns] 2022-02-21T01:52:47\n", + "Data variables: (12/32)\n", + " irradiation_time (time_step_number) float64 0.0 ... 4.207e+08\n", + " cooling_time (time_step_number) float64 0.0 0.0 ... 3.158e+10\n", + " duration (time_step_number) float64 0.0 ... 2.84e+10\n", + " flux (time_step_number) float64 0.0 2.445e+10 ... 0.0 0.0\n", + " total_atoms (time_step_number) float64 1.045e+22 ... 1.045e+22\n", + " total_activity (time_step_number) float64 0.01099 ... 3.152e+04\n", " ... ...\n", - " nuclide_alpha_heat (time_step_number, nuclide) float64 nan nan ... 0.0\n", - " nuclide_beta_heat (time_step_number, nuclide) float64 nan nan ... 0.0\n", - " nuclide_gamma_heat (time_step_number, nuclide) float64 nan nan ... 0.0\n", - " nuclide_dose (time_step_number, nuclide) float64 nan nan ... 0.0\n", - " nuclide_ingestion (time_step_number, nuclide) float64 nan nan ... 0.0\n", - " nuclide_inhalation (time_step_number, nuclide) float64 nan nan ... 0.0\n", + " nuclide_beta_heat (time_step_number, nuclide) float64 nan 0.0 ... nan\n", + " nuclide_gamma_heat (time_step_number, nuclide) float64 nan 0.0 ... nan\n", + " nuclide_dose (time_step_number, nuclide) float64 nan 0.0 ... nan\n", + " nuclide_ingestion (time_step_number, nuclide) float64 nan 0.0 ... nan\n", + " nuclide_inhalation (time_step_number, nuclide) float64 nan 0.0 ... nan\n", + " gamma (time_step_number, gamma_boundaries) float64 0.0 ...\n", "Attributes:\n", - " run_name: * Material Ag, fluxes 1\n", - " flux_name: 55.F9.10 11-L2-02W HFS_GLRY_08_U\n", + " run_name: * Material Alloy718-Co04, fluxes 104_2_1_1\n", + " flux_name: 90-degrees bend\n", " dose_rate_type: Point source\n", " dose_rate_distance: 1.0" ] }, - "execution_count": 26, + "execution_count": 242, "metadata": {}, "output_type": "execute_result" } @@ -889,226 +1110,8 @@ }, { "cell_type": "code", - "execution_count": null, - "id": "3d2db9b3-09d8-4bf7-bc4b-8ec13cc8105b", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": 28, - "id": "79beed07-0f86-485b-be23-97d7e8f33abb", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "import duckdb as db" - ] - }, - { - "cell_type": "code", - "execution_count": 46, - "id": "ee7bf9aa-13a8-419d-b39e-c90493094148", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "db_path = root_dir / \"wrk/try-duckdb.duckdb\"\n", - "db_path.parent.mkdir(parents=True, exist_ok=True)" - ] - }, - { - "cell_type": "code", - "execution_count": 48, - "id": "99a86bdc-84e1-4cd3-b7b7-4e63b6428086", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "con = db.connect(str(db_path))" - ] - }, - { - "cell_type": "code", - "execution_count": 153, - "id": "d9e1ddfb-398e-4cea-b01d-fb0e53242776", - "metadata": { - "tags": [] - }, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 153, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# con.execute(\"drop table rundata\")\n", - "# con.execute(\"drop table if exists timestep_gamma\")\n", - "con.execute(\"drop table if exists timestep_nuclide\")\n", - "# con.execute(\"drop table if exists timestep\")\n", - "con.execute(\"drop table nuclide\")\n" - ] - }, - { - "cell_type": "code", - "execution_count": 154, - "id": "c402d3a1-e77a-4b24-accc-a19588ccdf54", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "def create_tables(con):\n", - " sql = \"\"\"\n", - " \n", - " CREATE TABLE IF NOT EXISTS rundata (\n", - " timestamp varchar NOT NULL,\n", - " run_name varchar NOT NULL,\n", - " flux_name varchar NOT NULL,\n", - " dose_rate_type varchar NOT NULL,\n", - " dose_rate_distance real NOT NULL\n", - " );\n", - "\n", - " CREATE TABLE IF NOT EXISTS timestep(\n", - " id integer PRIMARY KEY,\n", - " elapsed_time real not null,\n", - " irradiation_time real not null,\n", - " cooling_time real not null,\n", - " duration real not null,\n", - " flux real not null,\n", - " total_atoms real not null,\n", - " total_activity real not null,\n", - " total_alpha_activity real not null,\n", - " total_beta_activity real not null,\n", - " total_gamma_activity real not null,\n", - " total_mass real not null,\n", - " total_heat real not null,\n", - " total_alpha_heat real not null,\n", - " total_beta_heat real not null,\n", - " total_gamma_heat real not null,\n", - " total_ingest1ion_dose real not null,\n", - " total_inhalation_dose real not null,\n", - " total_dose_rate real not null\n", - " );\n", - " \n", - " CREATE TABLE IF NOT EXISTS nuclide(\n", - " element varchar(2) not null,\n", - " mass_number integer not null check(0 < mass_number), -- A\n", - " state varchar(1) not null,\n", - " zai integer not null check(10010 <= zai) unique,\n", - " half_life real not null check(0 <= half_life),\n", - " primary key(element, mass_number, state)\n", - " );\n", - " \n", - " CREATE TABLE IF NOT EXISTS timestep_nuclide(\n", - " timestep_id integer not null,\n", - " element varchar(2) not null,\n", - " mass_number integer not null,\n", - " state varchar(1) not null,\n", - " atoms real not null,\n", - " grams real not null,\n", - " activity real not null,\n", - " alpha_activity real not null,\n", - " beta_activity real not null,\n", - " gamma_activity real not null,\n", - " heat real not null,\n", - " alpha_heat real not null,\n", - " beta_heat real not null,\n", - " gamma_heat real not null,\n", - " dose real not null,\n", - " ingestion real not null,\n", - " inhalation real not null,\n", - " primary key(timestep_id, element, mass_number, state),\n", - " foreign key(timestep_id) references timestep(id),\n", - " foreign key(element, mass_number, state) references nuclide(element, mass_number, state) \n", - " );\n", - "\n", - " CREATE TABLE IF NOT EXISTS timestep_gamma(\n", - " timestep_id integer not null,\n", - " boundary real not null check(0 <= boundary),\n", - " intensity real not null, \n", - " primary key(timestep_id, boundary),\n", - " foreign key(timestep_id) references timestep(id),\n", - " );\n", - "\"\"\"\n", - " con.execute(sql)" - ] - }, - { - "cell_type": "code", - "execution_count": 155, - "id": "25f6867e-397a-4e98-a363-74b6af739c88", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "create_tables(con)" - ] - }, - { - "cell_type": "code", - "execution_count": 85, - "id": "db019e1c-bebd-4993-a1b5-274cf00a2ceb", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "# con.execute(\"delete from rundata\")" - ] - }, - { - "cell_type": "code", - "execution_count": 81, - "id": "29716201-70f8-40d2-8da7-85689714ec32", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "def save_rundata(con, ds):\n", - " sql = \"\"\"\n", - " INSERT INTO rundata values(?, ?, ?, ?, ?)\n", - " \"\"\"\n", - " con.execute(sql, ( \n", - " ds.coords[\"timestamp\"].item(),\n", - " ds.attrs[\"run_name\"],\n", - " ds.attrs[\"flux_name\"],\n", - " ds.attrs[\"dose_rate_type\"],\n", - " ds.attrs[\"dose_rate_distance\"]\n", - " ))\n", - " con.commit()" - ] - }, - { - "cell_type": "code", - "execution_count": 83, - "id": "c789eedd-580c-4383-8bf1-cc943562a3aa", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "save_rundata(con, ds)" - ] - }, - { - "cell_type": "code", - "execution_count": 84, - "id": "1c650134-edf3-44dd-aa90-ddde6a3987a7", + "execution_count": 287, + "id": "6f923a0d-5ef8-4dea-8157-98f6049ddb26", "metadata": { "tags": [] }, @@ -1116,952 +1119,93 @@ { "data": { "text/html": [ - "
    \n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
    timestamprun_nameflux_namedose_rate_typedose_rate_distance
    01594594879000000000* Material Ag, fluxes 155.F9.10 11-L2-02W HFS_GLRY_08_UPoint source1.0
    \n", - "
    " - ], - "text/plain": [ - " timestamp run_name \\\n", - "0 1594594879000000000 * Material Ag, fluxes 1 \n", + "html[theme=dark],\n", + "body[data-theme=dark],\n", + "body.vscode-dark {\n", + " --xr-font-color0: rgba(255, 255, 255, 1);\n", + " --xr-font-color2: rgba(255, 255, 255, 0.54);\n", + " --xr-font-color3: rgba(255, 255, 255, 0.38);\n", + " --xr-border-color: #1F1F1F;\n", + " --xr-disabled-color: #515151;\n", + " --xr-background-color: #111111;\n", + " --xr-background-color-row-even: #111111;\n", + " --xr-background-color-row-odd: #313131;\n", + "}\n", "\n", - " flux_name dose_rate_type dose_rate_distance \n", - "0 55.F9.10 11-L2-02W HFS_GLRY_08_U Point source 1.0 " - ] - }, - "execution_count": 84, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "con.execute(\"select * from rundata\").df()" - ] - }, - { - "cell_type": "code", - "execution_count": 114, - "id": "cf8661b6-d9cb-4431-8b40-f14072409d5a", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "def save_timesteps(con, ds):\n", - " timesteps_df = ds[\n", - " [\n", - " \"time_step_number\",\n", - " \"elapsed_time\",\n", - " \"irradiation_time\",\n", - " \"cooling_time\",\n", - " \"duration\",\n", - " \"flux\",\n", - " \"total_atoms\",\n", - " \"total_activity\",\n", - " \"total_alpha_activity\",\n", - " \"total_beta_activity\",\n", - " \"total_gamma_activity\",\n", - " \"total_mass\",\n", - " \"total_heat\",\n", - " \"total_alpha_heat\",\n", - " \"total_beta_heat\",\n", - " \"total_gamma_heat\",\n", - " \"total_ingest1ion_dose\",\n", - " \"total_inhalation_dose\",\n", - " \"total_dose_rate\",\n", - " ]\n", - " ].to_pandas().reset_index()\n", - " sql = \"insert into timestep select * from timesteps_df\"\n", - " con.execute(sql)\n", - " con.commit()" - ] - }, - { - "cell_type": "code", - "execution_count": 115, - "id": "78154d84-9df4-417d-a35f-60252575aae6", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "save_timesteps(con, ds)" - ] - }, - { - "cell_type": "code", - "execution_count": 116, - "id": "bf73ee32-d132-418f-8e77-969d779b780a", - "metadata": { - "tags": [] - }, - "outputs": [ - { - "data": { - "text/html": [ - "
    \n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
    idelapsed_timeirradiation_timecooling_timedurationfluxtotal_atomstotal_activitytotal_alpha_activitytotal_beta_activitytotal_gamma_activitytotal_masstotal_heattotal_alpha_heattotal_beta_heattotal_gamma_heattotal_ingest1ion_dosetotal_inhalation_dosetotal_dose_rate
    010.00.00.00.00.000000e+005.577957e+210.000000e+000.00.00.00.0009990.0000000.00.000000e+000.000000e+000.0000000.0000000.000000
    1263115200.063115200.00.063115200.02.445200e+105.577957e+216.123276e+090.00.00.00.0009990.0000010.09.894924e-071.135242e-070.5446022.3233750.000092
    \n", - "
    " - ], - "text/plain": [ - " id elapsed_time irradiation_time cooling_time duration flux \\\n", - "0 1 0.0 0.0 0.0 0.0 0.000000e+00 \n", - "1 2 63115200.0 63115200.0 0.0 63115200.0 2.445200e+10 \n", + ".xr-header {\n", + " padding-top: 6px;\n", + " padding-bottom: 6px;\n", + " margin-bottom: 4px;\n", + " border-bottom: solid 1px var(--xr-border-color);\n", + "}\n", "\n", - " total_atoms total_activity total_alpha_activity total_beta_activity \\\n", - "0 5.577957e+21 0.000000e+00 0.0 0.0 \n", - "1 5.577957e+21 6.123276e+09 0.0 0.0 \n", + ".xr-header > div,\n", + ".xr-header > ul {\n", + " display: inline;\n", + " margin-top: 0;\n", + " margin-bottom: 0;\n", + "}\n", "\n", - " total_gamma_activity total_mass total_heat total_alpha_heat \\\n", - "0 0.0 0.000999 0.000000 0.0 \n", - "1 0.0 0.000999 0.000001 0.0 \n", + ".xr-obj-type,\n", + ".xr-array-name {\n", + " margin-left: 2px;\n", + " margin-right: 10px;\n", + "}\n", "\n", - " total_beta_heat total_gamma_heat total_ingest1ion_dose \\\n", - "0 0.000000e+00 0.000000e+00 0.000000 \n", - "1 9.894924e-07 1.135242e-07 0.544602 \n", + ".xr-obj-type {\n", + " color: var(--xr-font-color2);\n", + "}\n", "\n", - " total_inhalation_dose total_dose_rate \n", - "0 0.000000 0.000000 \n", - "1 2.323375 0.000092 " - ] - }, - "execution_count": 116, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "con.execute(\"select * from timestep\").df()" - ] - }, - { - "cell_type": "code", - "execution_count": 131, - "id": "44222193-149a-4661-8eef-00b46d5c6a90", - "metadata": { - "tags": [] - }, - "outputs": [ - { - "data": { - "text/html": [ - "
    \n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
    elementmass_numberstatezainuclide_half_life
    0Ag1054710503.568320e+06
    1Ag105m4710514.338000e+02
    2Ag1064710601.440000e+03
    3Ag106m4710617.309440e+05
    4Ag1074710700.000000e+00
    5Ag107m4710714.430000e+01
    6Ag1084710801.440000e+02
    7Ag108m4710811.319110e+10
    8Ag1094710900.000000e+00
    9Ag109m4710913.970000e+01
    10Ag1104711002.456000e+01
    11Ag110m4711012.158100e+07
    12Ag1114711106.436800e+05
    13Ag111m4711116.480000e+01
    14Cd1064810602.082800e+26
    15Cd1074810702.347200e+04
    16Cd1084810801.293860e+25
    17Cd1094810903.996860e+07
    18Cd1104811000.000000e+00
    19Cd1114811100.000000e+00
    20Cd111m4811112.924400e+03
    21Cd1124811200.000000e+00
    22H1100100.000000e+00
    23H2100200.000000e+00
    24H3100303.891050e+08
    25He3200300.000000e+00
    26He4200400.000000e+00
    27Pd1044610400.000000e+00
    28Pd1054610500.000000e+00
    29Pd1064610600.000000e+00
    30Pd1074610702.051200e+14
    31Pd107m4610712.130000e+01
    32Pd1084610800.000000e+00
    33Pd1094610904.932430e+04
    34Pd109m4610912.814000e+02
    35Pd1104611001.893460e+25
    36Rh1024510209.158400e+07
    37Rh102m4510211.797120e+07
    38Rh1034510300.000000e+00
    39Rh103m4510313.366840e+03
    40Rh1044510404.230000e+01
    41Rh104m4510412.604000e+02
    42Rh1054510501.272960e+05
    43Rh1064510603.000000e+01
    44Rh106m4510617.920000e+03
    45Ru1024410200.000000e+00
    46Ru1034410303.392060e+06
    47Ru1044410400.000000e+00
    \n", - "
    " - ], - "text/plain": [ - " element mass_number state zai nuclide_half_life\n", - "0 Ag 105 471050 3.568320e+06\n", - "1 Ag 105 m 471051 4.338000e+02\n", - "2 Ag 106 471060 1.440000e+03\n", - "3 Ag 106 m 471061 7.309440e+05\n", - "4 Ag 107 471070 0.000000e+00\n", - "5 Ag 107 m 471071 4.430000e+01\n", - "6 Ag 108 471080 1.440000e+02\n", - "7 Ag 108 m 471081 1.319110e+10\n", - "8 Ag 109 471090 0.000000e+00\n", - "9 Ag 109 m 471091 3.970000e+01\n", - "10 Ag 110 471100 2.456000e+01\n", - "11 Ag 110 m 471101 2.158100e+07\n", - "12 Ag 111 471110 6.436800e+05\n", - "13 Ag 111 m 471111 6.480000e+01\n", - "14 Cd 106 481060 2.082800e+26\n", - "15 Cd 107 481070 2.347200e+04\n", - "16 Cd 108 481080 1.293860e+25\n", - "17 Cd 109 481090 3.996860e+07\n", - "18 Cd 110 481100 0.000000e+00\n", - "19 Cd 111 481110 0.000000e+00\n", - "20 Cd 111 m 481111 2.924400e+03\n", - "21 Cd 112 481120 0.000000e+00\n", - "22 H 1 10010 0.000000e+00\n", - "23 H 2 10020 0.000000e+00\n", - "24 H 3 10030 3.891050e+08\n", - "25 He 3 20030 0.000000e+00\n", - "26 He 4 20040 0.000000e+00\n", - "27 Pd 104 461040 0.000000e+00\n", - "28 Pd 105 461050 0.000000e+00\n", - "29 Pd 106 461060 0.000000e+00\n", - "30 Pd 107 461070 2.051200e+14\n", - "31 Pd 107 m 461071 2.130000e+01\n", - "32 Pd 108 461080 0.000000e+00\n", - "33 Pd 109 461090 4.932430e+04\n", - "34 Pd 109 m 461091 2.814000e+02\n", - "35 Pd 110 461100 1.893460e+25\n", - "36 Rh 102 451020 9.158400e+07\n", - "37 Rh 102 m 451021 1.797120e+07\n", - "38 Rh 103 451030 0.000000e+00\n", - "39 Rh 103 m 451031 3.366840e+03\n", - "40 Rh 104 451040 4.230000e+01\n", - "41 Rh 104 m 451041 2.604000e+02\n", - "42 Rh 105 451050 1.272960e+05\n", - "43 Rh 106 451060 3.000000e+01\n", - "44 Rh 106 m 451061 7.920000e+03\n", - "45 Ru 102 441020 0.000000e+00\n", - "46 Ru 103 441030 3.392060e+06\n", - "47 Ru 104 441040 0.000000e+00" - ] - }, - "execution_count": 131, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "ds[[\"element\", \"mass_number\", \"state\", \"zai\", \"nuclide_half_life\"]].to_pandas().reset_index(drop=True)" - ] - }, - { - "cell_type": "code", - "execution_count": 156, - "id": "c5fdb6e7-00b7-40f1-9d8d-f755dd768a97", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "def save_nuclides(con, ds):\n", - " nuclides_df = ds[[\"element\", \"mass_number\", \"state\", \"zai\", \"nuclide_half_life\"]].to_pandas().reset_index(drop=True)\n", - " sql = \"insert into nuclide select * from nuclides_df\"\n", - " con.execute(sql)\n", - " con.commit()" - ] - }, - { - "cell_type": "code", - "execution_count": 157, - "id": "2cd4e47d-1ec3-493c-b655-8a83917deea5", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "save_nuclides(con, ds)" - ] - }, - { - "cell_type": "code", - "execution_count": 160, - "id": "1f6cbb0e-e893-4d88-a744-989d9b39e0a4", - "metadata": { - "tags": [] - }, - "outputs": [ - { - "data": { - "text/html": [ - "
    \n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
    elementmass_numberstatezaihalf_life
    0Ag1054710503.568320e+06
    1Ag105m4710514.338000e+02
    2Ag1064710601.440000e+03
    3Ag106m4710617.309440e+05
    4Ag1074710700.000000e+00
    \n", - "
    " - ], - "text/plain": [ - " element mass_number state zai half_life\n", - "0 Ag 105 471050 3.568320e+06\n", - "1 Ag 105 m 471051 4.338000e+02\n", - "2 Ag 106 471060 1.440000e+03\n", - "3 Ag 106 m 471061 7.309440e+05\n", - "4 Ag 107 471070 0.000000e+00" - ] - }, - "execution_count": 160, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "con.execute(\"select * from nuclide\").df().head()" - ] - }, - { - "cell_type": "code", - "execution_count": 166, - "id": "01216ae8-6108-4909-a332-44afbe8fb2c3", - "metadata": { - "tags": [] - }, - "outputs": [ - { - "data": { - "text/html": [ - "
    \n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "
    <xarray.DataArray 'timestamp' (timestamp: 1)>\n",
    +       "array(['2022-02-21T01:52:47.000000000'], dtype='datetime64[ns]')\n",
    +       "Coordinates:\n",
    +       "  * timestamp  (timestamp) datetime64[ns] 2022-02-21T01:52:47\n",
    +       "Attributes:\n",
    +       "    long description:  FISPACT datasets can be merged and then selected by ti...
    " + ], + "text/plain": [ + "\n", + "array(['2022-02-21T01:52:47.000000000'], dtype='datetime64[ns]')\n", + "Coordinates:\n", + " * timestamp (timestamp) datetime64[ns] 2022-02-21T01:52:47\n", + "Attributes:\n", + " long description: FISPACT datasets can be merged and then selected by ti..." + ] + }, + "execution_count": 287, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ds.timestamp" + ] + }, + { + "cell_type": "code", + "execution_count": 243, + "id": "79beed07-0f86-485b-be23-97d7e8f33abb", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "import duckdb as db" + ] + }, + { + "cell_type": "code", + "execution_count": 384, + "id": "ee7bf9aa-13a8-419d-b39e-c90493094148", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "db_path = root_dir / \"wrk/try-duckdb.duckdb\"\n", + "db_path.parent.mkdir(parents=True, exist_ok=True)\n", + "if db_path.exists():\n", + " db_path.unlink()" + ] + }, + { + "cell_type": "code", + "execution_count": 385, + "id": "99a86bdc-84e1-4cd3-b7b7-4e63b6428086", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "con = db.connect(str(db_path))" + ] + }, + { + "cell_type": "code", + "execution_count": 386, + "id": "c74de5dc-5b72-4e1a-a105-3c629995a5af", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "material_id = 100\n", + "case_id = 3" + ] + }, + { + "cell_type": "code", + "execution_count": 387, + "id": "d9e1ddfb-398e-4cea-b01d-fb0e53242776", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "def drop_tables(con):\n", + " con.execute(\"drop table if exists timestep_gamma\")\n", + " con.execute(\"drop table if exists timestep_nuclide\")\n", + " con.execute(\"drop table if exists timestep\")\n", + " con.execute(\"drop table if exists nuclide\")\n", + " con.execute(\"drop table if exists rundata\")" + ] + }, + { + "cell_type": "code", + "execution_count": 395, + "id": "c402d3a1-e77a-4b24-accc-a19588ccdf54", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "def create_tables(con):\n", + " sql = \"\"\" \n", + " CREATE TABLE IF NOT EXISTS rundata (\n", + " material_id uinteger not null,\n", + " case_id uinteger not null,\n", + " timestamp timestamp not null,\n", + " run_name varchar not null,\n", + " flux_name varchar NOT NULL,\n", + " dose_rate_type varchar NOT NULL,\n", + " dose_rate_distance real NOT NULL,\n", + " primary key(material_id, case_id)\n", + " );\n", + "\n", + " CREATE TABLE IF NOT EXISTS timestep(\n", + " id uinteger PRIMARY KEY,\n", + " elapsed_time float4 not null,\n", + " irradiation_time float4 not null,\n", + " cooling_time float4 not null,\n", + " duration float4 not null,\n", + " flux float4 not null,\n", + " total_atoms float4 not null,\n", + " total_activity float4 not null,\n", + " total_alpha_activity float4 not null,\n", + " total_beta_activity float4 not null,\n", + " total_gamma_activity float4 not null,\n", + " total_mass float4 not null,\n", + " total_heat float4 not null,\n", + " total_alpha_heat float4 null,\n", + " total_beta_heat float4 not null,\n", + " total_gamma_heat float4 not null,\n", + " total_ingest1ion_dose float4 not null,\n", + " total_inhalation_dose float4 not null,\n", + " total_dose_rate float4 not null,\n", + " material_id uinteger not null,\n", + " case_id uinteger not null,\n", + " foreign key(material_id, case_id) references rundata(material_id, case_id) \n", + " );\n", + "\n", + " \n", + " CREATE TABLE IF NOT EXISTS nuclide(\n", + " element varchar(2) not null,\n", + " mass_number usmallint not null check(0 < mass_number),\n", + " state varchar(1) not null,\n", + " zai integer not null check(10010 <= zai) unique,\n", + " half_life float4 not null check(0 <= half_life),\n", + " primary key(element, mass_number, state)\n", + " );\n", + " \n", + " CREATE TABLE IF NOT EXISTS timestep_nuclide(\n", + " timestep_id uinteger not null,\n", + " element varchar(2) not null,\n", + " mass_number usmallint not null,\n", + " state varchar(1) not null,\n", + " atoms float4 not null,\n", + " grams float4 not null,\n", + " activity float4 not null,\n", + " alpha_activity float4 not null,\n", + " beta_activity float4 not null,\n", + " gamma_activity float4 not null,\n", + " heat float4 not null,\n", + " alpha_heat float4 not null,\n", + " beta_heat float4 not null,\n", + " gamma_heat float4 not null,\n", + " dose float4 not null,\n", + " ingestion float4 not null,\n", + " inhalation float4 not null,\n", + " primary key(timestep_id, element, mass_number, state),\n", + " foreign key(timestep_id) references timestep(id),\n", + " foreign key(element, mass_number, state) references nuclide(element, mass_number, state) \n", + " );\n", + "\n", + " CREATE TABLE IF NOT EXISTS timestep_gamma(\n", + " timestep_id uinteger not null,\n", + " boundary real not null check(0 <= boundary),\n", + " intensity real not null, \n", + " primary key(timestep_id, boundary),\n", + " foreign key(timestep_id) references timestep(id),\n", + " );\n", + " \"\"\"\n", + " con.execute(sql)" + ] + }, + { + "cell_type": "code", + "execution_count": 396, + "id": "25f6867e-397a-4e98-a363-74b6af739c88", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# drop_tables(con)\n", + "create_tables(con)" + ] + }, + { + "cell_type": "code", + "execution_count": 402, + "id": "29716201-70f8-40d2-8da7-85689714ec32", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "def save_rundata(con, ds):\n", + " sql = \"\"\"\n", + " INSERT INTO rundata values(?, ?, ?, ?, ?)\n", + " \"\"\"\n", + " con.execute(sql, ( \n", + " material_id,\n", + " case_id,\n", + " ds.coords[\"timestamp\"].item(),\n", + " ds.attrs[\"run_name\"],\n", + " ds.attrs[\"flux_name\"],\n", + " ds.attrs[\"dose_rate_type\"],\n", + " ds.attrs[\"dose_rate_distance\"]\n", + " ))\n", + " con.commit()" + ] + }, + { + "cell_type": "code", + "execution_count": 403, + "id": "4d71d862-2960-455d-be85-c5d9394a160d", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "text/html": [ + "
    \n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
    table_catalogtable_schematable_nametable_typeself_referencing_column_namereference_generationuser_defined_type_cataloguser_defined_type_schemauser_defined_type_nameis_insertable_intois_typedcommit_action
    0try-duckdbmainrundataBASE TABLENaNNaNNaNNaNNaNYESNONaN
    1try-duckdbmaintimestepBASE TABLENaNNaNNaNNaNNaNYESNONaN
    2try-duckdbmainnuclideBASE TABLENaNNaNNaNNaNNaNYESNONaN
    3try-duckdbmaintimestep_nuclideBASE TABLENaNNaNNaNNaNNaNYESNONaN
    4try-duckdbmaintimestep_gammaBASE TABLENaNNaNNaNNaNNaNYESNONaN
    \n", + "
    " + ], + "text/plain": [ + " table_catalog table_schema table_name table_type \\\n", + "0 try-duckdb main rundata BASE TABLE \n", + "1 try-duckdb main timestep BASE TABLE \n", + "2 try-duckdb main nuclide BASE TABLE \n", + "3 try-duckdb main timestep_nuclide BASE TABLE \n", + "4 try-duckdb main timestep_gamma BASE TABLE \n", + "\n", + " self_referencing_column_name reference_generation \\\n", + "0 NaN NaN \n", + "1 NaN NaN \n", + "2 NaN NaN \n", + "3 NaN NaN \n", + "4 NaN NaN \n", + "\n", + " user_defined_type_catalog user_defined_type_schema \\\n", + "0 NaN NaN \n", + "1 NaN NaN \n", + "2 NaN NaN \n", + "3 NaN NaN \n", + "4 NaN NaN \n", + "\n", + " user_defined_type_name is_insertable_into is_typed commit_action \n", + "0 NaN YES NO NaN \n", + "1 NaN YES NO NaN \n", + "2 NaN YES NO NaN \n", + "3 NaN YES NO NaN \n", + "4 NaN YES NO NaN " + ] + }, + "execution_count": 403, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "con.execute(\"select * from information_schema.tables\").df()" + ] + }, + { + "cell_type": "code", + "execution_count": 400, + "id": "c789eedd-580c-4383-8bf1-cc943562a3aa", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "ename": "BinderException", + "evalue": "Binder Error: table rundata has 7 columns but 5 values were supplied", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mBinderException\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[400], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43msave_rundata\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcon\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mds\u001b[49m\u001b[43m)\u001b[49m\n", + "Cell \u001b[0;32mIn[397], line 5\u001b[0m, in \u001b[0;36msave_rundata\u001b[0;34m(con, ds)\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21msave_rundata\u001b[39m(con, ds):\n\u001b[1;32m 2\u001b[0m sql \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\"\"\u001b[39m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;124m INSERT INTO rundata values(?, ?, ?, ?, ?)\u001b[39m\n\u001b[1;32m 4\u001b[0m \u001b[38;5;124m \u001b[39m\u001b[38;5;124m\"\"\"\u001b[39m\n\u001b[0;32m----> 5\u001b[0m \u001b[43mcon\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mexecute\u001b[49m\u001b[43m(\u001b[49m\u001b[43msql\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43m(\u001b[49m\u001b[43m \u001b[49m\n\u001b[1;32m 6\u001b[0m \u001b[43m \u001b[49m\u001b[43mds\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcoords\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mtimestamp\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mitem\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 7\u001b[0m \u001b[43m \u001b[49m\u001b[43mds\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mattrs\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mrun_name\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 8\u001b[0m \u001b[43m \u001b[49m\u001b[43mds\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mattrs\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mflux_name\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 9\u001b[0m \u001b[43m \u001b[49m\u001b[43mds\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mattrs\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mdose_rate_type\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 10\u001b[0m \u001b[43m \u001b[49m\u001b[43mds\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mattrs\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mdose_rate_distance\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\n\u001b[1;32m 11\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 12\u001b[0m con\u001b[38;5;241m.\u001b[39mcommit()\n", + "\u001b[0;31mBinderException\u001b[0m: Binder Error: table rundata has 7 columns but 5 values were supplied" + ] + } + ], + "source": [ + "save_rundata(con, ds)" + ] + }, + { + "cell_type": "code", + "execution_count": 254, + "id": "1c650134-edf3-44dd-aa90-ddde6a3987a7", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "text/html": [ + "
    \n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
    timestamprun_nameflux_namedose_rate_typedose_rate_distance
    01645408367000000000* Material Alloy718-Co04, fluxes 104_2_1_190-degrees bendPoint source1.0
    \n", + "
    " + ], + "text/plain": [ + " timestamp run_name \\\n", + "0 1645408367000000000 * Material Alloy718-Co04, fluxes 104_2_1_1 \n", "\n", - ".xr-var-name span,\n", - ".xr-var-data,\n", - ".xr-index-name div,\n", - ".xr-index-data,\n", - ".xr-attrs {\n", - " padding-left: 25px !important;\n", - "}\n", + " flux_name dose_rate_type dose_rate_distance \n", + "0 90-degrees bend Point source 1.0 " + ] + }, + "execution_count": 254, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "con.execute(\"select * from rundata\").df()" + ] + }, + { + "cell_type": "code", + "execution_count": 255, + "id": "cf8661b6-d9cb-4431-8b40-f14072409d5a", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "def save_timesteps(con, ds):\n", + " timesteps_df = ds[\n", + " [\n", + " \"time_step_number\",\n", + " \"elapsed_time\",\n", + " \"irradiation_time\",\n", + " \"cooling_time\",\n", + " \"duration\",\n", + " \"flux\",\n", + " \"total_atoms\",\n", + " \"total_activity\",\n", + " \"total_alpha_activity\",\n", + " \"total_beta_activity\",\n", + " \"total_gamma_activity\",\n", + " \"total_mass\",\n", + " \"total_heat\",\n", + " \"total_alpha_heat\",\n", + " \"total_beta_heat\",\n", + " \"total_gamma_heat\",\n", + " \"total_ingest1ion_dose\",\n", + " \"total_inhalation_dose\",\n", + " \"total_dose_rate\",\n", + " ]\n", + " ].to_pandas().reset_index()\n", + " sql = \"insert into timestep select * from timesteps_df\"\n", + " con.execute(sql)\n", + " con.commit()" + ] + }, + { + "cell_type": "code", + "execution_count": 256, + "id": "78154d84-9df4-417d-a35f-60252575aae6", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "save_timesteps(con, ds)" + ] + }, + { + "cell_type": "code", + "execution_count": 257, + "id": "bf73ee32-d132-418f-8e77-969d779b780a", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "text/html": [ + "
    \n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
    idelapsed_timeirradiation_timecooling_timedurationfluxtotal_atomstotal_activitytotal_alpha_activitytotal_beta_activitytotal_gamma_activitytotal_masstotal_heattotal_alpha_heattotal_beta_heattotal_gamma_heattotal_ingest1ion_dosetotal_inhalation_dosetotal_dose_rate
    010.000000e+000.00.000000e+000.000000e+000.000000e+001.045481e+221.099260e-020.000000e+001.099260e-020.000000e+000.0011.994928e-190.000000e+001.994919e-198.784190e-255.288239e-129.131853e-127.484415e-22
    126.311520e+0763115200.00.000000e+006.311520e+072.445200e+101.045481e+222.268685e+076.921229e-151.476443e+077.922416e+060.0012.522555e-091.316125e-304.443058e-102.078249e-091.225884e-027.370374e-021.774444e-06
    233.786912e+08378691200.00.000000e+003.155760e+081.882800e+111.045484e+222.005898e+083.384520e-121.391144e+086.147540e+070.0012.601587e-086.436155e-283.691712e-092.232416e-081.498245e-011.057001e+001.854623e-05
    343.997401e+08378691200.02.104892e+072.104892e+070.000000e+001.045484e+225.064473e+073.389543e-125.005196e+075.927796e+050.0011.072963e-086.445708e-285.938637e-101.013577e-088.618334e-027.240407e-017.931148e-06
    454.417117e+08420662816.02.104892e+074.197161e+073.790000e+111.045484e+223.644599e+084.926714e-122.411954e+081.232645e+080.0014.388052e-089.368928e-287.024670e-093.685585e-082.313087e-011.522821e+003.102856e-05
    ............................................................
    60617.573741e+08420670816.03.367033e+082.209032e+080.000000e+001.045484e+221.021210e+074.950759e-129.725966e+064.861311e+050.0013.030422e-099.414649e-281.199240e-102.910498e-092.524398e-022.288691e-012.231632e-06
    61621.388526e+09420670816.09.678553e+086.311520e+080.000000e+001.045484e+222.140445e+064.950759e-121.934185e+062.062603e+050.0012.260388e-109.414649e-281.325084e-112.127880e-102.034489e-031.899889e-021.650785e-07
    62632.019678e+09420670816.01.599007e+096.311520e+080.000000e+001.045484e+221.354644e+064.950759e-121.266816e+068.782794e+040.0012.303827e-119.414649e-284.691881e-121.834639e-113.442937e-043.528395e-031.529847e-08
    63643.597558e+09420670816.03.176887e+091.577880e+090.000000e+001.045484e+228.909484e+054.950759e-128.798868e+051.106160e+040.0016.016502e-129.414649e-282.779170e-123.237332e-121.548528e-041.769614e-032.999845e-09
    64653.199940e+10420670816.03.157873e+102.840184e+100.000000e+001.045484e+223.152101e+044.950759e-123.071513e+048.058719e+020.0013.465519e-129.414649e-283.548016e-133.110717e-122.518117e-056.220313e-042.701462e-09
    \n", + "

    65 rows × 19 columns

    \n", + "
    " + ], + "text/plain": [ + " id elapsed_time irradiation_time cooling_time duration \\\n", + "0 1 0.000000e+00 0.0 0.000000e+00 0.000000e+00 \n", + "1 2 6.311520e+07 63115200.0 0.000000e+00 6.311520e+07 \n", + "2 3 3.786912e+08 378691200.0 0.000000e+00 3.155760e+08 \n", + "3 4 3.997401e+08 378691200.0 2.104892e+07 2.104892e+07 \n", + "4 5 4.417117e+08 420662816.0 2.104892e+07 4.197161e+07 \n", + ".. .. ... ... ... ... \n", + "60 61 7.573741e+08 420670816.0 3.367033e+08 2.209032e+08 \n", + "61 62 1.388526e+09 420670816.0 9.678553e+08 6.311520e+08 \n", + "62 63 2.019678e+09 420670816.0 1.599007e+09 6.311520e+08 \n", + "63 64 3.597558e+09 420670816.0 3.176887e+09 1.577880e+09 \n", + "64 65 3.199940e+10 420670816.0 3.157873e+10 2.840184e+10 \n", + "\n", + " flux total_atoms total_activity total_alpha_activity \\\n", + "0 0.000000e+00 1.045481e+22 1.099260e-02 0.000000e+00 \n", + "1 2.445200e+10 1.045481e+22 2.268685e+07 6.921229e-15 \n", + "2 1.882800e+11 1.045484e+22 2.005898e+08 3.384520e-12 \n", + "3 0.000000e+00 1.045484e+22 5.064473e+07 3.389543e-12 \n", + "4 3.790000e+11 1.045484e+22 3.644599e+08 4.926714e-12 \n", + ".. ... ... ... ... \n", + "60 0.000000e+00 1.045484e+22 1.021210e+07 4.950759e-12 \n", + "61 0.000000e+00 1.045484e+22 2.140445e+06 4.950759e-12 \n", + "62 0.000000e+00 1.045484e+22 1.354644e+06 4.950759e-12 \n", + "63 0.000000e+00 1.045484e+22 8.909484e+05 4.950759e-12 \n", + "64 0.000000e+00 1.045484e+22 3.152101e+04 4.950759e-12 \n", + "\n", + " total_beta_activity total_gamma_activity total_mass total_heat \\\n", + "0 1.099260e-02 0.000000e+00 0.001 1.994928e-19 \n", + "1 1.476443e+07 7.922416e+06 0.001 2.522555e-09 \n", + "2 1.391144e+08 6.147540e+07 0.001 2.601587e-08 \n", + "3 5.005196e+07 5.927796e+05 0.001 1.072963e-08 \n", + "4 2.411954e+08 1.232645e+08 0.001 4.388052e-08 \n", + ".. ... ... ... ... \n", + "60 9.725966e+06 4.861311e+05 0.001 3.030422e-09 \n", + "61 1.934185e+06 2.062603e+05 0.001 2.260388e-10 \n", + "62 1.266816e+06 8.782794e+04 0.001 2.303827e-11 \n", + "63 8.798868e+05 1.106160e+04 0.001 6.016502e-12 \n", + "64 3.071513e+04 8.058719e+02 0.001 3.465519e-12 \n", + "\n", + " total_alpha_heat total_beta_heat total_gamma_heat \\\n", + "0 0.000000e+00 1.994919e-19 8.784190e-25 \n", + "1 1.316125e-30 4.443058e-10 2.078249e-09 \n", + "2 6.436155e-28 3.691712e-09 2.232416e-08 \n", + "3 6.445708e-28 5.938637e-10 1.013577e-08 \n", + "4 9.368928e-28 7.024670e-09 3.685585e-08 \n", + ".. ... ... ... \n", + "60 9.414649e-28 1.199240e-10 2.910498e-09 \n", + "61 9.414649e-28 1.325084e-11 2.127880e-10 \n", + "62 9.414649e-28 4.691881e-12 1.834639e-11 \n", + "63 9.414649e-28 2.779170e-12 3.237332e-12 \n", + "64 9.414649e-28 3.548016e-13 3.110717e-12 \n", + "\n", + " total_ingest1ion_dose total_inhalation_dose total_dose_rate \n", + "0 5.288239e-12 9.131853e-12 7.484415e-22 \n", + "1 1.225884e-02 7.370374e-02 1.774444e-06 \n", + "2 1.498245e-01 1.057001e+00 1.854623e-05 \n", + "3 8.618334e-02 7.240407e-01 7.931148e-06 \n", + "4 2.313087e-01 1.522821e+00 3.102856e-05 \n", + ".. ... ... ... \n", + "60 2.524398e-02 2.288691e-01 2.231632e-06 \n", + "61 2.034489e-03 1.899889e-02 1.650785e-07 \n", + "62 3.442937e-04 3.528395e-03 1.529847e-08 \n", + "63 1.548528e-04 1.769614e-03 2.999845e-09 \n", + "64 2.518117e-05 6.220313e-04 2.701462e-09 \n", + "\n", + "[65 rows x 19 columns]" + ] + }, + "execution_count": 257, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "con.execute(\"select * from timestep\").df()" + ] + }, + { + "cell_type": "code", + "execution_count": 258, + "id": "c5fdb6e7-00b7-40f1-9d8d-f755dd768a97", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "def save_nuclides(con, ds):\n", + " nuclides_df = ds[[\"element\", \"mass_number\", \"state\", \"zai\", \"nuclide_half_life\"]].to_pandas().reset_index(drop=True)\n", + " sql = \"insert into nuclide select * from nuclides_df\"\n", + " con.execute(sql)\n", + " con.commit()" + ] + }, + { + "cell_type": "code", + "execution_count": 259, + "id": "2cd4e47d-1ec3-493c-b655-8a83917deea5", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "save_nuclides(con, ds)" + ] + }, + { + "cell_type": "code", + "execution_count": 285, + "id": "1f6cbb0e-e893-4d88-a744-989d9b39e0a4", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "text/html": [ + "
    \n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
    elementmass_numberstatezaihalf_life
    0Al261302602.262630e+13
    1Al271302700.000000e+00
    2Al281302801.344600e+02
    3Al291302903.936000e+02
    4Al301303003.650000e+00
    ..................
    210Zr934009304.828210e+13
    211Zr944009401.893460e+23
    212Zr954009505.532360e+06
    213Zr964009601.230750e+27
    214Zr974009706.027840e+04
    \n", + "

    215 rows × 5 columns

    \n", + "
    " + ], + "text/plain": [ + " element mass_number state zai half_life\n", + "0 Al 26 130260 2.262630e+13\n", + "1 Al 27 130270 0.000000e+00\n", + "2 Al 28 130280 1.344600e+02\n", + "3 Al 29 130290 3.936000e+02\n", + "4 Al 30 130300 3.650000e+00\n", + ".. ... ... ... ... ...\n", + "210 Zr 93 400930 4.828210e+13\n", + "211 Zr 94 400940 1.893460e+23\n", + "212 Zr 95 400950 5.532360e+06\n", + "213 Zr 96 400960 1.230750e+27\n", + "214 Zr 97 400970 6.027840e+04\n", + "\n", + "[215 rows x 5 columns]" + ] + }, + "execution_count": 285, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "con.execute(\"select * from nuclide\").df()" + ] + }, + { + "cell_type": "code", + "execution_count": 263, + "id": "526610bb-be7b-4ce7-8cc9-0bcdb00588f2", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "def save_timestep_nucludes(con, ds):\n", + " columns = [\n", + " \"time_step_number\",\n", + " \"element\",\n", + " \"mass_number\",\n", + " \"state\",\n", + " \"nuclide_atoms\",\n", + " \"nuclide_grams\",\n", + " \"nuclide_activity\",\n", + " \"nuclide_alpha_activity\",\n", + " \"nuclide_beta_activity\",\n", + " \"nuclide_gamma_activity\",\n", + " \"nuclide_heat\",\n", + " \"nuclide_alpha_heat\",\n", + " \"nuclide_beta_heat\",\n", + " \"nuclide_gamma_heat\",\n", + " \"nuclide_dose\",\n", + " \"nuclide_ingestion\",\n", + " \"nuclide_inhalation\",\n", + " ]\n", + " tn = ds[columns].to_dataframe().reset_index(\"time_step_number\")[columns].fillna(0.0)\n", + " sql = \"insert into timestep_nuclide select * from tn\"\n", + " con.execute(sql)\n", + " con.commit()" + ] + }, + { + "cell_type": "code", + "execution_count": 264, + "id": "de4b9bd0-02e4-48f5-bec3-bb92c67682d0", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "save_timestep_nucludes(con, ds)" + ] + }, + { + "cell_type": "code", + "execution_count": 265, + "id": "13094d05-fcad-40c3-b53d-34dfb8f84a4e", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "text/html": [ + "
    \n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
    timestep_idelementmass_numberstateatomsgramsactivityalpha_activitybeta_activitygamma_activityheatalpha_heatbeta_heatgamma_heatdoseingestioninhalation
    01Al260.000000e+000.000000e+000.000000e+000.00.000000e+000.00.000000e+000.00.000000e+000.00.00.000000e+000.000000e+00
    11Al271.785556e+208.000000e-030.000000e+000.00.000000e+000.00.000000e+000.00.000000e+000.00.00.000000e+000.000000e+00
    21Al280.000000e+000.000000e+000.000000e+000.00.000000e+000.00.000000e+000.00.000000e+000.00.00.000000e+000.000000e+00
    31Al290.000000e+000.000000e+000.000000e+000.00.000000e+000.00.000000e+000.00.000000e+000.00.00.000000e+000.000000e+00
    41Al300.000000e+000.000000e+000.000000e+000.00.000000e+000.00.000000e+000.00.000000e+000.00.00.000000e+000.000000e+00
    ......................................................
    1397065Zr936.327286e+139.761411e-099.083574e-010.09.083574e-010.02.791257e-180.02.791257e-180.00.09.991931e-102.270894e-08
    1397165Zr947.058445e+111.100659e-102.583916e-120.02.583916e-120.04.734377e-280.04.734377e-280.00.02.480559e-202.842307e-20
    1397265Zr950.000000e+000.000000e+000.000000e+000.00.000000e+000.00.000000e+000.00.000000e+000.00.00.000000e+000.000000e+00
    1397365Zr961.091942e+101.739020e-126.149716e-180.06.149716e-180.03.301027e-330.03.301027e-330.00.01.721921e-251.906412e-25
    1397465Zr970.000000e+000.000000e+000.000000e+000.00.000000e+000.00.000000e+000.00.000000e+000.00.00.000000e+000.000000e+00
    \n", + "

    13975 rows × 17 columns

    \n", + "
    " + ], + "text/plain": [ + " timestep_id element mass_number state atoms grams \\\n", + "0 1 Al 26 0.000000e+00 0.000000e+00 \n", + "1 1 Al 27 1.785556e+20 8.000000e-03 \n", + "2 1 Al 28 0.000000e+00 0.000000e+00 \n", + "3 1 Al 29 0.000000e+00 0.000000e+00 \n", + "4 1 Al 30 0.000000e+00 0.000000e+00 \n", + "... ... ... ... ... ... ... \n", + "13970 65 Zr 93 6.327286e+13 9.761411e-09 \n", + "13971 65 Zr 94 7.058445e+11 1.100659e-10 \n", + "13972 65 Zr 95 0.000000e+00 0.000000e+00 \n", + "13973 65 Zr 96 1.091942e+10 1.739020e-12 \n", + "13974 65 Zr 97 0.000000e+00 0.000000e+00 \n", + "\n", + " activity alpha_activity beta_activity gamma_activity \\\n", + "0 0.000000e+00 0.0 0.000000e+00 0.0 \n", + "1 0.000000e+00 0.0 0.000000e+00 0.0 \n", + "2 0.000000e+00 0.0 0.000000e+00 0.0 \n", + "3 0.000000e+00 0.0 0.000000e+00 0.0 \n", + "4 0.000000e+00 0.0 0.000000e+00 0.0 \n", + "... ... ... ... ... \n", + "13970 9.083574e-01 0.0 9.083574e-01 0.0 \n", + "13971 2.583916e-12 0.0 2.583916e-12 0.0 \n", + "13972 0.000000e+00 0.0 0.000000e+00 0.0 \n", + "13973 6.149716e-18 0.0 6.149716e-18 0.0 \n", + "13974 0.000000e+00 0.0 0.000000e+00 0.0 \n", + "\n", + " heat alpha_heat beta_heat gamma_heat dose ingestion \\\n", + "0 0.000000e+00 0.0 0.000000e+00 0.0 0.0 0.000000e+00 \n", + "1 0.000000e+00 0.0 0.000000e+00 0.0 0.0 0.000000e+00 \n", + "2 0.000000e+00 0.0 0.000000e+00 0.0 0.0 0.000000e+00 \n", + "3 0.000000e+00 0.0 0.000000e+00 0.0 0.0 0.000000e+00 \n", + "4 0.000000e+00 0.0 0.000000e+00 0.0 0.0 0.000000e+00 \n", + "... ... ... ... ... ... ... \n", + "13970 2.791257e-18 0.0 2.791257e-18 0.0 0.0 9.991931e-10 \n", + "13971 4.734377e-28 0.0 4.734377e-28 0.0 0.0 2.480559e-20 \n", + "13972 0.000000e+00 0.0 0.000000e+00 0.0 0.0 0.000000e+00 \n", + "13973 3.301027e-33 0.0 3.301027e-33 0.0 0.0 1.721921e-25 \n", + "13974 0.000000e+00 0.0 0.000000e+00 0.0 0.0 0.000000e+00 \n", + "\n", + " inhalation \n", + "0 0.000000e+00 \n", + "1 0.000000e+00 \n", + "2 0.000000e+00 \n", + "3 0.000000e+00 \n", + "4 0.000000e+00 \n", + "... ... \n", + "13970 2.270894e-08 \n", + "13971 2.842307e-20 \n", + "13972 0.000000e+00 \n", + "13973 1.906412e-25 \n", + "13974 0.000000e+00 \n", + "\n", + "[13975 rows x 17 columns]" + ] + }, + "execution_count": 265, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "con.execute(\"select * from timestep_nuclide\").df()" + ] + }, + { + "cell_type": "code", + "execution_count": 276, + "id": "a5ea7054-9a19-43e0-ab96-c4472f2422ad", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "text/html": [ + "
    \n", + "
    <xarray.Dataset>\n",
    -       "Dimensions:                 (time_step_number: 2, nuclide: 48, timestamp: 1)\n",
    -       "Coordinates:\n",
    -       "  * time_step_number        (time_step_number) int64 1 2\n",
    -       "  * nuclide                 (nuclide) object MultiIndex\n",
    -       "  * element                 (nuclide) object 'Ag' 'Ag' 'Ag' ... 'Ru' 'Ru' 'Ru'\n",
    -       "  * mass_number             (nuclide) int64 105 105 106 106 ... 106 102 103 104\n",
    -       "  * state                   (nuclide) object '' 'm' '' 'm' '' ... 'm' '' '' ''\n",
    -       "    elapsed_time            (time_step_number) float64 0.0 6.312e+07\n",
    -       "    zai                     (nuclide) int64 471050 471051 ... 441030 441040\n",
    -       "  * timestamp               (timestamp) datetime64[ns] 2020-07-12T23:01:19\n",
    -       "Data variables: (12/31)\n",
    -       "    irradiation_time        (time_step_number) float64 0.0 6.312e+07\n",
    -       "    cooling_time            (time_step_number) float64 0.0 0.0\n",
    -       "    duration                (time_step_number) float64 0.0 6.312e+07\n",
    -       "    flux                    (time_step_number) float64 0.0 2.445e+10\n",
    -       "    total_atoms             (time_step_number) float64 5.578e+21 5.578e+21\n",
    -       "    total_activity          (time_step_number) float64 0.0 6.123e+09\n",
    -       "    ...                      ...\n",
    -       "    nuclide_alpha_heat      (time_step_number, nuclide) float64 nan nan ... 0.0\n",
    -       "    nuclide_beta_heat       (time_step_number, nuclide) float64 nan nan ... 0.0\n",
    -       "    nuclide_gamma_heat      (time_step_number, nuclide) float64 nan nan ... 0.0\n",
    -       "    nuclide_dose            (time_step_number, nuclide) float64 nan nan ... 0.0\n",
    -       "    nuclide_ingestion       (time_step_number, nuclide) float64 nan nan ... 0.0\n",
    -       "    nuclide_inhalation      (time_step_number, nuclide) float64 nan nan ... 0.0\n",
    -       "Attributes:\n",
    -       "    run_name:            * Material Ag, fluxes 1\n",
    -       "    flux_name:           55.F9.10 11-L2-02W HFS_GLRY_08_U\n",
    -       "    dose_rate_type:      Point source\n",
    -       "    dose_rate_distance:  1.0
    " + " .dataframe thead th {\n", + " text-align: right;\n", + " }\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
    time_step_numbergamma_boundariesgamma
    011.000000e-110.000000e+00
    111.000000e-023.156906e-11
    212.000000e-020.000000e+00
    315.000000e-020.000000e+00
    411.000000e-015.480877e-10
    ............
    1620658.000000e+000.000000e+00
    1621651.000000e+010.000000e+00
    1622651.200000e+010.000000e+00
    1623651.400000e+010.000000e+00
    1624652.000000e+010.000000e+00
    \n", + "

    1625 rows × 3 columns

    \n", + "" ], "text/plain": [ - "\n", - "Dimensions: (time_step_number: 2, nuclide: 48, timestamp: 1)\n", - "Coordinates:\n", - " * time_step_number (time_step_number) int64 1 2\n", - " * nuclide (nuclide) object MultiIndex\n", - " * element (nuclide) object 'Ag' 'Ag' 'Ag' ... 'Ru' 'Ru' 'Ru'\n", - " * mass_number (nuclide) int64 105 105 106 106 ... 106 102 103 104\n", - " * state (nuclide) object '' 'm' '' 'm' '' ... 'm' '' '' ''\n", - " elapsed_time (time_step_number) float64 0.0 6.312e+07\n", - " zai (nuclide) int64 471050 471051 ... 441030 441040\n", - " * timestamp (timestamp) datetime64[ns] 2020-07-12T23:01:19\n", - "Data variables: (12/31)\n", - " irradiation_time (time_step_number) float64 0.0 6.312e+07\n", - " cooling_time (time_step_number) float64 0.0 0.0\n", - " duration (time_step_number) float64 0.0 6.312e+07\n", - " flux (time_step_number) float64 0.0 2.445e+10\n", - " total_atoms (time_step_number) float64 5.578e+21 5.578e+21\n", - " total_activity (time_step_number) float64 0.0 6.123e+09\n", - " ... ...\n", - " nuclide_alpha_heat (time_step_number, nuclide) float64 nan nan ... 0.0\n", - " nuclide_beta_heat (time_step_number, nuclide) float64 nan nan ... 0.0\n", - " nuclide_gamma_heat (time_step_number, nuclide) float64 nan nan ... 0.0\n", - " nuclide_dose (time_step_number, nuclide) float64 nan nan ... 0.0\n", - " nuclide_ingestion (time_step_number, nuclide) float64 nan nan ... 0.0\n", - " nuclide_inhalation (time_step_number, nuclide) float64 nan nan ... 0.0\n", - "Attributes:\n", - " run_name: * Material Ag, fluxes 1\n", - " flux_name: 55.F9.10 11-L2-02W HFS_GLRY_08_U\n", - " dose_rate_type: Point source\n", - " dose_rate_distance: 1.0" + " time_step_number gamma_boundaries gamma\n", + "0 1 1.000000e-11 0.000000e+00\n", + "1 1 1.000000e-02 3.156906e-11\n", + "2 1 2.000000e-02 0.000000e+00\n", + "3 1 5.000000e-02 0.000000e+00\n", + "4 1 1.000000e-01 5.480877e-10\n", + "... ... ... ...\n", + "1620 65 8.000000e+00 0.000000e+00\n", + "1621 65 1.000000e+01 0.000000e+00\n", + "1622 65 1.200000e+01 0.000000e+00\n", + "1623 65 1.400000e+01 0.000000e+00\n", + "1624 65 2.000000e+01 0.000000e+00\n", + "\n", + "[1625 rows x 3 columns]" ] }, - "execution_count": 166, + "execution_count": 276, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "ds" + "ds.gamma.to_dataframe().reset_index()[[\"time_step_number\", \"gamma_boundaries\", \"gamma\"]]" ] }, { "cell_type": "code", - "execution_count": 203, - "id": "b9679cc0-5621-4367-a4a9-0176745b9a65", + "execution_count": 277, + "id": "6d10e66a-6550-4cbc-828b-4438cbdab443", "metadata": { "tags": [] }, - "outputs": [ - { - "ename": "ValueError", - "evalue": "cannot remove index(es) 'nuclide', which would corrupt the following index built from coordinates 'nuclide', 'element', 'mass_number', 'state':\nPandasIndex(MultiIndex([('Ag', 105, ''),\n ('Ag', 105, 'm'),\n ('Ag', 106, ''),\n ('Ag', 106, 'm'),\n ('Ag', 107, ''),\n ('Ag', 107, 'm'),\n ('Ag', 108, ''),\n ('Ag', 108, 'm'),\n ('Ag', 109, ''),\n ('Ag', 109, 'm'),\n ('Ag', 110, ''),\n ('Ag', 110, 'm'),\n ('Ag', 111, ''),\n ('Ag', 111, 'm'),\n ('Cd', 106, ''),\n ('Cd', 107, ''),\n ('Cd', 108, ''),\n ('Cd', 109, ''),\n ('Cd', 110, ''),\n ('Cd', 111, ''),\n ('Cd', 111, 'm'),\n ('Cd', 112, ''),\n ( 'H', 1, ''),\n ( 'H', 2, ''),\n ( 'H', 3, ''),\n ('He', 3, ''),\n ('He', 4, ''),\n ('Pd', 104, ''),\n ('Pd', 105, ''),\n ('Pd', 106, ''),\n ('Pd', 107, ''),\n ('Pd', 107, 'm'),\n ('Pd', 108, ''),\n ('Pd', 109, ''),\n ('Pd', 109, 'm'),\n ('Pd', 110, ''),\n ('Rh', 102, ''),\n ('Rh', 102, 'm'),\n ('Rh', 103, ''),\n ('Rh', 103, 'm'),\n ('Rh', 104, ''),\n ('Rh', 104, 'm'),\n ('Rh', 105, ''),\n ('Rh', 106, ''),\n ('Rh', 106, 'm'),\n ('Ru', 102, ''),\n ('Ru', 103, ''),\n ('Ru', 104, '')],\n name='nuclide'))", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[203], line 19\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[43mds\u001b[49m\u001b[43m[\u001b[49m\u001b[43m[\u001b[49m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mtime_step_number\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43melement\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 4\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mmass_number\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 5\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mstate\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 6\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide_atoms\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 7\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide_grams\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 8\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide_activity\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 9\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide_alpha_activity\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 10\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide_beta_activity\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 11\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide_gamma_activity\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 12\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide_heat\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 13\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide_alpha_heat\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 14\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide_beta_heat\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 15\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide_gamma_heat\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 16\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide_dose\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 17\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide_ingestion\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 18\u001b[0m \u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide_inhalation\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[0;32m---> 19\u001b[0m \u001b[43m]\u001b[49m\u001b[43m]\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mto_array\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdrop_indexes\u001b[49m\u001b[43m(\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mtime_step_number\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mnuclide\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 20\u001b[0m \u001b[38;5;66;03m# .reset_coords(names=[\"time_step_number\", \"nuclide\"])\u001b[39;00m\n\u001b[1;32m 21\u001b[0m \u001b[38;5;66;03m# .stack(dimensions={\"tsn\": [\"time_step_number\", \"element\", \"mass_number\", \"state\"]})\u001b[39;00m\n", - "File \u001b[0;32m~/.pyenv/versions/3.11.2/envs/xpypact/lib/python3.11/site-packages/xarray/core/dataarray.py:3017\u001b[0m, in \u001b[0;36mDataArray.drop_indexes\u001b[0;34m(self, coord_names, errors)\u001b[0m\n\u001b[1;32m 2995\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mdrop_indexes\u001b[39m(\n\u001b[1;32m 2996\u001b[0m \u001b[38;5;28mself\u001b[39m: T_DataArray,\n\u001b[1;32m 2997\u001b[0m coord_names: Hashable \u001b[38;5;241m|\u001b[39m Iterable[Hashable],\n\u001b[1;32m 2998\u001b[0m \u001b[38;5;241m*\u001b[39m,\n\u001b[1;32m 2999\u001b[0m errors: ErrorOptions \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mraise\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m 3000\u001b[0m ) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m T_DataArray:\n\u001b[1;32m 3001\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"Drop the indexes assigned to the given coordinates.\u001b[39;00m\n\u001b[1;32m 3002\u001b[0m \n\u001b[1;32m 3003\u001b[0m \u001b[38;5;124;03m Parameters\u001b[39;00m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 3015\u001b[0m \u001b[38;5;124;03m A new dataarray with dropped indexes.\u001b[39;00m\n\u001b[1;32m 3016\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[0;32m-> 3017\u001b[0m ds \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_to_temp_dataset\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdrop_indexes\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcoord_names\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43merrors\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43merrors\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 3018\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_from_temp_dataset(ds)\n", - "File \u001b[0;32m~/.pyenv/versions/3.11.2/envs/xpypact/lib/python3.11/site-packages/xarray/core/dataset.py:5155\u001b[0m, in \u001b[0;36mDataset.drop_indexes\u001b[0;34m(self, coord_names, errors)\u001b[0m\n\u001b[1;32m 5150\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m unindexed_coords:\n\u001b[1;32m 5151\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\n\u001b[1;32m 5152\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mthose coordinates do not have an index: \u001b[39m\u001b[38;5;132;01m{\u001b[39;00munindexed_coords\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 5153\u001b[0m )\n\u001b[0;32m-> 5155\u001b[0m \u001b[43massert_no_index_corrupted\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mxindexes\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mcoord_names\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43maction\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mremove index(es)\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 5157\u001b[0m variables \u001b[38;5;241m=\u001b[39m {}\n\u001b[1;32m 5158\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m name, var \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_variables\u001b[38;5;241m.\u001b[39mitems():\n", - "File \u001b[0;32m~/.pyenv/versions/3.11.2/envs/xpypact/lib/python3.11/site-packages/xarray/core/indexes.py:1506\u001b[0m, in \u001b[0;36massert_no_index_corrupted\u001b[0;34m(indexes, coord_names, action)\u001b[0m\n\u001b[1;32m 1504\u001b[0m common_names_str \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m, \u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mjoin(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mk\u001b[38;5;132;01m!r}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;28;01mfor\u001b[39;00m k \u001b[38;5;129;01min\u001b[39;00m common_names)\n\u001b[1;32m 1505\u001b[0m index_names_str \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m, \u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mjoin(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mk\u001b[38;5;132;01m!r}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;28;01mfor\u001b[39;00m k \u001b[38;5;129;01min\u001b[39;00m index_coords)\n\u001b[0;32m-> 1506\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\n\u001b[1;32m 1507\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcannot \u001b[39m\u001b[38;5;132;01m{\u001b[39;00maction\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mcommon_names_str\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m, which would corrupt \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 1508\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mthe following index built from coordinates \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mindex_names_str\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m:\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 1509\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mindex\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 1510\u001b[0m )\n", - "\u001b[0;31mValueError\u001b[0m: cannot remove index(es) 'nuclide', which would corrupt the following index built from coordinates 'nuclide', 'element', 'mass_number', 'state':\nPandasIndex(MultiIndex([('Ag', 105, ''),\n ('Ag', 105, 'm'),\n ('Ag', 106, ''),\n ('Ag', 106, 'm'),\n ('Ag', 107, ''),\n ('Ag', 107, 'm'),\n ('Ag', 108, ''),\n ('Ag', 108, 'm'),\n ('Ag', 109, ''),\n ('Ag', 109, 'm'),\n ('Ag', 110, ''),\n ('Ag', 110, 'm'),\n ('Ag', 111, ''),\n ('Ag', 111, 'm'),\n ('Cd', 106, ''),\n ('Cd', 107, ''),\n ('Cd', 108, ''),\n ('Cd', 109, ''),\n ('Cd', 110, ''),\n ('Cd', 111, ''),\n ('Cd', 111, 'm'),\n ('Cd', 112, ''),\n ( 'H', 1, ''),\n ( 'H', 2, ''),\n ( 'H', 3, ''),\n ('He', 3, ''),\n ('He', 4, ''),\n ('Pd', 104, ''),\n ('Pd', 105, ''),\n ('Pd', 106, ''),\n ('Pd', 107, ''),\n ('Pd', 107, 'm'),\n ('Pd', 108, ''),\n ('Pd', 109, ''),\n ('Pd', 109, 'm'),\n ('Pd', 110, ''),\n ('Rh', 102, ''),\n ('Rh', 102, 'm'),\n ('Rh', 103, ''),\n ('Rh', 103, 'm'),\n ('Rh', 104, ''),\n ('Rh', 104, 'm'),\n ('Rh', 105, ''),\n ('Rh', 106, ''),\n ('Rh', 106, 'm'),\n ('Ru', 102, ''),\n ('Ru', 103, ''),\n ('Ru', 104, '')],\n name='nuclide'))" - ] - } - ], + "outputs": [], "source": [ - "ds[[\n", - "\"time_step_number\",\n", - "\"element\",\n", - "\"mass_number\",\n", - "\"state\",\n", - "\"nuclide_atoms\",\n", - "\"nuclide_grams\",\n", - "\"nuclide_activity\",\n", - "\"nuclide_alpha_activity\",\n", - "\"nuclide_beta_activity\",\n", - "\"nuclide_gamma_activity\",\n", - "\"nuclide_heat\",\n", - "\"nuclide_alpha_heat\",\n", - "\"nuclide_beta_heat\",\n", - "\"nuclide_gamma_heat\",\n", - "\"nuclide_dose\",\n", - "\"nuclide_ingestion\",\n", - "\"nuclide_inhalation\",\n", - "]].to_array().drop_indexes([\"time_step_number\", \"nuclide\"])\n", - "# .reset_coords(names=[\"time_step_number\", \"nuclide\"])\n", - "# .stack(dimensions={\"tsn\": [\"time_step_number\", \"element\", \"mass_number\", \"state\"]})" + "def save_gamma_spectra(con, ds):\n", + " columns = [\"time_step_number\", \"gamma_boundaries\", \"gamma\"]\n", + " tg = ds.gamma.to_dataframe().reset_index()[columns]\n", + " sql = \"insert into timestep_gamma select * from tg\"\n", + " con.execute(sql)\n", + " con.commit()" ] }, { "cell_type": "code", - "execution_count": 186, - "id": "526610bb-be7b-4ce7-8cc9-0bcdb00588f2", + "execution_count": 278, + "id": "fc882c1d-9402-4cc5-a316-f8f0ca25a5e1", "metadata": { "tags": [] }, "outputs": [], "source": [ - "def save_timestep_nucludes(con, ds):\n", - " timesteps_nuclides_df = ds[[\n", - " \"time_step_number\",\n", - " \"element\",\n", - " \"mass_number\",\n", - " \"state\",\n", - " \"nuclide_atoms\",\n", - " \"nuclide_grams\",\n", - " \"nuclide_activity\",\n", - " \"nuclide_alpha_activity\",\n", - " \"nuclide_beta_activity\",\n", - " \"nuclide_gamma_activity\",\n", - " \"nuclide_heat\",\n", - " \"nuclide_alpha_heat\",\n", - " \"nuclide_beta_heat\",\n", - " \"nuclide_gamma_heat\",\n", - " \"nuclide_dose\",\n", - " \"nuclide_ingestion\",\n", - " \"nuclide_inhalation\",\n", - " ]].to_dataframe().reset_index(drop=True)\n", - " sql = \"insert into timestep_nuclide select * from timesteps_nuclides_df\"\n", - " con.execute(sql)\n", - " con.commit()" + "save_gamma_spectra(con, ds)" ] }, { "cell_type": "code", - "execution_count": 187, - "id": "de4b9bd0-02e4-48f5-bec3-bb92c67682d0", + "execution_count": 283, + "id": "398ae012-c5df-4793-9b19-60395bbff7a7", "metadata": { "tags": [] }, "outputs": [ { - "ename": "BinderException", - "evalue": "Binder Error: table timestep_nuclide has 17 columns but 18 values were supplied", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mBinderException\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[187], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43msave_timestep_nucludes\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcon\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mds\u001b[49m\u001b[43m)\u001b[49m\n", - "Cell \u001b[0;32mIn[186], line 22\u001b[0m, in \u001b[0;36msave_timestep_nucludes\u001b[0;34m(con, ds)\u001b[0m\n\u001b[1;32m 2\u001b[0m timesteps_nuclides_df \u001b[38;5;241m=\u001b[39m ds[[\n\u001b[1;32m 3\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtime_step_number\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m 4\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124melement\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 19\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mnuclide_inhalation\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m 20\u001b[0m ]]\u001b[38;5;241m.\u001b[39mto_dataframe()\u001b[38;5;241m.\u001b[39mreset_index(drop\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mTrue\u001b[39;00m)\n\u001b[1;32m 21\u001b[0m sql \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124minsert into timestep_nuclide select * from timesteps_nuclides_df\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m---> 22\u001b[0m \u001b[43mcon\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mexecute\u001b[49m\u001b[43m(\u001b[49m\u001b[43msql\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 23\u001b[0m con\u001b[38;5;241m.\u001b[39mcommit()\n", - "\u001b[0;31mBinderException\u001b[0m: Binder Error: table timestep_nuclide has 17 columns but 18 values were supplied" - ] + "data": { + "text/html": [ + "
    \n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
    timestep_idboundaryintensity
    011.000000e-110.000000e+00
    111.000000e-023.156906e-11
    212.000000e-020.000000e+00
    315.000000e-020.000000e+00
    411.000000e-015.480877e-10
    ............
    1620658.000000e+000.000000e+00
    1621651.000000e+010.000000e+00
    1622651.200000e+010.000000e+00
    1623651.400000e+010.000000e+00
    1624652.000000e+010.000000e+00
    \n", + "

    1625 rows × 3 columns

    \n", + "
    " + ], + "text/plain": [ + " timestep_id boundary intensity\n", + "0 1 1.000000e-11 0.000000e+00\n", + "1 1 1.000000e-02 3.156906e-11\n", + "2 1 2.000000e-02 0.000000e+00\n", + "3 1 5.000000e-02 0.000000e+00\n", + "4 1 1.000000e-01 5.480877e-10\n", + "... ... ... ...\n", + "1620 65 8.000000e+00 0.000000e+00\n", + "1621 65 1.000000e+01 0.000000e+00\n", + "1622 65 1.200000e+01 0.000000e+00\n", + "1623 65 1.400000e+01 0.000000e+00\n", + "1624 65 2.000000e+01 0.000000e+00\n", + "\n", + "[1625 rows x 3 columns]" + ] + }, + "execution_count": 283, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ - "save_timestep_nucludes(con, ds)" + "con.execute(\"select * from timestep_gamma\").df()" + ] + }, + { + "cell_type": "code", + "execution_count": 284, + "id": "680defd9-9305-4459-b1a2-357ed1e476e3", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "text/html": [ + "
    \n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
    boundaryintensity
    01.000000e-110.000000e+00
    11.000000e-024.204333e+05
    22.000000e-028.981064e+04
    35.000000e-021.969102e+04
    41.000000e-012.891012e+06
    52.000000e-017.068460e+06
    63.000000e-011.825296e+06
    74.000000e-011.259209e+06
    86.000000e-018.268742e+06
    98.000000e-019.028931e+05
    101.000000e+005.304670e+07
    111.220000e+006.488259e+07
    121.440000e+006.590924e+07
    131.660000e+005.267068e+05
    142.000000e+007.746914e+06
    152.500000e+004.308211e+06
    163.000000e+001.930387e+06
    174.000000e+007.964872e+04
    185.000000e+001.688151e+01
    196.500000e+000.000000e+00
    208.000000e+000.000000e+00
    211.000000e+010.000000e+00
    221.200000e+010.000000e+00
    231.400000e+010.000000e+00
    242.000000e+010.000000e+00
    \n", + "
    " + ], + "text/plain": [ + " boundary intensity\n", + "0 1.000000e-11 0.000000e+00\n", + "1 1.000000e-02 4.204333e+05\n", + "2 2.000000e-02 8.981064e+04\n", + "3 5.000000e-02 1.969102e+04\n", + "4 1.000000e-01 2.891012e+06\n", + "5 2.000000e-01 7.068460e+06\n", + "6 3.000000e-01 1.825296e+06\n", + "7 4.000000e-01 1.259209e+06\n", + "8 6.000000e-01 8.268742e+06\n", + "9 8.000000e-01 9.028931e+05\n", + "10 1.000000e+00 5.304670e+07\n", + "11 1.220000e+00 6.488259e+07\n", + "12 1.440000e+00 6.590924e+07\n", + "13 1.660000e+00 5.267068e+05\n", + "14 2.000000e+00 7.746914e+06\n", + "15 2.500000e+00 4.308211e+06\n", + "16 3.000000e+00 1.930387e+06\n", + "17 4.000000e+00 7.964872e+04\n", + "18 5.000000e+00 1.688151e+01\n", + "19 6.500000e+00 0.000000e+00\n", + "20 8.000000e+00 0.000000e+00\n", + "21 1.000000e+01 0.000000e+00\n", + "22 1.200000e+01 0.000000e+00\n", + "23 1.400000e+01 0.000000e+00\n", + "24 2.000000e+01 0.000000e+00" + ] + }, + "execution_count": 284, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "con.execute(\"select boundary, intensity from timestep_gamma where timestep_id = 42\").df()" ] }, { "cell_type": "code", - "execution_count": 41, + "execution_count": 286, "id": "def18203-fed9-472d-a69c-b653dbf9a7b2", "metadata": { "tags": [] diff --git a/notebooks/dvp/try_ducdb.py b/notebooks/dvp/try_ducdb.py index 767a59e..f480e6d 100644 --- a/notebooks/dvp/try_ducdb.py +++ b/notebooks/dvp/try_ducdb.py @@ -1,189 +1,203 @@ #!/usr/bin/env python # coding: utf-8 -# In[1]: +# In[233]: get_ipython().run_line_magic("config", "Completer.use_jedi = False") -# In[3]: +# In[234]: import xpypact as xp -# In[5]: +# In[235]: xp.__version__ -# In[11]: +# In[236]: from pathlib import Path -# In[19]: +# In[237]: root_dir = Path("~", "dev", "xpypact").expanduser() -# In[20]: +# In[238]: -json_path = root_dir / "tests/data/Ag-1.json" +json_path = root_dir / "wrk/Alloy718-Co04-104_2_1_1.json" assert json_path.exists() -# In[23]: +# In[239]: import xpypact.data_arrays as da from xpypact.Inventory import Inventory, from_json -# In[24]: +# In[240]: inventory = from_json(json_path) -# In[25]: +# In[241]: ds = da.create_dataset(inventory) -# In[26]: +# In[242]: ds -# In[ ]: +# In[287]: + +ds.timestamp -# In[28]: + +# In[243]: import duckdb as db -# In[46]: +# In[384]: db_path = root_dir / "wrk/try-duckdb.duckdb" db_path.parent.mkdir(parents=True, exist_ok=True) +if db_path.exists(): + db_path.unlink() -# In[48]: +# In[385]: con = db.connect(str(db_path)) -# In[153]: +# In[386]: + + +material_id = 100 +case_id = 3 + + +# In[387]: -# con.execute("drop table rundata") -# con.execute("drop table if exists timestep_gamma") -con.execute("drop table if exists timestep_nuclide") -# con.execute("drop table if exists timestep") -con.execute("drop table nuclide") +def drop_tables(con): + con.execute("drop table if exists timestep_gamma") + con.execute("drop table if exists timestep_nuclide") + con.execute("drop table if exists timestep") + con.execute("drop table if exists nuclide") + con.execute("drop table if exists rundata") -# In[154]: +# In[395]: def create_tables(con): sql = """ - CREATE TABLE IF NOT EXISTS rundata ( - timestamp varchar NOT NULL, - run_name varchar NOT NULL, + material_id uinteger not null, + case_id uinteger not null, + timestamp timestamp not null, + run_name varchar not null, flux_name varchar NOT NULL, dose_rate_type varchar NOT NULL, - dose_rate_distance real NOT NULL + dose_rate_distance real NOT NULL, + primary key(material_id, case_id) ); CREATE TABLE IF NOT EXISTS timestep( - id integer PRIMARY KEY, - elapsed_time real not null, - irradiation_time real not null, - cooling_time real not null, - duration real not null, - flux real not null, - total_atoms real not null, - total_activity real not null, - total_alpha_activity real not null, - total_beta_activity real not null, - total_gamma_activity real not null, - total_mass real not null, - total_heat real not null, - total_alpha_heat real not null, - total_beta_heat real not null, - total_gamma_heat real not null, - total_ingest1ion_dose real not null, - total_inhalation_dose real not null, - total_dose_rate real not null + id uinteger PRIMARY KEY, + elapsed_time float4 not null, + irradiation_time float4 not null, + cooling_time float4 not null, + duration float4 not null, + flux float4 not null, + total_atoms float4 not null, + total_activity float4 not null, + total_alpha_activity float4 not null, + total_beta_activity float4 not null, + total_gamma_activity float4 not null, + total_mass float4 not null, + total_heat float4 not null, + total_alpha_heat float4 null, + total_beta_heat float4 not null, + total_gamma_heat float4 not null, + total_ingest1ion_dose float4 not null, + total_inhalation_dose float4 not null, + total_dose_rate float4 not null, + material_id uinteger not null, + case_id uinteger not null, + foreign key(material_id, case_id) references rundata(material_id, case_id) ); + CREATE TABLE IF NOT EXISTS nuclide( element varchar(2) not null, - mass_number integer not null check(0 < mass_number), -- A + mass_number usmallint not null check(0 < mass_number), state varchar(1) not null, zai integer not null check(10010 <= zai) unique, - half_life real not null check(0 <= half_life), + half_life float4 not null check(0 <= half_life), primary key(element, mass_number, state) ); CREATE TABLE IF NOT EXISTS timestep_nuclide( - timestep_id integer not null, + timestep_id uinteger not null, element varchar(2) not null, - mass_number integer not null, + mass_number usmallint not null, state varchar(1) not null, - atoms real not null, - grams real not null, - activity real not null, - alpha_activity real not null, - beta_activity real not null, - gamma_activity real not null, - heat real not null, - alpha_heat real not null, - beta_heat real not null, - gamma_heat real not null, - dose real not null, - ingestion real not null, - inhalation real not null, + atoms float4 not null, + grams float4 not null, + activity float4 not null, + alpha_activity float4 not null, + beta_activity float4 not null, + gamma_activity float4 not null, + heat float4 not null, + alpha_heat float4 not null, + beta_heat float4 not null, + gamma_heat float4 not null, + dose float4 not null, + ingestion float4 not null, + inhalation float4 not null, primary key(timestep_id, element, mass_number, state), foreign key(timestep_id) references timestep(id), foreign key(element, mass_number, state) references nuclide(element, mass_number, state) ); CREATE TABLE IF NOT EXISTS timestep_gamma( - timestep_id integer not null, + timestep_id uinteger not null, boundary real not null check(0 <= boundary), intensity real not null, primary key(timestep_id, boundary), foreign key(timestep_id) references timestep(id), ); -""" + """ con.execute(sql) -# In[155]: +# In[396]: +# drop_tables(con) create_tables(con) -# In[85]: - - -# con.execute("delete from rundata") - - -# In[81]: +# In[402]: def save_rundata(con, ds): @@ -193,6 +207,8 @@ def save_rundata(con, ds): con.execute( sql, ( + material_id, + case_id, ds.coords["timestamp"].item(), ds.attrs["run_name"], ds.attrs["flux_name"], @@ -203,19 +219,25 @@ def save_rundata(con, ds): con.commit() -# In[83]: +# In[403]: + + +con.execute("select * from information_schema.tables").df() + + +# In[400]: save_rundata(con, ds) -# In[84]: +# In[254]: con.execute("select * from rundata").df() -# In[114]: +# In[255]: def save_timesteps(con, ds): @@ -251,27 +273,19 @@ def save_timesteps(con, ds): con.commit() -# In[115]: +# In[256]: save_timesteps(con, ds) -# In[116]: +# In[257]: con.execute("select * from timestep").df() -# In[131]: - - -ds[ - ["element", "mass_number", "state", "zai", "nuclide_half_life"] -].to_pandas().reset_index(drop=True) - - -# In[156]: +# In[258]: def save_nuclides(con, ds): @@ -285,93 +299,97 @@ def save_nuclides(con, ds): con.commit() -# In[157]: +# In[259]: save_nuclides(con, ds) -# In[160]: +# In[285]: -con.execute("select * from nuclide").df().head() +con.execute("select * from nuclide").df() -# In[166]: +# In[263]: -ds +def save_timestep_nucludes(con, ds): + columns = [ + "time_step_number", + "element", + "mass_number", + "state", + "nuclide_atoms", + "nuclide_grams", + "nuclide_activity", + "nuclide_alpha_activity", + "nuclide_beta_activity", + "nuclide_gamma_activity", + "nuclide_heat", + "nuclide_alpha_heat", + "nuclide_beta_heat", + "nuclide_gamma_heat", + "nuclide_dose", + "nuclide_ingestion", + "nuclide_inhalation", + ] + tn = ds[columns].to_dataframe().reset_index("time_step_number")[columns].fillna(0.0) + sql = "insert into timestep_nuclide select * from tn" + con.execute(sql) + con.commit() -# In[203]: - - -ds[ - [ - """Time_step_number.""", - """Element.""", - """Mass_number.""", - """State.""", - """Nuclide_atoms.""", - """Nuclide_grams.""", - """Nuclide_activity.""", - """Nuclide_alpha_activity.""", - """Nuclide_beta_activity.""", - """Nuclide_gamma_activity.""", - """Nuclide_heat.""", - """Nuclide_alpha_heat.""", - """Nuclide_beta_heat.""", - """Nuclide_gamma_heat.""", - """Nuclide_dose.""", - """Nuclide_ingestion.""", - """Nuclide_inhalation.""", - ] -].to_array().drop_indexes(["time_step_number", "nuclide"]) -# .reset_coords(names=["time_step_number", "nuclide"]) -# .stack(dimensions={"tsn": ["time_step_number", "element", "mass_number", "state"]}) +# In[264]: -# In[186]: +save_timestep_nucludes(con, ds) -def save_timestep_nucludes(con, ds): - timesteps_nuclides_df = ( - ds[ - [ - "time_step_number", - "element", - "mass_number", - "state", - "nuclide_atoms", - "nuclide_grams", - "nuclide_activity", - "nuclide_alpha_activity", - "nuclide_beta_activity", - "nuclide_gamma_activity", - "nuclide_heat", - "nuclide_alpha_heat", - "nuclide_beta_heat", - "nuclide_gamma_heat", - "nuclide_dose", - "nuclide_ingestion", - "nuclide_inhalation", - ] - ] - .to_dataframe() - .reset_index(drop=True) - ) - sql = "insert into timestep_nuclide select * from timesteps_nuclides_df" +# In[265]: + + +con.execute("select * from timestep_nuclide").df() + + +# In[276]: + + +ds.gamma.to_dataframe().reset_index()[["time_step_number", "gamma_boundaries", "gamma"]] + + +# In[277]: + + +def save_gamma_spectra(con, ds): + columns = ["time_step_number", "gamma_boundaries", "gamma"] + tg = ds.gamma.to_dataframe().reset_index()[columns] + sql = "insert into timestep_gamma select * from tg" con.execute(sql) con.commit() -# In[187]: +# In[278]: -save_timestep_nucludes(con, ds) +save_gamma_spectra(con, ds) + + +# In[283]: + + +con.execute("select * from timestep_gamma").df() + + +# In[284]: + + +con.execute( + "select boundary, intensity from timestep_gamma where timestep_id = 42" +).df() -# In[41]: +# In[286]: con.close() From 49fb3f4b3b2e4d63a383919106bf91b7bf899f94 Mon Sep 17 00:00:00 2001 From: dvp Date: Thu, 23 Mar 2023 19:37:37 +0300 Subject: [PATCH 10/32] feat: continue notebook for prototyping with duckdb - add material and case --- notebooks/dvp/try_ducdb.ipynb | 2514 ++++++++++++++++++++++++++++----- notebooks/dvp/try_ducdb.py | 141 +- 2 files changed, 2247 insertions(+), 408 deletions(-) diff --git a/notebooks/dvp/try_ducdb.ipynb b/notebooks/dvp/try_ducdb.ipynb index 4ea1a3d..a2036ed 100644 --- a/notebooks/dvp/try_ducdb.ipynb +++ b/notebooks/dvp/try_ducdb.ipynb @@ -111,7 +111,7 @@ }, { "cell_type": "code", - "execution_count": 241, + "execution_count": 469, "id": "e471ce43-3860-430d-b669-7a1211bb5d06", "metadata": { "tags": [] @@ -123,7 +123,7 @@ }, { "cell_type": "code", - "execution_count": 242, + "execution_count": 470, "id": "eaa7c75f-119c-493c-b038-dbd615b72c6f", "metadata": { "tags": [] @@ -526,14 +526,14 @@ " run_name: * Material Alloy718-Co04, fluxes 104_2_1_1\n", " flux_name: 90-degrees bend\n", " dose_rate_type: Point source\n", - " dose_rate_distance: 1.0
  • run_name :
    * Material Alloy718-Co04, fluxes 104_2_1_1
    flux_name :
    90-degrees bend
    dose_rate_type :
    Point source
    dose_rate_distance :
    1.0
  • " ], "text/plain": [ "\n", @@ -1099,7 +1099,7 @@ " dose_rate_distance: 1.0" ] }, - "execution_count": 242, + "execution_count": 470, "metadata": {}, "output_type": "execute_result" } @@ -1110,8 +1110,8 @@ }, { "cell_type": "code", - "execution_count": 287, - "id": "6f923a0d-5ef8-4dea-8157-98f6049ddb26", + "execution_count": 417, + "id": "8dbfda08-8776-4733-9215-9d569fb24a34", "metadata": { "tags": [] }, @@ -1487,7 +1487,7 @@ "Coordinates:\n", " * timestamp (timestamp) datetime64[ns] 2022-02-21T01:52:47\n", "Attributes:\n", - " long description: FISPACT datasets can be merged and then selected by ti..." + " long description: FISPACT datasets can be merged and then selected by ti..." ], "text/plain": [ "\n", @@ -1498,7 +1498,7 @@ " long description: FISPACT datasets can be merged and then selected by ti..." ] }, - "execution_count": 287, + "execution_count": 417, "metadata": {}, "output_type": "execute_result" } @@ -1561,7 +1561,1477 @@ }, { "cell_type": "code", - "execution_count": 387, + "execution_count": 475, + "id": "dd2fb504-eb9a-48ee-bab2-2a512630797a", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "text/html": [ + "
    \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
    <xarray.Dataset>\n",
    +       "Dimensions:                 (material_id: 1, case_id: 1, time_step_number: 65,\n",
    +       "                             nuclide: 215, gamma_boundaries: 25, timestamp: 1)\n",
    +       "Coordinates:\n",
    +       "  * material_id             (material_id) int64 100\n",
    +       "  * case_id                 (case_id) int64 3\n",
    +       "  * time_step_number        (time_step_number) int64 1 2 3 4 5 ... 62 63 64 65\n",
    +       "  * nuclide                 (nuclide) object MultiIndex\n",
    +       "  * element                 (nuclide) object 'Al' 'Al' 'Al' ... 'Zr' 'Zr' 'Zr'\n",
    +       "  * mass_number             (nuclide) int64 26 27 28 29 30 40 ... 93 94 95 96 97\n",
    +       "  * state                   (nuclide) object '' '' '' '' '' ... '' '' '' '' ''\n",
    +       "  * gamma_boundaries        (gamma_boundaries) float64 1e-11 0.01 ... 14.0 20.0\n",
    +       "    elapsed_time            (time_step_number) float64 0.0 6.312e+07 ... 3.2e+10\n",
    +       "    zai                     (nuclide) int64 130260 130270 ... 400960 400970\n",
    +       "  * timestamp               (timestamp) datetime64[ns] 2022-02-21T01:52:47\n",
    +       "Data variables: (12/32)\n",
    +       "    irradiation_time        (material_id, case_id, time_step_number) float64 ...\n",
    +       "    cooling_time            (material_id, case_id, time_step_number) float64 ...\n",
    +       "    duration                (material_id, case_id, time_step_number) float64 ...\n",
    +       "    flux                    (material_id, case_id, time_step_number) float64 ...\n",
    +       "    total_atoms             (material_id, case_id, time_step_number) float64 ...\n",
    +       "    total_activity          (material_id, case_id, time_step_number) float64 ...\n",
    +       "    ...                      ...\n",
    +       "    nuclide_beta_heat       (material_id, case_id, time_step_number, nuclide) float64 ...\n",
    +       "    nuclide_gamma_heat      (material_id, case_id, time_step_number, nuclide) float64 ...\n",
    +       "    nuclide_dose            (material_id, case_id, time_step_number, nuclide) float64 ...\n",
    +       "    nuclide_ingestion       (material_id, case_id, time_step_number, nuclide) float64 ...\n",
    +       "    nuclide_inhalation      (material_id, case_id, time_step_number, nuclide) float64 ...\n",
    +       "    gamma                   (material_id, case_id, time_step_number, gamma_boundaries) float64 ...\n",
    +       "Attributes:\n",
    +       "    run_name:            * Material Alloy718-Co04, fluxes 104_2_1_1\n",
    +       "    flux_name:           90-degrees bend\n",
    +       "    dose_rate_type:      Point source\n",
    +       "    dose_rate_distance:  1.0
    " + ], + "text/plain": [ + "\n", + "Dimensions: (material_id: 1, case_id: 1, time_step_number: 65,\n", + " nuclide: 215, gamma_boundaries: 25, timestamp: 1)\n", + "Coordinates:\n", + " * material_id (material_id) int64 100\n", + " * case_id (case_id) int64 3\n", + " * time_step_number (time_step_number) int64 1 2 3 4 5 ... 62 63 64 65\n", + " * nuclide (nuclide) object MultiIndex\n", + " * element (nuclide) object 'Al' 'Al' 'Al' ... 'Zr' 'Zr' 'Zr'\n", + " * mass_number (nuclide) int64 26 27 28 29 30 40 ... 93 94 95 96 97\n", + " * state (nuclide) object '' '' '' '' '' ... '' '' '' '' ''\n", + " * gamma_boundaries (gamma_boundaries) float64 1e-11 0.01 ... 14.0 20.0\n", + " elapsed_time (time_step_number) float64 0.0 6.312e+07 ... 3.2e+10\n", + " zai (nuclide) int64 130260 130270 ... 400960 400970\n", + " * timestamp (timestamp) datetime64[ns] 2022-02-21T01:52:47\n", + "Data variables: (12/32)\n", + " irradiation_time (material_id, case_id, time_step_number) float64 ...\n", + " cooling_time (material_id, case_id, time_step_number) float64 ...\n", + " duration (material_id, case_id, time_step_number) float64 ...\n", + " flux (material_id, case_id, time_step_number) float64 ...\n", + " total_atoms (material_id, case_id, time_step_number) float64 ...\n", + " total_activity (material_id, case_id, time_step_number) float64 ...\n", + " ... ...\n", + " nuclide_beta_heat (material_id, case_id, time_step_number, nuclide) float64 ...\n", + " nuclide_gamma_heat (material_id, case_id, time_step_number, nuclide) float64 ...\n", + " nuclide_dose (material_id, case_id, time_step_number, nuclide) float64 ...\n", + " nuclide_ingestion (material_id, case_id, time_step_number, nuclide) float64 ...\n", + " nuclide_inhalation (material_id, case_id, time_step_number, nuclide) float64 ...\n", + " gamma (material_id, case_id, time_step_number, gamma_boundaries) float64 ...\n", + "Attributes:\n", + " run_name: * Material Alloy718-Co04, fluxes 104_2_1_1\n", + " flux_name: 90-degrees bend\n", + " dose_rate_type: Point source\n", + " dose_rate_distance: 1.0" + ] + }, + "execution_count": 475, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ds =ds.expand_dims(dim={\"material_id\": [material_id], \"case_id\": [case_id]})\n", + "ds" + ] + }, + { + "cell_type": "code", + "execution_count": 476, + "id": "7a9969f8-6583-444f-82ec-2c76ed8cf8cb", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "text/html": [ + "
    \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
    <xarray.DataArray 'irradiation_time' (material_id: 1, case_id: 1,\n",
    +       "                                      time_step_number: 65)>\n",
    +       "array([[[0.00000000e+00, 6.31152000e+07, 3.78691200e+08, 3.78691200e+08,\n",
    +       "         4.20662808e+08, 4.20662808e+08, 4.20663208e+08, 4.20663208e+08,\n",
    +       "         4.20663608e+08, 4.20663608e+08, 4.20664008e+08, 4.20664008e+08,\n",
    +       "         4.20664408e+08, 4.20664408e+08, 4.20664808e+08, 4.20664808e+08,\n",
    +       "         4.20665208e+08, 4.20665208e+08, 4.20665608e+08, 4.20665608e+08,\n",
    +       "         4.20666008e+08, 4.20666008e+08, 4.20666408e+08, 4.20666408e+08,\n",
    +       "         4.20666808e+08, 4.20666808e+08, 4.20667208e+08, 4.20667208e+08,\n",
    +       "         4.20667608e+08, 4.20667608e+08, 4.20668008e+08, 4.20668008e+08,\n",
    +       "         4.20668408e+08, 4.20668408e+08, 4.20668808e+08, 4.20668808e+08,\n",
    +       "         4.20669208e+08, 4.20669208e+08, 4.20669608e+08, 4.20669608e+08,\n",
    +       "         4.20670008e+08, 4.20670008e+08, 4.20670408e+08, 4.20670408e+08,\n",
    +       "         4.20670808e+08, 4.20670808e+08, 4.20670808e+08, 4.20670808e+08,\n",
    +       "         4.20670808e+08, 4.20670808e+08, 4.20670808e+08, 4.20670808e+08,\n",
    +       "         4.20670808e+08, 4.20670808e+08, 4.20670808e+08, 4.20670808e+08,\n",
    +       "         4.20670808e+08, 4.20670808e+08, 4.20670808e+08, 4.20670808e+08,\n",
    +       "         4.20670808e+08, 4.20670808e+08, 4.20670808e+08, 4.20670808e+08,\n",
    +       "         4.20670808e+08]]])\n",
    +       "Coordinates:\n",
    +       "  * material_id       (material_id) int64 100\n",
    +       "  * case_id           (case_id) int64 3\n",
    +       "  * time_step_number  (time_step_number) int64 1 2 3 4 5 6 ... 60 61 62 63 64 65\n",
    +       "    elapsed_time      (time_step_number) float64 0.0 6.312e+07 ... 3.2e+10\n",
    +       "Attributes:\n",
    +       "    units:    s
    " + ], + "text/plain": [ + "\n", + "array([[[0.00000000e+00, 6.31152000e+07, 3.78691200e+08, 3.78691200e+08,\n", + " 4.20662808e+08, 4.20662808e+08, 4.20663208e+08, 4.20663208e+08,\n", + " 4.20663608e+08, 4.20663608e+08, 4.20664008e+08, 4.20664008e+08,\n", + " 4.20664408e+08, 4.20664408e+08, 4.20664808e+08, 4.20664808e+08,\n", + " 4.20665208e+08, 4.20665208e+08, 4.20665608e+08, 4.20665608e+08,\n", + " 4.20666008e+08, 4.20666008e+08, 4.20666408e+08, 4.20666408e+08,\n", + " 4.20666808e+08, 4.20666808e+08, 4.20667208e+08, 4.20667208e+08,\n", + " 4.20667608e+08, 4.20667608e+08, 4.20668008e+08, 4.20668008e+08,\n", + " 4.20668408e+08, 4.20668408e+08, 4.20668808e+08, 4.20668808e+08,\n", + " 4.20669208e+08, 4.20669208e+08, 4.20669608e+08, 4.20669608e+08,\n", + " 4.20670008e+08, 4.20670008e+08, 4.20670408e+08, 4.20670408e+08,\n", + " 4.20670808e+08, 4.20670808e+08, 4.20670808e+08, 4.20670808e+08,\n", + " 4.20670808e+08, 4.20670808e+08, 4.20670808e+08, 4.20670808e+08,\n", + " 4.20670808e+08, 4.20670808e+08, 4.20670808e+08, 4.20670808e+08,\n", + " 4.20670808e+08, 4.20670808e+08, 4.20670808e+08, 4.20670808e+08,\n", + " 4.20670808e+08, 4.20670808e+08, 4.20670808e+08, 4.20670808e+08,\n", + " 4.20670808e+08]]])\n", + "Coordinates:\n", + " * material_id (material_id) int64 100\n", + " * case_id (case_id) int64 3\n", + " * time_step_number (time_step_number) int64 1 2 3 4 5 6 ... 60 61 62 63 64 65\n", + " elapsed_time (time_step_number) float64 0.0 6.312e+07 ... 3.2e+10\n", + "Attributes:\n", + " units: s" + ] + }, + "execution_count": 476, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ds.irradiation_time" + ] + }, + { + "cell_type": "code", + "execution_count": 446, "id": "d9e1ddfb-398e-4cea-b01d-fb0e53242776", "metadata": { "tags": [] @@ -1578,7 +3048,7 @@ }, { "cell_type": "code", - "execution_count": 395, + "execution_count": 447, "id": "c402d3a1-e77a-4b24-accc-a19588ccdf54", "metadata": { "tags": [] @@ -1599,7 +3069,9 @@ " );\n", "\n", " CREATE TABLE IF NOT EXISTS timestep(\n", - " id uinteger PRIMARY KEY,\n", + " material_id uinteger not null,\n", + " case_id uinteger not null,\n", + " time_step_number uinteger not null,\n", " elapsed_time float4 not null,\n", " irradiation_time float4 not null,\n", " cooling_time float4 not null,\n", @@ -1618,8 +3090,7 @@ " total_ingest1ion_dose float4 not null,\n", " total_inhalation_dose float4 not null,\n", " total_dose_rate float4 not null,\n", - " material_id uinteger not null,\n", - " case_id uinteger not null,\n", + " primary key(material_id, case_id, time_step_number),\n", " foreign key(material_id, case_id) references rundata(material_id, case_id) \n", " );\n", "\n", @@ -1634,7 +3105,9 @@ " );\n", " \n", " CREATE TABLE IF NOT EXISTS timestep_nuclide(\n", - " timestep_id uinteger not null,\n", + " material_id uinteger not null,\n", + " case_id uinteger not null,\n", + " time_step_number uinteger not null,\n", " element varchar(2) not null,\n", " mass_number usmallint not null,\n", " state varchar(1) not null,\n", @@ -1651,17 +3124,19 @@ " dose float4 not null,\n", " ingestion float4 not null,\n", " inhalation float4 not null,\n", - " primary key(timestep_id, element, mass_number, state),\n", - " foreign key(timestep_id) references timestep(id),\n", + " primary key(material_id, case_id, time_step_number, element, mass_number, state),\n", + " foreign key(material_id, case_id, time_step_number) references timestep(material_id, case_id, time_step_number),\n", " foreign key(element, mass_number, state) references nuclide(element, mass_number, state) \n", " );\n", "\n", " CREATE TABLE IF NOT EXISTS timestep_gamma(\n", - " timestep_id uinteger not null,\n", + " material_id uinteger not null,\n", + " case_id uinteger not null,\n", + " time_step_number uinteger not null,\n", " boundary real not null check(0 <= boundary),\n", " intensity real not null, \n", - " primary key(timestep_id, boundary),\n", - " foreign key(timestep_id) references timestep(id),\n", + " primary key(material_id, case_id, time_step_number, boundary),\n", + " foreign key(material_id, case_id, time_step_number) references timestep(material_id, case_id, time_step_number),\n", " );\n", " \"\"\"\n", " con.execute(sql)" @@ -1669,20 +3144,20 @@ }, { "cell_type": "code", - "execution_count": 396, + "execution_count": 448, "id": "25f6867e-397a-4e98-a363-74b6af739c88", "metadata": { "tags": [] }, "outputs": [], "source": [ - "# drop_tables(con)\n", + "drop_tables(con)\n", "create_tables(con)" ] }, { "cell_type": "code", - "execution_count": 402, + "execution_count": 449, "id": "29716201-70f8-40d2-8da7-85689714ec32", "metadata": { "tags": [] @@ -1691,12 +3166,12 @@ "source": [ "def save_rundata(con, ds):\n", " sql = \"\"\"\n", - " INSERT INTO rundata values(?, ?, ?, ?, ?)\n", + " INSERT INTO rundata values(?, ?, ?, ?, ?, ?, ?)\n", " \"\"\"\n", " con.execute(sql, ( \n", - " material_id,\n", - " case_id,\n", - " ds.coords[\"timestamp\"].item(),\n", + " ds.material_id.item(),\n", + " ds.case_id.item(),\n", + " ds.timestamp.dt.strftime(\"%Y-%m-%d %H:%M:%S\").item(),\n", " ds.attrs[\"run_name\"],\n", " ds.attrs[\"flux_name\"],\n", " ds.attrs[\"dose_rate_type\"],\n", @@ -1707,194 +3182,19 @@ }, { "cell_type": "code", - "execution_count": 403, - "id": "4d71d862-2960-455d-be85-c5d9394a160d", - "metadata": { - "tags": [] - }, - "outputs": [ - { - "data": { - "text/html": [ - "
    \n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
    table_catalogtable_schematable_nametable_typeself_referencing_column_namereference_generationuser_defined_type_cataloguser_defined_type_schemauser_defined_type_nameis_insertable_intois_typedcommit_action
    0try-duckdbmainrundataBASE TABLENaNNaNNaNNaNNaNYESNONaN
    1try-duckdbmaintimestepBASE TABLENaNNaNNaNNaNNaNYESNONaN
    2try-duckdbmainnuclideBASE TABLENaNNaNNaNNaNNaNYESNONaN
    3try-duckdbmaintimestep_nuclideBASE TABLENaNNaNNaNNaNNaNYESNONaN
    4try-duckdbmaintimestep_gammaBASE TABLENaNNaNNaNNaNNaNYESNONaN
    \n", - "
    " - ], - "text/plain": [ - " table_catalog table_schema table_name table_type \\\n", - "0 try-duckdb main rundata BASE TABLE \n", - "1 try-duckdb main timestep BASE TABLE \n", - "2 try-duckdb main nuclide BASE TABLE \n", - "3 try-duckdb main timestep_nuclide BASE TABLE \n", - "4 try-duckdb main timestep_gamma BASE TABLE \n", - "\n", - " self_referencing_column_name reference_generation \\\n", - "0 NaN NaN \n", - "1 NaN NaN \n", - "2 NaN NaN \n", - "3 NaN NaN \n", - "4 NaN NaN \n", - "\n", - " user_defined_type_catalog user_defined_type_schema \\\n", - "0 NaN NaN \n", - "1 NaN NaN \n", - "2 NaN NaN \n", - "3 NaN NaN \n", - "4 NaN NaN \n", - "\n", - " user_defined_type_name is_insertable_into is_typed commit_action \n", - "0 NaN YES NO NaN \n", - "1 NaN YES NO NaN \n", - "2 NaN YES NO NaN \n", - "3 NaN YES NO NaN \n", - "4 NaN YES NO NaN " - ] - }, - "execution_count": 403, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "con.execute(\"select * from information_schema.tables\").df()" - ] - }, - { - "cell_type": "code", - "execution_count": 400, + "execution_count": 451, "id": "c789eedd-580c-4383-8bf1-cc943562a3aa", "metadata": { "tags": [] }, - "outputs": [ - { - "ename": "BinderException", - "evalue": "Binder Error: table rundata has 7 columns but 5 values were supplied", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mBinderException\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[400], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43msave_rundata\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcon\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mds\u001b[49m\u001b[43m)\u001b[49m\n", - "Cell \u001b[0;32mIn[397], line 5\u001b[0m, in \u001b[0;36msave_rundata\u001b[0;34m(con, ds)\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21msave_rundata\u001b[39m(con, ds):\n\u001b[1;32m 2\u001b[0m sql \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\"\"\u001b[39m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;124m INSERT INTO rundata values(?, ?, ?, ?, ?)\u001b[39m\n\u001b[1;32m 4\u001b[0m \u001b[38;5;124m \u001b[39m\u001b[38;5;124m\"\"\"\u001b[39m\n\u001b[0;32m----> 5\u001b[0m \u001b[43mcon\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mexecute\u001b[49m\u001b[43m(\u001b[49m\u001b[43msql\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43m(\u001b[49m\u001b[43m \u001b[49m\n\u001b[1;32m 6\u001b[0m \u001b[43m \u001b[49m\u001b[43mds\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcoords\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mtimestamp\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mitem\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 7\u001b[0m \u001b[43m \u001b[49m\u001b[43mds\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mattrs\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mrun_name\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 8\u001b[0m \u001b[43m \u001b[49m\u001b[43mds\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mattrs\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mflux_name\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 9\u001b[0m \u001b[43m \u001b[49m\u001b[43mds\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mattrs\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mdose_rate_type\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 10\u001b[0m \u001b[43m \u001b[49m\u001b[43mds\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mattrs\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mdose_rate_distance\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\n\u001b[1;32m 11\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 12\u001b[0m con\u001b[38;5;241m.\u001b[39mcommit()\n", - "\u001b[0;31mBinderException\u001b[0m: Binder Error: table rundata has 7 columns but 5 values were supplied" - ] - } - ], + "outputs": [], "source": [ "save_rundata(con, ds)" ] }, { "cell_type": "code", - "execution_count": 254, + "execution_count": 452, "id": "1c650134-edf3-44dd-aa90-ddde6a3987a7", "metadata": { "tags": [] @@ -1921,6 +3221,8 @@ " \n", " \n", " \n", + " material_id\n", + " case_id\n", " timestamp\n", " run_name\n", " flux_name\n", @@ -1931,7 +3233,9 @@ " \n", " \n", " 0\n", - " 1645408367000000000\n", + " 100\n", + " 3\n", + " 2022-02-21 01:52:47\n", " * Material Alloy718-Co04, fluxes 104_2_1_1\n", " 90-degrees bend\n", " Point source\n", @@ -1942,14 +3246,17 @@ "" ], "text/plain": [ - " timestamp run_name \\\n", - "0 1645408367000000000 * Material Alloy718-Co04, fluxes 104_2_1_1 \n", + " material_id case_id timestamp \\\n", + "0 100 3 2022-02-21 01:52:47 \n", + "\n", + " run_name flux_name dose_rate_type \\\n", + "0 * Material Alloy718-Co04, fluxes 104_2_1_1 90-degrees bend Point source \n", "\n", - " flux_name dose_rate_type dose_rate_distance \n", - "0 90-degrees bend Point source 1.0 " + " dose_rate_distance \n", + "0 1.0 " ] }, - "execution_count": 254, + "execution_count": 452, "metadata": {}, "output_type": "execute_result" } @@ -1960,7 +3267,7 @@ }, { "cell_type": "code", - "execution_count": 255, + "execution_count": 455, "id": "cf8661b6-d9cb-4431-8b40-f14072409d5a", "metadata": { "tags": [] @@ -1970,6 +3277,8 @@ "def save_timesteps(con, ds):\n", " timesteps_df = ds[\n", " [\n", + " \"material_id\",\n", + " \"case_id\",\n", " \"time_step_number\",\n", " \"elapsed_time\",\n", " \"irradiation_time\",\n", @@ -1990,7 +3299,7 @@ " \"total_inhalation_dose\",\n", " \"total_dose_rate\",\n", " ]\n", - " ].to_pandas().reset_index()\n", + " ].to_dataframe().reset_index()\n", " sql = \"insert into timestep select * from timesteps_df\"\n", " con.execute(sql)\n", " con.commit()" @@ -1998,7 +3307,7 @@ }, { "cell_type": "code", - "execution_count": 256, + "execution_count": 456, "id": "78154d84-9df4-417d-a35f-60252575aae6", "metadata": { "tags": [] @@ -2010,7 +3319,7 @@ }, { "cell_type": "code", - "execution_count": 257, + "execution_count": 457, "id": "bf73ee32-d132-418f-8e77-969d779b780a", "metadata": { "tags": [] @@ -2037,7 +3346,9 @@ " \n", " \n", " \n", - " id\n", + " material_id\n", + " case_id\n", + " time_step_number\n", " elapsed_time\n", " irradiation_time\n", " cooling_time\n", @@ -2045,7 +3356,7 @@ " flux\n", " total_atoms\n", " total_activity\n", - " total_alpha_activity\n", + " ...\n", " total_beta_activity\n", " total_gamma_activity\n", " total_mass\n", @@ -2061,6 +3372,8 @@ " \n", " \n", " 0\n", + " 100\n", + " 3\n", " 1\n", " 0.000000e+00\n", " 0.0\n", @@ -2069,7 +3382,7 @@ " 0.000000e+00\n", " 1.045481e+22\n", " 1.099260e-02\n", - " 0.000000e+00\n", + " ...\n", " 1.099260e-02\n", " 0.000000e+00\n", " 0.001\n", @@ -2083,6 +3396,8 @@ " \n", " \n", " 1\n", + " 100\n", + " 3\n", " 2\n", " 6.311520e+07\n", " 63115200.0\n", @@ -2091,7 +3406,7 @@ " 2.445200e+10\n", " 1.045481e+22\n", " 2.268685e+07\n", - " 6.921229e-15\n", + " ...\n", " 1.476443e+07\n", " 7.922416e+06\n", " 0.001\n", @@ -2105,6 +3420,8 @@ " \n", " \n", " 2\n", + " 100\n", + " 3\n", " 3\n", " 3.786912e+08\n", " 378691200.0\n", @@ -2113,7 +3430,7 @@ " 1.882800e+11\n", " 1.045484e+22\n", " 2.005898e+08\n", - " 3.384520e-12\n", + " ...\n", " 1.391144e+08\n", " 6.147540e+07\n", " 0.001\n", @@ -2127,6 +3444,8 @@ " \n", " \n", " 3\n", + " 100\n", + " 3\n", " 4\n", " 3.997401e+08\n", " 378691200.0\n", @@ -2135,7 +3454,7 @@ " 0.000000e+00\n", " 1.045484e+22\n", " 5.064473e+07\n", - " 3.389543e-12\n", + " ...\n", " 5.005196e+07\n", " 5.927796e+05\n", " 0.001\n", @@ -2149,6 +3468,8 @@ " \n", " \n", " 4\n", + " 100\n", + " 3\n", " 5\n", " 4.417117e+08\n", " 420662816.0\n", @@ -2157,7 +3478,7 @@ " 3.790000e+11\n", " 1.045484e+22\n", " 3.644599e+08\n", - " 4.926714e-12\n", + " ...\n", " 2.411954e+08\n", " 1.232645e+08\n", " 0.001\n", @@ -2190,9 +3511,13 @@ " ...\n", " ...\n", " ...\n", + " ...\n", + " ...\n", " \n", " \n", " 60\n", + " 100\n", + " 3\n", " 61\n", " 7.573741e+08\n", " 420670816.0\n", @@ -2201,7 +3526,7 @@ " 0.000000e+00\n", " 1.045484e+22\n", " 1.021210e+07\n", - " 4.950759e-12\n", + " ...\n", " 9.725966e+06\n", " 4.861311e+05\n", " 0.001\n", @@ -2215,6 +3540,8 @@ " \n", " \n", " 61\n", + " 100\n", + " 3\n", " 62\n", " 1.388526e+09\n", " 420670816.0\n", @@ -2223,7 +3550,7 @@ " 0.000000e+00\n", " 1.045484e+22\n", " 2.140445e+06\n", - " 4.950759e-12\n", + " ...\n", " 1.934185e+06\n", " 2.062603e+05\n", " 0.001\n", @@ -2237,6 +3564,8 @@ " \n", " \n", " 62\n", + " 100\n", + " 3\n", " 63\n", " 2.019678e+09\n", " 420670816.0\n", @@ -2245,7 +3574,7 @@ " 0.000000e+00\n", " 1.045484e+22\n", " 1.354644e+06\n", - " 4.950759e-12\n", + " ...\n", " 1.266816e+06\n", " 8.782794e+04\n", " 0.001\n", @@ -2259,6 +3588,8 @@ " \n", " \n", " 63\n", + " 100\n", + " 3\n", " 64\n", " 3.597558e+09\n", " 420670816.0\n", @@ -2267,7 +3598,7 @@ " 0.000000e+00\n", " 1.045484e+22\n", " 8.909484e+05\n", - " 4.950759e-12\n", + " ...\n", " 8.798868e+05\n", " 1.106160e+04\n", " 0.001\n", @@ -2281,6 +3612,8 @@ " \n", " \n", " 64\n", + " 100\n", + " 3\n", " 65\n", " 3.199940e+10\n", " 420670816.0\n", @@ -2289,7 +3622,7 @@ " 0.000000e+00\n", " 1.045484e+22\n", " 3.152101e+04\n", - " 4.950759e-12\n", + " ...\n", " 3.071513e+04\n", " 8.058719e+02\n", " 0.001\n", @@ -2303,48 +3636,48 @@ " \n", " \n", "\n", - "

    65 rows × 19 columns

    \n", + "

    65 rows × 21 columns

    \n", "" ], "text/plain": [ - " id elapsed_time irradiation_time cooling_time duration \\\n", - "0 1 0.000000e+00 0.0 0.000000e+00 0.000000e+00 \n", - "1 2 6.311520e+07 63115200.0 0.000000e+00 6.311520e+07 \n", - "2 3 3.786912e+08 378691200.0 0.000000e+00 3.155760e+08 \n", - "3 4 3.997401e+08 378691200.0 2.104892e+07 2.104892e+07 \n", - "4 5 4.417117e+08 420662816.0 2.104892e+07 4.197161e+07 \n", - ".. .. ... ... ... ... \n", - "60 61 7.573741e+08 420670816.0 3.367033e+08 2.209032e+08 \n", - "61 62 1.388526e+09 420670816.0 9.678553e+08 6.311520e+08 \n", - "62 63 2.019678e+09 420670816.0 1.599007e+09 6.311520e+08 \n", - "63 64 3.597558e+09 420670816.0 3.176887e+09 1.577880e+09 \n", - "64 65 3.199940e+10 420670816.0 3.157873e+10 2.840184e+10 \n", - "\n", - " flux total_atoms total_activity total_alpha_activity \\\n", - "0 0.000000e+00 1.045481e+22 1.099260e-02 0.000000e+00 \n", - "1 2.445200e+10 1.045481e+22 2.268685e+07 6.921229e-15 \n", - "2 1.882800e+11 1.045484e+22 2.005898e+08 3.384520e-12 \n", - "3 0.000000e+00 1.045484e+22 5.064473e+07 3.389543e-12 \n", - "4 3.790000e+11 1.045484e+22 3.644599e+08 4.926714e-12 \n", - ".. ... ... ... ... \n", - "60 0.000000e+00 1.045484e+22 1.021210e+07 4.950759e-12 \n", - "61 0.000000e+00 1.045484e+22 2.140445e+06 4.950759e-12 \n", - "62 0.000000e+00 1.045484e+22 1.354644e+06 4.950759e-12 \n", - "63 0.000000e+00 1.045484e+22 8.909484e+05 4.950759e-12 \n", - "64 0.000000e+00 1.045484e+22 3.152101e+04 4.950759e-12 \n", - "\n", - " total_beta_activity total_gamma_activity total_mass total_heat \\\n", - "0 1.099260e-02 0.000000e+00 0.001 1.994928e-19 \n", - "1 1.476443e+07 7.922416e+06 0.001 2.522555e-09 \n", - "2 1.391144e+08 6.147540e+07 0.001 2.601587e-08 \n", - "3 5.005196e+07 5.927796e+05 0.001 1.072963e-08 \n", - "4 2.411954e+08 1.232645e+08 0.001 4.388052e-08 \n", - ".. ... ... ... ... \n", - "60 9.725966e+06 4.861311e+05 0.001 3.030422e-09 \n", - "61 1.934185e+06 2.062603e+05 0.001 2.260388e-10 \n", - "62 1.266816e+06 8.782794e+04 0.001 2.303827e-11 \n", - "63 8.798868e+05 1.106160e+04 0.001 6.016502e-12 \n", - "64 3.071513e+04 8.058719e+02 0.001 3.465519e-12 \n", + " material_id case_id time_step_number elapsed_time irradiation_time \\\n", + "0 100 3 1 0.000000e+00 0.0 \n", + "1 100 3 2 6.311520e+07 63115200.0 \n", + "2 100 3 3 3.786912e+08 378691200.0 \n", + "3 100 3 4 3.997401e+08 378691200.0 \n", + "4 100 3 5 4.417117e+08 420662816.0 \n", + ".. ... ... ... ... ... \n", + "60 100 3 61 7.573741e+08 420670816.0 \n", + "61 100 3 62 1.388526e+09 420670816.0 \n", + "62 100 3 63 2.019678e+09 420670816.0 \n", + "63 100 3 64 3.597558e+09 420670816.0 \n", + "64 100 3 65 3.199940e+10 420670816.0 \n", + "\n", + " cooling_time duration flux total_atoms total_activity \\\n", + "0 0.000000e+00 0.000000e+00 0.000000e+00 1.045481e+22 1.099260e-02 \n", + "1 0.000000e+00 6.311520e+07 2.445200e+10 1.045481e+22 2.268685e+07 \n", + "2 0.000000e+00 3.155760e+08 1.882800e+11 1.045484e+22 2.005898e+08 \n", + "3 2.104892e+07 2.104892e+07 0.000000e+00 1.045484e+22 5.064473e+07 \n", + "4 2.104892e+07 4.197161e+07 3.790000e+11 1.045484e+22 3.644599e+08 \n", + ".. ... ... ... ... ... \n", + "60 3.367033e+08 2.209032e+08 0.000000e+00 1.045484e+22 1.021210e+07 \n", + "61 9.678553e+08 6.311520e+08 0.000000e+00 1.045484e+22 2.140445e+06 \n", + "62 1.599007e+09 6.311520e+08 0.000000e+00 1.045484e+22 1.354644e+06 \n", + "63 3.176887e+09 1.577880e+09 0.000000e+00 1.045484e+22 8.909484e+05 \n", + "64 3.157873e+10 2.840184e+10 0.000000e+00 1.045484e+22 3.152101e+04 \n", + "\n", + " ... total_beta_activity total_gamma_activity total_mass total_heat \\\n", + "0 ... 1.099260e-02 0.000000e+00 0.001 1.994928e-19 \n", + "1 ... 1.476443e+07 7.922416e+06 0.001 2.522555e-09 \n", + "2 ... 1.391144e+08 6.147540e+07 0.001 2.601587e-08 \n", + "3 ... 5.005196e+07 5.927796e+05 0.001 1.072963e-08 \n", + "4 ... 2.411954e+08 1.232645e+08 0.001 4.388052e-08 \n", + ".. ... ... ... ... ... \n", + "60 ... 9.725966e+06 4.861311e+05 0.001 3.030422e-09 \n", + "61 ... 1.934185e+06 2.062603e+05 0.001 2.260388e-10 \n", + "62 ... 1.266816e+06 8.782794e+04 0.001 2.303827e-11 \n", + "63 ... 8.798868e+05 1.106160e+04 0.001 6.016502e-12 \n", + "64 ... 3.071513e+04 8.058719e+02 0.001 3.465519e-12 \n", "\n", " total_alpha_heat total_beta_heat total_gamma_heat \\\n", "0 0.000000e+00 1.994919e-19 8.784190e-25 \n", @@ -2372,50 +3705,206 @@ "63 1.548528e-04 1.769614e-03 2.999845e-09 \n", "64 2.518117e-05 6.220313e-04 2.701462e-09 \n", "\n", - "[65 rows x 19 columns]" + "[65 rows x 21 columns]" + ] + }, + "execution_count": 457, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "con.execute(\"select * from timestep\").df()" + ] + }, + { + "cell_type": "code", + "execution_count": 458, + "id": "c5fdb6e7-00b7-40f1-9d8d-f755dd768a97", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "def save_nuclides(con, ds):\n", + " nuclides_df = ds[[\"element\", \"mass_number\", \"state\", \"zai\", \"nuclide_half_life\"]].to_pandas().reset_index(drop=True)\n", + " sql = \"insert or ignore into nuclide select * from nuclides_df\"\n", + " con.execute(sql)\n", + " con.commit()" + ] + }, + { + "cell_type": "code", + "execution_count": 459, + "id": "2cd4e47d-1ec3-493c-b655-8a83917deea5", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "save_nuclides(con, ds)" + ] + }, + { + "cell_type": "code", + "execution_count": 460, + "id": "1f6cbb0e-e893-4d88-a744-989d9b39e0a4", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "text/html": [ + "
    \n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
    elementmass_numberstatezaihalf_life
    0Al261302602.262630e+13
    1Al271302700.000000e+00
    2Al281302801.344600e+02
    3Al291302903.936000e+02
    4Al301303003.650000e+00
    ..................
    210Zr934009304.828210e+13
    211Zr944009401.893460e+23
    212Zr954009505.532360e+06
    213Zr964009601.230750e+27
    214Zr974009706.027840e+04
    \n", + "

    215 rows × 5 columns

    \n", + "
    " + ], + "text/plain": [ + " element mass_number state zai half_life\n", + "0 Al 26 130260 2.262630e+13\n", + "1 Al 27 130270 0.000000e+00\n", + "2 Al 28 130280 1.344600e+02\n", + "3 Al 29 130290 3.936000e+02\n", + "4 Al 30 130300 3.650000e+00\n", + ".. ... ... ... ... ...\n", + "210 Zr 93 400930 4.828210e+13\n", + "211 Zr 94 400940 1.893460e+23\n", + "212 Zr 95 400950 5.532360e+06\n", + "213 Zr 96 400960 1.230750e+27\n", + "214 Zr 97 400970 6.027840e+04\n", + "\n", + "[215 rows x 5 columns]" ] }, - "execution_count": 257, + "execution_count": 460, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "con.execute(\"select * from timestep\").df()" - ] - }, - { - "cell_type": "code", - "execution_count": 258, - "id": "c5fdb6e7-00b7-40f1-9d8d-f755dd768a97", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "def save_nuclides(con, ds):\n", - " nuclides_df = ds[[\"element\", \"mass_number\", \"state\", \"zai\", \"nuclide_half_life\"]].to_pandas().reset_index(drop=True)\n", - " sql = \"insert into nuclide select * from nuclides_df\"\n", - " con.execute(sql)\n", - " con.commit()" - ] - }, - { - "cell_type": "code", - "execution_count": 259, - "id": "2cd4e47d-1ec3-493c-b655-8a83917deea5", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "save_nuclides(con, ds)" + "con.execute(\"select * from nuclide\").df()" ] }, { "cell_type": "code", - "execution_count": 285, - "id": "1f6cbb0e-e893-4d88-a744-989d9b39e0a4", + "execution_count": 508, + "id": "1161cef3-d3cf-4c2f-aa2d-2c1ea9ee9208", "metadata": { "tags": [] }, @@ -2441,53 +3930,149 @@ " \n", " \n", " \n", + " material_id\n", + " case_id\n", + " time_step_number\n", " element\n", " mass_number\n", " state\n", + " nuclide_atoms\n", + " nuclide_grams\n", + " nuclide_activity\n", + " nuclide_alpha_activity\n", + " ...\n", + " nuclide_gamma_activity\n", + " nuclide_heat\n", + " nuclide_alpha_heat\n", + " nuclide_beta_heat\n", + " nuclide_gamma_heat\n", + " nuclide_dose\n", + " nuclide_ingestion\n", + " nuclide_inhalation\n", + " elapsed_time\n", " zai\n", - " half_life\n", " \n", " \n", " \n", " \n", " 0\n", + " 0\n", + " 0\n", + " 0\n", " Al\n", " 26\n", " \n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.0\n", + " ...\n", + " 0.0\n", + " 0.000000e+00\n", + " 0.0\n", + " 0.000000e+00\n", + " 0.0\n", + " 0.0\n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.000000e+00\n", " 130260\n", - " 2.262630e+13\n", " \n", " \n", " 1\n", + " 0\n", + " 0\n", + " 0\n", " Al\n", " 27\n", " \n", - " 130270\n", + " 1.785556e+20\n", + " 8.000000e-03\n", + " 0.000000e+00\n", + " 0.0\n", + " ...\n", + " 0.0\n", " 0.000000e+00\n", + " 0.0\n", + " 0.000000e+00\n", + " 0.0\n", + " 0.0\n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 130270\n", " \n", " \n", " 2\n", + " 0\n", + " 0\n", + " 0\n", " Al\n", " 28\n", " \n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.0\n", + " ...\n", + " 0.0\n", + " 0.000000e+00\n", + " 0.0\n", + " 0.000000e+00\n", + " 0.0\n", + " 0.0\n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.000000e+00\n", " 130280\n", - " 1.344600e+02\n", " \n", " \n", " 3\n", + " 0\n", + " 0\n", + " 0\n", " Al\n", " 29\n", " \n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.0\n", + " ...\n", + " 0.0\n", + " 0.000000e+00\n", + " 0.0\n", + " 0.000000e+00\n", + " 0.0\n", + " 0.0\n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.000000e+00\n", " 130290\n", - " 3.936000e+02\n", " \n", " \n", " 4\n", + " 0\n", + " 0\n", + " 0\n", " Al\n", " 30\n", " \n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.0\n", + " ...\n", + " 0.0\n", + " 0.000000e+00\n", + " 0.0\n", + " 0.000000e+00\n", + " 0.0\n", + " 0.0\n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.000000e+00\n", " 130300\n", - " 3.650000e+00\n", " \n", " \n", " ...\n", @@ -2496,76 +4081,261 @@ " ...\n", " ...\n", " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", " \n", " \n", - " 210\n", + " 13970\n", + " 0\n", + " 0\n", + " 64\n", " Zr\n", " 93\n", " \n", + " 6.327286e+13\n", + " 9.761411e-09\n", + " 9.083574e-01\n", + " 0.0\n", + " ...\n", + " 0.0\n", + " 2.791257e-18\n", + " 0.0\n", + " 2.791257e-18\n", + " 0.0\n", + " 0.0\n", + " 9.991931e-10\n", + " 2.270893e-08\n", + " 3.199940e+10\n", " 400930\n", - " 4.828210e+13\n", " \n", " \n", - " 211\n", + " 13971\n", + " 0\n", + " 0\n", + " 64\n", " Zr\n", " 94\n", " \n", + " 7.058445e+11\n", + " 1.100659e-10\n", + " 2.583916e-12\n", + " 0.0\n", + " ...\n", + " 0.0\n", + " 4.734377e-28\n", + " 0.0\n", + " 4.734377e-28\n", + " 0.0\n", + " 0.0\n", + " 2.480559e-20\n", + " 2.842307e-20\n", + " 3.199940e+10\n", " 400940\n", - " 1.893460e+23\n", " \n", " \n", - " 212\n", + " 13972\n", + " 0\n", + " 0\n", + " 64\n", " Zr\n", " 95\n", " \n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.0\n", + " ...\n", + " 0.0\n", + " 0.000000e+00\n", + " 0.0\n", + " 0.000000e+00\n", + " 0.0\n", + " 0.0\n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 3.199940e+10\n", " 400950\n", - " 5.532360e+06\n", " \n", " \n", - " 213\n", + " 13973\n", + " 0\n", + " 0\n", + " 64\n", " Zr\n", " 96\n", " \n", + " 1.091942e+10\n", + " 1.739020e-12\n", + " 6.149716e-18\n", + " 0.0\n", + " ...\n", + " 0.0\n", + " 3.301027e-33\n", + " 0.0\n", + " 3.301027e-33\n", + " 0.0\n", + " 0.0\n", + " 1.721921e-25\n", + " 1.906412e-25\n", + " 3.199940e+10\n", " 400960\n", - " 1.230750e+27\n", " \n", " \n", - " 214\n", + " 13974\n", + " 0\n", + " 0\n", + " 64\n", " Zr\n", " 97\n", " \n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.0\n", + " ...\n", + " 0.0\n", + " 0.000000e+00\n", + " 0.0\n", + " 0.000000e+00\n", + " 0.0\n", + " 0.0\n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 3.199940e+10\n", " 400970\n", - " 6.027840e+04\n", " \n", " \n", "\n", - "

    215 rows × 5 columns

    \n", + "

    13975 rows × 21 columns

    \n", "" ], "text/plain": [ - " element mass_number state zai half_life\n", - "0 Al 26 130260 2.262630e+13\n", - "1 Al 27 130270 0.000000e+00\n", - "2 Al 28 130280 1.344600e+02\n", - "3 Al 29 130290 3.936000e+02\n", - "4 Al 30 130300 3.650000e+00\n", - ".. ... ... ... ... ...\n", - "210 Zr 93 400930 4.828210e+13\n", - "211 Zr 94 400940 1.893460e+23\n", - "212 Zr 95 400950 5.532360e+06\n", - "213 Zr 96 400960 1.230750e+27\n", - "214 Zr 97 400970 6.027840e+04\n", - "\n", - "[215 rows x 5 columns]" + " material_id case_id time_step_number element mass_number state \\\n", + "0 0 0 0 Al 26 \n", + "1 0 0 0 Al 27 \n", + "2 0 0 0 Al 28 \n", + "3 0 0 0 Al 29 \n", + "4 0 0 0 Al 30 \n", + "... ... ... ... ... ... ... \n", + "13970 0 0 64 Zr 93 \n", + "13971 0 0 64 Zr 94 \n", + "13972 0 0 64 Zr 95 \n", + "13973 0 0 64 Zr 96 \n", + "13974 0 0 64 Zr 97 \n", + "\n", + " nuclide_atoms nuclide_grams nuclide_activity nuclide_alpha_activity \\\n", + "0 0.000000e+00 0.000000e+00 0.000000e+00 0.0 \n", + "1 1.785556e+20 8.000000e-03 0.000000e+00 0.0 \n", + "2 0.000000e+00 0.000000e+00 0.000000e+00 0.0 \n", + "3 0.000000e+00 0.000000e+00 0.000000e+00 0.0 \n", + "4 0.000000e+00 0.000000e+00 0.000000e+00 0.0 \n", + "... ... ... ... ... \n", + "13970 6.327286e+13 9.761411e-09 9.083574e-01 0.0 \n", + "13971 7.058445e+11 1.100659e-10 2.583916e-12 0.0 \n", + "13972 0.000000e+00 0.000000e+00 0.000000e+00 0.0 \n", + "13973 1.091942e+10 1.739020e-12 6.149716e-18 0.0 \n", + "13974 0.000000e+00 0.000000e+00 0.000000e+00 0.0 \n", + "\n", + " ... nuclide_gamma_activity nuclide_heat nuclide_alpha_heat \\\n", + "0 ... 0.0 0.000000e+00 0.0 \n", + "1 ... 0.0 0.000000e+00 0.0 \n", + "2 ... 0.0 0.000000e+00 0.0 \n", + "3 ... 0.0 0.000000e+00 0.0 \n", + "4 ... 0.0 0.000000e+00 0.0 \n", + "... ... ... ... ... \n", + "13970 ... 0.0 2.791257e-18 0.0 \n", + "13971 ... 0.0 4.734377e-28 0.0 \n", + "13972 ... 0.0 0.000000e+00 0.0 \n", + "13973 ... 0.0 3.301027e-33 0.0 \n", + "13974 ... 0.0 0.000000e+00 0.0 \n", + "\n", + " nuclide_beta_heat nuclide_gamma_heat nuclide_dose nuclide_ingestion \\\n", + "0 0.000000e+00 0.0 0.0 0.000000e+00 \n", + "1 0.000000e+00 0.0 0.0 0.000000e+00 \n", + "2 0.000000e+00 0.0 0.0 0.000000e+00 \n", + "3 0.000000e+00 0.0 0.0 0.000000e+00 \n", + "4 0.000000e+00 0.0 0.0 0.000000e+00 \n", + "... ... ... ... ... \n", + "13970 2.791257e-18 0.0 0.0 9.991931e-10 \n", + "13971 4.734377e-28 0.0 0.0 2.480559e-20 \n", + "13972 0.000000e+00 0.0 0.0 0.000000e+00 \n", + "13973 3.301027e-33 0.0 0.0 1.721921e-25 \n", + "13974 0.000000e+00 0.0 0.0 0.000000e+00 \n", + "\n", + " nuclide_inhalation elapsed_time zai \n", + "0 0.000000e+00 0.000000e+00 130260 \n", + "1 0.000000e+00 0.000000e+00 130270 \n", + "2 0.000000e+00 0.000000e+00 130280 \n", + "3 0.000000e+00 0.000000e+00 130290 \n", + "4 0.000000e+00 0.000000e+00 130300 \n", + "... ... ... ... \n", + "13970 2.270893e-08 3.199940e+10 400930 \n", + "13971 2.842307e-20 3.199940e+10 400940 \n", + "13972 0.000000e+00 3.199940e+10 400950 \n", + "13973 1.906412e-25 3.199940e+10 400960 \n", + "13974 0.000000e+00 3.199940e+10 400970 \n", + "\n", + "[13975 rows x 21 columns]" ] }, - "execution_count": 285, + "execution_count": 508, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "con.execute(\"select * from nuclide\").df()" + "columns = [\n", + " \"material_id\",\n", + " \"case_id\",\n", + " \"time_step_number\",\n", + " \"element\",\n", + " \"mass_number\",\n", + " \"state\",\n", + " \"nuclide_atoms\",\n", + " \"nuclide_grams\",\n", + " \"nuclide_activity\",\n", + " \"nuclide_alpha_activity\",\n", + " \"nuclide_beta_activity\",\n", + " \"nuclide_gamma_activity\",\n", + " \"nuclide_heat\",\n", + " \"nuclide_alpha_heat\",\n", + " \"nuclide_beta_heat\",\n", + " \"nuclide_gamma_heat\",\n", + " \"nuclide_dose\",\n", + " \"nuclide_ingestion\",\n", + " \"nuclide_inhalation\",\n", + "]\n", + "# tn = ds[columns].to_dataframe().reset_index(\n", + "# [\n", + "# \"material_id\", \"case_id\", \"time_step_number\",\n", + "# ]\n", + "# )\n", + "# tn = tn.reset_index(\n", + "# [\"element\", \"mass_number\", \"state\"]\n", + "# )\n", + "\n", + "# .reset_index()\n", + "# .reset_index(\"time_step_number\")[columns].fillna(0.0)\n", + "# tn.reset_index(allow_duplicates=True)\n", + "ds[columns].reset_index([\"material_id\", \"case_id\", \"time_step_number\", \"nuclide\"]).to_dataframe().reset_index(\n", + " [\n", + " \"material_id\", \"case_id\", \"time_step_number\",\n", + " ]\n", + ").reset_index(drop=True).fillna(0.0)\n" ] }, { @@ -2579,6 +4349,8 @@ "source": [ "def save_timestep_nucludes(con, ds):\n", " columns = [\n", + " \"material_id\",\n", + " \"case_id\",\n", " \"time_step_number\",\n", " \"element\",\n", " \"mass_number\",\n", diff --git a/notebooks/dvp/try_ducdb.py b/notebooks/dvp/try_ducdb.py index f480e6d..1727c60 100644 --- a/notebooks/dvp/try_ducdb.py +++ b/notebooks/dvp/try_ducdb.py @@ -49,19 +49,19 @@ inventory = from_json(json_path) -# In[241]: +# In[469]: ds = da.create_dataset(inventory) -# In[242]: +# In[470]: ds -# In[287]: +# In[417]: ds.timestamp @@ -94,7 +94,20 @@ case_id = 3 -# In[387]: +# In[475]: + + +ds = ds.expand_dims(dim={"material_id": [material_id], "case_id": [case_id]}) +ds + + +# In[476]: + + +ds.irradiation_time + + +# In[446]: def drop_tables(con): @@ -105,7 +118,7 @@ def drop_tables(con): con.execute("drop table if exists rundata") -# In[395]: +# In[447]: def create_tables(con): @@ -122,7 +135,9 @@ def create_tables(con): ); CREATE TABLE IF NOT EXISTS timestep( - id uinteger PRIMARY KEY, + material_id uinteger not null, + case_id uinteger not null, + time_step_number uinteger not null, elapsed_time float4 not null, irradiation_time float4 not null, cooling_time float4 not null, @@ -141,8 +156,7 @@ def create_tables(con): total_ingest1ion_dose float4 not null, total_inhalation_dose float4 not null, total_dose_rate float4 not null, - material_id uinteger not null, - case_id uinteger not null, + primary key(material_id, case_id, time_step_number), foreign key(material_id, case_id) references rundata(material_id, case_id) ); @@ -157,7 +171,9 @@ def create_tables(con): ); CREATE TABLE IF NOT EXISTS timestep_nuclide( - timestep_id uinteger not null, + material_id uinteger not null, + case_id uinteger not null, + time_step_number uinteger not null, element varchar(2) not null, mass_number usmallint not null, state varchar(1) not null, @@ -174,42 +190,44 @@ def create_tables(con): dose float4 not null, ingestion float4 not null, inhalation float4 not null, - primary key(timestep_id, element, mass_number, state), - foreign key(timestep_id) references timestep(id), + primary key(material_id, case_id, time_step_number, element, mass_number, state), + foreign key(material_id, case_id, time_step_number) references timestep(material_id, case_id, time_step_number), foreign key(element, mass_number, state) references nuclide(element, mass_number, state) ); CREATE TABLE IF NOT EXISTS timestep_gamma( - timestep_id uinteger not null, + material_id uinteger not null, + case_id uinteger not null, + time_step_number uinteger not null, boundary real not null check(0 <= boundary), intensity real not null, - primary key(timestep_id, boundary), - foreign key(timestep_id) references timestep(id), + primary key(material_id, case_id, time_step_number, boundary), + foreign key(material_id, case_id, time_step_number) references timestep(material_id, case_id, time_step_number), ); """ con.execute(sql) -# In[396]: +# In[448]: -# drop_tables(con) +drop_tables(con) create_tables(con) -# In[402]: +# In[449]: def save_rundata(con, ds): sql = """ - INSERT INTO rundata values(?, ?, ?, ?, ?) + INSERT INTO rundata values(?, ?, ?, ?, ?, ?, ?) """ con.execute( sql, ( - material_id, - case_id, - ds.coords["timestamp"].item(), + ds.material_id.item(), + ds.case_id.item(), + ds.timestamp.dt.strftime("%Y-%m-%d %H:%M:%S").item(), ds.attrs["run_name"], ds.attrs["flux_name"], ds.attrs["dose_rate_type"], @@ -219,31 +237,27 @@ def save_rundata(con, ds): con.commit() -# In[403]: - - -con.execute("select * from information_schema.tables").df() - - -# In[400]: +# In[451]: save_rundata(con, ds) -# In[254]: +# In[452]: con.execute("select * from rundata").df() -# In[255]: +# In[455]: def save_timesteps(con, ds): timesteps_df = ( ds[ [ + "material_id", + "case_id", "time_step_number", "elapsed_time", "irradiation_time", @@ -265,7 +279,7 @@ def save_timesteps(con, ds): "total_dose_rate", ] ] - .to_pandas() + .to_dataframe() .reset_index() ) sql = "insert into timestep select * from timesteps_df" @@ -273,19 +287,19 @@ def save_timesteps(con, ds): con.commit() -# In[256]: +# In[456]: save_timesteps(con, ds) -# In[257]: +# In[457]: con.execute("select * from timestep").df() -# In[258]: +# In[458]: def save_nuclides(con, ds): @@ -294,28 +308,81 @@ def save_nuclides(con, ds): .to_pandas() .reset_index(drop=True) ) - sql = "insert into nuclide select * from nuclides_df" + sql = "insert or ignore into nuclide select * from nuclides_df" con.execute(sql) con.commit() -# In[259]: +# In[459]: save_nuclides(con, ds) -# In[285]: +# In[460]: con.execute("select * from nuclide").df() +# In[508]: + + +columns = [ + "material_id", + "case_id", + "time_step_number", + "element", + "mass_number", + "state", + "nuclide_atoms", + "nuclide_grams", + "nuclide_activity", + "nuclide_alpha_activity", + "nuclide_beta_activity", + "nuclide_gamma_activity", + "nuclide_heat", + "nuclide_alpha_heat", + "nuclide_beta_heat", + "nuclide_gamma_heat", + "nuclide_dose", + "nuclide_ingestion", + "nuclide_inhalation", +] +# tn = ds[columns].to_dataframe().reset_index( +# [ +# "material_id", "case_id", "time_step_number", +# ] +# ) +# tn = tn.reset_index( +# ["element", "mass_number", "state"] +# ) + +# .reset_index() +# .reset_index("time_step_number")[columns].fillna(0.0) +# tn.reset_index(allow_duplicates=True) +ds[columns].reset_index( + ["material_id", "case_id", "time_step_number", "nuclide"] +).to_dataframe().reset_index( + [ + "material_id", + "case_id", + "time_step_number", + ] +).reset_index( + drop=True +).fillna( + 0.0 +) + + # In[263]: def save_timestep_nucludes(con, ds): columns = [ + "material_id", + "case_id", "time_step_number", "element", "mass_number", From b68c61296c63b00efb89f4e8ccc13f334edb2296 Mon Sep 17 00:00:00 2001 From: dvp Date: Fri, 24 Mar 2023 17:08:05 +0300 Subject: [PATCH 11/32] notebook: duckdb prototyping in progress --- notebooks/dvp/try_ducdb.ipynb | 939 +++++++++++++++++++--------------- notebooks/dvp/try_ducdb.py | 80 +-- 2 files changed, 574 insertions(+), 445 deletions(-) diff --git a/notebooks/dvp/try_ducdb.ipynb b/notebooks/dvp/try_ducdb.ipynb index a2036ed..12d27ba 100644 --- a/notebooks/dvp/try_ducdb.ipynb +++ b/notebooks/dvp/try_ducdb.ipynb @@ -3110,20 +3110,24 @@ " time_step_number uinteger not null,\n", " element varchar(2) not null,\n", " mass_number usmallint not null,\n", + " \n", " state varchar(1) not null,\n", " atoms float4 not null,\n", " grams float4 not null,\n", " activity float4 not null,\n", " alpha_activity float4 not null,\n", + " \n", " beta_activity float4 not null,\n", " gamma_activity float4 not null,\n", " heat float4 not null,\n", " alpha_heat float4 not null,\n", " beta_heat float4 not null,\n", + " \n", " gamma_heat float4 not null,\n", " dose float4 not null,\n", " ingestion float4 not null,\n", " inhalation float4 not null,\n", + " \n", " primary key(material_id, case_id, time_step_number, element, mass_number, state),\n", " foreign key(material_id, case_id, time_step_number) references timestep(material_id, case_id, time_step_number),\n", " foreign key(element, mass_number, state) references nuclide(element, mass_number, state) \n", @@ -3144,7 +3148,7 @@ }, { "cell_type": "code", - "execution_count": 448, + "execution_count": 512, "id": "25f6867e-397a-4e98-a363-74b6af739c88", "metadata": { "tags": [] @@ -3157,7 +3161,7 @@ }, { "cell_type": "code", - "execution_count": 449, + "execution_count": 513, "id": "29716201-70f8-40d2-8da7-85689714ec32", "metadata": { "tags": [] @@ -3182,7 +3186,7 @@ }, { "cell_type": "code", - "execution_count": 451, + "execution_count": 514, "id": "c789eedd-580c-4383-8bf1-cc943562a3aa", "metadata": { "tags": [] @@ -3194,7 +3198,7 @@ }, { "cell_type": "code", - "execution_count": 452, + "execution_count": 515, "id": "1c650134-edf3-44dd-aa90-ddde6a3987a7", "metadata": { "tags": [] @@ -3256,7 +3260,7 @@ "0 1.0 " ] }, - "execution_count": 452, + "execution_count": 515, "metadata": {}, "output_type": "execute_result" } @@ -3267,7 +3271,7 @@ }, { "cell_type": "code", - "execution_count": 455, + "execution_count": 516, "id": "cf8661b6-d9cb-4431-8b40-f14072409d5a", "metadata": { "tags": [] @@ -3307,7 +3311,7 @@ }, { "cell_type": "code", - "execution_count": 456, + "execution_count": 517, "id": "78154d84-9df4-417d-a35f-60252575aae6", "metadata": { "tags": [] @@ -3319,7 +3323,7 @@ }, { "cell_type": "code", - "execution_count": 457, + "execution_count": 518, "id": "bf73ee32-d132-418f-8e77-969d779b780a", "metadata": { "tags": [] @@ -3708,7 +3712,7 @@ "[65 rows x 21 columns]" ] }, - "execution_count": 457, + "execution_count": 518, "metadata": {}, "output_type": "execute_result" } @@ -3719,7 +3723,7 @@ }, { "cell_type": "code", - "execution_count": 458, + "execution_count": 533, "id": "c5fdb6e7-00b7-40f1-9d8d-f755dd768a97", "metadata": { "tags": [] @@ -3727,7 +3731,16 @@ "outputs": [], "source": [ "def save_nuclides(con, ds):\n", - " nuclides_df = ds[[\"element\", \"mass_number\", \"state\", \"zai\", \"nuclide_half_life\"]].to_pandas().reset_index(drop=True)\n", + " nuclides_df = ds[[\"element\", \"mass_number\", \"state\", \"zai\", \"nuclide_half_life\"]] \\\n", + " .reset_index([\"material_id\", \"case_id\"]) \\\n", + " .to_dataframe() \\\n", + " .reset_index(\n", + " [\n", + " \"material_id\", \"case_id\"\n", + " ],\n", + " drop=True\n", + " ) \\\n", + " .reset_index(drop=True)\n", " sql = \"insert or ignore into nuclide select * from nuclides_df\"\n", " con.execute(sql)\n", " con.commit()" @@ -3735,7 +3748,7 @@ }, { "cell_type": "code", - "execution_count": 459, + "execution_count": 534, "id": "2cd4e47d-1ec3-493c-b655-8a83917deea5", "metadata": { "tags": [] @@ -3747,7 +3760,7 @@ }, { "cell_type": "code", - "execution_count": 460, + "execution_count": 535, "id": "1f6cbb0e-e893-4d88-a744-989d9b39e0a4", "metadata": { "tags": [] @@ -3892,7 +3905,7 @@ "[215 rows x 5 columns]" ] }, - "execution_count": 460, + "execution_count": 535, "metadata": {}, "output_type": "execute_result" } @@ -3903,7 +3916,7 @@ }, { "cell_type": "code", - "execution_count": 508, + "execution_count": 559, "id": "1161cef3-d3cf-4c2f-aa2d-2c1ea9ee9208", "metadata": { "tags": [] @@ -3912,387 +3925,485 @@ { "data": { "text/html": [ - "
    \n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
    material_idcase_idtime_step_numberelementmass_numberstatenuclide_atomsnuclide_gramsnuclide_activitynuclide_alpha_activity...nuclide_gamma_activitynuclide_heatnuclide_alpha_heatnuclide_beta_heatnuclide_gamma_heatnuclide_dosenuclide_ingestionnuclide_inhalationelapsed_timezai
    0000Al260.000000e+000.000000e+000.000000e+000.0...0.00.000000e+000.00.000000e+000.00.00.000000e+000.000000e+000.000000e+00130260
    1000Al271.785556e+208.000000e-030.000000e+000.0...0.00.000000e+000.00.000000e+000.00.00.000000e+000.000000e+000.000000e+00130270
    2000Al280.000000e+000.000000e+000.000000e+000.0...0.00.000000e+000.00.000000e+000.00.00.000000e+000.000000e+000.000000e+00130280
    3000Al290.000000e+000.000000e+000.000000e+000.0...0.00.000000e+000.00.000000e+000.00.00.000000e+000.000000e+000.000000e+00130290
    4000Al300.000000e+000.000000e+000.000000e+000.0...0.00.000000e+000.00.000000e+000.00.00.000000e+000.000000e+000.000000e+00130300
    ..................................................................
    139700064Zr936.327286e+139.761411e-099.083574e-010.0...0.02.791257e-180.02.791257e-180.00.09.991931e-102.270893e-083.199940e+10400930
    139710064Zr947.058445e+111.100659e-102.583916e-120.0...0.04.734377e-280.04.734377e-280.00.02.480559e-202.842307e-203.199940e+10400940
    139720064Zr950.000000e+000.000000e+000.000000e+000.0...0.00.000000e+000.00.000000e+000.00.00.000000e+000.000000e+003.199940e+10400950
    139730064Zr961.091942e+101.739020e-126.149716e-180.0...0.03.301027e-330.03.301027e-330.00.01.721921e-251.906412e-253.199940e+10400960
    139740064Zr970.000000e+000.000000e+000.000000e+000.0...0.00.000000e+000.00.000000e+000.00.00.000000e+000.000000e+003.199940e+10400970
    \n", - "

    13975 rows × 21 columns

    \n", - "
    " + "html[theme=dark],\n", + "body[data-theme=dark],\n", + "body.vscode-dark {\n", + " --xr-font-color0: rgba(255, 255, 255, 1);\n", + " --xr-font-color2: rgba(255, 255, 255, 0.54);\n", + " --xr-font-color3: rgba(255, 255, 255, 0.38);\n", + " --xr-border-color: #1F1F1F;\n", + " --xr-disabled-color: #515151;\n", + " --xr-background-color: #111111;\n", + " --xr-background-color-row-even: #111111;\n", + " --xr-background-color-row-odd: #313131;\n", + "}\n", + "\n", + ".xr-wrap {\n", + " display: block !important;\n", + " min-width: 300px;\n", + " max-width: 700px;\n", + "}\n", + "\n", + ".xr-text-repr-fallback {\n", + " /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n", + " display: none;\n", + "}\n", + "\n", + ".xr-header {\n", + " padding-top: 6px;\n", + " padding-bottom: 6px;\n", + " margin-bottom: 4px;\n", + " border-bottom: solid 1px var(--xr-border-color);\n", + "}\n", + "\n", + ".xr-header > div,\n", + ".xr-header > ul {\n", + " display: inline;\n", + " margin-top: 0;\n", + " margin-bottom: 0;\n", + "}\n", + "\n", + ".xr-obj-type,\n", + ".xr-array-name {\n", + " margin-left: 2px;\n", + " margin-right: 10px;\n", + "}\n", + "\n", + ".xr-obj-type {\n", + " color: var(--xr-font-color2);\n", + "}\n", + "\n", + ".xr-sections {\n", + " padding-left: 0 !important;\n", + " display: grid;\n", + " grid-template-columns: 150px auto auto 1fr 20px 20px;\n", + "}\n", + "\n", + ".xr-section-item {\n", + " display: contents;\n", + "}\n", + "\n", + ".xr-section-item input {\n", + " display: none;\n", + "}\n", + "\n", + ".xr-section-item input + label {\n", + " color: var(--xr-disabled-color);\n", + "}\n", + "\n", + ".xr-section-item input:enabled + label {\n", + " cursor: pointer;\n", + " color: var(--xr-font-color2);\n", + "}\n", + "\n", + ".xr-section-item input:enabled + label:hover {\n", + " color: var(--xr-font-color0);\n", + "}\n", + "\n", + ".xr-section-summary {\n", + " grid-column: 1;\n", + " color: var(--xr-font-color2);\n", + " font-weight: 500;\n", + "}\n", + "\n", + ".xr-section-summary > span {\n", + " display: inline-block;\n", + " padding-left: 0.5em;\n", + "}\n", + "\n", + ".xr-section-summary-in:disabled + label {\n", + " color: var(--xr-font-color2);\n", + "}\n", + "\n", + ".xr-section-summary-in + label:before {\n", + " display: inline-block;\n", + " content: '►';\n", + " font-size: 11px;\n", + " width: 15px;\n", + " text-align: center;\n", + "}\n", + "\n", + ".xr-section-summary-in:disabled + label:before {\n", + " color: var(--xr-disabled-color);\n", + "}\n", + "\n", + ".xr-section-summary-in:checked + label:before {\n", + " content: '▼';\n", + "}\n", + "\n", + ".xr-section-summary-in:checked + label > span {\n", + " display: none;\n", + "}\n", + "\n", + ".xr-section-summary,\n", + ".xr-section-inline-details {\n", + " padding-top: 4px;\n", + " padding-bottom: 4px;\n", + "}\n", + "\n", + ".xr-section-inline-details {\n", + " grid-column: 2 / -1;\n", + "}\n", + "\n", + ".xr-section-details {\n", + " display: none;\n", + " grid-column: 1 / -1;\n", + " margin-bottom: 5px;\n", + "}\n", + "\n", + ".xr-section-summary-in:checked ~ .xr-section-details {\n", + " display: contents;\n", + "}\n", + "\n", + ".xr-array-wrap {\n", + " grid-column: 1 / -1;\n", + " display: grid;\n", + " grid-template-columns: 20px auto;\n", + "}\n", + "\n", + ".xr-array-wrap > label {\n", + " grid-column: 1;\n", + " vertical-align: top;\n", + "}\n", + "\n", + ".xr-preview {\n", + " color: var(--xr-font-color3);\n", + "}\n", + "\n", + ".xr-array-preview,\n", + ".xr-array-data {\n", + " padding: 0 5px !important;\n", + " grid-column: 2;\n", + "}\n", + "\n", + ".xr-array-data,\n", + ".xr-array-in:checked ~ .xr-array-preview {\n", + " display: none;\n", + "}\n", + "\n", + ".xr-array-in:checked ~ .xr-array-data,\n", + ".xr-array-preview {\n", + " display: inline-block;\n", + "}\n", + "\n", + ".xr-dim-list {\n", + " display: inline-block !important;\n", + " list-style: none;\n", + " padding: 0 !important;\n", + " margin: 0;\n", + "}\n", + "\n", + ".xr-dim-list li {\n", + " display: inline-block;\n", + " padding: 0;\n", + " margin: 0;\n", + "}\n", + "\n", + ".xr-dim-list:before {\n", + " content: '(';\n", + "}\n", + "\n", + ".xr-dim-list:after {\n", + " content: ')';\n", + "}\n", + "\n", + ".xr-dim-list li:not(:last-child):after {\n", + " content: ',';\n", + " padding-right: 5px;\n", + "}\n", + "\n", + ".xr-has-index {\n", + " font-weight: bold;\n", + "}\n", + "\n", + ".xr-var-list,\n", + ".xr-var-item {\n", + " display: contents;\n", + "}\n", + "\n", + ".xr-var-item > div,\n", + ".xr-var-item label,\n", + ".xr-var-item > .xr-var-name span {\n", + " background-color: var(--xr-background-color-row-even);\n", + " margin-bottom: 0;\n", + "}\n", + "\n", + ".xr-var-item > .xr-var-name:hover span {\n", + " padding-right: 5px;\n", + "}\n", + "\n", + ".xr-var-list > li:nth-child(odd) > div,\n", + ".xr-var-list > li:nth-child(odd) > label,\n", + ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n", + " background-color: var(--xr-background-color-row-odd);\n", + "}\n", + "\n", + ".xr-var-name {\n", + " grid-column: 1;\n", + "}\n", + "\n", + ".xr-var-dims {\n", + " grid-column: 2;\n", + "}\n", + "\n", + ".xr-var-dtype {\n", + " grid-column: 3;\n", + " text-align: right;\n", + " color: var(--xr-font-color2);\n", + "}\n", + "\n", + ".xr-var-preview {\n", + " grid-column: 4;\n", + "}\n", + "\n", + ".xr-index-preview {\n", + " grid-column: 2 / 5;\n", + " color: var(--xr-font-color2);\n", + "}\n", + "\n", + ".xr-var-name,\n", + ".xr-var-dims,\n", + ".xr-var-dtype,\n", + ".xr-preview,\n", + ".xr-attrs dt {\n", + " white-space: nowrap;\n", + " overflow: hidden;\n", + " text-overflow: ellipsis;\n", + " padding-right: 10px;\n", + "}\n", + "\n", + ".xr-var-name:hover,\n", + ".xr-var-dims:hover,\n", + ".xr-var-dtype:hover,\n", + ".xr-attrs dt:hover {\n", + " overflow: visible;\n", + " width: auto;\n", + " z-index: 1;\n", + "}\n", + "\n", + ".xr-var-attrs,\n", + ".xr-var-data,\n", + ".xr-index-data {\n", + " display: none;\n", + " background-color: var(--xr-background-color) !important;\n", + " padding-bottom: 5px !important;\n", + "}\n", + "\n", + ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n", + ".xr-var-data-in:checked ~ .xr-var-data,\n", + ".xr-index-data-in:checked ~ .xr-index-data {\n", + " display: block;\n", + "}\n", + "\n", + ".xr-var-data > table {\n", + " float: right;\n", + "}\n", + "\n", + ".xr-var-name span,\n", + ".xr-var-data,\n", + ".xr-index-name div,\n", + ".xr-index-data,\n", + ".xr-attrs {\n", + " padding-left: 25px !important;\n", + "}\n", + "\n", + ".xr-attrs,\n", + ".xr-var-attrs,\n", + ".xr-var-data,\n", + ".xr-index-data {\n", + " grid-column: 1 / -1;\n", + "}\n", + "\n", + "dl.xr-attrs {\n", + " padding: 0;\n", + " margin: 0;\n", + " display: grid;\n", + " grid-template-columns: 125px auto;\n", + "}\n", + "\n", + ".xr-attrs dt,\n", + ".xr-attrs dd {\n", + " padding: 0;\n", + " margin: 0;\n", + " float: left;\n", + " padding-right: 10px;\n", + " width: auto;\n", + "}\n", + "\n", + ".xr-attrs dt {\n", + " font-weight: normal;\n", + " grid-column: 1;\n", + "}\n", + "\n", + ".xr-attrs dt:hover span {\n", + " display: inline-block;\n", + " background: var(--xr-background-color);\n", + " padding-right: 10px;\n", + "}\n", + "\n", + ".xr-attrs dd {\n", + " grid-column: 2;\n", + " white-space: pre-wrap;\n", + " word-break: break-all;\n", + "}\n", + "\n", + ".xr-icon-database,\n", + ".xr-icon-file-text2,\n", + ".xr-no-icon {\n", + " display: inline-block;\n", + " vertical-align: middle;\n", + " width: 1em;\n", + " height: 1.5em !important;\n", + " stroke-width: 0;\n", + " stroke: currentColor;\n", + " fill: currentColor;\n", + "}\n", + "
    <xarray.Dataset>\n",
    +       "Dimensions:           (material_id: 1, case_id: 1, time_step_number: 65,\n",
    +       "                       nuclide: 215)\n",
    +       "Coordinates:\n",
    +       "  * material_id       (material_id) int64 100\n",
    +       "  * case_id           (case_id) int64 3\n",
    +       "  * time_step_number  (time_step_number) int64 1 2 3 4 5 6 ... 60 61 62 63 64 65\n",
    +       "  * element           (nuclide) object 'Al' 'Al' 'Al' 'Al' ... 'Zr' 'Zr' 'Zr'\n",
    +       "  * mass_number       (nuclide) int64 26 27 28 29 30 40 10 ... 92 93 94 95 96 97\n",
    +       "  * state             (nuclide) object '' '' '' '' '' '' ... '' '' '' '' '' ''\n",
    +       "  * nuclide           (nuclide) object MultiIndex\n",
    +       "    elapsed_time      (time_step_number) float64 0.0 6.312e+07 ... 3.2e+10\n",
    +       "    zai               (nuclide) int64 130260 130270 130280 ... 400960 400970\n",
    +       "Data variables:\n",
    +       "    *empty*\n",
    +       "Attributes:\n",
    +       "    run_name:            * Material Alloy718-Co04, fluxes 104_2_1_1\n",
    +       "    flux_name:           90-degrees bend\n",
    +       "    dose_rate_type:      Point source\n",
    +       "    dose_rate_distance:  1.0
    " ], "text/plain": [ - " material_id case_id time_step_number element mass_number state \\\n", - "0 0 0 0 Al 26 \n", - "1 0 0 0 Al 27 \n", - "2 0 0 0 Al 28 \n", - "3 0 0 0 Al 29 \n", - "4 0 0 0 Al 30 \n", - "... ... ... ... ... ... ... \n", - "13970 0 0 64 Zr 93 \n", - "13971 0 0 64 Zr 94 \n", - "13972 0 0 64 Zr 95 \n", - "13973 0 0 64 Zr 96 \n", - "13974 0 0 64 Zr 97 \n", - "\n", - " nuclide_atoms nuclide_grams nuclide_activity nuclide_alpha_activity \\\n", - "0 0.000000e+00 0.000000e+00 0.000000e+00 0.0 \n", - "1 1.785556e+20 8.000000e-03 0.000000e+00 0.0 \n", - "2 0.000000e+00 0.000000e+00 0.000000e+00 0.0 \n", - "3 0.000000e+00 0.000000e+00 0.000000e+00 0.0 \n", - "4 0.000000e+00 0.000000e+00 0.000000e+00 0.0 \n", - "... ... ... ... ... \n", - "13970 6.327286e+13 9.761411e-09 9.083574e-01 0.0 \n", - "13971 7.058445e+11 1.100659e-10 2.583916e-12 0.0 \n", - "13972 0.000000e+00 0.000000e+00 0.000000e+00 0.0 \n", - "13973 1.091942e+10 1.739020e-12 6.149716e-18 0.0 \n", - "13974 0.000000e+00 0.000000e+00 0.000000e+00 0.0 \n", - "\n", - " ... nuclide_gamma_activity nuclide_heat nuclide_alpha_heat \\\n", - "0 ... 0.0 0.000000e+00 0.0 \n", - "1 ... 0.0 0.000000e+00 0.0 \n", - "2 ... 0.0 0.000000e+00 0.0 \n", - "3 ... 0.0 0.000000e+00 0.0 \n", - "4 ... 0.0 0.000000e+00 0.0 \n", - "... ... ... ... ... \n", - "13970 ... 0.0 2.791257e-18 0.0 \n", - "13971 ... 0.0 4.734377e-28 0.0 \n", - "13972 ... 0.0 0.000000e+00 0.0 \n", - "13973 ... 0.0 3.301027e-33 0.0 \n", - "13974 ... 0.0 0.000000e+00 0.0 \n", - "\n", - " nuclide_beta_heat nuclide_gamma_heat nuclide_dose nuclide_ingestion \\\n", - "0 0.000000e+00 0.0 0.0 0.000000e+00 \n", - "1 0.000000e+00 0.0 0.0 0.000000e+00 \n", - "2 0.000000e+00 0.0 0.0 0.000000e+00 \n", - "3 0.000000e+00 0.0 0.0 0.000000e+00 \n", - "4 0.000000e+00 0.0 0.0 0.000000e+00 \n", - "... ... ... ... ... \n", - "13970 2.791257e-18 0.0 0.0 9.991931e-10 \n", - "13971 4.734377e-28 0.0 0.0 2.480559e-20 \n", - "13972 0.000000e+00 0.0 0.0 0.000000e+00 \n", - "13973 3.301027e-33 0.0 0.0 1.721921e-25 \n", - "13974 0.000000e+00 0.0 0.0 0.000000e+00 \n", - "\n", - " nuclide_inhalation elapsed_time zai \n", - "0 0.000000e+00 0.000000e+00 130260 \n", - "1 0.000000e+00 0.000000e+00 130270 \n", - "2 0.000000e+00 0.000000e+00 130280 \n", - "3 0.000000e+00 0.000000e+00 130290 \n", - "4 0.000000e+00 0.000000e+00 130300 \n", - "... ... ... ... \n", - "13970 2.270893e-08 3.199940e+10 400930 \n", - "13971 2.842307e-20 3.199940e+10 400940 \n", - "13972 0.000000e+00 3.199940e+10 400950 \n", - "13973 1.906412e-25 3.199940e+10 400960 \n", - "13974 0.000000e+00 3.199940e+10 400970 \n", - "\n", - "[13975 rows x 21 columns]" + "\n", + "Dimensions: (material_id: 1, case_id: 1, time_step_number: 65,\n", + " nuclide: 215)\n", + "Coordinates:\n", + " * material_id (material_id) int64 100\n", + " * case_id (case_id) int64 3\n", + " * time_step_number (time_step_number) int64 1 2 3 4 5 6 ... 60 61 62 63 64 65\n", + " * element (nuclide) object 'Al' 'Al' 'Al' 'Al' ... 'Zr' 'Zr' 'Zr'\n", + " * mass_number (nuclide) int64 26 27 28 29 30 40 10 ... 92 93 94 95 96 97\n", + " * state (nuclide) object '' '' '' '' '' '' ... '' '' '' '' '' ''\n", + " * nuclide (nuclide) object MultiIndex\n", + " elapsed_time (time_step_number) float64 0.0 6.312e+07 ... 3.2e+10\n", + " zai (nuclide) int64 130260 130270 130280 ... 400960 400970\n", + "Data variables:\n", + " *empty*\n", + "Attributes:\n", + " run_name: * Material Alloy718-Co04, fluxes 104_2_1_1\n", + " flux_name: 90-degrees bend\n", + " dose_rate_type: Point source\n", + " dose_rate_distance: 1.0" ] }, - "execution_count": 508, + "execution_count": 559, "metadata": {}, "output_type": "execute_result" } @@ -4319,28 +4430,23 @@ " \"nuclide_ingestion\",\n", " \"nuclide_inhalation\",\n", "]\n", - "# tn = ds[columns].to_dataframe().reset_index(\n", + "# ds[columns].reset_index([\"material_id\", \"case_id\"])\n", + "\n", + "ds[columns].coords.to_dataset()\n", + "# .reset_index([\"elapsed_time\", \"zai\"])\n", + "# .reset_coords()\n", + "# .drop_indexes([\"material_id\", \"case_id\", \"time_step_number\", \"nuclide\"])\n", + "# .reset_index([\"material_id\", \"case_id\", \"time_step_number\", \"nuclide\"])\n", + "# .to_dataframe().reset_index(\n", "# [\n", "# \"material_id\", \"case_id\", \"time_step_number\",\n", "# ]\n", - "# )\n", - "# tn = tn.reset_index(\n", - "# [\"element\", \"mass_number\", \"state\"]\n", - "# )\n", - "\n", - "# .reset_index()\n", - "# .reset_index(\"time_step_number\")[columns].fillna(0.0)\n", - "# tn.reset_index(allow_duplicates=True)\n", - "ds[columns].reset_index([\"material_id\", \"case_id\", \"time_step_number\", \"nuclide\"]).to_dataframe().reset_index(\n", - " [\n", - " \"material_id\", \"case_id\", \"time_step_number\",\n", - " ]\n", - ").reset_index(drop=True).fillna(0.0)\n" + "# ).reset_index(drop=True)[columns].fillna(0.0)\n" ] }, { "cell_type": "code", - "execution_count": 263, + "execution_count": 540, "id": "526610bb-be7b-4ce7-8cc9-0bcdb00588f2", "metadata": { "tags": [] @@ -4369,7 +4475,11 @@ " \"nuclide_ingestion\",\n", " \"nuclide_inhalation\",\n", " ]\n", - " tn = ds[columns].to_dataframe().reset_index(\"time_step_number\")[columns].fillna(0.0)\n", + " tn = ds[columns].reset_index([\"material_id\", \"case_id\", \"time_step_number\", \"nuclide\"]).to_dataframe().reset_index(\n", + " [\n", + " \"material_id\", \"case_id\", \"time_step_number\",\n", + " ]\n", + " ).reset_index(drop=True)[columns].fillna(0.0)\n", " sql = \"insert into timestep_nuclide select * from tn\"\n", " con.execute(sql)\n", " con.commit()" @@ -4377,12 +4487,25 @@ }, { "cell_type": "code", - "execution_count": 264, + "execution_count": 541, "id": "de4b9bd0-02e4-48f5-bec3-bb92c67682d0", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "ename": "ConstraintException", + "evalue": "Constraint Error: Violates foreign key constraint because key \"material_id: 0, case_id: 0, time_step_number: 0\" does not exist in the referenced table", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mConstraintException\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[541], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43msave_timestep_nucludes\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcon\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mds\u001b[49m\u001b[43m)\u001b[49m\n", + "Cell \u001b[0;32mIn[540], line 29\u001b[0m, in \u001b[0;36msave_timestep_nucludes\u001b[0;34m(con, ds)\u001b[0m\n\u001b[1;32m 23\u001b[0m tn \u001b[38;5;241m=\u001b[39m ds[columns]\u001b[38;5;241m.\u001b[39mreset_index([\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mmaterial_id\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcase_id\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtime_step_number\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mnuclide\u001b[39m\u001b[38;5;124m\"\u001b[39m])\u001b[38;5;241m.\u001b[39mto_dataframe()\u001b[38;5;241m.\u001b[39mreset_index(\n\u001b[1;32m 24\u001b[0m [\n\u001b[1;32m 25\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mmaterial_id\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcase_id\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtime_step_number\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m 26\u001b[0m ]\n\u001b[1;32m 27\u001b[0m )\u001b[38;5;241m.\u001b[39mreset_index(drop\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mTrue\u001b[39;00m)[columns]\u001b[38;5;241m.\u001b[39mfillna(\u001b[38;5;241m0.0\u001b[39m)\n\u001b[1;32m 28\u001b[0m sql \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124minsert into timestep_nuclide select * from tn\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m---> 29\u001b[0m \u001b[43mcon\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mexecute\u001b[49m\u001b[43m(\u001b[49m\u001b[43msql\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 30\u001b[0m con\u001b[38;5;241m.\u001b[39mcommit()\n", + "\u001b[0;31mConstraintException\u001b[0m: Constraint Error: Violates foreign key constraint because key \"material_id: 0, case_id: 0, time_step_number: 0\" does not exist in the referenced table" + ] + } + ], "source": [ "save_timestep_nucludes(con, ds)" ] diff --git a/notebooks/dvp/try_ducdb.py b/notebooks/dvp/try_ducdb.py index 1727c60..cb90a76 100644 --- a/notebooks/dvp/try_ducdb.py +++ b/notebooks/dvp/try_ducdb.py @@ -176,20 +176,24 @@ def create_tables(con): time_step_number uinteger not null, element varchar(2) not null, mass_number usmallint not null, + state varchar(1) not null, atoms float4 not null, grams float4 not null, activity float4 not null, alpha_activity float4 not null, + beta_activity float4 not null, gamma_activity float4 not null, heat float4 not null, alpha_heat float4 not null, beta_heat float4 not null, + gamma_heat float4 not null, dose float4 not null, ingestion float4 not null, inhalation float4 not null, + primary key(material_id, case_id, time_step_number, element, mass_number, state), foreign key(material_id, case_id, time_step_number) references timestep(material_id, case_id, time_step_number), foreign key(element, mass_number, state) references nuclide(element, mass_number, state) @@ -208,14 +212,14 @@ def create_tables(con): con.execute(sql) -# In[448]: +# In[512]: drop_tables(con) create_tables(con) -# In[449]: +# In[513]: def save_rundata(con, ds): @@ -237,19 +241,19 @@ def save_rundata(con, ds): con.commit() -# In[451]: +# In[514]: save_rundata(con, ds) -# In[452]: +# In[515]: con.execute("select * from rundata").df() -# In[455]: +# In[516]: def save_timesteps(con, ds): @@ -287,25 +291,27 @@ def save_timesteps(con, ds): con.commit() -# In[456]: +# In[517]: save_timesteps(con, ds) -# In[457]: +# In[518]: con.execute("select * from timestep").df() -# In[458]: +# In[533]: def save_nuclides(con, ds): nuclides_df = ( ds[["element", "mass_number", "state", "zai", "nuclide_half_life"]] - .to_pandas() + .reset_index(["material_id", "case_id"]) + .to_dataframe() + .reset_index(["material_id", "case_id"], drop=True) .reset_index(drop=True) ) sql = "insert or ignore into nuclide select * from nuclides_df" @@ -313,19 +319,19 @@ def save_nuclides(con, ds): con.commit() -# In[459]: +# In[534]: save_nuclides(con, ds) -# In[460]: +# In[535]: con.execute("select * from nuclide").df() -# In[508]: +# In[559]: columns = [ @@ -349,34 +355,21 @@ def save_nuclides(con, ds): "nuclide_ingestion", "nuclide_inhalation", ] -# tn = ds[columns].to_dataframe().reset_index( +# ds[columns].reset_index(["material_id", "case_id"]) + +ds[columns].coords.to_dataset() +# .reset_index(["elapsed_time", "zai"]) +# .reset_coords() +# .drop_indexes(["material_id", "case_id", "time_step_number", "nuclide"]) +# .reset_index(["material_id", "case_id", "time_step_number", "nuclide"]) +# .to_dataframe().reset_index( # [ # "material_id", "case_id", "time_step_number", # ] -# ) -# tn = tn.reset_index( -# ["element", "mass_number", "state"] -# ) - -# .reset_index() -# .reset_index("time_step_number")[columns].fillna(0.0) -# tn.reset_index(allow_duplicates=True) -ds[columns].reset_index( - ["material_id", "case_id", "time_step_number", "nuclide"] -).to_dataframe().reset_index( - [ - "material_id", - "case_id", - "time_step_number", - ] -).reset_index( - drop=True -).fillna( - 0.0 -) +# ).reset_index(drop=True)[columns].fillna(0.0) -# In[263]: +# In[540]: def save_timestep_nucludes(con, ds): @@ -401,13 +394,26 @@ def save_timestep_nucludes(con, ds): "nuclide_ingestion", "nuclide_inhalation", ] - tn = ds[columns].to_dataframe().reset_index("time_step_number")[columns].fillna(0.0) + tn = ( + ds[columns] + .reset_index(["material_id", "case_id", "time_step_number", "nuclide"]) + .to_dataframe() + .reset_index( + [ + "material_id", + "case_id", + "time_step_number", + ] + ) + .reset_index(drop=True)[columns] + .fillna(0.0) + ) sql = "insert into timestep_nuclide select * from tn" con.execute(sql) con.commit() -# In[264]: +# In[541]: save_timestep_nucludes(con, ds) From 04b665c1432dd88540ecd5ce33a07c6c45525e96 Mon Sep 17 00:00:00 2001 From: dvp Date: Fri, 24 Mar 2023 17:09:52 +0300 Subject: [PATCH 12/32] dependecies: poetry update --- poetry.lock | 96 ++++++++++++++++++++++++++--------------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/poetry.lock b/poetry.lock index a390b1e..cc0c8c0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.4.0 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.4.1 and should not be changed by hand. [[package]] name = "alabaster" @@ -543,19 +543,19 @@ testing = ["pre-commit"] [[package]] name = "filelock" -version = "3.10.0" +version = "3.10.3" description = "A platform independent file lock." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "filelock-3.10.0-py3-none-any.whl", hash = "sha256:e90b34656470756edf8b19656785c5fea73afa1953f3e1b0d645cef11cab3182"}, - {file = "filelock-3.10.0.tar.gz", hash = "sha256:3199fd0d3faea8b911be52b663dfccceb84c95949dd13179aa21436d1a79c4ce"}, + {file = "filelock-3.10.3-py3-none-any.whl", hash = "sha256:99d6282f732410d44242ca02aa49835cf5473e2dd4d6734a2a785c8889dc191e"}, + {file = "filelock-3.10.3.tar.gz", hash = "sha256:a26bfa34d26293e04886dff13fa8dd0c8c6e1a786b723c689755fe8939297410"}, ] [package.extras] docs = ["furo (>=2022.12.7)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.22,!=1.23.4)"] -testing = ["covdefaults (>=2.3)", "coverage (>=7.2.1)", "pytest (>=7.2.2)", "pytest-cov (>=4)", "pytest-timeout (>=2.1)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.2.2)", "pytest (>=7.2.2)", "pytest-cov (>=4)", "pytest-timeout (>=2.1)"] [[package]] name = "flake8" @@ -1833,48 +1833,48 @@ files = [ [[package]] name = "pydantic" -version = "1.10.6" +version = "1.10.7" description = "Data validation and settings management using python type hints" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "pydantic-1.10.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f9289065611c48147c1dd1fd344e9d57ab45f1d99b0fb26c51f1cf72cd9bcd31"}, - {file = "pydantic-1.10.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8c32b6bba301490d9bb2bf5f631907803135e8085b6aa3e5fe5a770d46dd0160"}, - {file = "pydantic-1.10.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd9b9e98068fa1068edfc9eabde70a7132017bdd4f362f8b4fd0abed79c33083"}, - {file = "pydantic-1.10.6-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1c84583b9df62522829cbc46e2b22e0ec11445625b5acd70c5681ce09c9b11c4"}, - {file = "pydantic-1.10.6-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:b41822064585fea56d0116aa431fbd5137ce69dfe837b599e310034171996084"}, - {file = "pydantic-1.10.6-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:61f1f08adfaa9cc02e0cbc94f478140385cbd52d5b3c5a657c2fceb15de8d1fb"}, - {file = "pydantic-1.10.6-cp310-cp310-win_amd64.whl", hash = "sha256:32937835e525d92c98a1512218db4eed9ddc8f4ee2a78382d77f54341972c0e7"}, - {file = "pydantic-1.10.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bbd5c531b22928e63d0cb1868dee76123456e1de2f1cb45879e9e7a3f3f1779b"}, - {file = "pydantic-1.10.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e277bd18339177daa62a294256869bbe84df1fb592be2716ec62627bb8d7c81d"}, - {file = "pydantic-1.10.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:89f15277d720aa57e173954d237628a8d304896364b9de745dcb722f584812c7"}, - {file = "pydantic-1.10.6-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b243b564cea2576725e77aeeda54e3e0229a168bc587d536cd69941e6797543d"}, - {file = "pydantic-1.10.6-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:3ce13a558b484c9ae48a6a7c184b1ba0e5588c5525482681db418268e5f86186"}, - {file = "pydantic-1.10.6-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3ac1cd4deed871dfe0c5f63721e29debf03e2deefa41b3ed5eb5f5df287c7b70"}, - {file = "pydantic-1.10.6-cp311-cp311-win_amd64.whl", hash = "sha256:b1eb6610330a1dfba9ce142ada792f26bbef1255b75f538196a39e9e90388bf4"}, - {file = "pydantic-1.10.6-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:4ca83739c1263a044ec8b79df4eefc34bbac87191f0a513d00dd47d46e307a65"}, - {file = "pydantic-1.10.6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ea4e2a7cb409951988e79a469f609bba998a576e6d7b9791ae5d1e0619e1c0f2"}, - {file = "pydantic-1.10.6-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:53de12b4608290992a943801d7756f18a37b7aee284b9ffa794ee8ea8153f8e2"}, - {file = "pydantic-1.10.6-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:60184e80aac3b56933c71c48d6181e630b0fbc61ae455a63322a66a23c14731a"}, - {file = "pydantic-1.10.6-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:415a3f719ce518e95a92effc7ee30118a25c3d032455d13e121e3840985f2efd"}, - {file = "pydantic-1.10.6-cp37-cp37m-win_amd64.whl", hash = "sha256:72cb30894a34d3a7ab6d959b45a70abac8a2a93b6480fc5a7bfbd9c935bdc4fb"}, - {file = "pydantic-1.10.6-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:3091d2eaeda25391405e36c2fc2ed102b48bac4b384d42b2267310abae350ca6"}, - {file = "pydantic-1.10.6-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:751f008cd2afe812a781fd6aa2fb66c620ca2e1a13b6a2152b1ad51553cb4b77"}, - {file = "pydantic-1.10.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:12e837fd320dd30bd625be1b101e3b62edc096a49835392dcf418f1a5ac2b832"}, - {file = "pydantic-1.10.6-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:587d92831d0115874d766b1f5fddcdde0c5b6c60f8c6111a394078ec227fca6d"}, - {file = "pydantic-1.10.6-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:476f6674303ae7965730a382a8e8d7fae18b8004b7b69a56c3d8fa93968aa21c"}, - {file = "pydantic-1.10.6-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:3a2be0a0f32c83265fd71a45027201e1278beaa82ea88ea5b345eea6afa9ac7f"}, - {file = "pydantic-1.10.6-cp38-cp38-win_amd64.whl", hash = "sha256:0abd9c60eee6201b853b6c4be104edfba4f8f6c5f3623f8e1dba90634d63eb35"}, - {file = "pydantic-1.10.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6195ca908045054dd2d57eb9c39a5fe86409968b8040de8c2240186da0769da7"}, - {file = "pydantic-1.10.6-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:43cdeca8d30de9a897440e3fb8866f827c4c31f6c73838e3a01a14b03b067b1d"}, - {file = "pydantic-1.10.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c19eb5163167489cb1e0161ae9220dadd4fc609a42649e7e84a8fa8fff7a80f"}, - {file = "pydantic-1.10.6-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:012c99a9c0d18cfde7469aa1ebff922e24b0c706d03ead96940f5465f2c9cf62"}, - {file = "pydantic-1.10.6-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:528dcf7ec49fb5a84bf6fe346c1cc3c55b0e7603c2123881996ca3ad79db5bfc"}, - {file = "pydantic-1.10.6-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:163e79386c3547c49366e959d01e37fc30252285a70619ffc1b10ede4758250a"}, - {file = "pydantic-1.10.6-cp39-cp39-win_amd64.whl", hash = "sha256:189318051c3d57821f7233ecc94708767dd67687a614a4e8f92b4a020d4ffd06"}, - {file = "pydantic-1.10.6-py3-none-any.whl", hash = "sha256:acc6783751ac9c9bc4680379edd6d286468a1dc8d7d9906cd6f1186ed682b2b0"}, - {file = "pydantic-1.10.6.tar.gz", hash = "sha256:cf95adb0d1671fc38d8c43dd921ad5814a735e7d9b4d9e437c088002863854fd"}, + {file = "pydantic-1.10.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e79e999e539872e903767c417c897e729e015872040e56b96e67968c3b918b2d"}, + {file = "pydantic-1.10.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:01aea3a42c13f2602b7ecbbea484a98169fb568ebd9e247593ea05f01b884b2e"}, + {file = "pydantic-1.10.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:516f1ed9bc2406a0467dd777afc636c7091d71f214d5e413d64fef45174cfc7a"}, + {file = "pydantic-1.10.7-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ae150a63564929c675d7f2303008d88426a0add46efd76c3fc797cd71cb1b46f"}, + {file = "pydantic-1.10.7-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:ecbbc51391248116c0a055899e6c3e7ffbb11fb5e2a4cd6f2d0b93272118a209"}, + {file = "pydantic-1.10.7-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:f4a2b50e2b03d5776e7f21af73e2070e1b5c0d0df255a827e7c632962f8315af"}, + {file = "pydantic-1.10.7-cp310-cp310-win_amd64.whl", hash = "sha256:a7cd2251439988b413cb0a985c4ed82b6c6aac382dbaff53ae03c4b23a70e80a"}, + {file = "pydantic-1.10.7-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:68792151e174a4aa9e9fc1b4e653e65a354a2fa0fed169f7b3d09902ad2cb6f1"}, + {file = "pydantic-1.10.7-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:dfe2507b8ef209da71b6fb5f4e597b50c5a34b78d7e857c4f8f3115effaef5fe"}, + {file = "pydantic-1.10.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10a86d8c8db68086f1e30a530f7d5f83eb0685e632e411dbbcf2d5c0150e8dcd"}, + {file = "pydantic-1.10.7-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d75ae19d2a3dbb146b6f324031c24f8a3f52ff5d6a9f22f0683694b3afcb16fb"}, + {file = "pydantic-1.10.7-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:464855a7ff7f2cc2cf537ecc421291b9132aa9c79aef44e917ad711b4a93163b"}, + {file = "pydantic-1.10.7-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:193924c563fae6ddcb71d3f06fa153866423ac1b793a47936656e806b64e24ca"}, + {file = "pydantic-1.10.7-cp311-cp311-win_amd64.whl", hash = "sha256:b4a849d10f211389502059c33332e91327bc154acc1845f375a99eca3afa802d"}, + {file = "pydantic-1.10.7-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:cc1dde4e50a5fc1336ee0581c1612215bc64ed6d28d2c7c6f25d2fe3e7c3e918"}, + {file = "pydantic-1.10.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e0cfe895a504c060e5d36b287ee696e2fdad02d89e0d895f83037245218a87fe"}, + {file = "pydantic-1.10.7-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:670bb4683ad1e48b0ecb06f0cfe2178dcf74ff27921cdf1606e527d2617a81ee"}, + {file = "pydantic-1.10.7-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:950ce33857841f9a337ce07ddf46bc84e1c4946d2a3bba18f8280297157a3fd1"}, + {file = "pydantic-1.10.7-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:c15582f9055fbc1bfe50266a19771bbbef33dd28c45e78afbe1996fd70966c2a"}, + {file = "pydantic-1.10.7-cp37-cp37m-win_amd64.whl", hash = "sha256:82dffb306dd20bd5268fd6379bc4bfe75242a9c2b79fec58e1041fbbdb1f7914"}, + {file = "pydantic-1.10.7-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8c7f51861d73e8b9ddcb9916ae7ac39fb52761d9ea0df41128e81e2ba42886cd"}, + {file = "pydantic-1.10.7-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6434b49c0b03a51021ade5c4daa7d70c98f7a79e95b551201fff682fc1661245"}, + {file = "pydantic-1.10.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:64d34ab766fa056df49013bb6e79921a0265204c071984e75a09cbceacbbdd5d"}, + {file = "pydantic-1.10.7-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:701daea9ffe9d26f97b52f1d157e0d4121644f0fcf80b443248434958fd03dc3"}, + {file = "pydantic-1.10.7-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:cf135c46099ff3f919d2150a948ce94b9ce545598ef2c6c7bf55dca98a304b52"}, + {file = "pydantic-1.10.7-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b0f85904f73161817b80781cc150f8b906d521fa11e3cdabae19a581c3606209"}, + {file = "pydantic-1.10.7-cp38-cp38-win_amd64.whl", hash = "sha256:9f6f0fd68d73257ad6685419478c5aece46432f4bdd8d32c7345f1986496171e"}, + {file = "pydantic-1.10.7-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c230c0d8a322276d6e7b88c3f7ce885f9ed16e0910354510e0bae84d54991143"}, + {file = "pydantic-1.10.7-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:976cae77ba6a49d80f461fd8bba183ff7ba79f44aa5cfa82f1346b5626542f8e"}, + {file = "pydantic-1.10.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7d45fc99d64af9aaf7e308054a0067fdcd87ffe974f2442312372dfa66e1001d"}, + {file = "pydantic-1.10.7-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d2a5ebb48958754d386195fe9e9c5106f11275867051bf017a8059410e9abf1f"}, + {file = "pydantic-1.10.7-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:abfb7d4a7cd5cc4e1d1887c43503a7c5dd608eadf8bc615413fc498d3e4645cd"}, + {file = "pydantic-1.10.7-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:80b1fab4deb08a8292d15e43a6edccdffa5377a36a4597bb545b93e79c5ff0a5"}, + {file = "pydantic-1.10.7-cp39-cp39-win_amd64.whl", hash = "sha256:d71e69699498b020ea198468e2480a2f1e7433e32a3a99760058c6520e2bea7e"}, + {file = "pydantic-1.10.7-py3-none-any.whl", hash = "sha256:0cd181f1d0b1d00e2b705f1bf1ac7799a2d938cce3376b8007df62b29be3c2c6"}, + {file = "pydantic-1.10.7.tar.gz", hash = "sha256:cfc83c0678b6ba51b0532bea66860617c4cd4251ecf76e9846fa5a9f3454e97e"}, ] [package.dependencies] @@ -1946,14 +1946,14 @@ plugins = ["importlib-metadata"] [[package]] name = "pylint" -version = "2.17.0" +version = "2.17.1" description = "python code static checker" category = "dev" optional = false python-versions = ">=3.7.2" files = [ - {file = "pylint-2.17.0-py3-none-any.whl", hash = "sha256:e097d8325f8c88e14ad12844e3fe2d963d3de871ea9a8f8ad25ab1c109889ddc"}, - {file = "pylint-2.17.0.tar.gz", hash = "sha256:1460829b6397cb5eb0cdb0b4fc4b556348e515cdca32115f74a1eb7c20b896b4"}, + {file = "pylint-2.17.1-py3-none-any.whl", hash = "sha256:8660a54e3f696243d644fca98f79013a959c03f979992c1ab59c24d3f4ec2700"}, + {file = "pylint-2.17.1.tar.gz", hash = "sha256:d4d009b0116e16845533bc2163493d6681846ac725eab8ca8014afb520178ddd"}, ] [package.dependencies] @@ -2695,14 +2695,14 @@ toml = ">=0.10.2" [[package]] name = "typeguard" -version = "3.0.1" +version = "3.0.2" description = "Run-time type checker for Python" category = "dev" optional = false python-versions = ">=3.7.4" files = [ - {file = "typeguard-3.0.1-py3-none-any.whl", hash = "sha256:15628045c830abf68533247afd2cb04683b5ce6f4e30d5401a5ef6f5182280de"}, - {file = "typeguard-3.0.1.tar.gz", hash = "sha256:beb0e67c5dc76eea4a6d00a6606d444d899589908362960769d0c4a1d32bca70"}, + {file = "typeguard-3.0.2-py3-none-any.whl", hash = "sha256:bbe993854385284ab42fd5bd3bee6f6556577ce8b50696d6cb956d704f286c8e"}, + {file = "typeguard-3.0.2.tar.gz", hash = "sha256:fee5297fdb28f8e9efcb8142b5ee219e02375509cd77ea9d270b5af826358d5a"}, ] [package.dependencies] From a66765c1e93b90adb0ae86340e136ba2b102309b Mon Sep 17 00:00:00 2001 From: dvp Date: Fri, 24 Mar 2023 17:12:44 +0300 Subject: [PATCH 13/32] build: sync with mckit-nuclides similar files --- .github/constraints.txt | 2 +- .github/workflows/labeler.yml | 2 +- .github/workflows/release.yml | 6 +++--- .github/workflows/tests.yml | 6 +++--- pyproject.toml | 10 +++++----- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/constraints.txt b/.github/constraints.txt index e6e9b58..7369a3e 100644 --- a/.github/constraints.txt +++ b/.github/constraints.txt @@ -1,5 +1,5 @@ pip==23.0.1 nox==2022.11.21 -poetry==1.4.0 +poetry==1.4.1 virtualenv==20.16.5 # restricted by poetry on Windows, current 20.17.1 wheel-0.38.4 diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 5e1da55..149f097 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -26,7 +26,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repository - uses: actions/checkout@v3.3.0 + uses: actions/checkout@v3.4.0 - name: Sync GitHub Issue Labels uses: crazy-max/ghaction-github-labeler@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4ccfa44..333871e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,7 +27,7 @@ jobs: steps: - name: Check out the repository - uses: actions/checkout@v3.3.0 + uses: actions/checkout@v3.4.0 with: fetch-depth: 2 # need previous revision to define tag @@ -71,14 +71,14 @@ jobs: - name: Publish package on PyPI if: steps.check-version.outputs.tag - uses: pypa/gh-action-pypi-publish@v1.7.1 + uses: pypa/gh-action-pypi-publish@v1.8.1 with: user: __token__ password: ${{ secrets.PYPI_TOKEN }} - name: Publish package on TestPyPI if: "! steps.check-version.outputs.tag" - uses: pypa/gh-action-pypi-publish@v1.7.1 + uses: pypa/gh-action-pypi-publish@v1.8.1 with: user: __token__ password: ${{ secrets.TEST_PYPI_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d3e54cc..e0155c7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,7 +36,7 @@ jobs: !contains(github.event.head_commit.message, '[skip_ci]') steps: - name: Check out the repository - uses: actions/checkout@v3.3.0 + uses: actions/checkout@v3.4.0 - name: Set up Python 3.10 # on 3.11 pip install in unstable: "canonicalize" fails occasionally uses: actions/setup-python@v4.5.0 @@ -137,7 +137,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3.3.0 + uses: actions/checkout@v3.4.0 with: fetch-depth: 1 @@ -187,7 +187,7 @@ jobs: steps: - name: Check out the repository - uses: actions/checkout@v3.3.0 + uses: actions/checkout@v3.4.0 - name: Set up Python 3.11 uses: actions/setup-python@v4.5.0 diff --git a/pyproject.toml b/pyproject.toml index 4f8e26f..2fc1038 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ classifiers = [ ] [build-system] -requires = ["poetry-core >= 1.1.0"] +requires = ["poetry-core >= 1.5.2"] build-backend = "poetry.core.masonry.api" # [tool.poetry.scripts] @@ -43,7 +43,7 @@ Changelog = "https://github.com/MC-kit/xpypact/releases" [tool.poetry.dependencies] -python = ">=3.8,<4.0" +python = ">=3.8.1,<4.0" h5netcdf = ">=0.13.1" mckit-nuclides = {version = ">=0.1.1", allow-prereleases = true} numpy = ">=1.24.2" @@ -105,13 +105,13 @@ numpy = ">=1.23.2" [tool.poetry.group.flake8.dependencies] darglint = ">=1.8.1" -flake8 = ">=4.0.1" #TODO dvp: update with flake8-eradicate +flake8 = ">=6.0.0" #flake8 = ">=6.0.0" flake8-adjustable-complexity = ">=0.0.6" flake8-annotations = ">=2.6.2" flake8-annotations-coverage = ">=0.0.6" flake8-bandit = ">=4.1.1" -flake8-bugbear = ">=22.3.23" +flake8-bugbear = ">=23.3.23" flake8-builtins = ">=1.5.3" flake8-class-attributes-order = ">=0.1.3" flake8-cognitive-complexity = ">=0.1.0" @@ -119,7 +119,7 @@ flake8-colors = ">=0.1.9" flake8-commas = ">=2.1.0" flake8-comprehensions = ">=3.10.0" flake8-docstrings = ">=1.6.0" -flake8-eradicate = ">=1.4.0" +# flake8-eradicate = ">=1.4.0" #TODO dvp: return with flake8-eradicate update flake8-expression-complexity = ">=0.0.11" flake8-functions = ">=0.0.7" flake8-import-order = ">=0.18.1" From 037815ef803b65eb0d0d230bf2a1c18cf0049d83 Mon Sep 17 00:00:00 2001 From: dvp Date: Mon, 27 Mar 2023 07:49:08 +0300 Subject: [PATCH 14/32] dependencies: poetry update (dev only) --- poetry.lock | 229 +++++++++++++++++++++++++++------------------------- 1 file changed, 117 insertions(+), 112 deletions(-) diff --git a/poetry.lock b/poetry.lock index 3d38306..f2a1666 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.4.0 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.4.1 and should not be changed by hand. [[package]] name = "alabaster" @@ -54,14 +54,14 @@ files = [ [[package]] name = "astroid" -version = "2.15.0" +version = "2.15.1" description = "An abstract syntax tree for Python with inference support." category = "dev" optional = false python-versions = ">=3.7.2" files = [ - {file = "astroid-2.15.0-py3-none-any.whl", hash = "sha256:e3e4d0ffc2d15d954065579689c36aac57a339a4679a679579af6401db4d3fdb"}, - {file = "astroid-2.15.0.tar.gz", hash = "sha256:525f126d5dc1b8b0b6ee398b33159105615d92dc4a17f2cd064125d57f6186fa"}, + {file = "astroid-2.15.1-py3-none-any.whl", hash = "sha256:89860bda98fe2bbd1f5d262229be7629d778ce280de68d95d4a73d1f592ad268"}, + {file = "astroid-2.15.1.tar.gz", hash = "sha256:af4e0aff46e2868218502789898269ed95b663fba49e65d91c1e09c966266c34"}, ] [package.dependencies] @@ -543,19 +543,19 @@ testing = ["pre-commit"] [[package]] name = "filelock" -version = "3.10.0" +version = "3.10.6" description = "A platform independent file lock." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "filelock-3.10.0-py3-none-any.whl", hash = "sha256:e90b34656470756edf8b19656785c5fea73afa1953f3e1b0d645cef11cab3182"}, - {file = "filelock-3.10.0.tar.gz", hash = "sha256:3199fd0d3faea8b911be52b663dfccceb84c95949dd13179aa21436d1a79c4ce"}, + {file = "filelock-3.10.6-py3-none-any.whl", hash = "sha256:52f119747b2b9c4730dac715a7b1ab34b8ee70fd9259cba158ee53da566387ff"}, + {file = "filelock-3.10.6.tar.gz", hash = "sha256:409105becd604d6b176a483f855e7e8903c5cb2873e47f2c64f66a370c046aaf"}, ] [package.extras] docs = ["furo (>=2022.12.7)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.22,!=1.23.4)"] -testing = ["covdefaults (>=2.3)", "coverage (>=7.2.1)", "pytest (>=7.2.2)", "pytest-cov (>=4)", "pytest-timeout (>=2.1)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.2.2)", "diff-cover (>=7.5)", "pytest (>=7.2.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)", "pytest-timeout (>=2.1)"] [[package]] name = "flake8" @@ -736,14 +736,14 @@ flake8 = ">=2" [[package]] name = "flake8-comprehensions" -version = "3.11.0" +version = "3.11.1" description = "A flake8 plugin to help you write better list/set/dict comprehensions." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "flake8_comprehensions-3.11.0-py3-none-any.whl", hash = "sha256:820b6463d4964249b7380432f3aac2f26d4a86c7d52cbe9d53dfd9e1caf01b33"}, - {file = "flake8_comprehensions-3.11.0.tar.gz", hash = "sha256:d06a95fdf2dabf6a7632550fed4a10d0449d00473875b1e4b167ca84d4daee59"}, + {file = "flake8_comprehensions-3.11.1-py3-none-any.whl", hash = "sha256:d1e27f4099900c61fb156cbb7461e0e49702385fd388326e1a892d04b069c48e"}, + {file = "flake8_comprehensions-3.11.1.tar.gz", hash = "sha256:31d6386c125e325d7c84290d71f5354295dbbf5a8d47259708fa349aa0969523"}, ] [package.dependencies] @@ -1054,14 +1054,14 @@ numpy = ">=1.14.5" [[package]] name = "identify" -version = "2.5.21" +version = "2.5.22" description = "File identification library for Python" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "identify-2.5.21-py2.py3-none-any.whl", hash = "sha256:69edcaffa8e91ae0f77d397af60f148b6b45a8044b2cc6d99cafa5b04793ff00"}, - {file = "identify-2.5.21.tar.gz", hash = "sha256:7671a05ef9cfaf8ff63b15d45a91a1147a03aaccb2976d4e9bd047cbbc508471"}, + {file = "identify-2.5.22-py2.py3-none-any.whl", hash = "sha256:f0faad595a4687053669c112004178149f6c326db71ee999ae4636685753ad2f"}, + {file = "identify-2.5.22.tar.gz", hash = "sha256:f7a93d6cf98e29bd07663c60728e7a4057615068d7a639d132dc883b2d54d31e"}, ] [package.extras] @@ -1561,56 +1561,61 @@ et-xmlfile = "*" [[package]] name = "orjson" -version = "3.8.7" +version = "3.8.8" description = "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "orjson-3.8.7-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:f98c82850b7b4b7e27785ca43706fa86c893cdb88d54576bbb9b0d9c1070e421"}, - {file = "orjson-3.8.7-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:1dee503c6c1a0659c5b46f5f39d9ca9d3657b11ca8bb4af8506086df416887d9"}, - {file = "orjson-3.8.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cc4fa83831f42ce5c938f8cefc2e175fa1df6f661fdeaba3badf26d2b8cfcf73"}, - {file = "orjson-3.8.7-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9e432c6c9c8b97ad825276d5795286f7cc9689f377a97e3b7ecf14918413303f"}, - {file = "orjson-3.8.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ee519964a5a0efb9633f38b1129fd242807c5c57162844efeeaab1c8de080051"}, - {file = "orjson-3.8.7-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:109b539ce5bf60a121454d008fa67c3b67e5a3249e47d277012645922cf74bd0"}, - {file = "orjson-3.8.7-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:ad4d441fbde4133af6fee37f67dbf23181b9c537ecc317346ec8c3b4c8ec7705"}, - {file = "orjson-3.8.7-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:89dc786419e1ce2588345f58dd6a434e6728bce66b94989644234bcdbe39b603"}, - {file = "orjson-3.8.7-cp310-none-win_amd64.whl", hash = "sha256:697abde7350fb8076d44bcb6b4ab3ce415ae2b5a9bb91efc460e5ab0d96bb5d3"}, - {file = "orjson-3.8.7-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:1c19f47b35b9966a3abadf341b18ee4a860431bf2b00fd8d58906d51cf78aa70"}, - {file = "orjson-3.8.7-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:3ffaabb380cd0ee187b4fc362516df6bf739808130b1339445c7d8878fca36e7"}, - {file = "orjson-3.8.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d88837002c5a8af970745b8e0ca1b0fdb06aafbe7f1279e110d338ea19f3d23"}, - {file = "orjson-3.8.7-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ff60187d1b7e0bfab376b6002b08c560b7de06c87cf3a8ac639ecf58f84c5f3b"}, - {file = "orjson-3.8.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0110970aed35dec293f30ed1e09f8604afd5d15c5ef83de7f6c427619b3ba47b"}, - {file = "orjson-3.8.7-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:51b275475d4e36118b65ad56f9764056a09d985c5d72e64579bf8816f1356a5e"}, - {file = "orjson-3.8.7-cp311-none-win_amd64.whl", hash = "sha256:63144d27735f3b60f079f247ac9a289d80dfe49a7f03880dfa0c0ba64d6491d5"}, - {file = "orjson-3.8.7-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:a16273d77db746bb1789a2bbfded81148a60743fd6f9d5185e02d92e3732fa18"}, - {file = "orjson-3.8.7-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:5bb32259ea22cc9dd47a6fdc4b8f9f1e2f798fcf56c7c1122a7df0f4c5d33bf3"}, - {file = "orjson-3.8.7-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ad02e9102d4ba67db30a136e631e32aeebd1dce26c9f5942a457b02df131c5d0"}, - {file = "orjson-3.8.7-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:dbcfcec2b7ac52deb7be3685b551addc28ee8fa454ef41f8b714df6ba0e32a27"}, - {file = "orjson-3.8.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e1a0e5504a5fc86083cc210c6946e8d61e13fe9f1d7a7bf81b42f7050a49d4fb"}, - {file = "orjson-3.8.7-cp37-cp37m-manylinux_2_28_x86_64.whl", hash = "sha256:7bd4fd37adb03b1f2a1012d43c9f95973a02164e131dfe3ff804d7e180af5653"}, - {file = "orjson-3.8.7-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:188ed9f9a781333ad802af54c55d5a48991e292239aef41bd663b6e314377eb8"}, - {file = "orjson-3.8.7-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:cc52f58c688cb10afd810280e450f56fbcb27f52c053463e625c8335c95db0dc"}, - {file = "orjson-3.8.7-cp37-none-win_amd64.whl", hash = "sha256:403c8c84ac8a02c40613b0493b74d5256379e65196d39399edbf2ed3169cbeb5"}, - {file = "orjson-3.8.7-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:7d6ac5f8a2a17095cd927c4d52abbb38af45918e0d3abd60fb50cfd49d71ae24"}, - {file = "orjson-3.8.7-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:0295a7bfd713fa89231fd0822c995c31fc2343c59a1d13aa1b8b6651335654f5"}, - {file = "orjson-3.8.7-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:feb32aaaa34cf2f891eb793ad320d4bb6731328496ae59b6c9eb1b620c42b529"}, - {file = "orjson-3.8.7-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7a3ab1a473894e609b6f1d763838c6689ba2b97620c256a32c4d9f10595ac179"}, - {file = "orjson-3.8.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2e8c430d82b532c5ab95634e034bbf6ca7432ffe175a3e63eadd493e00b3a555"}, - {file = "orjson-3.8.7-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:366cc75f7e09106f9dac95a675aef413367b284f25507d21e55bd7f45f445e80"}, - {file = "orjson-3.8.7-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:84d154d07e8b17d97e990d5d710b719a031738eb1687d8a05b9089f0564ff3e0"}, - {file = "orjson-3.8.7-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:06180014afcfdc167ca984b312218aa62ce20093965c437c5f9166764cb65ef7"}, - {file = "orjson-3.8.7-cp38-none-win_amd64.whl", hash = "sha256:41244431ba13f2e6ef22b52c5cf0202d17954489f4a3c0505bd28d0e805c3546"}, - {file = "orjson-3.8.7-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:b20f29fa8371b8023f1791df035a2c3ccbd98baa429ac3114fc104768f7db6f8"}, - {file = "orjson-3.8.7-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:226bfc1da2f21ee74918cee2873ea9a0fec1a8830e533cb287d192d593e99d02"}, - {file = "orjson-3.8.7-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e75c11023ac29e29fd3e75038d0e8dd93f9ea24d7b9a5e871967a8921a88df24"}, - {file = "orjson-3.8.7-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:78604d3acfd7cd502f6381eea0c42281fe2b74755b334074ab3ebc0224100be1"}, - {file = "orjson-3.8.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e7129a6847f0494aa1427167486ef6aea2e835ba05f6c627df522692ee228f65"}, - {file = "orjson-3.8.7-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:1a1a8f4980059f48483782c608145b0f74538c266e01c183d9bcd9f8b71dbada"}, - {file = "orjson-3.8.7-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d60304172a33705ce4bd25a6261ab84bed2dab0b3d3b79672ea16c7648af4832"}, - {file = "orjson-3.8.7-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:4f733062d84389c32c0492e5a4929056fac217034a94523debe0430bcc602cda"}, - {file = "orjson-3.8.7-cp39-none-win_amd64.whl", hash = "sha256:010e2970ec9e826c332819e0da4b14b29b19641da0f1a6af4cec91629ef9b988"}, - {file = "orjson-3.8.7.tar.gz", hash = "sha256:8460c8810652dba59c38c80d27c325b5092d189308d8d4f3e688dbd8d4f3b2dc"}, + {file = "orjson-3.8.8-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:18fcdea75d8b571dc9b185652b81397b62878ae7934fd62e6a0103a5b8448e34"}, + {file = "orjson-3.8.8-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:306618884929b596e2e083f82b5617da812df25b0c467542371f1d51f0c5a6f5"}, + {file = "orjson-3.8.8-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:edc65ddb6ae6f8fbb2bbf78ac98f75b729c9eeb0776d5508dd76d3a948dda1dd"}, + {file = "orjson-3.8.8-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e6a6d55e01bce74516dff15302627a13b1f4edcb1c3942dd660978dee423ccf2"}, + {file = "orjson-3.8.8-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:28075c4b502d792fb6703e983d456b2a30d5d6f332d26092eb312dc782e64c64"}, + {file = "orjson-3.8.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9eda4c37e48ff549763183a1549c10eec6ea40439520b17d09359cd74a425069"}, + {file = "orjson-3.8.8-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:a3eac485a15493164867729f44e1e1247b3094ff19d37708e8cdc9c88a93c623"}, + {file = "orjson-3.8.8-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:88bf40e5468444c04374d1b8f1877cebbaef6bb7406cb6b4a34a570c5cbb87bc"}, + {file = "orjson-3.8.8-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:747bd4e09d8aa61e1ff677a7dd1cffd28a5d13c22f3769123c58ec988bf1b83d"}, + {file = "orjson-3.8.8-cp310-none-win_amd64.whl", hash = "sha256:dd7d86c5f5f820ac9d4783477e86eb984b63bdb32359935609eb33cf65049c54"}, + {file = "orjson-3.8.8-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:52293a6097750c2d434737966fe6e2a1ed489ac70cc8e584f5944af83de0b787"}, + {file = "orjson-3.8.8-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:9322450f392dceb49810d2f820b1932af22d66f67f1d45c31f160067dd06359f"}, + {file = "orjson-3.8.8-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:68d59e3ae84a9b6f14b45a89f7fde4a08a87ea5eb76bfc854b354640de8156f5"}, + {file = "orjson-3.8.8-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:022347dad2253081eaa25366834bb8b06a5aceb0e83b39c6b0aa865759e49d69"}, + {file = "orjson-3.8.8-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ddfcc54793e266056fe1c257d0804c336bca1c5c1ee7979d674e1fc19cfb0a6a"}, + {file = "orjson-3.8.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:449d8ed1e0e6b24e9df5a06b59fd66ea7f7293e141257069601ae8ff9fad705c"}, + {file = "orjson-3.8.8-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:0204bc414bc6f7a595211569840b422d96649fd8686efa1fbbcb12eed5dd9521"}, + {file = "orjson-3.8.8-cp311-none-win_amd64.whl", hash = "sha256:e991a5c2c5f2f299c77e1d07ef2812ff5b68e1d97a2aab01aca29cf756473aa3"}, + {file = "orjson-3.8.8-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:2006d9c046bbf335c951f61e016a27bd4f17323dd116f601e4a8a11739cd0a62"}, + {file = "orjson-3.8.8-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:4553d85bad4cbd634a40b7b5d36daaa197a6025f9ce3e2165b371e528759093d"}, + {file = "orjson-3.8.8-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:57ee45d2cc6c11c50afb5a0c09d7cd559aea76c77250dbe996be6a03464d4a50"}, + {file = "orjson-3.8.8-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:02f5b5db1e424706eb9f70f1c25699ff4cef16fadfc64af5b70f8628eafe4771"}, + {file = "orjson-3.8.8-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4d7c9f3b1598a1ccd806ef02257a76a00c7ede09662ddb54eec2b4bd92874254"}, + {file = "orjson-3.8.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b90d171932b6a9d50e79fa2762cb303e3556bbf25c08bb316fe346ec58af9c19"}, + {file = "orjson-3.8.8-cp37-cp37m-manylinux_2_28_x86_64.whl", hash = "sha256:28dfe774c345130f1117c4d023644ec52d9d50e3eaadb9bd1c668d91dc109bb5"}, + {file = "orjson-3.8.8-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:8f84116fcc3714e7ba3cbeb1b11ac5e4549e7d2726c50142f8299fff9dea7d53"}, + {file = "orjson-3.8.8-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:f989f8580db86166aaaa938ccd1597ba1817e3f5df14c047baafe783e3d24173"}, + {file = "orjson-3.8.8-cp37-none-win_amd64.whl", hash = "sha256:66045850f286090800a18662d81d44f88c3fcb60ea3a9947d5caeab5d1efc92e"}, + {file = "orjson-3.8.8-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:2c2c5f3d3bbd61dba646e2b9c54a0dd7941b03fba49726bd31c1c23fedf0b9aa"}, + {file = "orjson-3.8.8-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:9cb36d4a14f3a911369219d5abc19b907bc41ed2730f7bfe0847b0fd3e834c87"}, + {file = "orjson-3.8.8-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:343124f84da0a33c83ee106a98b3e3c42767c88323d4a2809683cbe83816e8be"}, + {file = "orjson-3.8.8-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:24ad122d8dd057acf2a9965a2ffc1bc12fb310ae1cfe2912db930cbb9ef7eaba"}, + {file = "orjson-3.8.8-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c2f28a92a9bcb4e8635524b20db1b539bda8613872f306b36cdfd9d3577d03ac"}, + {file = "orjson-3.8.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:81d3c5b253eebfc4a61cea1f255a576cb2b889afa99f4510f30ec13201d4f457"}, + {file = "orjson-3.8.8-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:317164f7d4c0540a6eb8b0a0faeec84ef011d359da05188423db762b65f84e1d"}, + {file = "orjson-3.8.8-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:5e7e39357371d4ae5649f33c01886508a4c8e5fa5c7344554af041dc0f004c01"}, + {file = "orjson-3.8.8-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:60fefd4bbd796b4296f478e705fe2c2c7defd28da98d3017743eb87c3238a380"}, + {file = "orjson-3.8.8-cp38-none-win_amd64.whl", hash = "sha256:0dc4a52f1087baeec6b58248fd6b01f17c124fb99f6f770596851ea434a7be0b"}, + {file = "orjson-3.8.8-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:a6bcb449537a99f55c5f05187bac00b4549a795e89c10dcca0d7629548852357"}, + {file = "orjson-3.8.8-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:9c98dc791aa44268ba7f6e21124cf885c813b155316c6bf257560571d243fe15"}, + {file = "orjson-3.8.8-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1b2abf93b727a6af7c5ec8816168cbdff39c716af18ced425dd50ae46d69765c"}, + {file = "orjson-3.8.8-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:23447d38375a19d57975d4e32d9ce9f533803c197fd4292e10d3234c052037a8"}, + {file = "orjson-3.8.8-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4c2e19d2b46cc93c7218bf8180807bf922ff61dc9883458a06edc66d22970fff"}, + {file = "orjson-3.8.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e480d74d7bf415e6548a364669404119a85dbe0e3c6cd5f7cb4c7003eac20164"}, + {file = "orjson-3.8.8-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:8e0bff5656b99dd975cae2e5230b39e5909d06c0692fd1f6f06dc46f1fe705d0"}, + {file = "orjson-3.8.8-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:56bb6eb7a254eec3b15feba9b20f4172ccbe6ea50a54cf66cbc8e1e4a19585c2"}, + {file = "orjson-3.8.8-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:1af1cfad5d90b68e15fd625c889c4f9f91d7a88f49512cdb89f01c3881e0c9d9"}, + {file = "orjson-3.8.8-cp39-none-win_amd64.whl", hash = "sha256:d5514dfe200356a1d5a6039e00dca78d87d063f3da1eb6a371253e5a8b7ab5b0"}, + {file = "orjson-3.8.8.tar.gz", hash = "sha256:c096d7a523bae6ffb9c4a228ba4691d66113f0f2231579dc945523fbef09c6da"}, ] [[package]] @@ -1734,19 +1739,19 @@ flake8 = ">=5.0.0" [[package]] name = "platformdirs" -version = "3.1.1" +version = "3.2.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "platformdirs-3.1.1-py3-none-any.whl", hash = "sha256:e5986afb596e4bb5bde29a79ac9061aa955b94fca2399b7aaac4090860920dd8"}, - {file = "platformdirs-3.1.1.tar.gz", hash = "sha256:024996549ee88ec1a9aa99ff7f8fc819bb59e2c3477b410d90a16d32d6e707aa"}, + {file = "platformdirs-3.2.0-py3-none-any.whl", hash = "sha256:ebe11c0d7a805086e99506aa331612429a72ca7cd52a1f0d277dc4adc20cb10e"}, + {file = "platformdirs-3.2.0.tar.gz", hash = "sha256:d5b638ca397f25f979350ff789db335903d7ea010ab28903f57b27e1b16c2b08"}, ] [package.extras] docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.22,!=1.23.4)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.2.2)", "pytest (>=7.2.1)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.2.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] [[package]] name = "pluggy" @@ -1766,14 +1771,14 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "pre-commit" -version = "3.2.0" +version = "3.2.1" description = "A framework for managing and maintaining multi-language pre-commit hooks." category = "dev" optional = false python-versions = ">=3.8" files = [ - {file = "pre_commit-3.2.0-py2.py3-none-any.whl", hash = "sha256:f712d3688102e13c8e66b7d7dbd8934a6dda157e58635d89f7d6fecdca39ce8a"}, - {file = "pre_commit-3.2.0.tar.gz", hash = "sha256:818f0d998059934d0f81bb3667e3ccdc32da6ed7ccaac33e43dc231561ddaaa9"}, + {file = "pre_commit-3.2.1-py2.py3-none-any.whl", hash = "sha256:a06a7fcce7f420047a71213c175714216498b49ebc81fe106f7716ca265f5bb6"}, + {file = "pre_commit-3.2.1.tar.gz", hash = "sha256:b5aee7d75dbba21ee161ba641b01e7ae10c5b91967ebf7b2ab0dfae12d07e1f1"}, ] [package.dependencies] @@ -1828,48 +1833,48 @@ files = [ [[package]] name = "pydantic" -version = "1.10.6" +version = "1.10.7" description = "Data validation and settings management using python type hints" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "pydantic-1.10.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f9289065611c48147c1dd1fd344e9d57ab45f1d99b0fb26c51f1cf72cd9bcd31"}, - {file = "pydantic-1.10.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8c32b6bba301490d9bb2bf5f631907803135e8085b6aa3e5fe5a770d46dd0160"}, - {file = "pydantic-1.10.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd9b9e98068fa1068edfc9eabde70a7132017bdd4f362f8b4fd0abed79c33083"}, - {file = "pydantic-1.10.6-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1c84583b9df62522829cbc46e2b22e0ec11445625b5acd70c5681ce09c9b11c4"}, - {file = "pydantic-1.10.6-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:b41822064585fea56d0116aa431fbd5137ce69dfe837b599e310034171996084"}, - {file = "pydantic-1.10.6-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:61f1f08adfaa9cc02e0cbc94f478140385cbd52d5b3c5a657c2fceb15de8d1fb"}, - {file = "pydantic-1.10.6-cp310-cp310-win_amd64.whl", hash = "sha256:32937835e525d92c98a1512218db4eed9ddc8f4ee2a78382d77f54341972c0e7"}, - {file = "pydantic-1.10.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bbd5c531b22928e63d0cb1868dee76123456e1de2f1cb45879e9e7a3f3f1779b"}, - {file = "pydantic-1.10.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e277bd18339177daa62a294256869bbe84df1fb592be2716ec62627bb8d7c81d"}, - {file = "pydantic-1.10.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:89f15277d720aa57e173954d237628a8d304896364b9de745dcb722f584812c7"}, - {file = "pydantic-1.10.6-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b243b564cea2576725e77aeeda54e3e0229a168bc587d536cd69941e6797543d"}, - {file = "pydantic-1.10.6-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:3ce13a558b484c9ae48a6a7c184b1ba0e5588c5525482681db418268e5f86186"}, - {file = "pydantic-1.10.6-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3ac1cd4deed871dfe0c5f63721e29debf03e2deefa41b3ed5eb5f5df287c7b70"}, - {file = "pydantic-1.10.6-cp311-cp311-win_amd64.whl", hash = "sha256:b1eb6610330a1dfba9ce142ada792f26bbef1255b75f538196a39e9e90388bf4"}, - {file = "pydantic-1.10.6-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:4ca83739c1263a044ec8b79df4eefc34bbac87191f0a513d00dd47d46e307a65"}, - {file = "pydantic-1.10.6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ea4e2a7cb409951988e79a469f609bba998a576e6d7b9791ae5d1e0619e1c0f2"}, - {file = "pydantic-1.10.6-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:53de12b4608290992a943801d7756f18a37b7aee284b9ffa794ee8ea8153f8e2"}, - {file = "pydantic-1.10.6-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:60184e80aac3b56933c71c48d6181e630b0fbc61ae455a63322a66a23c14731a"}, - {file = "pydantic-1.10.6-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:415a3f719ce518e95a92effc7ee30118a25c3d032455d13e121e3840985f2efd"}, - {file = "pydantic-1.10.6-cp37-cp37m-win_amd64.whl", hash = "sha256:72cb30894a34d3a7ab6d959b45a70abac8a2a93b6480fc5a7bfbd9c935bdc4fb"}, - {file = "pydantic-1.10.6-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:3091d2eaeda25391405e36c2fc2ed102b48bac4b384d42b2267310abae350ca6"}, - {file = "pydantic-1.10.6-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:751f008cd2afe812a781fd6aa2fb66c620ca2e1a13b6a2152b1ad51553cb4b77"}, - {file = "pydantic-1.10.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:12e837fd320dd30bd625be1b101e3b62edc096a49835392dcf418f1a5ac2b832"}, - {file = "pydantic-1.10.6-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:587d92831d0115874d766b1f5fddcdde0c5b6c60f8c6111a394078ec227fca6d"}, - {file = "pydantic-1.10.6-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:476f6674303ae7965730a382a8e8d7fae18b8004b7b69a56c3d8fa93968aa21c"}, - {file = "pydantic-1.10.6-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:3a2be0a0f32c83265fd71a45027201e1278beaa82ea88ea5b345eea6afa9ac7f"}, - {file = "pydantic-1.10.6-cp38-cp38-win_amd64.whl", hash = "sha256:0abd9c60eee6201b853b6c4be104edfba4f8f6c5f3623f8e1dba90634d63eb35"}, - {file = "pydantic-1.10.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6195ca908045054dd2d57eb9c39a5fe86409968b8040de8c2240186da0769da7"}, - {file = "pydantic-1.10.6-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:43cdeca8d30de9a897440e3fb8866f827c4c31f6c73838e3a01a14b03b067b1d"}, - {file = "pydantic-1.10.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c19eb5163167489cb1e0161ae9220dadd4fc609a42649e7e84a8fa8fff7a80f"}, - {file = "pydantic-1.10.6-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:012c99a9c0d18cfde7469aa1ebff922e24b0c706d03ead96940f5465f2c9cf62"}, - {file = "pydantic-1.10.6-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:528dcf7ec49fb5a84bf6fe346c1cc3c55b0e7603c2123881996ca3ad79db5bfc"}, - {file = "pydantic-1.10.6-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:163e79386c3547c49366e959d01e37fc30252285a70619ffc1b10ede4758250a"}, - {file = "pydantic-1.10.6-cp39-cp39-win_amd64.whl", hash = "sha256:189318051c3d57821f7233ecc94708767dd67687a614a4e8f92b4a020d4ffd06"}, - {file = "pydantic-1.10.6-py3-none-any.whl", hash = "sha256:acc6783751ac9c9bc4680379edd6d286468a1dc8d7d9906cd6f1186ed682b2b0"}, - {file = "pydantic-1.10.6.tar.gz", hash = "sha256:cf95adb0d1671fc38d8c43dd921ad5814a735e7d9b4d9e437c088002863854fd"}, + {file = "pydantic-1.10.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e79e999e539872e903767c417c897e729e015872040e56b96e67968c3b918b2d"}, + {file = "pydantic-1.10.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:01aea3a42c13f2602b7ecbbea484a98169fb568ebd9e247593ea05f01b884b2e"}, + {file = "pydantic-1.10.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:516f1ed9bc2406a0467dd777afc636c7091d71f214d5e413d64fef45174cfc7a"}, + {file = "pydantic-1.10.7-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ae150a63564929c675d7f2303008d88426a0add46efd76c3fc797cd71cb1b46f"}, + {file = "pydantic-1.10.7-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:ecbbc51391248116c0a055899e6c3e7ffbb11fb5e2a4cd6f2d0b93272118a209"}, + {file = "pydantic-1.10.7-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:f4a2b50e2b03d5776e7f21af73e2070e1b5c0d0df255a827e7c632962f8315af"}, + {file = "pydantic-1.10.7-cp310-cp310-win_amd64.whl", hash = "sha256:a7cd2251439988b413cb0a985c4ed82b6c6aac382dbaff53ae03c4b23a70e80a"}, + {file = "pydantic-1.10.7-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:68792151e174a4aa9e9fc1b4e653e65a354a2fa0fed169f7b3d09902ad2cb6f1"}, + {file = "pydantic-1.10.7-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:dfe2507b8ef209da71b6fb5f4e597b50c5a34b78d7e857c4f8f3115effaef5fe"}, + {file = "pydantic-1.10.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10a86d8c8db68086f1e30a530f7d5f83eb0685e632e411dbbcf2d5c0150e8dcd"}, + {file = "pydantic-1.10.7-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d75ae19d2a3dbb146b6f324031c24f8a3f52ff5d6a9f22f0683694b3afcb16fb"}, + {file = "pydantic-1.10.7-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:464855a7ff7f2cc2cf537ecc421291b9132aa9c79aef44e917ad711b4a93163b"}, + {file = "pydantic-1.10.7-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:193924c563fae6ddcb71d3f06fa153866423ac1b793a47936656e806b64e24ca"}, + {file = "pydantic-1.10.7-cp311-cp311-win_amd64.whl", hash = "sha256:b4a849d10f211389502059c33332e91327bc154acc1845f375a99eca3afa802d"}, + {file = "pydantic-1.10.7-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:cc1dde4e50a5fc1336ee0581c1612215bc64ed6d28d2c7c6f25d2fe3e7c3e918"}, + {file = "pydantic-1.10.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e0cfe895a504c060e5d36b287ee696e2fdad02d89e0d895f83037245218a87fe"}, + {file = "pydantic-1.10.7-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:670bb4683ad1e48b0ecb06f0cfe2178dcf74ff27921cdf1606e527d2617a81ee"}, + {file = "pydantic-1.10.7-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:950ce33857841f9a337ce07ddf46bc84e1c4946d2a3bba18f8280297157a3fd1"}, + {file = "pydantic-1.10.7-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:c15582f9055fbc1bfe50266a19771bbbef33dd28c45e78afbe1996fd70966c2a"}, + {file = "pydantic-1.10.7-cp37-cp37m-win_amd64.whl", hash = "sha256:82dffb306dd20bd5268fd6379bc4bfe75242a9c2b79fec58e1041fbbdb1f7914"}, + {file = "pydantic-1.10.7-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8c7f51861d73e8b9ddcb9916ae7ac39fb52761d9ea0df41128e81e2ba42886cd"}, + {file = "pydantic-1.10.7-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6434b49c0b03a51021ade5c4daa7d70c98f7a79e95b551201fff682fc1661245"}, + {file = "pydantic-1.10.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:64d34ab766fa056df49013bb6e79921a0265204c071984e75a09cbceacbbdd5d"}, + {file = "pydantic-1.10.7-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:701daea9ffe9d26f97b52f1d157e0d4121644f0fcf80b443248434958fd03dc3"}, + {file = "pydantic-1.10.7-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:cf135c46099ff3f919d2150a948ce94b9ce545598ef2c6c7bf55dca98a304b52"}, + {file = "pydantic-1.10.7-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b0f85904f73161817b80781cc150f8b906d521fa11e3cdabae19a581c3606209"}, + {file = "pydantic-1.10.7-cp38-cp38-win_amd64.whl", hash = "sha256:9f6f0fd68d73257ad6685419478c5aece46432f4bdd8d32c7345f1986496171e"}, + {file = "pydantic-1.10.7-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c230c0d8a322276d6e7b88c3f7ce885f9ed16e0910354510e0bae84d54991143"}, + {file = "pydantic-1.10.7-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:976cae77ba6a49d80f461fd8bba183ff7ba79f44aa5cfa82f1346b5626542f8e"}, + {file = "pydantic-1.10.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7d45fc99d64af9aaf7e308054a0067fdcd87ffe974f2442312372dfa66e1001d"}, + {file = "pydantic-1.10.7-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d2a5ebb48958754d386195fe9e9c5106f11275867051bf017a8059410e9abf1f"}, + {file = "pydantic-1.10.7-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:abfb7d4a7cd5cc4e1d1887c43503a7c5dd608eadf8bc615413fc498d3e4645cd"}, + {file = "pydantic-1.10.7-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:80b1fab4deb08a8292d15e43a6edccdffa5377a36a4597bb545b93e79c5ff0a5"}, + {file = "pydantic-1.10.7-cp39-cp39-win_amd64.whl", hash = "sha256:d71e69699498b020ea198468e2480a2f1e7433e32a3a99760058c6520e2bea7e"}, + {file = "pydantic-1.10.7-py3-none-any.whl", hash = "sha256:0cd181f1d0b1d00e2b705f1bf1ac7799a2d938cce3376b8007df62b29be3c2c6"}, + {file = "pydantic-1.10.7.tar.gz", hash = "sha256:cfc83c0678b6ba51b0532bea66860617c4cd4251ecf76e9846fa5a9f3454e97e"}, ] [package.dependencies] @@ -1941,14 +1946,14 @@ plugins = ["importlib-metadata"] [[package]] name = "pylint" -version = "2.17.0" +version = "2.17.1" description = "python code static checker" category = "dev" optional = false python-versions = ">=3.7.2" files = [ - {file = "pylint-2.17.0-py3-none-any.whl", hash = "sha256:e097d8325f8c88e14ad12844e3fe2d963d3de871ea9a8f8ad25ab1c109889ddc"}, - {file = "pylint-2.17.0.tar.gz", hash = "sha256:1460829b6397cb5eb0cdb0b4fc4b556348e515cdca32115f74a1eb7c20b896b4"}, + {file = "pylint-2.17.1-py3-none-any.whl", hash = "sha256:8660a54e3f696243d644fca98f79013a959c03f979992c1ab59c24d3f4ec2700"}, + {file = "pylint-2.17.1.tar.gz", hash = "sha256:d4d009b0116e16845533bc2163493d6681846ac725eab8ca8014afb520178ddd"}, ] [package.dependencies] @@ -2098,14 +2103,14 @@ six = ">=1.5" [[package]] name = "pytz" -version = "2022.7.1" +version = "2023.2" description = "World timezone definitions, modern and historical" category = "main" optional = false python-versions = "*" files = [ - {file = "pytz-2022.7.1-py2.py3-none-any.whl", hash = "sha256:78f4f37d8198e0627c5f1143240bb0206b8691d8d7ac6d78fee88b78733f8c4a"}, - {file = "pytz-2022.7.1.tar.gz", hash = "sha256:01a0681c4b9684a28304615eba55d1ab31ae00bf68ec157ec3708a8182dbbcd0"}, + {file = "pytz-2023.2-py2.py3-none-any.whl", hash = "sha256:8a8baaf1e237175b02f5c751eea67168043a749c843989e2b3015aa1ad9db68b"}, + {file = "pytz-2023.2.tar.gz", hash = "sha256:a27dcf612c05d2ebde626f7d506555f10dfc815b3eddccfaadfc7d99b11c9a07"}, ] [[package]] @@ -2688,14 +2693,14 @@ toml = ">=0.10.2" [[package]] name = "typeguard" -version = "3.0.1" +version = "3.0.2" description = "Run-time type checker for Python" category = "dev" optional = false python-versions = ">=3.7.4" files = [ - {file = "typeguard-3.0.1-py3-none-any.whl", hash = "sha256:15628045c830abf68533247afd2cb04683b5ce6f4e30d5401a5ef6f5182280de"}, - {file = "typeguard-3.0.1.tar.gz", hash = "sha256:beb0e67c5dc76eea4a6d00a6606d444d899589908362960769d0c4a1d32bca70"}, + {file = "typeguard-3.0.2-py3-none-any.whl", hash = "sha256:bbe993854385284ab42fd5bd3bee6f6556577ce8b50696d6cb956d704f286c8e"}, + {file = "typeguard-3.0.2.tar.gz", hash = "sha256:fee5297fdb28f8e9efcb8142b5ee219e02375509cd77ea9d270b5af826358d5a"}, ] [package.dependencies] From 735bdc4a3bcd8ecde66fd7fc6f9a008471305137 Mon Sep 17 00:00:00 2001 From: dvp Date: Mon, 27 Mar 2023 10:24:34 +0300 Subject: [PATCH 15/32] dependencies: poetry update --- poetry.lock | 117 ++++++++++++++++++++-------------------------------- 1 file changed, 44 insertions(+), 73 deletions(-) diff --git a/poetry.lock b/poetry.lock index cc0c8c0..a8bd79a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -54,14 +54,14 @@ files = [ [[package]] name = "astroid" -version = "2.15.0" +version = "2.15.1" description = "An abstract syntax tree for Python with inference support." category = "dev" optional = false python-versions = ">=3.7.2" files = [ - {file = "astroid-2.15.0-py3-none-any.whl", hash = "sha256:e3e4d0ffc2d15d954065579689c36aac57a339a4679a679579af6401db4d3fdb"}, - {file = "astroid-2.15.0.tar.gz", hash = "sha256:525f126d5dc1b8b0b6ee398b33159105615d92dc4a17f2cd064125d57f6186fa"}, + {file = "astroid-2.15.1-py3-none-any.whl", hash = "sha256:89860bda98fe2bbd1f5d262229be7629d778ce280de68d95d4a73d1f592ad268"}, + {file = "astroid-2.15.1.tar.gz", hash = "sha256:af4e0aff46e2868218502789898269ed95b663fba49e65d91c1e09c966266c34"}, ] [package.dependencies] @@ -487,18 +487,6 @@ toml = "*" conda = ["pyyaml"] pipenv = ["pipenv"] -[[package]] -name = "eradicate" -version = "2.2.0" -description = "Removes commented-out code." -category = "dev" -optional = false -python-versions = "*" -files = [ - {file = "eradicate-2.2.0-py3-none-any.whl", hash = "sha256:751813c315a48ce7e3d0483410991015342d380a956e86e0265c61bfb875bcbc"}, - {file = "eradicate-2.2.0.tar.gz", hash = "sha256:c329a05def6a4b558dab58bb1b694f5209706b7c99ba174d226dfdb69a5ba0da"}, -] - [[package]] name = "et-xmlfile" version = "1.1.0" @@ -543,36 +531,36 @@ testing = ["pre-commit"] [[package]] name = "filelock" -version = "3.10.3" +version = "3.10.6" description = "A platform independent file lock." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "filelock-3.10.3-py3-none-any.whl", hash = "sha256:99d6282f732410d44242ca02aa49835cf5473e2dd4d6734a2a785c8889dc191e"}, - {file = "filelock-3.10.3.tar.gz", hash = "sha256:a26bfa34d26293e04886dff13fa8dd0c8c6e1a786b723c689755fe8939297410"}, + {file = "filelock-3.10.6-py3-none-any.whl", hash = "sha256:52f119747b2b9c4730dac715a7b1ab34b8ee70fd9259cba158ee53da566387ff"}, + {file = "filelock-3.10.6.tar.gz", hash = "sha256:409105becd604d6b176a483f855e7e8903c5cb2873e47f2c64f66a370c046aaf"}, ] [package.extras] docs = ["furo (>=2022.12.7)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.22,!=1.23.4)"] -testing = ["covdefaults (>=2.3)", "coverage (>=7.2.2)", "pytest (>=7.2.2)", "pytest-cov (>=4)", "pytest-timeout (>=2.1)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.2.2)", "diff-cover (>=7.5)", "pytest (>=7.2.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)", "pytest-timeout (>=2.1)"] [[package]] name = "flake8" -version = "5.0.4" +version = "6.0.0" description = "the modular source code checker: pep8 pyflakes and co" category = "dev" optional = false -python-versions = ">=3.6.1" +python-versions = ">=3.8.1" files = [ - {file = "flake8-5.0.4-py2.py3-none-any.whl", hash = "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248"}, - {file = "flake8-5.0.4.tar.gz", hash = "sha256:6fbe320aad8d6b95cec8b8e47bc933004678dc63095be98528b7bdd2a9f510db"}, + {file = "flake8-6.0.0-py2.py3-none-any.whl", hash = "sha256:3833794e27ff64ea4e9cf5d410082a8b97ff1a06c16aa3d2027339cd0f1195c7"}, + {file = "flake8-6.0.0.tar.gz", hash = "sha256:c61007e76655af75e6785a931f452915b371dc48f56efd765247c8fe68f2b181"}, ] [package.dependencies] mccabe = ">=0.7.0,<0.8.0" -pycodestyle = ">=2.9.0,<2.10.0" -pyflakes = ">=2.5.0,<2.6.0" +pycodestyle = ">=2.10.0,<2.11.0" +pyflakes = ">=3.0.0,<3.1.0" [[package]] name = "flake8-adjustable-complexity" @@ -591,19 +579,19 @@ flake8 = "*" [[package]] name = "flake8-annotations" -version = "2.9.1" +version = "3.0.0" description = "Flake8 Type Annotation Checks" category = "dev" optional = false -python-versions = ">=3.7,<4.0" +python-versions = ">=3.8.1,<4.0.0" files = [ - {file = "flake8-annotations-2.9.1.tar.gz", hash = "sha256:11f09efb99ae63c8f9d6b492b75fe147fbc323179fddfe00b2e56eefeca42f57"}, - {file = "flake8_annotations-2.9.1-py3-none-any.whl", hash = "sha256:a4385158a7a9fc8af1d8820a2f4c8d03387997006a83f5f8bfe5bc6085bdf88a"}, + {file = "flake8_annotations-3.0.0-py3-none-any.whl", hash = "sha256:ea927d31016515e9aa6e256651d74baeeee6fa4ad3f8383715ec5c0460a4c225"}, + {file = "flake8_annotations-3.0.0.tar.gz", hash = "sha256:88c8b35a0db10b9a92be69ed3f81494509a18db1c3162551e57bc0fc35fab065"}, ] [package.dependencies] attrs = ">=21.4" -flake8 = ">=3.7" +flake8 = ">=5.0" [[package]] name = "flake8-annotations-coverage" @@ -638,19 +626,19 @@ flake8 = ">=5.0.0" [[package]] name = "flake8-bugbear" -version = "23.3.12" +version = "23.3.23" description = "A plugin for flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle." category = "dev" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8.1" files = [ - {file = "flake8-bugbear-23.3.12.tar.gz", hash = "sha256:e3e7f74c8a49ad3794a7183353026dabd68c74030d5f46571f84c1fb0eb79363"}, - {file = "flake8_bugbear-23.3.12-py3-none-any.whl", hash = "sha256:beb5c7efcd7ccc2039ef66a77bb8db925e7be3531ff1cb4d0b7030d0e2113d72"}, + {file = "flake8-bugbear-23.3.23.tar.gz", hash = "sha256:ea565bdb87b96b56dc499edd6cc3ba7f695373d902a5f56c989b74fad7c7719d"}, + {file = "flake8_bugbear-23.3.23-py3-none-any.whl", hash = "sha256:8a218d13abd6904800970381057ce8e72cde8eea743240c4ef3ede4dd0bc9cfb"}, ] [package.dependencies] attrs = ">=19.2.0" -flake8 = ">=3.0.0" +flake8 = ">=6.0.0" [package.extras] dev = ["coverage", "hypothesis", "hypothesmith (>=0.2)", "pre-commit", "pytest", "tox"] @@ -765,23 +753,6 @@ files = [ flake8 = ">=3" pydocstyle = ">=2.1" -[[package]] -name = "flake8-eradicate" -version = "1.4.0" -description = "Flake8 plugin to find commented out code" -category = "dev" -optional = false -python-versions = ">=3.7,<4.0" -files = [ - {file = "flake8-eradicate-1.4.0.tar.gz", hash = "sha256:3088cfd6717d1c9c6c3ac45ef2e5f5b6c7267f7504d5a74b781500e95cb9c7e1"}, - {file = "flake8_eradicate-1.4.0-py3-none-any.whl", hash = "sha256:e3bbd0871be358e908053c1ab728903c114f062ba596b4d40c852fd18f473d56"}, -] - -[package.dependencies] -attrs = "*" -eradicate = ">=2.0,<3.0" -flake8 = ">=3.5,<6" - [[package]] name = "flake8-expression-complexity" version = "0.0.11" @@ -1054,14 +1025,14 @@ numpy = ">=1.14.5" [[package]] name = "identify" -version = "2.5.21" +version = "2.5.22" description = "File identification library for Python" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "identify-2.5.21-py2.py3-none-any.whl", hash = "sha256:69edcaffa8e91ae0f77d397af60f148b6b45a8044b2cc6d99cafa5b04793ff00"}, - {file = "identify-2.5.21.tar.gz", hash = "sha256:7671a05ef9cfaf8ff63b15d45a91a1147a03aaccb2976d4e9bd047cbbc508471"}, + {file = "identify-2.5.22-py2.py3-none-any.whl", hash = "sha256:f0faad595a4687053669c112004178149f6c326db71ee999ae4636685753ad2f"}, + {file = "identify-2.5.22.tar.gz", hash = "sha256:f7a93d6cf98e29bd07663c60728e7a4057615068d7a639d132dc883b2d54d31e"}, ] [package.extras] @@ -1739,19 +1710,19 @@ flake8 = ">=5.0.0" [[package]] name = "platformdirs" -version = "3.1.1" +version = "3.2.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "platformdirs-3.1.1-py3-none-any.whl", hash = "sha256:e5986afb596e4bb5bde29a79ac9061aa955b94fca2399b7aaac4090860920dd8"}, - {file = "platformdirs-3.1.1.tar.gz", hash = "sha256:024996549ee88ec1a9aa99ff7f8fc819bb59e2c3477b410d90a16d32d6e707aa"}, + {file = "platformdirs-3.2.0-py3-none-any.whl", hash = "sha256:ebe11c0d7a805086e99506aa331612429a72ca7cd52a1f0d277dc4adc20cb10e"}, + {file = "platformdirs-3.2.0.tar.gz", hash = "sha256:d5b638ca397f25f979350ff789db335903d7ea010ab28903f57b27e1b16c2b08"}, ] [package.extras] docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.22,!=1.23.4)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.2.2)", "pytest (>=7.2.1)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.2.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] [[package]] name = "pluggy" @@ -1771,14 +1742,14 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "pre-commit" -version = "3.2.0" +version = "3.2.1" description = "A framework for managing and maintaining multi-language pre-commit hooks." category = "dev" optional = false python-versions = ">=3.8" files = [ - {file = "pre_commit-3.2.0-py2.py3-none-any.whl", hash = "sha256:f712d3688102e13c8e66b7d7dbd8934a6dda157e58635d89f7d6fecdca39ce8a"}, - {file = "pre_commit-3.2.0.tar.gz", hash = "sha256:818f0d998059934d0f81bb3667e3ccdc32da6ed7ccaac33e43dc231561ddaaa9"}, + {file = "pre_commit-3.2.1-py2.py3-none-any.whl", hash = "sha256:a06a7fcce7f420047a71213c175714216498b49ebc81fe106f7716ca265f5bb6"}, + {file = "pre_commit-3.2.1.tar.gz", hash = "sha256:b5aee7d75dbba21ee161ba641b01e7ae10c5b91967ebf7b2ab0dfae12d07e1f1"}, ] [package.dependencies] @@ -1821,14 +1792,14 @@ typer = ">=0.4.1,<0.8.0" [[package]] name = "pycodestyle" -version = "2.9.1" +version = "2.10.0" description = "Python style guide checker" category = "dev" optional = false python-versions = ">=3.6" files = [ - {file = "pycodestyle-2.9.1-py2.py3-none-any.whl", hash = "sha256:d1735fc58b418fd7c5f658d28d943854f8a849b01a5d0a1e6f3f3fdd0166804b"}, - {file = "pycodestyle-2.9.1.tar.gz", hash = "sha256:2c9607871d58c76354b697b42f5d57e1ada7d261c261efac224b664affdc5785"}, + {file = "pycodestyle-2.10.0-py2.py3-none-any.whl", hash = "sha256:8a4eaf0d0495c7395bdab3589ac2db602797d76207242c17d470186815706610"}, + {file = "pycodestyle-2.10.0.tar.gz", hash = "sha256:347187bdb476329d98f695c213d7295a846d1152ff4fe9bacb8a9590b8ee7053"}, ] [[package]] @@ -1919,14 +1890,14 @@ toml = ["tomli (>=1.2.3)"] [[package]] name = "pyflakes" -version = "2.5.0" +version = "3.0.1" description = "passive checker of Python programs" category = "dev" optional = false python-versions = ">=3.6" files = [ - {file = "pyflakes-2.5.0-py2.py3-none-any.whl", hash = "sha256:4579f67d887f804e67edb544428f264b7b24f435b263c4614f384135cea553d2"}, - {file = "pyflakes-2.5.0.tar.gz", hash = "sha256:491feb020dca48ccc562a8c0cbe8df07ee13078df59813b83959cbdada312ea3"}, + {file = "pyflakes-3.0.1-py2.py3-none-any.whl", hash = "sha256:ec55bf7fe21fff7f1ad2f7da62363d749e2a470500eab1b555334b67aa1ef8cf"}, + {file = "pyflakes-3.0.1.tar.gz", hash = "sha256:ec8b276a6b60bd80defed25add7e439881c19e64850afd9b346283d4165fd0fd"}, ] [[package]] @@ -2103,14 +2074,14 @@ six = ">=1.5" [[package]] name = "pytz" -version = "2022.7.1" +version = "2023.2" description = "World timezone definitions, modern and historical" category = "main" optional = false python-versions = "*" files = [ - {file = "pytz-2022.7.1-py2.py3-none-any.whl", hash = "sha256:78f4f37d8198e0627c5f1143240bb0206b8691d8d7ac6d78fee88b78733f8c4a"}, - {file = "pytz-2022.7.1.tar.gz", hash = "sha256:01a0681c4b9684a28304615eba55d1ab31ae00bf68ec157ec3708a8182dbbcd0"}, + {file = "pytz-2023.2-py2.py3-none-any.whl", hash = "sha256:8a8baaf1e237175b02f5c751eea67168043a749c843989e2b3015aa1ad9db68b"}, + {file = "pytz-2023.2.tar.gz", hash = "sha256:a27dcf612c05d2ebde626f7d506555f10dfc815b3eddccfaadfc7d99b11c9a07"}, ] [[package]] @@ -2985,5 +2956,5 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "2.0" -python-versions = ">=3.8,<4.0" -content-hash = "6398c04f3b966965cfb936b0d477dafedaf7f53481db8a090d576b53e14e9dc1" +python-versions = ">=3.8.1,<4.0" +content-hash = "6a94d46546d761f4aa966b6e06f2649c9776f6349cfe42d2fd6430be27c14a0f" From 6e75e6e2bf4c21c2e4a90d4de3ebe70a5408e4c6 Mon Sep 17 00:00:00 2001 From: dvp Date: Mon, 27 Mar 2023 10:50:47 +0300 Subject: [PATCH 16/32] dependencies: poetry update --- poetry.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index a8bd79a..f2cb20f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2616,14 +2616,14 @@ files = [ [[package]] name = "tomlkit" -version = "0.11.6" +version = "0.11.7" description = "Style preserving TOML library" category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" files = [ - {file = "tomlkit-0.11.6-py3-none-any.whl", hash = "sha256:07de26b0d8cfc18f871aec595fda24d95b08fef89d147caa861939f37230bf4b"}, - {file = "tomlkit-0.11.6.tar.gz", hash = "sha256:71b952e5721688937fb02cf9d354dbcf0785066149d2855e44531ebdd2b65d73"}, + {file = "tomlkit-0.11.7-py3-none-any.whl", hash = "sha256:5325463a7da2ef0c6bbfefb62a3dc883aebe679984709aee32a317907d0a8d3c"}, + {file = "tomlkit-0.11.7.tar.gz", hash = "sha256:f392ef70ad87a672f02519f99967d28a4d3047133e2d1df936511465fbb3791d"}, ] [[package]] From ed66665c29a20970ac4d9ac7953db972bd0c0c47 Mon Sep 17 00:00:00 2001 From: dvp Date: Mon, 27 Mar 2023 11:18:28 +0300 Subject: [PATCH 17/32] build: git ignore poetry local config --- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index e2acb02..8bd070d 100644 --- a/.gitignore +++ b/.gitignore @@ -134,3 +134,9 @@ dmypy.json # A soundbox work and data folder wrk/ + + +# poetry local config +/poetry.toml + + From e2be64a067c08f3c2680c946387539c1f735665c Mon Sep 17 00:00:00 2001 From: dvp Date: Mon, 27 Mar 2023 12:31:55 +0300 Subject: [PATCH 18/32] notebook: duckdb prototype is done --- notebooks/dvp/try_ducdb.ipynb | 5766 +++++++++++++++------------------ notebooks/dvp/try_ducdb.py | 189 +- 2 files changed, 2694 insertions(+), 3261 deletions(-) diff --git a/notebooks/dvp/try_ducdb.ipynb b/notebooks/dvp/try_ducdb.ipynb index 12d27ba..ba8d453 100644 --- a/notebooks/dvp/try_ducdb.ipynb +++ b/notebooks/dvp/try_ducdb.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 233, + "execution_count": 1, "id": "250d384f-b617-4bde-8d6e-5bfea316e21f", "metadata": { "tags": [] @@ -14,7 +14,7 @@ }, { "cell_type": "code", - "execution_count": 234, + "execution_count": 2, "id": "49812848-cb6d-487a-bcdf-927e86781ae9", "metadata": { "tags": [] @@ -26,7 +26,7 @@ }, { "cell_type": "code", - "execution_count": 235, + "execution_count": 3, "id": "5e40fc05-d196-4ab9-b4df-ec6166ee5611", "metadata": { "tags": [] @@ -38,7 +38,7 @@ "'0.1.12a0'" ] }, - "execution_count": 235, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } @@ -49,7 +49,7 @@ }, { "cell_type": "code", - "execution_count": 236, + "execution_count": 4, "id": "982fbe50-fd22-499a-98d9-910f6d0c72d7", "metadata": { "tags": [] @@ -61,7 +61,7 @@ }, { "cell_type": "code", - "execution_count": 237, + "execution_count": 5, "id": "bf81c238-8be8-4f93-b3e4-155bb46e21e8", "metadata": { "tags": [] @@ -73,7 +73,7 @@ }, { "cell_type": "code", - "execution_count": 238, + "execution_count": 6, "id": "c0811f45-0503-4302-9890-62803b49cabe", "metadata": { "tags": [] @@ -86,7 +86,7 @@ }, { "cell_type": "code", - "execution_count": 239, + "execution_count": 7, "id": "57fecf87-b03f-48e4-bfe4-beee3d661355", "metadata": { "tags": [] @@ -99,7 +99,7 @@ }, { "cell_type": "code", - "execution_count": 240, + "execution_count": 8, "id": "c13bb091-11ad-4e08-bbad-7cba93475e4b", "metadata": { "tags": [] @@ -111,7 +111,7 @@ }, { "cell_type": "code", - "execution_count": 469, + "execution_count": 9, "id": "e471ce43-3860-430d-b669-7a1211bb5d06", "metadata": { "tags": [] @@ -123,7 +123,7 @@ }, { "cell_type": "code", - "execution_count": 470, + "execution_count": 10, "id": "eaa7c75f-119c-493c-b038-dbd615b72c6f", "metadata": { "tags": [] @@ -526,14 +526,14 @@ " run_name: * Material Alloy718-Co04, fluxes 104_2_1_1\n", " flux_name: 90-degrees bend\n", " dose_rate_type: Point source\n", - " dose_rate_distance: 1.0
  • run_name :
    * Material Alloy718-Co04, fluxes 104_2_1_1
    flux_name :
    90-degrees bend
    dose_rate_type :
    Point source
    dose_rate_distance :
    1.0
  • " ], "text/plain": [ "\n", @@ -1099,7 +1099,7 @@ " dose_rate_distance: 1.0" ] }, - "execution_count": 470, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } @@ -1110,8 +1110,60 @@ }, { "cell_type": "code", - "execution_count": 417, - "id": "8dbfda08-8776-4733-9215-9d569fb24a34", + "execution_count": 12, + "id": "79beed07-0f86-485b-be23-97d7e8f33abb", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "import duckdb as db" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "ee7bf9aa-13a8-419d-b39e-c90493094148", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "db_path = root_dir / \"wrk/try-duckdb.duckdb\"\n", + "db_path.parent.mkdir(parents=True, exist_ok=True)\n", + "if db_path.exists():\n", + " db_path.unlink()" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "99a86bdc-84e1-4cd3-b7b7-4e63b6428086", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "con = db.connect(str(db_path))" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "c74de5dc-5b72-4e1a-a105-3c629995a5af", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "material_id = 100\n", + "case_id = 3" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "dd2fb504-eb9a-48ee-bab2-2a512630797a", "metadata": { "tags": [] }, @@ -1482,2940 +1534,2206 @@ " stroke: currentColor;\n", " fill: currentColor;\n", "}\n", - "
    <xarray.DataArray 'timestamp' (timestamp: 1)>\n",
    -       "array(['2022-02-21T01:52:47.000000000'], dtype='datetime64[ns]')\n",
    -       "Coordinates:\n",
    -       "  * timestamp  (timestamp) datetime64[ns] 2022-02-21T01:52:47\n",
    -       "Attributes:\n",
    -       "    long description:  FISPACT datasets can be merged and then selected by ti...
    " - ], - "text/plain": [ - "\n", - "array(['2022-02-21T01:52:47.000000000'], dtype='datetime64[ns]')\n", + "
    <xarray.Dataset>\n",
    +       "Dimensions:                 (material_id: 1, case_id: 1, time_step_number: 65,\n",
    +       "                             nuclide: 215, gamma_boundaries: 25, timestamp: 1)\n",
            "Coordinates:\n",
    -       "  * timestamp  (timestamp) datetime64[ns] 2022-02-21T01:52:47\n",
    +       "  * material_id             (material_id) int64 100\n",
    +       "  * case_id                 (case_id) int64 3\n",
    +       "  * time_step_number        (time_step_number) int64 1 2 3 4 5 ... 62 63 64 65\n",
    +       "  * nuclide                 (nuclide) object MultiIndex\n",
    +       "  * element                 (nuclide) object 'Al' 'Al' 'Al' ... 'Zr' 'Zr' 'Zr'\n",
    +       "  * mass_number             (nuclide) int64 26 27 28 29 30 40 ... 93 94 95 96 97\n",
    +       "  * state                   (nuclide) object '' '' '' '' '' ... '' '' '' '' ''\n",
    +       "  * gamma_boundaries        (gamma_boundaries) float64 1e-11 0.01 ... 14.0 20.0\n",
    +       "    elapsed_time            (time_step_number) float64 0.0 6.312e+07 ... 3.2e+10\n",
    +       "    zai                     (nuclide) int64 130260 130270 ... 400960 400970\n",
    +       "  * timestamp               (timestamp) datetime64[ns] 2022-02-21T01:52:47\n",
    +       "Data variables: (12/32)\n",
    +       "    irradiation_time        (material_id, case_id, time_step_number) float64 ...\n",
    +       "    cooling_time            (material_id, case_id, time_step_number) float64 ...\n",
    +       "    duration                (material_id, case_id, time_step_number) float64 ...\n",
    +       "    flux                    (material_id, case_id, time_step_number) float64 ...\n",
    +       "    total_atoms             (material_id, case_id, time_step_number) float64 ...\n",
    +       "    total_activity          (material_id, case_id, time_step_number) float64 ...\n",
    +       "    ...                      ...\n",
    +       "    nuclide_beta_heat       (material_id, case_id, time_step_number, nuclide) float64 ...\n",
    +       "    nuclide_gamma_heat      (material_id, case_id, time_step_number, nuclide) float64 ...\n",
    +       "    nuclide_dose            (material_id, case_id, time_step_number, nuclide) float64 ...\n",
    +       "    nuclide_ingestion       (material_id, case_id, time_step_number, nuclide) float64 ...\n",
    +       "    nuclide_inhalation      (material_id, case_id, time_step_number, nuclide) float64 ...\n",
    +       "    gamma                   (material_id, case_id, time_step_number, gamma_boundaries) float64 ...\n",
            "Attributes:\n",
    -       "    long description:  FISPACT datasets can be merged and then selected by ti..."
    -      ]
    -     },
    -     "execution_count": 417,
    -     "metadata": {},
    -     "output_type": "execute_result"
    -    }
    -   ],
    -   "source": [
    -    "ds.timestamp"
    -   ]
    -  },
    -  {
    -   "cell_type": "code",
    -   "execution_count": 243,
    -   "id": "79beed07-0f86-485b-be23-97d7e8f33abb",
    -   "metadata": {
    -    "tags": []
    -   },
    -   "outputs": [],
    -   "source": [
    -    "import duckdb as db"
    -   ]
    -  },
    -  {
    -   "cell_type": "code",
    -   "execution_count": 384,
    -   "id": "ee7bf9aa-13a8-419d-b39e-c90493094148",
    -   "metadata": {
    -    "tags": []
    -   },
    -   "outputs": [],
    -   "source": [
    -    "db_path = root_dir / \"wrk/try-duckdb.duckdb\"\n",
    -    "db_path.parent.mkdir(parents=True, exist_ok=True)\n",
    -    "if db_path.exists():\n",
    -    "    db_path.unlink()"
    -   ]
    -  },
    -  {
    -   "cell_type": "code",
    -   "execution_count": 385,
    -   "id": "99a86bdc-84e1-4cd3-b7b7-4e63b6428086",
    -   "metadata": {
    -    "tags": []
    -   },
    -   "outputs": [],
    -   "source": [
    -    "con = db.connect(str(db_path))"
    -   ]
    -  },
    -  {
    -   "cell_type": "code",
    -   "execution_count": 386,
    -   "id": "c74de5dc-5b72-4e1a-a105-3c629995a5af",
    -   "metadata": {
    -    "tags": []
    -   },
    -   "outputs": [],
    -   "source": [
    -    "material_id = 100\n",
    -    "case_id = 3"
    -   ]
    -  },
    -  {
    -   "cell_type": "code",
    -   "execution_count": 475,
    -   "id": "dd2fb504-eb9a-48ee-bab2-2a512630797a",
    -   "metadata": {
    -    "tags": []
    -   },
    -   "outputs": [
    -    {
    -     "data": {
    -      "text/html": [
    -       "
    \n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "
    <xarray.Dataset>\n",
    -       "Dimensions:                 (material_id: 1, case_id: 1, time_step_number: 65,\n",
    -       "                             nuclide: 215, gamma_boundaries: 25, timestamp: 1)\n",
    -       "Coordinates:\n",
    -       "  * material_id             (material_id) int64 100\n",
    -       "  * case_id                 (case_id) int64 3\n",
    -       "  * time_step_number        (time_step_number) int64 1 2 3 4 5 ... 62 63 64 65\n",
    -       "  * nuclide                 (nuclide) object MultiIndex\n",
    -       "  * element                 (nuclide) object 'Al' 'Al' 'Al' ... 'Zr' 'Zr' 'Zr'\n",
    -       "  * mass_number             (nuclide) int64 26 27 28 29 30 40 ... 93 94 95 96 97\n",
    -       "  * state                   (nuclide) object '' '' '' '' '' ... '' '' '' '' ''\n",
    -       "  * gamma_boundaries        (gamma_boundaries) float64 1e-11 0.01 ... 14.0 20.0\n",
    -       "    elapsed_time            (time_step_number) float64 0.0 6.312e+07 ... 3.2e+10\n",
    -       "    zai                     (nuclide) int64 130260 130270 ... 400960 400970\n",
    -       "  * timestamp               (timestamp) datetime64[ns] 2022-02-21T01:52:47\n",
    -       "Data variables: (12/32)\n",
    -       "    irradiation_time        (material_id, case_id, time_step_number) float64 ...\n",
    -       "    cooling_time            (material_id, case_id, time_step_number) float64 ...\n",
    -       "    duration                (material_id, case_id, time_step_number) float64 ...\n",
    -       "    flux                    (material_id, case_id, time_step_number) float64 ...\n",
    -       "    total_atoms             (material_id, case_id, time_step_number) float64 ...\n",
    -       "    total_activity          (material_id, case_id, time_step_number) float64 ...\n",
    -       "    ...                      ...\n",
    -       "    nuclide_beta_heat       (material_id, case_id, time_step_number, nuclide) float64 ...\n",
    -       "    nuclide_gamma_heat      (material_id, case_id, time_step_number, nuclide) float64 ...\n",
    -       "    nuclide_dose            (material_id, case_id, time_step_number, nuclide) float64 ...\n",
    -       "    nuclide_ingestion       (material_id, case_id, time_step_number, nuclide) float64 ...\n",
    -       "    nuclide_inhalation      (material_id, case_id, time_step_number, nuclide) float64 ...\n",
    -       "    gamma                   (material_id, case_id, time_step_number, gamma_boundaries) float64 ...\n",
    -       "Attributes:\n",
    -       "    run_name:            * Material Alloy718-Co04, fluxes 104_2_1_1\n",
    -       "    flux_name:           90-degrees bend\n",
    -       "    dose_rate_type:      Point source\n",
    -       "    dose_rate_distance:  1.0
    " - ], - "text/plain": [ - "\n", - "Dimensions: (material_id: 1, case_id: 1, time_step_number: 65,\n", - " nuclide: 215, gamma_boundaries: 25, timestamp: 1)\n", - "Coordinates:\n", - " * material_id (material_id) int64 100\n", - " * case_id (case_id) int64 3\n", - " * time_step_number (time_step_number) int64 1 2 3 4 5 ... 62 63 64 65\n", - " * nuclide (nuclide) object MultiIndex\n", - " * element (nuclide) object 'Al' 'Al' 'Al' ... 'Zr' 'Zr' 'Zr'\n", - " * mass_number (nuclide) int64 26 27 28 29 30 40 ... 93 94 95 96 97\n", - " * state (nuclide) object '' '' '' '' '' ... '' '' '' '' ''\n", - " * gamma_boundaries (gamma_boundaries) float64 1e-11 0.01 ... 14.0 20.0\n", - " elapsed_time (time_step_number) float64 0.0 6.312e+07 ... 3.2e+10\n", - " zai (nuclide) int64 130260 130270 ... 400960 400970\n", - " * timestamp (timestamp) datetime64[ns] 2022-02-21T01:52:47\n", - "Data variables: (12/32)\n", - " irradiation_time (material_id, case_id, time_step_number) float64 ...\n", - " cooling_time (material_id, case_id, time_step_number) float64 ...\n", - " duration (material_id, case_id, time_step_number) float64 ...\n", - " flux (material_id, case_id, time_step_number) float64 ...\n", - " total_atoms (material_id, case_id, time_step_number) float64 ...\n", - " total_activity (material_id, case_id, time_step_number) float64 ...\n", - " ... ...\n", - " nuclide_beta_heat (material_id, case_id, time_step_number, nuclide) float64 ...\n", - " nuclide_gamma_heat (material_id, case_id, time_step_number, nuclide) float64 ...\n", - " nuclide_dose (material_id, case_id, time_step_number, nuclide) float64 ...\n", - " nuclide_ingestion (material_id, case_id, time_step_number, nuclide) float64 ...\n", - " nuclide_inhalation (material_id, case_id, time_step_number, nuclide) float64 ...\n", - " gamma (material_id, case_id, time_step_number, gamma_boundaries) float64 ...\n", - "Attributes:\n", - " run_name: * Material Alloy718-Co04, fluxes 104_2_1_1\n", - " flux_name: 90-degrees bend\n", - " dose_rate_type: Point source\n", - " dose_rate_distance: 1.0" - ] - }, - "execution_count": 475, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "ds =ds.expand_dims(dim={\"material_id\": [material_id], \"case_id\": [case_id]})\n", - "ds" - ] - }, - { - "cell_type": "code", - "execution_count": 476, - "id": "7a9969f8-6583-444f-82ec-2c76ed8cf8cb", - "metadata": { - "tags": [] - }, - "outputs": [ - { - "data": { - "text/html": [ - "
    \n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "
    <xarray.DataArray 'irradiation_time' (material_id: 1, case_id: 1,\n",
    -       "                                      time_step_number: 65)>\n",
    -       "array([[[0.00000000e+00, 6.31152000e+07, 3.78691200e+08, 3.78691200e+08,\n",
    -       "         4.20662808e+08, 4.20662808e+08, 4.20663208e+08, 4.20663208e+08,\n",
    -       "         4.20663608e+08, 4.20663608e+08, 4.20664008e+08, 4.20664008e+08,\n",
    -       "         4.20664408e+08, 4.20664408e+08, 4.20664808e+08, 4.20664808e+08,\n",
    -       "         4.20665208e+08, 4.20665208e+08, 4.20665608e+08, 4.20665608e+08,\n",
    -       "         4.20666008e+08, 4.20666008e+08, 4.20666408e+08, 4.20666408e+08,\n",
    -       "         4.20666808e+08, 4.20666808e+08, 4.20667208e+08, 4.20667208e+08,\n",
    -       "         4.20667608e+08, 4.20667608e+08, 4.20668008e+08, 4.20668008e+08,\n",
    -       "         4.20668408e+08, 4.20668408e+08, 4.20668808e+08, 4.20668808e+08,\n",
    -       "         4.20669208e+08, 4.20669208e+08, 4.20669608e+08, 4.20669608e+08,\n",
    -       "         4.20670008e+08, 4.20670008e+08, 4.20670408e+08, 4.20670408e+08,\n",
    -       "         4.20670808e+08, 4.20670808e+08, 4.20670808e+08, 4.20670808e+08,\n",
    -       "         4.20670808e+08, 4.20670808e+08, 4.20670808e+08, 4.20670808e+08,\n",
    -       "         4.20670808e+08, 4.20670808e+08, 4.20670808e+08, 4.20670808e+08,\n",
    -       "         4.20670808e+08, 4.20670808e+08, 4.20670808e+08, 4.20670808e+08,\n",
    -       "         4.20670808e+08, 4.20670808e+08, 4.20670808e+08, 4.20670808e+08,\n",
    -       "         4.20670808e+08]]])\n",
    -       "Coordinates:\n",
    -       "  * material_id       (material_id) int64 100\n",
    -       "  * case_id           (case_id) int64 3\n",
    -       "  * time_step_number  (time_step_number) int64 1 2 3 4 5 6 ... 60 61 62 63 64 65\n",
    -       "    elapsed_time      (time_step_number) float64 0.0 6.312e+07 ... 3.2e+10\n",
    -       "Attributes:\n",
    -       "    units:    s
    " - ], - "text/plain": [ - "\n", - "array([[[0.00000000e+00, 6.31152000e+07, 3.78691200e+08, 3.78691200e+08,\n", - " 4.20662808e+08, 4.20662808e+08, 4.20663208e+08, 4.20663208e+08,\n", - " 4.20663608e+08, 4.20663608e+08, 4.20664008e+08, 4.20664008e+08,\n", - " 4.20664408e+08, 4.20664408e+08, 4.20664808e+08, 4.20664808e+08,\n", - " 4.20665208e+08, 4.20665208e+08, 4.20665608e+08, 4.20665608e+08,\n", - " 4.20666008e+08, 4.20666008e+08, 4.20666408e+08, 4.20666408e+08,\n", - " 4.20666808e+08, 4.20666808e+08, 4.20667208e+08, 4.20667208e+08,\n", - " 4.20667608e+08, 4.20667608e+08, 4.20668008e+08, 4.20668008e+08,\n", - " 4.20668408e+08, 4.20668408e+08, 4.20668808e+08, 4.20668808e+08,\n", - " 4.20669208e+08, 4.20669208e+08, 4.20669608e+08, 4.20669608e+08,\n", - " 4.20670008e+08, 4.20670008e+08, 4.20670408e+08, 4.20670408e+08,\n", - " 4.20670808e+08, 4.20670808e+08, 4.20670808e+08, 4.20670808e+08,\n", - " 4.20670808e+08, 4.20670808e+08, 4.20670808e+08, 4.20670808e+08,\n", - " 4.20670808e+08, 4.20670808e+08, 4.20670808e+08, 4.20670808e+08,\n", - " 4.20670808e+08, 4.20670808e+08, 4.20670808e+08, 4.20670808e+08,\n", - " 4.20670808e+08, 4.20670808e+08, 4.20670808e+08, 4.20670808e+08,\n", - " 4.20670808e+08]]])\n", - "Coordinates:\n", - " * material_id (material_id) int64 100\n", - " * case_id (case_id) int64 3\n", - " * time_step_number (time_step_number) int64 1 2 3 4 5 6 ... 60 61 62 63 64 65\n", - " elapsed_time (time_step_number) float64 0.0 6.312e+07 ... 3.2e+10\n", - "Attributes:\n", - " units: s" - ] - }, - "execution_count": 476, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "ds.irradiation_time" - ] - }, - { - "cell_type": "code", - "execution_count": 446, - "id": "d9e1ddfb-398e-4cea-b01d-fb0e53242776", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "def drop_tables(con):\n", - " con.execute(\"drop table if exists timestep_gamma\")\n", - " con.execute(\"drop table if exists timestep_nuclide\")\n", - " con.execute(\"drop table if exists timestep\")\n", - " con.execute(\"drop table if exists nuclide\")\n", - " con.execute(\"drop table if exists rundata\")" - ] - }, - { - "cell_type": "code", - "execution_count": 447, - "id": "c402d3a1-e77a-4b24-accc-a19588ccdf54", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "def create_tables(con):\n", - " sql = \"\"\" \n", - " CREATE TABLE IF NOT EXISTS rundata (\n", - " material_id uinteger not null,\n", - " case_id uinteger not null,\n", - " timestamp timestamp not null,\n", - " run_name varchar not null,\n", - " flux_name varchar NOT NULL,\n", - " dose_rate_type varchar NOT NULL,\n", - " dose_rate_distance real NOT NULL,\n", - " primary key(material_id, case_id)\n", - " );\n", - "\n", - " CREATE TABLE IF NOT EXISTS timestep(\n", - " material_id uinteger not null,\n", - " case_id uinteger not null,\n", - " time_step_number uinteger not null,\n", - " elapsed_time float4 not null,\n", - " irradiation_time float4 not null,\n", - " cooling_time float4 not null,\n", - " duration float4 not null,\n", - " flux float4 not null,\n", - " total_atoms float4 not null,\n", - " total_activity float4 not null,\n", - " total_alpha_activity float4 not null,\n", - " total_beta_activity float4 not null,\n", - " total_gamma_activity float4 not null,\n", - " total_mass float4 not null,\n", - " total_heat float4 not null,\n", - " total_alpha_heat float4 null,\n", - " total_beta_heat float4 not null,\n", - " total_gamma_heat float4 not null,\n", - " total_ingest1ion_dose float4 not null,\n", - " total_inhalation_dose float4 not null,\n", - " total_dose_rate float4 not null,\n", - " primary key(material_id, case_id, time_step_number),\n", - " foreign key(material_id, case_id) references rundata(material_id, case_id) \n", - " );\n", - "\n", - " \n", - " CREATE TABLE IF NOT EXISTS nuclide(\n", - " element varchar(2) not null,\n", - " mass_number usmallint not null check(0 < mass_number),\n", - " state varchar(1) not null,\n", - " zai integer not null check(10010 <= zai) unique,\n", - " half_life float4 not null check(0 <= half_life),\n", - " primary key(element, mass_number, state)\n", - " );\n", - " \n", - " CREATE TABLE IF NOT EXISTS timestep_nuclide(\n", - " material_id uinteger not null,\n", - " case_id uinteger not null,\n", - " time_step_number uinteger not null,\n", - " element varchar(2) not null,\n", - " mass_number usmallint not null,\n", - " \n", - " state varchar(1) not null,\n", - " atoms float4 not null,\n", - " grams float4 not null,\n", - " activity float4 not null,\n", - " alpha_activity float4 not null,\n", - " \n", - " beta_activity float4 not null,\n", - " gamma_activity float4 not null,\n", - " heat float4 not null,\n", - " alpha_heat float4 not null,\n", - " beta_heat float4 not null,\n", - " \n", - " gamma_heat float4 not null,\n", - " dose float4 not null,\n", - " ingestion float4 not null,\n", - " inhalation float4 not null,\n", - " \n", - " primary key(material_id, case_id, time_step_number, element, mass_number, state),\n", - " foreign key(material_id, case_id, time_step_number) references timestep(material_id, case_id, time_step_number),\n", - " foreign key(element, mass_number, state) references nuclide(element, mass_number, state) \n", - " );\n", - "\n", - " CREATE TABLE IF NOT EXISTS timestep_gamma(\n", - " material_id uinteger not null,\n", - " case_id uinteger not null,\n", - " time_step_number uinteger not null,\n", - " boundary real not null check(0 <= boundary),\n", - " intensity real not null, \n", - " primary key(material_id, case_id, time_step_number, boundary),\n", - " foreign key(material_id, case_id, time_step_number) references timestep(material_id, case_id, time_step_number),\n", - " );\n", - " \"\"\"\n", - " con.execute(sql)" - ] - }, - { - "cell_type": "code", - "execution_count": 512, - "id": "25f6867e-397a-4e98-a363-74b6af739c88", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "drop_tables(con)\n", - "create_tables(con)" - ] - }, - { - "cell_type": "code", - "execution_count": 513, - "id": "29716201-70f8-40d2-8da7-85689714ec32", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "def save_rundata(con, ds):\n", - " sql = \"\"\"\n", - " INSERT INTO rundata values(?, ?, ?, ?, ?, ?, ?)\n", - " \"\"\"\n", - " con.execute(sql, ( \n", - " ds.material_id.item(),\n", - " ds.case_id.item(),\n", - " ds.timestamp.dt.strftime(\"%Y-%m-%d %H:%M:%S\").item(),\n", - " ds.attrs[\"run_name\"],\n", - " ds.attrs[\"flux_name\"],\n", - " ds.attrs[\"dose_rate_type\"],\n", - " ds.attrs[\"dose_rate_distance\"]\n", - " ))\n", - " con.commit()" - ] - }, - { - "cell_type": "code", - "execution_count": 514, - "id": "c789eedd-580c-4383-8bf1-cc943562a3aa", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "save_rundata(con, ds)" - ] - }, - { - "cell_type": "code", - "execution_count": 515, - "id": "1c650134-edf3-44dd-aa90-ddde6a3987a7", - "metadata": { - "tags": [] - }, - "outputs": [ - { - "data": { - "text/html": [ - "
    \n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
    material_idcase_idtimestamprun_nameflux_namedose_rate_typedose_rate_distance
    010032022-02-21 01:52:47* Material Alloy718-Co04, fluxes 104_2_1_190-degrees bendPoint source1.0
    \n", - "
    " - ], - "text/plain": [ - " material_id case_id timestamp \\\n", - "0 100 3 2022-02-21 01:52:47 \n", - "\n", - " run_name flux_name dose_rate_type \\\n", - "0 * Material Alloy718-Co04, fluxes 104_2_1_1 90-degrees bend Point source \n", - "\n", - " dose_rate_distance \n", - "0 1.0 " - ] - }, - "execution_count": 515, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "con.execute(\"select * from rundata\").df()" - ] - }, - { - "cell_type": "code", - "execution_count": 516, - "id": "cf8661b6-d9cb-4431-8b40-f14072409d5a", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "def save_timesteps(con, ds):\n", - " timesteps_df = ds[\n", - " [\n", - " \"material_id\",\n", - " \"case_id\",\n", - " \"time_step_number\",\n", - " \"elapsed_time\",\n", - " \"irradiation_time\",\n", - " \"cooling_time\",\n", - " \"duration\",\n", - " \"flux\",\n", - " \"total_atoms\",\n", - " \"total_activity\",\n", - " \"total_alpha_activity\",\n", - " \"total_beta_activity\",\n", - " \"total_gamma_activity\",\n", - " \"total_mass\",\n", - " \"total_heat\",\n", - " \"total_alpha_heat\",\n", - " \"total_beta_heat\",\n", - " \"total_gamma_heat\",\n", - " \"total_ingest1ion_dose\",\n", - " \"total_inhalation_dose\",\n", - " \"total_dose_rate\",\n", - " ]\n", - " ].to_dataframe().reset_index()\n", - " sql = \"insert into timestep select * from timesteps_df\"\n", - " con.execute(sql)\n", - " con.commit()" - ] - }, - { - "cell_type": "code", - "execution_count": 517, - "id": "78154d84-9df4-417d-a35f-60252575aae6", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "save_timesteps(con, ds)" - ] - }, - { - "cell_type": "code", - "execution_count": 518, - "id": "bf73ee32-d132-418f-8e77-969d779b780a", - "metadata": { - "tags": [] - }, - "outputs": [ - { - "data": { - "text/html": [ - "
    \n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
    material_idcase_idtime_step_numberelapsed_timeirradiation_timecooling_timedurationfluxtotal_atomstotal_activity...total_beta_activitytotal_gamma_activitytotal_masstotal_heattotal_alpha_heattotal_beta_heattotal_gamma_heattotal_ingest1ion_dosetotal_inhalation_dosetotal_dose_rate
    0100310.000000e+000.00.000000e+000.000000e+000.000000e+001.045481e+221.099260e-02...1.099260e-020.000000e+000.0011.994928e-190.000000e+001.994919e-198.784190e-255.288239e-129.131853e-127.484415e-22
    1100326.311520e+0763115200.00.000000e+006.311520e+072.445200e+101.045481e+222.268685e+07...1.476443e+077.922416e+060.0012.522555e-091.316125e-304.443058e-102.078249e-091.225884e-027.370374e-021.774444e-06
    2100333.786912e+08378691200.00.000000e+003.155760e+081.882800e+111.045484e+222.005898e+08...1.391144e+086.147540e+070.0012.601587e-086.436155e-283.691712e-092.232416e-081.498245e-011.057001e+001.854623e-05
    3100343.997401e+08378691200.02.104892e+072.104892e+070.000000e+001.045484e+225.064473e+07...5.005196e+075.927796e+050.0011.072963e-086.445708e-285.938637e-101.013577e-088.618334e-027.240407e-017.931148e-06
    4100354.417117e+08420662816.02.104892e+074.197161e+073.790000e+111.045484e+223.644599e+08...2.411954e+081.232645e+080.0014.388052e-089.368928e-287.024670e-093.685585e-082.313087e-011.522821e+003.102856e-05
    ..................................................................
    601003617.573741e+08420670816.03.367033e+082.209032e+080.000000e+001.045484e+221.021210e+07...9.725966e+064.861311e+050.0013.030422e-099.414649e-281.199240e-102.910498e-092.524398e-022.288691e-012.231632e-06
    611003621.388526e+09420670816.09.678553e+086.311520e+080.000000e+001.045484e+222.140445e+06...1.934185e+062.062603e+050.0012.260388e-109.414649e-281.325084e-112.127880e-102.034489e-031.899889e-021.650785e-07
    621003632.019678e+09420670816.01.599007e+096.311520e+080.000000e+001.045484e+221.354644e+06...1.266816e+068.782794e+040.0012.303827e-119.414649e-284.691881e-121.834639e-113.442937e-043.528395e-031.529847e-08
    631003643.597558e+09420670816.03.176887e+091.577880e+090.000000e+001.045484e+228.909484e+05...8.798868e+051.106160e+040.0016.016502e-129.414649e-282.779170e-123.237332e-121.548528e-041.769614e-032.999845e-09
    641003653.199940e+10420670816.03.157873e+102.840184e+100.000000e+001.045484e+223.152101e+04...3.071513e+048.058719e+020.0013.465519e-129.414649e-283.548016e-133.110717e-122.518117e-056.220313e-042.701462e-09
    \n", - "

    65 rows × 21 columns

    \n", - "
    " - ], - "text/plain": [ - " material_id case_id time_step_number elapsed_time irradiation_time \\\n", - "0 100 3 1 0.000000e+00 0.0 \n", - "1 100 3 2 6.311520e+07 63115200.0 \n", - "2 100 3 3 3.786912e+08 378691200.0 \n", - "3 100 3 4 3.997401e+08 378691200.0 \n", - "4 100 3 5 4.417117e+08 420662816.0 \n", - ".. ... ... ... ... ... \n", - "60 100 3 61 7.573741e+08 420670816.0 \n", - "61 100 3 62 1.388526e+09 420670816.0 \n", - "62 100 3 63 2.019678e+09 420670816.0 \n", - "63 100 3 64 3.597558e+09 420670816.0 \n", - "64 100 3 65 3.199940e+10 420670816.0 \n", - "\n", - " cooling_time duration flux total_atoms total_activity \\\n", - "0 0.000000e+00 0.000000e+00 0.000000e+00 1.045481e+22 1.099260e-02 \n", - "1 0.000000e+00 6.311520e+07 2.445200e+10 1.045481e+22 2.268685e+07 \n", - "2 0.000000e+00 3.155760e+08 1.882800e+11 1.045484e+22 2.005898e+08 \n", - "3 2.104892e+07 2.104892e+07 0.000000e+00 1.045484e+22 5.064473e+07 \n", - "4 2.104892e+07 4.197161e+07 3.790000e+11 1.045484e+22 3.644599e+08 \n", - ".. ... ... ... ... ... \n", - "60 3.367033e+08 2.209032e+08 0.000000e+00 1.045484e+22 1.021210e+07 \n", - "61 9.678553e+08 6.311520e+08 0.000000e+00 1.045484e+22 2.140445e+06 \n", - "62 1.599007e+09 6.311520e+08 0.000000e+00 1.045484e+22 1.354644e+06 \n", - "63 3.176887e+09 1.577880e+09 0.000000e+00 1.045484e+22 8.909484e+05 \n", - "64 3.157873e+10 2.840184e+10 0.000000e+00 1.045484e+22 3.152101e+04 \n", - "\n", - " ... total_beta_activity total_gamma_activity total_mass total_heat \\\n", - "0 ... 1.099260e-02 0.000000e+00 0.001 1.994928e-19 \n", - "1 ... 1.476443e+07 7.922416e+06 0.001 2.522555e-09 \n", - "2 ... 1.391144e+08 6.147540e+07 0.001 2.601587e-08 \n", - "3 ... 5.005196e+07 5.927796e+05 0.001 1.072963e-08 \n", - "4 ... 2.411954e+08 1.232645e+08 0.001 4.388052e-08 \n", - ".. ... ... ... ... ... \n", - "60 ... 9.725966e+06 4.861311e+05 0.001 3.030422e-09 \n", - "61 ... 1.934185e+06 2.062603e+05 0.001 2.260388e-10 \n", - "62 ... 1.266816e+06 8.782794e+04 0.001 2.303827e-11 \n", - "63 ... 8.798868e+05 1.106160e+04 0.001 6.016502e-12 \n", - "64 ... 3.071513e+04 8.058719e+02 0.001 3.465519e-12 \n", - "\n", - " total_alpha_heat total_beta_heat total_gamma_heat \\\n", - "0 0.000000e+00 1.994919e-19 8.784190e-25 \n", - "1 1.316125e-30 4.443058e-10 2.078249e-09 \n", - "2 6.436155e-28 3.691712e-09 2.232416e-08 \n", - "3 6.445708e-28 5.938637e-10 1.013577e-08 \n", - "4 9.368928e-28 7.024670e-09 3.685585e-08 \n", - ".. ... ... ... \n", - "60 9.414649e-28 1.199240e-10 2.910498e-09 \n", - "61 9.414649e-28 1.325084e-11 2.127880e-10 \n", - "62 9.414649e-28 4.691881e-12 1.834639e-11 \n", - "63 9.414649e-28 2.779170e-12 3.237332e-12 \n", - "64 9.414649e-28 3.548016e-13 3.110717e-12 \n", - "\n", - " total_ingest1ion_dose total_inhalation_dose total_dose_rate \n", - "0 5.288239e-12 9.131853e-12 7.484415e-22 \n", - "1 1.225884e-02 7.370374e-02 1.774444e-06 \n", - "2 1.498245e-01 1.057001e+00 1.854623e-05 \n", - "3 8.618334e-02 7.240407e-01 7.931148e-06 \n", - "4 2.313087e-01 1.522821e+00 3.102856e-05 \n", - ".. ... ... ... \n", - "60 2.524398e-02 2.288691e-01 2.231632e-06 \n", - "61 2.034489e-03 1.899889e-02 1.650785e-07 \n", - "62 3.442937e-04 3.528395e-03 1.529847e-08 \n", - "63 1.548528e-04 1.769614e-03 2.999845e-09 \n", - "64 2.518117e-05 6.220313e-04 2.701462e-09 \n", - "\n", - "[65 rows x 21 columns]" - ] - }, - "execution_count": 518, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "con.execute(\"select * from timestep\").df()" - ] - }, - { - "cell_type": "code", - "execution_count": 533, - "id": "c5fdb6e7-00b7-40f1-9d8d-f755dd768a97", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "def save_nuclides(con, ds):\n", - " nuclides_df = ds[[\"element\", \"mass_number\", \"state\", \"zai\", \"nuclide_half_life\"]] \\\n", - " .reset_index([\"material_id\", \"case_id\"]) \\\n", - " .to_dataframe() \\\n", - " .reset_index(\n", - " [\n", - " \"material_id\", \"case_id\"\n", - " ],\n", - " drop=True\n", - " ) \\\n", - " .reset_index(drop=True)\n", - " sql = \"insert or ignore into nuclide select * from nuclides_df\"\n", - " con.execute(sql)\n", - " con.commit()" - ] - }, - { - "cell_type": "code", - "execution_count": 534, - "id": "2cd4e47d-1ec3-493c-b655-8a83917deea5", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "save_nuclides(con, ds)" - ] - }, - { - "cell_type": "code", - "execution_count": 535, - "id": "1f6cbb0e-e893-4d88-a744-989d9b39e0a4", - "metadata": { - "tags": [] - }, - "outputs": [ - { - "data": { - "text/html": [ - "
    \n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
    elementmass_numberstatezaihalf_life
    0Al261302602.262630e+13
    1Al271302700.000000e+00
    2Al281302801.344600e+02
    3Al291302903.936000e+02
    4Al301303003.650000e+00
    ..................
    210Zr934009304.828210e+13
    211Zr944009401.893460e+23
    212Zr954009505.532360e+06
    213Zr964009601.230750e+27
    214Zr974009706.027840e+04
    \n", - "

    215 rows × 5 columns

    \n", - "
    " - ], - "text/plain": [ - " element mass_number state zai half_life\n", - "0 Al 26 130260 2.262630e+13\n", - "1 Al 27 130270 0.000000e+00\n", - "2 Al 28 130280 1.344600e+02\n", - "3 Al 29 130290 3.936000e+02\n", - "4 Al 30 130300 3.650000e+00\n", - ".. ... ... ... ... ...\n", - "210 Zr 93 400930 4.828210e+13\n", - "211 Zr 94 400940 1.893460e+23\n", - "212 Zr 95 400950 5.532360e+06\n", - "213 Zr 96 400960 1.230750e+27\n", - "214 Zr 97 400970 6.027840e+04\n", - "\n", - "[215 rows x 5 columns]" - ] - }, - "execution_count": 535, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "con.execute(\"select * from nuclide\").df()" - ] - }, - { - "cell_type": "code", - "execution_count": 559, - "id": "1161cef3-d3cf-4c2f-aa2d-2c1ea9ee9208", - "metadata": { - "tags": [] - }, - "outputs": [ - { - "data": { - "text/html": [ - "
    \n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
    material_idcase_idtime_step_number0
    0100310.0
    11003263115200.0
    210033378691200.0
    310034378691200.0
    410035420662808.0
    ...............
    60100361420670808.0
    61100362420670808.0
    62100363420670808.0
    63100364420670808.0
    64100365420670808.0
    \n", + "

    65 rows × 4 columns

    \n", + "
    " + ], + "text/plain": [ + " material_id case_id time_step_number 0\n", + "0 100 3 1 0.0\n", + "1 100 3 2 63115200.0\n", + "2 100 3 3 378691200.0\n", + "3 100 3 4 378691200.0\n", + "4 100 3 5 420662808.0\n", + ".. ... ... ... ...\n", + "60 100 3 61 420670808.0\n", + "61 100 3 62 420670808.0\n", + "62 100 3 63 420670808.0\n", + "63 100 3 64 420670808.0\n", + "64 100 3 65 420670808.0\n", + "\n", + "[65 rows x 4 columns]" + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ds.irradiation_time.stack({\"idx\":[\"material_id\", \"case_id\", \"time_step_number\"]}).to_pandas().reset_index()" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "id": "d9e1ddfb-398e-4cea-b01d-fb0e53242776", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "def drop_tables(con):\n", + " con.execute(\"drop table if exists timestep_gamma\")\n", + " con.execute(\"drop table if exists timestep_nuclide\")\n", + " con.execute(\"drop table if exists timestep\")\n", + " con.execute(\"drop table if exists nuclide\")\n", + " con.execute(\"drop table if exists rundata\")" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "c402d3a1-e77a-4b24-accc-a19588ccdf54", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "def create_tables(con):\n", + " sql = \"\"\" \n", + " CREATE TABLE IF NOT EXISTS rundata (\n", + " material_id uinteger not null,\n", + " case_id uinteger not null,\n", + " timestamp timestamp not null,\n", + " run_name varchar not null,\n", + " flux_name varchar NOT NULL,\n", + " dose_rate_type varchar NOT NULL,\n", + " dose_rate_distance real NOT NULL,\n", + " primary key(material_id, case_id)\n", + " );\n", + "\n", + " CREATE TABLE IF NOT EXISTS timestep(\n", + " material_id uinteger not null,\n", + " case_id uinteger not null,\n", + " time_step_number uinteger not null,\n", + " elapsed_time float4 not null,\n", + " irradiation_time float4 not null,\n", + " cooling_time float4 not null,\n", + " duration float4 not null,\n", + " flux float4 not null,\n", + " total_atoms float4 not null,\n", + " total_activity float4 not null,\n", + " total_alpha_activity float4 not null,\n", + " total_beta_activity float4 not null,\n", + " total_gamma_activity float4 not null,\n", + " total_mass float4 not null,\n", + " total_heat float4 not null,\n", + " total_alpha_heat float4 null,\n", + " total_beta_heat float4 not null,\n", + " total_gamma_heat float4 not null,\n", + " total_ingest1ion_dose float4 not null,\n", + " total_inhalation_dose float4 not null,\n", + " total_dose_rate float4 not null,\n", + " primary key(material_id, case_id, time_step_number),\n", + " foreign key(material_id, case_id) references rundata(material_id, case_id) \n", + " );\n", + "\n", + " \n", + " CREATE TABLE IF NOT EXISTS nuclide(\n", + " element varchar(2) not null,\n", + " mass_number usmallint not null check(0 < mass_number),\n", + " state varchar(1) not null,\n", + " zai integer not null check(10010 <= zai) unique,\n", + " half_life float4 not null check(0 <= half_life),\n", + " primary key(element, mass_number, state)\n", + " );\n", + " \n", + " CREATE TABLE IF NOT EXISTS timestep_nuclide(\n", + " material_id uinteger not null,\n", + " case_id uinteger not null,\n", + " time_step_number uinteger not null,\n", + " element varchar(2) not null,\n", + " mass_number usmallint not null,\n", + " \n", + " state varchar(1) not null,\n", + " atoms float4 not null,\n", + " grams float4 not null,\n", + " activity float4 not null,\n", + " alpha_activity float4 not null,\n", + " \n", + " beta_activity float4 not null,\n", + " gamma_activity float4 not null,\n", + " heat float4 not null,\n", + " alpha_heat float4 not null,\n", + " beta_heat float4 not null,\n", + " \n", + " gamma_heat float4 not null,\n", + " dose float4 not null,\n", + " ingestion float4 not null,\n", + " inhalation float4 not null,\n", + " \n", + " primary key(material_id, case_id, time_step_number, element, mass_number, state),\n", + " foreign key(material_id, case_id, time_step_number) references timestep(material_id, case_id, time_step_number),\n", + " foreign key(element, mass_number, state) references nuclide(element, mass_number, state) \n", + " );\n", + "\n", + " CREATE TABLE IF NOT EXISTS timestep_gamma(\n", + " material_id uinteger not null,\n", + " case_id uinteger not null,\n", + " time_step_number uinteger not null,\n", + " boundary real not null check(0 <= boundary),\n", + " intensity real not null, \n", + " primary key(material_id, case_id, time_step_number, boundary),\n", + " foreign key(material_id, case_id, time_step_number) references timestep(material_id, case_id, time_step_number),\n", + " );\n", + " \"\"\"\n", + " con.execute(sql)" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "25f6867e-397a-4e98-a363-74b6af739c88", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "drop_tables(con)\n", + "create_tables(con)" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "29716201-70f8-40d2-8da7-85689714ec32", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "def save_rundata(con, ds):\n", + " sql = \"\"\"\n", + " INSERT INTO rundata values(?, ?, ?, ?, ?, ?, ?)\n", + " \"\"\"\n", + " con.execute(sql, ( \n", + " ds.material_id.item(),\n", + " ds.case_id.item(),\n", + " ds.timestamp.dt.strftime(\"%Y-%m-%d %H:%M:%S\").item(),\n", + " ds.attrs[\"run_name\"],\n", + " ds.attrs[\"flux_name\"],\n", + " ds.attrs[\"dose_rate_type\"],\n", + " ds.attrs[\"dose_rate_distance\"]\n", + " ))\n", + " con.commit()" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "c789eedd-580c-4383-8bf1-cc943562a3aa", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "save_rundata(con, ds)" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "id": "1c650134-edf3-44dd-aa90-ddde6a3987a7", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "text/html": [ + "
    \n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
    material_idcase_idtimestamprun_nameflux_namedose_rate_typedose_rate_distance
    010032022-02-21 01:52:47* Material Alloy718-Co04, fluxes 104_2_1_190-degrees bendPoint source1.0
    \n", + "
    " + ], + "text/plain": [ + " material_id case_id timestamp \\\n", + "0 100 3 2022-02-21 01:52:47 \n", "\n", - ".xr-index-preview {\n", - " grid-column: 2 / 5;\n", - " color: var(--xr-font-color2);\n", - "}\n", + " run_name flux_name dose_rate_type \\\n", + "0 * Material Alloy718-Co04, fluxes 104_2_1_1 90-degrees bend Point source \n", "\n", - ".xr-var-name,\n", - ".xr-var-dims,\n", - ".xr-var-dtype,\n", - ".xr-preview,\n", - ".xr-attrs dt {\n", - " white-space: nowrap;\n", - " overflow: hidden;\n", - " text-overflow: ellipsis;\n", - " padding-right: 10px;\n", - "}\n", + " dose_rate_distance \n", + "0 1.0 " + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "con.execute(\"select * from rundata\").df()" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "id": "cf8661b6-d9cb-4431-8b40-f14072409d5a", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "def save_timesteps(con, ds):\n", + " timesteps_df = ds[\n", + " [\n", + " \"material_id\",\n", + " \"case_id\",\n", + " \"time_step_number\",\n", + " \"elapsed_time\",\n", + " \"irradiation_time\",\n", + " \"cooling_time\",\n", + " \"duration\",\n", + " \"flux\",\n", + " \"total_atoms\",\n", + " \"total_activity\",\n", + " \"total_alpha_activity\",\n", + " \"total_beta_activity\",\n", + " \"total_gamma_activity\",\n", + " \"total_mass\",\n", + " \"total_heat\",\n", + " \"total_alpha_heat\",\n", + " \"total_beta_heat\",\n", + " \"total_gamma_heat\",\n", + " \"total_ingest1ion_dose\",\n", + " \"total_inhalation_dose\",\n", + " \"total_dose_rate\",\n", + " ]\n", + " ].to_dataframe().reset_index()\n", + " sql = \"insert into timestep select * from timesteps_df\"\n", + " con.execute(sql)\n", + " con.commit()" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "id": "78154d84-9df4-417d-a35f-60252575aae6", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "save_timesteps(con, ds)" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "id": "bf73ee32-d132-418f-8e77-969d779b780a", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "text/html": [ + "
    \n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
    material_idcase_idtime_step_numberelapsed_timeirradiation_timecooling_timedurationfluxtotal_atomstotal_activity...total_beta_activitytotal_gamma_activitytotal_masstotal_heattotal_alpha_heattotal_beta_heattotal_gamma_heattotal_ingest1ion_dosetotal_inhalation_dosetotal_dose_rate
    0100310.000000e+000.00.000000e+000.000000e+000.000000e+001.045481e+221.099260e-02...1.099260e-020.000000e+000.0011.994928e-190.000000e+001.994919e-198.784190e-255.288239e-129.131853e-127.484415e-22
    1100326.311520e+0763115200.00.000000e+006.311520e+072.445200e+101.045481e+222.268685e+07...1.476443e+077.922416e+060.0012.522555e-091.316125e-304.443058e-102.078249e-091.225884e-027.370374e-021.774444e-06
    2100333.786912e+08378691200.00.000000e+003.155760e+081.882800e+111.045484e+222.005898e+08...1.391144e+086.147540e+070.0012.601587e-086.436155e-283.691712e-092.232416e-081.498245e-011.057001e+001.854623e-05
    3100343.997401e+08378691200.02.104892e+072.104892e+070.000000e+001.045484e+225.064473e+07...5.005196e+075.927796e+050.0011.072963e-086.445708e-285.938637e-101.013577e-088.618334e-027.240407e-017.931148e-06
    4100354.417117e+08420662816.02.104892e+074.197161e+073.790000e+111.045484e+223.644599e+08...2.411954e+081.232645e+080.0014.388052e-089.368928e-287.024670e-093.685585e-082.313087e-011.522821e+003.102856e-05
    ..................................................................
    601003617.573741e+08420670816.03.367033e+082.209032e+080.000000e+001.045484e+221.021210e+07...9.725966e+064.861311e+050.0013.030422e-099.414649e-281.199240e-102.910498e-092.524398e-022.288691e-012.231632e-06
    611003621.388526e+09420670816.09.678553e+086.311520e+080.000000e+001.045484e+222.140445e+06...1.934185e+062.062603e+050.0012.260388e-109.414649e-281.325084e-112.127880e-102.034489e-031.899889e-021.650785e-07
    621003632.019678e+09420670816.01.599007e+096.311520e+080.000000e+001.045484e+221.354644e+06...1.266816e+068.782794e+040.0012.303827e-119.414649e-284.691881e-121.834639e-113.442937e-043.528395e-031.529847e-08
    631003643.597558e+09420670816.03.176887e+091.577880e+090.000000e+001.045484e+228.909484e+05...8.798868e+051.106160e+040.0016.016502e-129.414649e-282.779170e-123.237332e-121.548528e-041.769614e-032.999845e-09
    641003653.199940e+10420670816.03.157873e+102.840184e+100.000000e+001.045484e+223.152101e+04...3.071513e+048.058719e+020.0013.465519e-129.414649e-283.548016e-133.110717e-122.518117e-056.220313e-042.701462e-09
    \n", + "

    65 rows × 21 columns

    \n", + "
    " + ], + "text/plain": [ + " material_id case_id time_step_number elapsed_time irradiation_time \\\n", + "0 100 3 1 0.000000e+00 0.0 \n", + "1 100 3 2 6.311520e+07 63115200.0 \n", + "2 100 3 3 3.786912e+08 378691200.0 \n", + "3 100 3 4 3.997401e+08 378691200.0 \n", + "4 100 3 5 4.417117e+08 420662816.0 \n", + ".. ... ... ... ... ... \n", + "60 100 3 61 7.573741e+08 420670816.0 \n", + "61 100 3 62 1.388526e+09 420670816.0 \n", + "62 100 3 63 2.019678e+09 420670816.0 \n", + "63 100 3 64 3.597558e+09 420670816.0 \n", + "64 100 3 65 3.199940e+10 420670816.0 \n", "\n", - ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n", - ".xr-var-data-in:checked ~ .xr-var-data,\n", - ".xr-index-data-in:checked ~ .xr-index-data {\n", - " display: block;\n", - "}\n", + " cooling_time duration flux total_atoms total_activity \\\n", + "0 0.000000e+00 0.000000e+00 0.000000e+00 1.045481e+22 1.099260e-02 \n", + "1 0.000000e+00 6.311520e+07 2.445200e+10 1.045481e+22 2.268685e+07 \n", + "2 0.000000e+00 3.155760e+08 1.882800e+11 1.045484e+22 2.005898e+08 \n", + "3 2.104892e+07 2.104892e+07 0.000000e+00 1.045484e+22 5.064473e+07 \n", + "4 2.104892e+07 4.197161e+07 3.790000e+11 1.045484e+22 3.644599e+08 \n", + ".. ... ... ... ... ... \n", + "60 3.367033e+08 2.209032e+08 0.000000e+00 1.045484e+22 1.021210e+07 \n", + "61 9.678553e+08 6.311520e+08 0.000000e+00 1.045484e+22 2.140445e+06 \n", + "62 1.599007e+09 6.311520e+08 0.000000e+00 1.045484e+22 1.354644e+06 \n", + "63 3.176887e+09 1.577880e+09 0.000000e+00 1.045484e+22 8.909484e+05 \n", + "64 3.157873e+10 2.840184e+10 0.000000e+00 1.045484e+22 3.152101e+04 \n", "\n", - ".xr-var-data > table {\n", - " float: right;\n", - "}\n", + " ... total_beta_activity total_gamma_activity total_mass total_heat \\\n", + "0 ... 1.099260e-02 0.000000e+00 0.001 1.994928e-19 \n", + "1 ... 1.476443e+07 7.922416e+06 0.001 2.522555e-09 \n", + "2 ... 1.391144e+08 6.147540e+07 0.001 2.601587e-08 \n", + "3 ... 5.005196e+07 5.927796e+05 0.001 1.072963e-08 \n", + "4 ... 2.411954e+08 1.232645e+08 0.001 4.388052e-08 \n", + ".. ... ... ... ... ... \n", + "60 ... 9.725966e+06 4.861311e+05 0.001 3.030422e-09 \n", + "61 ... 1.934185e+06 2.062603e+05 0.001 2.260388e-10 \n", + "62 ... 1.266816e+06 8.782794e+04 0.001 2.303827e-11 \n", + "63 ... 8.798868e+05 1.106160e+04 0.001 6.016502e-12 \n", + "64 ... 3.071513e+04 8.058719e+02 0.001 3.465519e-12 \n", "\n", - ".xr-var-name span,\n", - ".xr-var-data,\n", - ".xr-index-name div,\n", - ".xr-index-data,\n", - ".xr-attrs {\n", - " padding-left: 25px !important;\n", - "}\n", + " total_alpha_heat total_beta_heat total_gamma_heat \\\n", + "0 0.000000e+00 1.994919e-19 8.784190e-25 \n", + "1 1.316125e-30 4.443058e-10 2.078249e-09 \n", + "2 6.436155e-28 3.691712e-09 2.232416e-08 \n", + "3 6.445708e-28 5.938637e-10 1.013577e-08 \n", + "4 9.368928e-28 7.024670e-09 3.685585e-08 \n", + ".. ... ... ... \n", + "60 9.414649e-28 1.199240e-10 2.910498e-09 \n", + "61 9.414649e-28 1.325084e-11 2.127880e-10 \n", + "62 9.414649e-28 4.691881e-12 1.834639e-11 \n", + "63 9.414649e-28 2.779170e-12 3.237332e-12 \n", + "64 9.414649e-28 3.548016e-13 3.110717e-12 \n", "\n", - ".xr-attrs,\n", - ".xr-var-attrs,\n", - ".xr-var-data,\n", - ".xr-index-data {\n", - " grid-column: 1 / -1;\n", - "}\n", + " total_ingest1ion_dose total_inhalation_dose total_dose_rate \n", + "0 5.288239e-12 9.131853e-12 7.484415e-22 \n", + "1 1.225884e-02 7.370374e-02 1.774444e-06 \n", + "2 1.498245e-01 1.057001e+00 1.854623e-05 \n", + "3 8.618334e-02 7.240407e-01 7.931148e-06 \n", + "4 2.313087e-01 1.522821e+00 3.102856e-05 \n", + ".. ... ... ... \n", + "60 2.524398e-02 2.288691e-01 2.231632e-06 \n", + "61 2.034489e-03 1.899889e-02 1.650785e-07 \n", + "62 3.442937e-04 3.528395e-03 1.529847e-08 \n", + "63 1.548528e-04 1.769614e-03 2.999845e-09 \n", + "64 2.518117e-05 6.220313e-04 2.701462e-09 \n", "\n", - "dl.xr-attrs {\n", - " padding: 0;\n", - " margin: 0;\n", - " display: grid;\n", - " grid-template-columns: 125px auto;\n", - "}\n", + "[65 rows x 21 columns]" + ] + }, + "execution_count": 29, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "con.execute(\"select * from timestep\").df()" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "id": "9b2d9205-284f-48bf-8817-04dce78e16fd", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "text/html": [ + "
    \n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
    elementmass_numberstatezainuclide_half_life
    0Al261302602.262630e+13
    1Al271302700.000000e+00
    2Al281302801.344600e+02
    3Al291302903.936000e+02
    4Al301303003.650000e+00
    ..................
    210Zr934009304.828210e+13
    211Zr944009401.893460e+23
    212Zr954009505.532360e+06
    213Zr964009601.230750e+27
    214Zr974009706.027840e+04
    \n", + "

    215 rows × 5 columns

    \n", + "
    " + ], + "text/plain": [ + " element mass_number state zai nuclide_half_life\n", + "0 Al 26 130260 2.262630e+13\n", + "1 Al 27 130270 0.000000e+00\n", + "2 Al 28 130280 1.344600e+02\n", + "3 Al 29 130290 3.936000e+02\n", + "4 Al 30 130300 3.650000e+00\n", + ".. ... ... ... ... ...\n", + "210 Zr 93 400930 4.828210e+13\n", + "211 Zr 94 400940 1.893460e+23\n", + "212 Zr 95 400950 5.532360e+06\n", + "213 Zr 96 400960 1.230750e+27\n", + "214 Zr 97 400970 6.027840e+04\n", "\n", - ".xr-attrs dt:hover span {\n", - " display: inline-block;\n", - " background: var(--xr-background-color);\n", - " padding-right: 10px;\n", - "}\n", + "[215 rows x 5 columns]" + ] + }, + "execution_count": 55, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "columns_all = [\"element\", \"mass_number\", \"state\", \"zai\", \"nuclide_half_life\"]\n", + "columns = [\"zai\", \"nuclide_half_life\"]\n", + "ds[columns].to_dataframe()[columns].reset_index()[columns_all]\n", + "# .unstack(\"nuclide\") \n", + "# .stack({\"idx\": [\"material_id\", \"case_id\", \"element\", \"mass_number\", \"state\"]}) \\\n", + "# .to_dataframe()\n", + "\n", + "# \\\n", + "# .reset_index([\"material_id\", \"case_id\"]) \\\n", + "# .to_dataframe() \\\n", + "# .reset_index(\n", + "# [\n", + "# \"material_id\", \"case_id\"\n", + "# ],\n", + "# drop=True\n", + "# ) \\\n", + "# .reset_index(drop=True)" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "id": "c5fdb6e7-00b7-40f1-9d8d-f755dd768a97", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "def save_nuclides(con, ds):\n", + " columns_all = [\"element\", \"mass_number\", \"state\", \"zai\", \"nuclide_half_life\"]\n", + " columns = [\"zai\", \"nuclide_half_life\"]\n", + " nuclides_df = ds[columns].to_dataframe()[columns].reset_index()[columns_all]\n", + " sql = \"insert or ignore into nuclide select * from nuclides_df\"\n", + " con.execute(sql)\n", + " con.commit()" + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "id": "2cd4e47d-1ec3-493c-b655-8a83917deea5", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "save_nuclides(con, ds)" + ] + }, + { + "cell_type": "code", + "execution_count": 58, + "id": "1f6cbb0e-e893-4d88-a744-989d9b39e0a4", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "text/html": [ + "
    \n", + "
    <xarray.Dataset>\n",
    -       "Dimensions:           (material_id: 1, case_id: 1, time_step_number: 65,\n",
    -       "                       nuclide: 215)\n",
    -       "Coordinates:\n",
    -       "  * material_id       (material_id) int64 100\n",
    -       "  * case_id           (case_id) int64 3\n",
    -       "  * time_step_number  (time_step_number) int64 1 2 3 4 5 6 ... 60 61 62 63 64 65\n",
    -       "  * element           (nuclide) object 'Al' 'Al' 'Al' 'Al' ... 'Zr' 'Zr' 'Zr'\n",
    -       "  * mass_number       (nuclide) int64 26 27 28 29 30 40 10 ... 92 93 94 95 96 97\n",
    -       "  * state             (nuclide) object '' '' '' '' '' '' ... '' '' '' '' '' ''\n",
    -       "  * nuclide           (nuclide) object MultiIndex\n",
    -       "    elapsed_time      (time_step_number) float64 0.0 6.312e+07 ... 3.2e+10\n",
    -       "    zai               (nuclide) int64 130260 130270 130280 ... 400960 400970\n",
    -       "Data variables:\n",
    -       "    *empty*\n",
    -       "Attributes:\n",
    -       "    run_name:            * Material Alloy718-Co04, fluxes 104_2_1_1\n",
    -       "    flux_name:           90-degrees bend\n",
    -       "    dose_rate_type:      Point source\n",
    -       "    dose_rate_distance:  1.0
    " + " .dataframe thead th {\n", + " text-align: right;\n", + " }\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
    elementmass_numberstatezaihalf_life
    0Al261302602.262630e+13
    1Al271302700.000000e+00
    2Al281302801.344600e+02
    3Al291302903.936000e+02
    4Al301303003.650000e+00
    ..................
    210Zr934009304.828210e+13
    211Zr944009401.893460e+23
    212Zr954009505.532360e+06
    213Zr964009601.230750e+27
    214Zr974009706.027840e+04
    \n", + "

    215 rows × 5 columns

    \n", + "" + ], + "text/plain": [ + " element mass_number state zai half_life\n", + "0 Al 26 130260 2.262630e+13\n", + "1 Al 27 130270 0.000000e+00\n", + "2 Al 28 130280 1.344600e+02\n", + "3 Al 29 130290 3.936000e+02\n", + "4 Al 30 130300 3.650000e+00\n", + ".. ... ... ... ... ...\n", + "210 Zr 93 400930 4.828210e+13\n", + "211 Zr 94 400940 1.893460e+23\n", + "212 Zr 95 400950 5.532360e+06\n", + "213 Zr 96 400960 1.230750e+27\n", + "214 Zr 97 400970 6.027840e+04\n", + "\n", + "[215 rows x 5 columns]" + ] + }, + "execution_count": 58, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "con.execute(\"select * from nuclide\").df()" + ] + }, + { + "cell_type": "code", + "execution_count": 91, + "id": "1161cef3-d3cf-4c2f-aa2d-2c1ea9ee9208", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "text/html": [ + "
    \n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
    material_idcase_idtime_step_numberelementmass_numberstatenuclide_atomsnuclide_gramsnuclide_activitynuclide_alpha_activitynuclide_beta_activitynuclide_gamma_activitynuclide_heatnuclide_alpha_heatnuclide_beta_heatnuclide_gamma_heatnuclide_dosenuclide_ingestionnuclide_inhalation
    010031Al260.000000e+000.000000e+000.0000000.00.0000000.00.000000e+000.00.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00
    110032Al261.110297e+114.791169e-120.0034010.00.0034010.01.675088e-180.02.173910e-191.457697e-181.085307e-151.190471e-116.802694e-11
    210033Al264.381537e+121.890728e-100.1342270.00.1342270.06.610360e-170.08.578851e-185.752474e-174.282920e-144.697929e-102.684531e-09
    310034Al264.381534e+121.890726e-100.1342260.00.1342260.06.610355e-170.08.578846e-185.752471e-174.282917e-144.697926e-102.684529e-09
    410035Al265.523492e+122.383506e-100.1692100.00.1692100.08.333209e-170.01.081475e-177.251735e-175.399172e-145.922345e-103.384197e-09
    ............................................................
    13970100361Zr970.000000e+000.000000e+000.0000000.00.0000000.00.000000e+000.00.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00
    13971100362Zr970.000000e+000.000000e+000.0000000.00.0000000.00.000000e+000.00.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00
    13972100363Zr970.000000e+000.000000e+000.0000000.00.0000000.00.000000e+000.00.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00
    13973100364Zr970.000000e+000.000000e+000.0000000.00.0000000.00.000000e+000.00.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00
    13974100365Zr970.000000e+000.000000e+000.0000000.00.0000000.00.000000e+000.00.000000e+000.000000e+000.000000e+000.000000e+000.000000e+00
    \n", + "

    13975 rows × 19 columns

    \n", + "
    " ], "text/plain": [ - "\n", - "Dimensions: (material_id: 1, case_id: 1, time_step_number: 65,\n", - " nuclide: 215)\n", - "Coordinates:\n", - " * material_id (material_id) int64 100\n", - " * case_id (case_id) int64 3\n", - " * time_step_number (time_step_number) int64 1 2 3 4 5 6 ... 60 61 62 63 64 65\n", - " * element (nuclide) object 'Al' 'Al' 'Al' 'Al' ... 'Zr' 'Zr' 'Zr'\n", - " * mass_number (nuclide) int64 26 27 28 29 30 40 10 ... 92 93 94 95 96 97\n", - " * state (nuclide) object '' '' '' '' '' '' ... '' '' '' '' '' ''\n", - " * nuclide (nuclide) object MultiIndex\n", - " elapsed_time (time_step_number) float64 0.0 6.312e+07 ... 3.2e+10\n", - " zai (nuclide) int64 130260 130270 130280 ... 400960 400970\n", - "Data variables:\n", - " *empty*\n", - "Attributes:\n", - " run_name: * Material Alloy718-Co04, fluxes 104_2_1_1\n", - " flux_name: 90-degrees bend\n", - " dose_rate_type: Point source\n", - " dose_rate_distance: 1.0" + " material_id case_id time_step_number element mass_number state \\\n", + "0 100 3 1 Al 26 \n", + "1 100 3 2 Al 26 \n", + "2 100 3 3 Al 26 \n", + "3 100 3 4 Al 26 \n", + "4 100 3 5 Al 26 \n", + "... ... ... ... ... ... ... \n", + "13970 100 3 61 Zr 97 \n", + "13971 100 3 62 Zr 97 \n", + "13972 100 3 63 Zr 97 \n", + "13973 100 3 64 Zr 97 \n", + "13974 100 3 65 Zr 97 \n", + "\n", + " nuclide_atoms nuclide_grams nuclide_activity nuclide_alpha_activity \\\n", + "0 0.000000e+00 0.000000e+00 0.000000 0.0 \n", + "1 1.110297e+11 4.791169e-12 0.003401 0.0 \n", + "2 4.381537e+12 1.890728e-10 0.134227 0.0 \n", + "3 4.381534e+12 1.890726e-10 0.134226 0.0 \n", + "4 5.523492e+12 2.383506e-10 0.169210 0.0 \n", + "... ... ... ... ... \n", + "13970 0.000000e+00 0.000000e+00 0.000000 0.0 \n", + "13971 0.000000e+00 0.000000e+00 0.000000 0.0 \n", + "13972 0.000000e+00 0.000000e+00 0.000000 0.0 \n", + "13973 0.000000e+00 0.000000e+00 0.000000 0.0 \n", + "13974 0.000000e+00 0.000000e+00 0.000000 0.0 \n", + "\n", + " nuclide_beta_activity nuclide_gamma_activity nuclide_heat \\\n", + "0 0.000000 0.0 0.000000e+00 \n", + "1 0.003401 0.0 1.675088e-18 \n", + "2 0.134227 0.0 6.610360e-17 \n", + "3 0.134226 0.0 6.610355e-17 \n", + "4 0.169210 0.0 8.333209e-17 \n", + "... ... ... ... \n", + "13970 0.000000 0.0 0.000000e+00 \n", + "13971 0.000000 0.0 0.000000e+00 \n", + "13972 0.000000 0.0 0.000000e+00 \n", + "13973 0.000000 0.0 0.000000e+00 \n", + "13974 0.000000 0.0 0.000000e+00 \n", + "\n", + " nuclide_alpha_heat nuclide_beta_heat nuclide_gamma_heat \\\n", + "0 0.0 0.000000e+00 0.000000e+00 \n", + "1 0.0 2.173910e-19 1.457697e-18 \n", + "2 0.0 8.578851e-18 5.752474e-17 \n", + "3 0.0 8.578846e-18 5.752471e-17 \n", + "4 0.0 1.081475e-17 7.251735e-17 \n", + "... ... ... ... \n", + "13970 0.0 0.000000e+00 0.000000e+00 \n", + "13971 0.0 0.000000e+00 0.000000e+00 \n", + "13972 0.0 0.000000e+00 0.000000e+00 \n", + "13973 0.0 0.000000e+00 0.000000e+00 \n", + "13974 0.0 0.000000e+00 0.000000e+00 \n", + "\n", + " nuclide_dose nuclide_ingestion nuclide_inhalation \n", + "0 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "1 1.085307e-15 1.190471e-11 6.802694e-11 \n", + "2 4.282920e-14 4.697929e-10 2.684531e-09 \n", + "3 4.282917e-14 4.697926e-10 2.684529e-09 \n", + "4 5.399172e-14 5.922345e-10 3.384197e-09 \n", + "... ... ... ... \n", + "13970 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "13971 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "13972 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "13973 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "13974 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "\n", + "[13975 rows x 19 columns]" ] }, - "execution_count": 559, + "execution_count": 91, "metadata": {}, "output_type": "execute_result" } ], "source": [ "columns = [\n", - " \"material_id\",\n", - " \"case_id\",\n", - " \"time_step_number\",\n", - " \"element\",\n", - " \"mass_number\",\n", - " \"state\",\n", + " # \"material_id\",\n", + " # \"case_id\",\n", + " # \"time_step_number\",\n", + " # \"element\",\n", + " # \"mass_number\",\n", + " # \"state\",\n", " \"nuclide_atoms\",\n", " \"nuclide_grams\",\n", " \"nuclide_activity\",\n", @@ -4430,9 +3748,19 @@ " \"nuclide_ingestion\",\n", " \"nuclide_inhalation\",\n", "]\n", + "columns_all = [\n", + " \"material_id\",\n", + " \"case_id\",\n", + " \"time_step_number\",\n", + " \"element\",\n", + " \"mass_number\",\n", + " \"state\",\n", + "] + columns\n", + "\n", + "ds[columns].stack(idx=(\"material_id\", \"case_id\", \"time_step_number\")).to_dataframe()[columns].reset_index()[columns_all].fillna(0.0)\n", "# ds[columns].reset_index([\"material_id\", \"case_id\"])\n", "\n", - "ds[columns].coords.to_dataset()\n", + "# ds[columns].coords.to_dataset()\n", "# .reset_index([\"elapsed_time\", \"zai\"])\n", "# .reset_coords()\n", "# .drop_indexes([\"material_id\", \"case_id\", \"time_step_number\", \"nuclide\"])\n", @@ -4446,7 +3774,15 @@ }, { "cell_type": "code", - "execution_count": 540, + "execution_count": null, + "id": "bdcce70a-bf6c-40a5-9b19-e95145d22b6e", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 92, "id": "526610bb-be7b-4ce7-8cc9-0bcdb00588f2", "metadata": { "tags": [] @@ -4455,12 +3791,6 @@ "source": [ "def save_timestep_nucludes(con, ds):\n", " columns = [\n", - " \"material_id\",\n", - " \"case_id\",\n", - " \"time_step_number\",\n", - " \"element\",\n", - " \"mass_number\",\n", - " \"state\",\n", " \"nuclide_atoms\",\n", " \"nuclide_grams\",\n", " \"nuclide_activity\",\n", @@ -4475,11 +3805,20 @@ " \"nuclide_ingestion\",\n", " \"nuclide_inhalation\",\n", " ]\n", - " tn = ds[columns].reset_index([\"material_id\", \"case_id\", \"time_step_number\", \"nuclide\"]).to_dataframe().reset_index(\n", - " [\n", - " \"material_id\", \"case_id\", \"time_step_number\",\n", - " ]\n", - " ).reset_index(drop=True)[columns].fillna(0.0)\n", + " columns_all = [\n", + " \"material_id\",\n", + " \"case_id\",\n", + " \"time_step_number\",\n", + " \"element\",\n", + " \"mass_number\",\n", + " \"state\",\n", + " ] + columns\n", + "\n", + " tn = ds[columns] \\\n", + " .stack(idx=(\"material_id\", \"case_id\", \"time_step_number\")) \\\n", + " .to_dataframe()[columns] \\\n", + " .reset_index()[columns_all] \\\n", + " .fillna(0.0)\n", " sql = \"insert into timestep_nuclide select * from tn\"\n", " con.execute(sql)\n", " con.commit()" @@ -4487,32 +3826,19 @@ }, { "cell_type": "code", - "execution_count": 541, + "execution_count": 93, "id": "de4b9bd0-02e4-48f5-bec3-bb92c67682d0", "metadata": { "tags": [] }, - "outputs": [ - { - "ename": "ConstraintException", - "evalue": "Constraint Error: Violates foreign key constraint because key \"material_id: 0, case_id: 0, time_step_number: 0\" does not exist in the referenced table", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mConstraintException\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[541], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43msave_timestep_nucludes\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcon\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mds\u001b[49m\u001b[43m)\u001b[49m\n", - "Cell \u001b[0;32mIn[540], line 29\u001b[0m, in \u001b[0;36msave_timestep_nucludes\u001b[0;34m(con, ds)\u001b[0m\n\u001b[1;32m 23\u001b[0m tn \u001b[38;5;241m=\u001b[39m ds[columns]\u001b[38;5;241m.\u001b[39mreset_index([\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mmaterial_id\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcase_id\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtime_step_number\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mnuclide\u001b[39m\u001b[38;5;124m\"\u001b[39m])\u001b[38;5;241m.\u001b[39mto_dataframe()\u001b[38;5;241m.\u001b[39mreset_index(\n\u001b[1;32m 24\u001b[0m [\n\u001b[1;32m 25\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mmaterial_id\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcase_id\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtime_step_number\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m 26\u001b[0m ]\n\u001b[1;32m 27\u001b[0m )\u001b[38;5;241m.\u001b[39mreset_index(drop\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mTrue\u001b[39;00m)[columns]\u001b[38;5;241m.\u001b[39mfillna(\u001b[38;5;241m0.0\u001b[39m)\n\u001b[1;32m 28\u001b[0m sql \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124minsert into timestep_nuclide select * from tn\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m---> 29\u001b[0m \u001b[43mcon\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mexecute\u001b[49m\u001b[43m(\u001b[49m\u001b[43msql\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 30\u001b[0m con\u001b[38;5;241m.\u001b[39mcommit()\n", - "\u001b[0;31mConstraintException\u001b[0m: Constraint Error: Violates foreign key constraint because key \"material_id: 0, case_id: 0, time_step_number: 0\" does not exist in the referenced table" - ] - } - ], + "outputs": [], "source": [ "save_timestep_nucludes(con, ds)" ] }, { "cell_type": "code", - "execution_count": 265, + "execution_count": 94, "id": "13094d05-fcad-40c3-b53d-34dfb8f84a4e", "metadata": { "tags": [] @@ -4539,7 +3865,9 @@ " \n", " \n", " \n", - " timestep_id\n", + " material_id\n", + " case_id\n", + " time_step_number\n", " element\n", " mass_number\n", " state\n", @@ -4561,103 +3889,113 @@ " \n", " \n", " 0\n", + " 100\n", + " 3\n", " 1\n", " Al\n", " 26\n", " \n", " 0.000000e+00\n", " 0.000000e+00\n", - " 0.000000e+00\n", + " 0.000000\n", " 0.0\n", - " 0.000000e+00\n", + " 0.000000\n", " 0.0\n", " 0.000000e+00\n", " 0.0\n", " 0.000000e+00\n", - " 0.0\n", - " 0.0\n", + " 0.000000e+00\n", + " 0.000000e+00\n", " 0.000000e+00\n", " 0.000000e+00\n", " \n", " \n", " 1\n", - " 1\n", + " 100\n", + " 3\n", + " 2\n", " Al\n", - " 27\n", + " 26\n", " \n", - " 1.785556e+20\n", - " 8.000000e-03\n", - " 0.000000e+00\n", - " 0.0\n", - " 0.000000e+00\n", + " 1.110297e+11\n", + " 4.791169e-12\n", + " 0.003401\n", " 0.0\n", - " 0.000000e+00\n", - " 0.0\n", - " 0.000000e+00\n", + " 0.003401\n", " 0.0\n", + " 1.675088e-18\n", " 0.0\n", - " 0.000000e+00\n", - " 0.000000e+00\n", + " 2.173910e-19\n", + " 1.457697e-18\n", + " 1.085307e-15\n", + " 1.190471e-11\n", + " 6.802694e-11\n", " \n", " \n", " 2\n", - " 1\n", + " 100\n", + " 3\n", + " 3\n", " Al\n", - " 28\n", + " 26\n", " \n", - " 0.000000e+00\n", - " 0.000000e+00\n", - " 0.000000e+00\n", - " 0.0\n", - " 0.000000e+00\n", + " 4.381537e+12\n", + " 1.890728e-10\n", + " 0.134227\n", " 0.0\n", - " 0.000000e+00\n", - " 0.0\n", - " 0.000000e+00\n", + " 0.134227\n", " 0.0\n", + " 6.610360e-17\n", " 0.0\n", - " 0.000000e+00\n", - " 0.000000e+00\n", + " 8.578851e-18\n", + " 5.752475e-17\n", + " 4.282920e-14\n", + " 4.697929e-10\n", + " 2.684531e-09\n", " \n", " \n", " 3\n", - " 1\n", + " 100\n", + " 3\n", + " 4\n", " Al\n", - " 29\n", + " 26\n", " \n", - " 0.000000e+00\n", - " 0.000000e+00\n", - " 0.000000e+00\n", - " 0.0\n", - " 0.000000e+00\n", + " 4.381534e+12\n", + " 1.890726e-10\n", + " 0.134226\n", " 0.0\n", - " 0.000000e+00\n", - " 0.0\n", - " 0.000000e+00\n", + " 0.134226\n", " 0.0\n", + " 6.610355e-17\n", " 0.0\n", - " 0.000000e+00\n", - " 0.000000e+00\n", + " 8.578846e-18\n", + " 5.752471e-17\n", + " 4.282917e-14\n", + " 4.697926e-10\n", + " 2.684529e-09\n", " \n", " \n", " 4\n", - " 1\n", + " 100\n", + " 3\n", + " 5\n", " Al\n", - " 30\n", + " 26\n", " \n", - " 0.000000e+00\n", - " 0.000000e+00\n", - " 0.000000e+00\n", - " 0.0\n", - " 0.000000e+00\n", + " 5.523492e+12\n", + " 2.383506e-10\n", + " 0.169210\n", " 0.0\n", - " 0.000000e+00\n", - " 0.0\n", - " 0.000000e+00\n", + " 0.169210\n", " 0.0\n", + " 8.333209e-17\n", " 0.0\n", - " 0.000000e+00\n", - " 0.000000e+00\n", + " 1.081475e-17\n", + " 7.251735e-17\n", + " 5.399172e-14\n", + " 5.922345e-10\n", + " 3.384197e-09\n", " \n", " \n", " ...\n", @@ -4678,169 +4016,181 @@ " ...\n", " ...\n", " ...\n", + " ...\n", + " ...\n", " \n", " \n", " 13970\n", - " 65\n", + " 100\n", + " 3\n", + " 61\n", " Zr\n", - " 93\n", + " 97\n", " \n", - " 6.327286e+13\n", - " 9.761411e-09\n", - " 9.083574e-01\n", - " 0.0\n", - " 9.083574e-01\n", - " 0.0\n", - " 2.791257e-18\n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.000000\n", " 0.0\n", - " 2.791257e-18\n", + " 0.000000\n", " 0.0\n", + " 0.000000e+00\n", " 0.0\n", - " 9.991931e-10\n", - " 2.270894e-08\n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.000000e+00\n", " \n", " \n", " 13971\n", - " 65\n", + " 100\n", + " 3\n", + " 62\n", " Zr\n", - " 94\n", + " 97\n", " \n", - " 7.058445e+11\n", - " 1.100659e-10\n", - " 2.583916e-12\n", - " 0.0\n", - " 2.583916e-12\n", - " 0.0\n", - " 4.734377e-28\n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.000000\n", " 0.0\n", - " 4.734377e-28\n", + " 0.000000\n", " 0.0\n", + " 0.000000e+00\n", " 0.0\n", - " 2.480559e-20\n", - " 2.842307e-20\n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.000000e+00\n", " \n", " \n", " 13972\n", - " 65\n", + " 100\n", + " 3\n", + " 63\n", " Zr\n", - " 95\n", + " 97\n", " \n", " 0.000000e+00\n", " 0.000000e+00\n", - " 0.000000e+00\n", + " 0.000000\n", " 0.0\n", - " 0.000000e+00\n", + " 0.000000\n", " 0.0\n", " 0.000000e+00\n", " 0.0\n", " 0.000000e+00\n", - " 0.0\n", - " 0.0\n", + " 0.000000e+00\n", + " 0.000000e+00\n", " 0.000000e+00\n", " 0.000000e+00\n", " \n", " \n", " 13973\n", - " 65\n", + " 100\n", + " 3\n", + " 64\n", " Zr\n", - " 96\n", + " 97\n", " \n", - " 1.091942e+10\n", - " 1.739020e-12\n", - " 6.149716e-18\n", - " 0.0\n", - " 6.149716e-18\n", - " 0.0\n", - " 3.301027e-33\n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.000000\n", " 0.0\n", - " 3.301027e-33\n", + " 0.000000\n", " 0.0\n", + " 0.000000e+00\n", " 0.0\n", - " 1.721921e-25\n", - " 1.906412e-25\n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.000000e+00\n", + " 0.000000e+00\n", " \n", " \n", " 13974\n", + " 100\n", + " 3\n", " 65\n", " Zr\n", " 97\n", " \n", " 0.000000e+00\n", " 0.000000e+00\n", - " 0.000000e+00\n", + " 0.000000\n", " 0.0\n", - " 0.000000e+00\n", + " 0.000000\n", " 0.0\n", " 0.000000e+00\n", " 0.0\n", " 0.000000e+00\n", - " 0.0\n", - " 0.0\n", + " 0.000000e+00\n", + " 0.000000e+00\n", " 0.000000e+00\n", " 0.000000e+00\n", " \n", " \n", "\n", - "

    13975 rows × 17 columns

    \n", + "

    13975 rows × 19 columns

    \n", "" ], "text/plain": [ - " timestep_id element mass_number state atoms grams \\\n", - "0 1 Al 26 0.000000e+00 0.000000e+00 \n", - "1 1 Al 27 1.785556e+20 8.000000e-03 \n", - "2 1 Al 28 0.000000e+00 0.000000e+00 \n", - "3 1 Al 29 0.000000e+00 0.000000e+00 \n", - "4 1 Al 30 0.000000e+00 0.000000e+00 \n", - "... ... ... ... ... ... ... \n", - "13970 65 Zr 93 6.327286e+13 9.761411e-09 \n", - "13971 65 Zr 94 7.058445e+11 1.100659e-10 \n", - "13972 65 Zr 95 0.000000e+00 0.000000e+00 \n", - "13973 65 Zr 96 1.091942e+10 1.739020e-12 \n", - "13974 65 Zr 97 0.000000e+00 0.000000e+00 \n", - "\n", - " activity alpha_activity beta_activity gamma_activity \\\n", - "0 0.000000e+00 0.0 0.000000e+00 0.0 \n", - "1 0.000000e+00 0.0 0.000000e+00 0.0 \n", - "2 0.000000e+00 0.0 0.000000e+00 0.0 \n", - "3 0.000000e+00 0.0 0.000000e+00 0.0 \n", - "4 0.000000e+00 0.0 0.000000e+00 0.0 \n", - "... ... ... ... ... \n", - "13970 9.083574e-01 0.0 9.083574e-01 0.0 \n", - "13971 2.583916e-12 0.0 2.583916e-12 0.0 \n", - "13972 0.000000e+00 0.0 0.000000e+00 0.0 \n", - "13973 6.149716e-18 0.0 6.149716e-18 0.0 \n", - "13974 0.000000e+00 0.0 0.000000e+00 0.0 \n", - "\n", - " heat alpha_heat beta_heat gamma_heat dose ingestion \\\n", - "0 0.000000e+00 0.0 0.000000e+00 0.0 0.0 0.000000e+00 \n", - "1 0.000000e+00 0.0 0.000000e+00 0.0 0.0 0.000000e+00 \n", - "2 0.000000e+00 0.0 0.000000e+00 0.0 0.0 0.000000e+00 \n", - "3 0.000000e+00 0.0 0.000000e+00 0.0 0.0 0.000000e+00 \n", - "4 0.000000e+00 0.0 0.000000e+00 0.0 0.0 0.000000e+00 \n", - "... ... ... ... ... ... ... \n", - "13970 2.791257e-18 0.0 2.791257e-18 0.0 0.0 9.991931e-10 \n", - "13971 4.734377e-28 0.0 4.734377e-28 0.0 0.0 2.480559e-20 \n", - "13972 0.000000e+00 0.0 0.000000e+00 0.0 0.0 0.000000e+00 \n", - "13973 3.301027e-33 0.0 3.301027e-33 0.0 0.0 1.721921e-25 \n", - "13974 0.000000e+00 0.0 0.000000e+00 0.0 0.0 0.000000e+00 \n", - "\n", - " inhalation \n", - "0 0.000000e+00 \n", - "1 0.000000e+00 \n", - "2 0.000000e+00 \n", - "3 0.000000e+00 \n", - "4 0.000000e+00 \n", - "... ... \n", - "13970 2.270894e-08 \n", - "13971 2.842307e-20 \n", - "13972 0.000000e+00 \n", - "13973 1.906412e-25 \n", - "13974 0.000000e+00 \n", - "\n", - "[13975 rows x 17 columns]" + " material_id case_id time_step_number element mass_number state \\\n", + "0 100 3 1 Al 26 \n", + "1 100 3 2 Al 26 \n", + "2 100 3 3 Al 26 \n", + "3 100 3 4 Al 26 \n", + "4 100 3 5 Al 26 \n", + "... ... ... ... ... ... ... \n", + "13970 100 3 61 Zr 97 \n", + "13971 100 3 62 Zr 97 \n", + "13972 100 3 63 Zr 97 \n", + "13973 100 3 64 Zr 97 \n", + "13974 100 3 65 Zr 97 \n", + "\n", + " atoms grams activity alpha_activity beta_activity \\\n", + "0 0.000000e+00 0.000000e+00 0.000000 0.0 0.000000 \n", + "1 1.110297e+11 4.791169e-12 0.003401 0.0 0.003401 \n", + "2 4.381537e+12 1.890728e-10 0.134227 0.0 0.134227 \n", + "3 4.381534e+12 1.890726e-10 0.134226 0.0 0.134226 \n", + "4 5.523492e+12 2.383506e-10 0.169210 0.0 0.169210 \n", + "... ... ... ... ... ... \n", + "13970 0.000000e+00 0.000000e+00 0.000000 0.0 0.000000 \n", + "13971 0.000000e+00 0.000000e+00 0.000000 0.0 0.000000 \n", + "13972 0.000000e+00 0.000000e+00 0.000000 0.0 0.000000 \n", + "13973 0.000000e+00 0.000000e+00 0.000000 0.0 0.000000 \n", + "13974 0.000000e+00 0.000000e+00 0.000000 0.0 0.000000 \n", + "\n", + " gamma_activity heat alpha_heat beta_heat gamma_heat \\\n", + "0 0.0 0.000000e+00 0.0 0.000000e+00 0.000000e+00 \n", + "1 0.0 1.675088e-18 0.0 2.173910e-19 1.457697e-18 \n", + "2 0.0 6.610360e-17 0.0 8.578851e-18 5.752475e-17 \n", + "3 0.0 6.610355e-17 0.0 8.578846e-18 5.752471e-17 \n", + "4 0.0 8.333209e-17 0.0 1.081475e-17 7.251735e-17 \n", + "... ... ... ... ... ... \n", + "13970 0.0 0.000000e+00 0.0 0.000000e+00 0.000000e+00 \n", + "13971 0.0 0.000000e+00 0.0 0.000000e+00 0.000000e+00 \n", + "13972 0.0 0.000000e+00 0.0 0.000000e+00 0.000000e+00 \n", + "13973 0.0 0.000000e+00 0.0 0.000000e+00 0.000000e+00 \n", + "13974 0.0 0.000000e+00 0.0 0.000000e+00 0.000000e+00 \n", + "\n", + " dose ingestion inhalation \n", + "0 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "1 1.085307e-15 1.190471e-11 6.802694e-11 \n", + "2 4.282920e-14 4.697929e-10 2.684531e-09 \n", + "3 4.282917e-14 4.697926e-10 2.684529e-09 \n", + "4 5.399172e-14 5.922345e-10 3.384197e-09 \n", + "... ... ... ... \n", + "13970 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "13971 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "13972 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "13973 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "13974 0.000000e+00 0.000000e+00 0.000000e+00 \n", + "\n", + "[13975 rows x 19 columns]" ] }, - "execution_count": 265, + "execution_count": 94, "metadata": {}, "output_type": "execute_result" } @@ -4851,7 +4201,7 @@ }, { "cell_type": "code", - "execution_count": 276, + "execution_count": 98, "id": "a5ea7054-9a19-43e0-ab96-c4472f2422ad", "metadata": { "tags": [] @@ -4878,6 +4228,8 @@ " \n", " \n", " \n", + " material_id\n", + " case_id\n", " time_step_number\n", " gamma_boundaries\n", " gamma\n", @@ -4886,30 +4238,40 @@ " \n", " \n", " 0\n", + " 100\n", + " 3\n", " 1\n", " 1.000000e-11\n", " 0.000000e+00\n", " \n", " \n", " 1\n", + " 100\n", + " 3\n", " 1\n", " 1.000000e-02\n", " 3.156906e-11\n", " \n", " \n", " 2\n", + " 100\n", + " 3\n", " 1\n", " 2.000000e-02\n", " 0.000000e+00\n", " \n", " \n", " 3\n", + " 100\n", + " 3\n", " 1\n", " 5.000000e-02\n", " 0.000000e+00\n", " \n", " \n", " 4\n", + " 100\n", + " 3\n", " 1\n", " 1.000000e-01\n", " 5.480877e-10\n", @@ -4919,71 +4281,83 @@ " ...\n", " ...\n", " ...\n", + " ...\n", + " ...\n", " \n", " \n", " 1620\n", + " 100\n", + " 3\n", " 65\n", " 8.000000e+00\n", " 0.000000e+00\n", " \n", " \n", " 1621\n", + " 100\n", + " 3\n", " 65\n", " 1.000000e+01\n", " 0.000000e+00\n", " \n", " \n", " 1622\n", + " 100\n", + " 3\n", " 65\n", " 1.200000e+01\n", " 0.000000e+00\n", " \n", " \n", " 1623\n", + " 100\n", + " 3\n", " 65\n", " 1.400000e+01\n", " 0.000000e+00\n", " \n", " \n", " 1624\n", + " 100\n", + " 3\n", " 65\n", " 2.000000e+01\n", " 0.000000e+00\n", " \n", " \n", "\n", - "

    1625 rows × 3 columns

    \n", + "

    1625 rows × 5 columns

    \n", "" ], "text/plain": [ - " time_step_number gamma_boundaries gamma\n", - "0 1 1.000000e-11 0.000000e+00\n", - "1 1 1.000000e-02 3.156906e-11\n", - "2 1 2.000000e-02 0.000000e+00\n", - "3 1 5.000000e-02 0.000000e+00\n", - "4 1 1.000000e-01 5.480877e-10\n", - "... ... ... ...\n", - "1620 65 8.000000e+00 0.000000e+00\n", - "1621 65 1.000000e+01 0.000000e+00\n", - "1622 65 1.200000e+01 0.000000e+00\n", - "1623 65 1.400000e+01 0.000000e+00\n", - "1624 65 2.000000e+01 0.000000e+00\n", - "\n", - "[1625 rows x 3 columns]" + " material_id case_id time_step_number gamma_boundaries gamma\n", + "0 100 3 1 1.000000e-11 0.000000e+00\n", + "1 100 3 1 1.000000e-02 3.156906e-11\n", + "2 100 3 1 2.000000e-02 0.000000e+00\n", + "3 100 3 1 5.000000e-02 0.000000e+00\n", + "4 100 3 1 1.000000e-01 5.480877e-10\n", + "... ... ... ... ... ...\n", + "1620 100 3 65 8.000000e+00 0.000000e+00\n", + "1621 100 3 65 1.000000e+01 0.000000e+00\n", + "1622 100 3 65 1.200000e+01 0.000000e+00\n", + "1623 100 3 65 1.400000e+01 0.000000e+00\n", + "1624 100 3 65 2.000000e+01 0.000000e+00\n", + "\n", + "[1625 rows x 5 columns]" ] }, - "execution_count": 276, + "execution_count": 98, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "ds.gamma.to_dataframe().reset_index()[[\"time_step_number\", \"gamma_boundaries\", \"gamma\"]]" + "ds.gamma.to_dataframe().reset_index()[[\"material_id\", \"case_id\", \"time_step_number\", \"gamma_boundaries\", \"gamma\"]]" ] }, { "cell_type": "code", - "execution_count": 277, + "execution_count": 99, "id": "6d10e66a-6550-4cbc-828b-4438cbdab443", "metadata": { "tags": [] @@ -4991,7 +4365,7 @@ "outputs": [], "source": [ "def save_gamma_spectra(con, ds):\n", - " columns = [\"time_step_number\", \"gamma_boundaries\", \"gamma\"]\n", + " columns = [\"material_id\", \"case_id\", \"time_step_number\", \"gamma_boundaries\", \"gamma\"]\n", " tg = ds.gamma.to_dataframe().reset_index()[columns]\n", " sql = \"insert into timestep_gamma select * from tg\"\n", " con.execute(sql)\n", @@ -5000,7 +4374,7 @@ }, { "cell_type": "code", - "execution_count": 278, + "execution_count": 100, "id": "fc882c1d-9402-4cc5-a316-f8f0ca25a5e1", "metadata": { "tags": [] @@ -5012,7 +4386,7 @@ }, { "cell_type": "code", - "execution_count": 283, + "execution_count": 101, "id": "398ae012-c5df-4793-9b19-60395bbff7a7", "metadata": { "tags": [] @@ -5039,7 +4413,9 @@ " \n", " \n", " \n", - " timestep_id\n", + " material_id\n", + " case_id\n", + " time_step_number\n", " boundary\n", " intensity\n", " \n", @@ -5047,30 +4423,40 @@ " \n", " \n", " 0\n", + " 100\n", + " 3\n", " 1\n", " 1.000000e-11\n", " 0.000000e+00\n", " \n", " \n", " 1\n", + " 100\n", + " 3\n", " 1\n", " 1.000000e-02\n", " 3.156906e-11\n", " \n", " \n", " 2\n", + " 100\n", + " 3\n", " 1\n", " 2.000000e-02\n", " 0.000000e+00\n", " \n", " \n", " 3\n", + " 100\n", + " 3\n", " 1\n", " 5.000000e-02\n", " 0.000000e+00\n", " \n", " \n", " 4\n", + " 100\n", + " 3\n", " 1\n", " 1.000000e-01\n", " 5.480877e-10\n", @@ -5080,60 +4466,72 @@ " ...\n", " ...\n", " ...\n", + " ...\n", + " ...\n", " \n", " \n", " 1620\n", + " 100\n", + " 3\n", " 65\n", " 8.000000e+00\n", " 0.000000e+00\n", " \n", " \n", " 1621\n", + " 100\n", + " 3\n", " 65\n", " 1.000000e+01\n", " 0.000000e+00\n", " \n", " \n", " 1622\n", + " 100\n", + " 3\n", " 65\n", " 1.200000e+01\n", " 0.000000e+00\n", " \n", " \n", " 1623\n", + " 100\n", + " 3\n", " 65\n", " 1.400000e+01\n", " 0.000000e+00\n", " \n", " \n", " 1624\n", + " 100\n", + " 3\n", " 65\n", " 2.000000e+01\n", " 0.000000e+00\n", " \n", " \n", "\n", - "

    1625 rows × 3 columns

    \n", + "

    1625 rows × 5 columns

    \n", "" ], "text/plain": [ - " timestep_id boundary intensity\n", - "0 1 1.000000e-11 0.000000e+00\n", - "1 1 1.000000e-02 3.156906e-11\n", - "2 1 2.000000e-02 0.000000e+00\n", - "3 1 5.000000e-02 0.000000e+00\n", - "4 1 1.000000e-01 5.480877e-10\n", - "... ... ... ...\n", - "1620 65 8.000000e+00 0.000000e+00\n", - "1621 65 1.000000e+01 0.000000e+00\n", - "1622 65 1.200000e+01 0.000000e+00\n", - "1623 65 1.400000e+01 0.000000e+00\n", - "1624 65 2.000000e+01 0.000000e+00\n", - "\n", - "[1625 rows x 3 columns]" + " material_id case_id time_step_number boundary intensity\n", + "0 100 3 1 1.000000e-11 0.000000e+00\n", + "1 100 3 1 1.000000e-02 3.156906e-11\n", + "2 100 3 1 2.000000e-02 0.000000e+00\n", + "3 100 3 1 5.000000e-02 0.000000e+00\n", + "4 100 3 1 1.000000e-01 5.480877e-10\n", + "... ... ... ... ... ...\n", + "1620 100 3 65 8.000000e+00 0.000000e+00\n", + "1621 100 3 65 1.000000e+01 0.000000e+00\n", + "1622 100 3 65 1.200000e+01 0.000000e+00\n", + "1623 100 3 65 1.400000e+01 0.000000e+00\n", + "1624 100 3 65 2.000000e+01 0.000000e+00\n", + "\n", + "[1625 rows x 5 columns]" ] }, - "execution_count": 283, + "execution_count": 101, "metadata": {}, "output_type": "execute_result" } @@ -5144,7 +4542,7 @@ }, { "cell_type": "code", - "execution_count": 284, + "execution_count": 103, "id": "680defd9-9305-4459-b1a2-357ed1e476e3", "metadata": { "tags": [] @@ -5334,13 +4732,13 @@ "24 2.000000e+01 0.000000e+00" ] }, - "execution_count": 284, + "execution_count": 103, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "con.execute(\"select boundary, intensity from timestep_gamma where timestep_id = 42\").df()" + "con.execute(\"select boundary, intensity from timestep_gamma where time_step_number = 42\").df()" ] }, { diff --git a/notebooks/dvp/try_ducdb.py b/notebooks/dvp/try_ducdb.py index cb90a76..18572e4 100644 --- a/notebooks/dvp/try_ducdb.py +++ b/notebooks/dvp/try_ducdb.py @@ -1,78 +1,72 @@ #!/usr/bin/env python # coding: utf-8 -# In[233]: +# In[1]: get_ipython().run_line_magic("config", "Completer.use_jedi = False") -# In[234]: +# In[2]: import xpypact as xp -# In[235]: +# In[3]: xp.__version__ -# In[236]: +# In[4]: from pathlib import Path -# In[237]: +# In[5]: root_dir = Path("~", "dev", "xpypact").expanduser() -# In[238]: +# In[6]: json_path = root_dir / "wrk/Alloy718-Co04-104_2_1_1.json" assert json_path.exists() -# In[239]: +# In[7]: import xpypact.data_arrays as da from xpypact.Inventory import Inventory, from_json -# In[240]: +# In[8]: inventory = from_json(json_path) -# In[469]: +# In[9]: ds = da.create_dataset(inventory) -# In[470]: +# In[10]: ds -# In[417]: - - -ds.timestamp - - -# In[243]: +# In[12]: import duckdb as db -# In[384]: +# In[13]: db_path = root_dir / "wrk/try-duckdb.duckdb" @@ -81,33 +75,37 @@ db_path.unlink() -# In[385]: +# In[14]: con = db.connect(str(db_path)) -# In[386]: +# In[15]: material_id = 100 case_id = 3 -# In[475]: +# In[16]: ds = ds.expand_dims(dim={"material_id": [material_id], "case_id": [case_id]}) ds -# In[476]: +# How to transform xarray to pandas saving indexes as columns +# In[20]: -ds.irradiation_time +ds.irradiation_time.stack( + {"idx": ["material_id", "case_id", "time_step_number"]} +).to_pandas().reset_index() -# In[446]: + +# In[21]: def drop_tables(con): @@ -118,7 +116,7 @@ def drop_tables(con): con.execute("drop table if exists rundata") -# In[447]: +# In[22]: def create_tables(con): @@ -212,14 +210,14 @@ def create_tables(con): con.execute(sql) -# In[512]: +# In[23]: drop_tables(con) create_tables(con) -# In[513]: +# In[24]: def save_rundata(con, ds): @@ -241,19 +239,19 @@ def save_rundata(con, ds): con.commit() -# In[514]: +# In[25]: save_rundata(con, ds) -# In[515]: +# In[26]: con.execute("select * from rundata").df() -# In[516]: +# In[27]: def save_timesteps(con, ds): @@ -291,56 +289,74 @@ def save_timesteps(con, ds): con.commit() -# In[517]: +# In[28]: save_timesteps(con, ds) -# In[518]: +# In[29]: con.execute("select * from timestep").df() -# In[533]: +# In[55]: + + +columns_all = ["element", "mass_number", "state", "zai", "nuclide_half_life"] +columns = ["zai", "nuclide_half_life"] +ds[columns].to_dataframe()[columns].reset_index()[columns_all] +# .unstack("nuclide") +# .stack({"idx": ["material_id", "case_id", "element", "mass_number", "state"]}) \ +# .to_dataframe() + +# \ +# .reset_index(["material_id", "case_id"]) \ +# .to_dataframe() \ +# .reset_index( +# [ +# "material_id", "case_id" +# ], +# drop=True +# ) \ +# .reset_index(drop=True) + + +# In[56]: def save_nuclides(con, ds): - nuclides_df = ( - ds[["element", "mass_number", "state", "zai", "nuclide_half_life"]] - .reset_index(["material_id", "case_id"]) - .to_dataframe() - .reset_index(["material_id", "case_id"], drop=True) - .reset_index(drop=True) - ) + columns_all = ["element", "mass_number", "state", "zai", "nuclide_half_life"] + columns = ["zai", "nuclide_half_life"] + nuclides_df = ds[columns].to_dataframe()[columns].reset_index()[columns_all] sql = "insert or ignore into nuclide select * from nuclides_df" con.execute(sql) con.commit() -# In[534]: +# In[57]: save_nuclides(con, ds) -# In[535]: +# In[58]: con.execute("select * from nuclide").df() -# In[559]: +# In[91]: columns = [ - "material_id", - "case_id", - "time_step_number", - "element", - "mass_number", - "state", + # "material_id", + # "case_id", + # "time_step_number", + # "element", + # "mass_number", + # "state", "nuclide_atoms", "nuclide_grams", "nuclide_activity", @@ -355,9 +371,21 @@ def save_nuclides(con, ds): "nuclide_ingestion", "nuclide_inhalation", ] +columns_all = [ + "material_id", + "case_id", + "time_step_number", + "element", + "mass_number", + "state", +] + columns + +ds[columns].stack(idx=("material_id", "case_id", "time_step_number")).to_dataframe()[ + columns +].reset_index()[columns_all].fillna(0.0) # ds[columns].reset_index(["material_id", "case_id"]) -ds[columns].coords.to_dataset() +# ds[columns].coords.to_dataset() # .reset_index(["elapsed_time", "zai"]) # .reset_coords() # .drop_indexes(["material_id", "case_id", "time_step_number", "nuclide"]) @@ -369,17 +397,14 @@ def save_nuclides(con, ds): # ).reset_index(drop=True)[columns].fillna(0.0) -# In[540]: +# In[ ]: + + +# In[92]: def save_timestep_nucludes(con, ds): columns = [ - "material_id", - "case_id", - "time_step_number", - "element", - "mass_number", - "state", "nuclide_atoms", "nuclide_grams", "nuclide_activity", @@ -394,18 +419,20 @@ def save_timestep_nucludes(con, ds): "nuclide_ingestion", "nuclide_inhalation", ] + columns_all = [ + "material_id", + "case_id", + "time_step_number", + "element", + "mass_number", + "state", + ] + columns + tn = ( ds[columns] - .reset_index(["material_id", "case_id", "time_step_number", "nuclide"]) - .to_dataframe() - .reset_index( - [ - "material_id", - "case_id", - "time_step_number", - ] - ) - .reset_index(drop=True)[columns] + .stack(idx=("material_id", "case_id", "time_step_number")) + .to_dataframe()[columns] + .reset_index()[columns_all] .fillna(0.0) ) sql = "insert into timestep_nuclide select * from tn" @@ -413,52 +440,60 @@ def save_timestep_nucludes(con, ds): con.commit() -# In[541]: +# In[93]: save_timestep_nucludes(con, ds) -# In[265]: +# In[94]: con.execute("select * from timestep_nuclide").df() -# In[276]: +# In[98]: -ds.gamma.to_dataframe().reset_index()[["time_step_number", "gamma_boundaries", "gamma"]] +ds.gamma.to_dataframe().reset_index()[ + ["material_id", "case_id", "time_step_number", "gamma_boundaries", "gamma"] +] -# In[277]: +# In[99]: def save_gamma_spectra(con, ds): - columns = ["time_step_number", "gamma_boundaries", "gamma"] + columns = [ + "material_id", + "case_id", + "time_step_number", + "gamma_boundaries", + "gamma", + ] tg = ds.gamma.to_dataframe().reset_index()[columns] sql = "insert into timestep_gamma select * from tg" con.execute(sql) con.commit() -# In[278]: +# In[100]: save_gamma_spectra(con, ds) -# In[283]: +# In[101]: con.execute("select * from timestep_gamma").df() -# In[284]: +# In[103]: con.execute( - "select boundary, intensity from timestep_gamma where timestep_id = 42" + "select boundary, intensity from timestep_gamma where time_step_number = 42" ).df() From f43d3291426ca49619eb76770f4b6c2d5c0e98d5 Mon Sep 17 00:00:00 2001 From: dvp Date: Mon, 27 Mar 2023 19:22:33 +0300 Subject: [PATCH 19/32] notebook: duckdb prototype is done --- notebooks/dvp/try_ducdb.ipynb | 2 +- notebooks/dvp/try_ducdb.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/notebooks/dvp/try_ducdb.ipynb b/notebooks/dvp/try_ducdb.ipynb index ba8d453..2ae9ebf 100644 --- a/notebooks/dvp/try_ducdb.ipynb +++ b/notebooks/dvp/try_ducdb.ipynb @@ -4743,7 +4743,7 @@ }, { "cell_type": "code", - "execution_count": 286, + "execution_count": 104, "id": "def18203-fed9-472d-a69c-b653dbf9a7b2", "metadata": { "tags": [] diff --git a/notebooks/dvp/try_ducdb.py b/notebooks/dvp/try_ducdb.py index 18572e4..eeb7281 100644 --- a/notebooks/dvp/try_ducdb.py +++ b/notebooks/dvp/try_ducdb.py @@ -497,7 +497,7 @@ def save_gamma_spectra(con, ds): ).df() -# In[286]: +# In[104]: con.close() From eb91621af40c96eaa74af09d919a7ad1ca4c0325 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Mar 2023 11:56:55 +0000 Subject: [PATCH 20/32] build(deps): bump actions/checkout from 3.3.0 to 3.5.0 Bumps [actions/checkout](https://github.com/actions/checkout) from 3.3.0 to 3.5.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3.3.0...v3.5.0) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/labeler.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/tests.yml | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 5e1da55..3a7babe 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -26,7 +26,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repository - uses: actions/checkout@v3.3.0 + uses: actions/checkout@v3.5.0 - name: Sync GitHub Issue Labels uses: crazy-max/ghaction-github-labeler@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4ccfa44..4bff35f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,7 +27,7 @@ jobs: steps: - name: Check out the repository - uses: actions/checkout@v3.3.0 + uses: actions/checkout@v3.5.0 with: fetch-depth: 2 # need previous revision to define tag diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d3e54cc..4e80520 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,7 +36,7 @@ jobs: !contains(github.event.head_commit.message, '[skip_ci]') steps: - name: Check out the repository - uses: actions/checkout@v3.3.0 + uses: actions/checkout@v3.5.0 - name: Set up Python 3.10 # on 3.11 pip install in unstable: "canonicalize" fails occasionally uses: actions/setup-python@v4.5.0 @@ -85,7 +85,7 @@ jobs: needs: lint steps: - name: Check out the repository - uses: actions/checkout@v3.3.0 + uses: actions/checkout@v3.5.0 with: fetch-depth: 1 @@ -137,7 +137,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3.3.0 + uses: actions/checkout@v3.5.0 with: fetch-depth: 1 @@ -187,7 +187,7 @@ jobs: steps: - name: Check out the repository - uses: actions/checkout@v3.3.0 + uses: actions/checkout@v3.5.0 - name: Set up Python 3.11 uses: actions/setup-python@v4.5.0 From d59f6e554d5c3b42b8e8e882455c70b29682a824 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Mar 2023 11:56:58 +0000 Subject: [PATCH 21/32] build(deps): bump actions/stale from 7 to 8 Bumps [actions/stale](https://github.com/actions/stale) from 7 to 8. - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/stale/compare/v7...v8) --- updated-dependencies: - dependency-name: actions/stale dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/stale.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 5dd2ae0..0a639eb 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/stale@v7 + - uses: actions/stale@v8 with: repo-token: ${{ secrets.MCKIT_GITHUB_TOKEN }} stale-issue-message: 'Stale issue message' From ff5ebdca99ec87e184f52a49a7945220042d24c8 Mon Sep 17 00:00:00 2001 From: dvp Date: Tue, 28 Mar 2023 18:11:36 +0300 Subject: [PATCH 22/32] build: add ruff as major linter --- .pre-commit-config.yaml | 12 +- docs/source/conf.py | 26 +- notebooks/dvp/try_ducdb.py | 14 +- noxfile.py | 15 + poetry.lock | 1097 +++++++++++++++++++++++++++++++++++- pyproject.toml | 60 +- 6 files changed, 1182 insertions(+), 42 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ec90ea1..140f1d3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -82,12 +82,16 @@ repos: language: system types: [python] # Lint - - id: flake8 - name: flake8 - entry: poetry run flake8 + # - id: flake8 + # name: flake8 + # entry: poetry run flake8 + # language: system + # types: [python] + - id: ruff + name: ruff + entry: poetry run ruff --force-exclude --fix --config pyproject.toml language: system types: [python] -# Also code format the docs # - id: blacken-docs # name: blacken-docs # entry: poetry run blacken-docs diff --git a/docs/source/conf.py b/docs/source/conf.py index 32025e2..acf91dd 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,8 +1,8 @@ -# Configuration file for the Sphinx documentation builder. -# -# This file only contains a selection of the most common options. For a full -# list see the documentation: -# https://www.sphinx-doc.org/en/master/usage/configuration.html +from typing import Dict, List + +import sys + +from pathlib import Path # -- Path setup -------------------------------------------------------------- @@ -10,17 +10,19 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # -import sys - -from pathlib import Path pkg_path = Path("..", "..", "src").absolute() assert pkg_path.exists(), f"Invalid path {pkg_path}" sys.path.insert(0, str(pkg_path)) -from typing import Dict, List +import xpypact # noqa: E402 + +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html -import mckit_nuclides # -- Project information ----------------------------------------------------- @@ -35,9 +37,9 @@ # built documents. # # The short X.Y version. -version = mckit_nuclides.__version__.rsplit(".", maxsplit=1)[0] +version = xpypact.__version__.rsplit(".", maxsplit=1)[0] # The full version, including alpha/beta/rc tags. -release = mckit_nuclides.__version__ +release = xpypact.__version__ # -- General configuration --------------------------------------------------- diff --git a/notebooks/dvp/try_ducdb.py b/notebooks/dvp/try_ducdb.py index eeb7281..b9d8bd0 100644 --- a/notebooks/dvp/try_ducdb.py +++ b/notebooks/dvp/try_ducdb.py @@ -41,7 +41,7 @@ import xpypact.data_arrays as da -from xpypact.Inventory import Inventory, from_json +from xpypact.Inventory import from_json # In[8]: @@ -255,7 +255,7 @@ def save_rundata(con, ds): def save_timesteps(con, ds): - timesteps_df = ( + ( ds[ [ "material_id", @@ -329,7 +329,7 @@ def save_timesteps(con, ds): def save_nuclides(con, ds): columns_all = ["element", "mass_number", "state", "zai", "nuclide_half_life"] columns = ["zai", "nuclide_half_life"] - nuclides_df = ds[columns].to_dataframe()[columns].reset_index()[columns_all] + ds[columns].to_dataframe()[columns].reset_index()[columns_all] sql = "insert or ignore into nuclide select * from nuclides_df" con.execute(sql) con.commit() @@ -428,7 +428,7 @@ def save_timestep_nucludes(con, ds): "state", ] + columns - tn = ( + ( ds[columns] .stack(idx=("material_id", "case_id", "time_step_number")) .to_dataframe()[columns] @@ -471,7 +471,7 @@ def save_gamma_spectra(con, ds): "gamma_boundaries", "gamma", ] - tg = ds.gamma.to_dataframe().reset_index()[columns] + ds.gamma.to_dataframe().reset_index()[columns] sql = "insert into timestep_gamma select * from tg" con.execute(sql) con.commit() @@ -492,9 +492,7 @@ def save_gamma_spectra(con, ds): # In[103]: -con.execute( - "select boundary, intensity from timestep_gamma where time_step_number = 42" -).df() +con.execute("select boundary, intensity from timestep_gamma where time_step_number = 42").df() # In[104]: diff --git a/noxfile.py b/noxfile.py index fb8d2b6..54f4f19 100644 --- a/noxfile.py +++ b/noxfile.py @@ -297,6 +297,21 @@ def xdoctest(s: Session) -> None: s.run("python", "-m", "xdoctest", *args) +@session(python="3.11") +def ruff(s: Session) -> None: + """Run ruff linter.""" + args = s.posargs or ["src", "tests"] + s.run( + "poetry", + "install", + "--no-root", + "--only", + "main,ruff", + external=True, + ) + s.run("ruff", *args) + + @session(name="docs-build", python="3.11") def docs_build(s: Session) -> None: """Build the documentation.""" diff --git a/poetry.lock b/poetry.lock index f2cb20f..574cedb 100644 --- a/poetry.lock +++ b/poetry.lock @@ -12,6 +12,18 @@ files = [ {file = "alabaster-0.7.13.tar.gz", hash = "sha256:a27a4a084d5e690e16e01e03ad2b2e552c61a65469419b907243193de1a84ae2"}, ] +[[package]] +name = "appdirs" +version = "1.4.4" +description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +category = "dev" +optional = false +python-versions = "*" +files = [ + {file = "appdirs-1.4.4-py2.py3-none-any.whl", hash = "sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128"}, + {file = "appdirs-1.4.4.tar.gz", hash = "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41"}, +] + [[package]] name = "argcomplete" version = "2.1.2" @@ -130,6 +142,40 @@ test = ["beautifulsoup4 (>=4.8.0)", "coverage (>=4.5.4)", "fixtures (>=3.0.0)", toml = ["tomli (>=1.1.0)"] yaml = ["PyYAML"] +[[package]] +name = "beautifulsoup4" +version = "4.12.0" +description = "Screen-scraping library" +category = "dev" +optional = false +python-versions = ">=3.6.0" +files = [ + {file = "beautifulsoup4-4.12.0-py3-none-any.whl", hash = "sha256:2130a5ad7f513200fae61a17abb5e338ca980fa28c439c0571014bc0217e9591"}, + {file = "beautifulsoup4-4.12.0.tar.gz", hash = "sha256:c5fceeaec29d09c84970e47c65f2f0efe57872f7cff494c9691a26ec0ff13234"}, +] + +[package.dependencies] +soupsieve = ">1.2" + +[package.extras] +html5lib = ["html5lib"] +lxml = ["lxml"] + +[[package]] +name = "beniget" +version = "0.4.1" +description = "Extract semantic information about static Python code" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "beniget-0.4.1-py3-none-any.whl", hash = "sha256:cb061256631313f9d06031b824f7f403baecaf609b2d3d14d43f23356cf143f2"}, + {file = "beniget-0.4.1.tar.gz", hash = "sha256:75554b3b8ad0553ce2f607627dad3d95c60c441189875b98e097528f8e23ac0c"}, +] + +[package.dependencies] +gast = ">=0.5.0,<0.6.0" + [[package]] name = "black" version = "22.12.0" @@ -166,6 +212,41 @@ d = ["aiohttp (>=3.7.4)"] jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] uvloop = ["uvloop (>=0.15.2)"] +[[package]] +name = "bleach" +version = "6.0.0" +description = "An easy safelist-based HTML-sanitizing tool." +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "bleach-6.0.0-py3-none-any.whl", hash = "sha256:33c16e3353dbd13028ab4799a0f89a83f113405c766e9c122df8a06f5b85b3f4"}, + {file = "bleach-6.0.0.tar.gz", hash = "sha256:1a1a85c1595e07d8db14c5f09f09e6433502c51c595970edc090551f0db99414"}, +] + +[package.dependencies] +six = ">=1.9.0" +webencodings = "*" + +[package.extras] +css = ["tinycss2 (>=1.1.0,<1.2)"] + +[[package]] +name = "cattrs" +version = "22.2.0" +description = "Composable complex class support for attrs and dataclasses." +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "cattrs-22.2.0-py3-none-any.whl", hash = "sha256:bc12b1f0d000b9f9bee83335887d532a1d3e99a833d1bf0882151c97d3e68c21"}, + {file = "cattrs-22.2.0.tar.gz", hash = "sha256:f0eed5642399423cf656e7b66ce92cdc5b963ecafd041d1b24d136fdde7acf6d"}, +] + +[package.dependencies] +attrs = ">=20" +exceptiongroup = {version = "*", markers = "python_version < \"3.11\""} + [[package]] name = "certifi" version = "2022.12.7" @@ -178,6 +259,83 @@ files = [ {file = "certifi-2022.12.7.tar.gz", hash = "sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3"}, ] +[[package]] +name = "cffi" +version = "1.15.1" +description = "Foreign Function Interface for Python calling C code." +category = "dev" +optional = false +python-versions = "*" +files = [ + {file = "cffi-1.15.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914"}, + {file = "cffi-1.15.1-cp27-cp27m-win32.whl", hash = "sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3"}, + {file = "cffi-1.15.1-cp27-cp27m-win_amd64.whl", hash = "sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e"}, + {file = "cffi-1.15.1-cp310-cp310-win32.whl", hash = "sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2"}, + {file = "cffi-1.15.1-cp310-cp310-win_amd64.whl", hash = "sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8"}, + {file = "cffi-1.15.1-cp311-cp311-win32.whl", hash = "sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d"}, + {file = "cffi-1.15.1-cp311-cp311-win_amd64.whl", hash = "sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104"}, + {file = "cffi-1.15.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e"}, + {file = "cffi-1.15.1-cp36-cp36m-win32.whl", hash = "sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf"}, + {file = "cffi-1.15.1-cp36-cp36m-win_amd64.whl", hash = "sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497"}, + {file = "cffi-1.15.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426"}, + {file = "cffi-1.15.1-cp37-cp37m-win32.whl", hash = "sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9"}, + {file = "cffi-1.15.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045"}, + {file = "cffi-1.15.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192"}, + {file = "cffi-1.15.1-cp38-cp38-win32.whl", hash = "sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314"}, + {file = "cffi-1.15.1-cp38-cp38-win_amd64.whl", hash = "sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3"}, + {file = "cffi-1.15.1-cp39-cp39-win32.whl", hash = "sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee"}, + {file = "cffi-1.15.1-cp39-cp39-win_amd64.whl", hash = "sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c"}, + {file = "cffi-1.15.1.tar.gz", hash = "sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9"}, +] + +[package.dependencies] +pycparser = "*" + [[package]] name = "cfgv" version = "3.3.1" @@ -428,6 +586,36 @@ files = [ {file = "darglint-1.8.1.tar.gz", hash = "sha256:080d5106df149b199822e7ee7deb9c012b49891538f14a11be681044f0bb20da"}, ] +[[package]] +name = "defusedxml" +version = "0.7.1" +description = "XML bomb protection for Python stdlib modules" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +files = [ + {file = "defusedxml-0.7.1-py2.py3-none-any.whl", hash = "sha256:a352e7e428770286cc899e2542b6cdaedb2b4953ff269a210103ec58f6198a61"}, + {file = "defusedxml-0.7.1.tar.gz", hash = "sha256:1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69"}, +] + +[[package]] +name = "deprecated" +version = "1.2.13" +description = "Python @deprecated decorator to deprecate old python classes, functions or methods." +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "Deprecated-1.2.13-py2.py3-none-any.whl", hash = "sha256:64756e3e14c8c5eea9795d93c524551432a0be75629f8f29e67ab8caf076c76d"}, + {file = "Deprecated-1.2.13.tar.gz", hash = "sha256:43ac5335da90c31c24ba028af536a91d41d53f9e6901ddb021bcc572ce44e38d"}, +] + +[package.dependencies] +wrapt = ">=1.10,<2" + +[package.extras] +dev = ["PyTest", "PyTest (<5)", "PyTest-Cov", "PyTest-Cov (<2.6)", "bump2version (<1)", "configparser (<5)", "importlib-metadata (<3)", "importlib-resources (<4)", "sphinx (<2)", "sphinxcontrib-websupport (<2)", "tox", "zipp (<2)"] + [[package]] name = "dill" version = "0.3.6" @@ -455,6 +643,18 @@ files = [ {file = "distlib-0.3.6.tar.gz", hash = "sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46"}, ] +[[package]] +name = "docstring-to-markdown" +version = "0.12" +description = "On the fly conversion of Python docstrings to markdown" +category = "dev" +optional = false +python-versions = ">=3.6" +files = [ + {file = "docstring-to-markdown-0.12.tar.gz", hash = "sha256:40004224b412bd6f64c0f3b85bb357a41341afd66c4b4896709efa56827fb2bb"}, + {file = "docstring_to_markdown-0.12-py3-none-any.whl", hash = "sha256:7df6311a887dccf9e770f51242ec002b19f0591994c4783be49d24cdc1df3737"}, +] + [[package]] name = "docutils" version = "0.19" @@ -529,16 +729,31 @@ files = [ [package.extras] testing = ["pre-commit"] +[[package]] +name = "fastjsonschema" +version = "2.16.3" +description = "Fastest Python implementation of JSON schema" +category = "dev" +optional = false +python-versions = "*" +files = [ + {file = "fastjsonschema-2.16.3-py3-none-any.whl", hash = "sha256:04fbecc94300436f628517b05741b7ea009506ce8f946d40996567c669318490"}, + {file = "fastjsonschema-2.16.3.tar.gz", hash = "sha256:4a30d6315a68c253cfa8f963b9697246315aa3db89f98b97235e345dedfb0b8e"}, +] + +[package.extras] +devel = ["colorama", "json-spec", "jsonschema", "pylint", "pytest", "pytest-benchmark", "pytest-cache", "validictory"] + [[package]] name = "filelock" -version = "3.10.6" +version = "3.10.7" description = "A platform independent file lock." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "filelock-3.10.6-py3-none-any.whl", hash = "sha256:52f119747b2b9c4730dac715a7b1ab34b8ee70fd9259cba158ee53da566387ff"}, - {file = "filelock-3.10.6.tar.gz", hash = "sha256:409105becd604d6b176a483f855e7e8903c5cb2873e47f2c64f66a370c046aaf"}, + {file = "filelock-3.10.7-py3-none-any.whl", hash = "sha256:bde48477b15fde2c7e5a0713cbe72721cb5a5ad32ee0b8f419907960b9d75536"}, + {file = "filelock-3.10.7.tar.gz", hash = "sha256:892be14aa8efc01673b5ed6589dbccb95f9a8596f0507e232626155495c18105"}, ] [package.extras] @@ -939,6 +1154,30 @@ files = [ [package.dependencies] flake8 = ">=3.6" +[[package]] +name = "frilouz" +version = "0.0.2" +description = "Python AST parser adapter with partial error recovery" +category = "dev" +optional = false +python-versions = "*" +files = [ + {file = "frilouz-0.0.2-py3-none-any.whl", hash = "sha256:1385d2939833c47c5edb960eb5f72f9e8fd834550004b83c98902b5e9c9a0cd6"}, + {file = "frilouz-0.0.2.tar.gz", hash = "sha256:ba7922f36500f6ea4a68e87f9cd24fe4a011a98673cb7ab4c7c3efcd33647a59"}, +] + +[[package]] +name = "gast" +version = "0.5.3" +description = "Python AST that abstracts the underlying Python version" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "gast-0.5.3-py3-none-any.whl", hash = "sha256:211aac1e58c167b25d3504998f2db694454a24bb1fb1225bce99420166f21d6a"}, + {file = "gast-0.5.3.tar.gz", hash = "sha256:cfbea25820e653af9c7d1807f659ce0a0a9c64f2439421a7bba4f0983f532dea"}, +] + [[package]] name = "gitdb" version = "4.0.10" @@ -1131,6 +1370,26 @@ pipfile-deprecated-finder = ["pip-shims (>=0.5.2)", "pipreqs", "requirementslib" plugins = ["setuptools"] requirements-deprecated-finder = ["pip-api", "pipreqs"] +[[package]] +name = "jedi" +version = "0.18.2" +description = "An autocompletion tool for Python that can be used for text editors." +category = "dev" +optional = false +python-versions = ">=3.6" +files = [ + {file = "jedi-0.18.2-py2.py3-none-any.whl", hash = "sha256:203c1fd9d969ab8f2119ec0a3342e0b49910045abe6af0a3ae83a5764d54639e"}, + {file = "jedi-0.18.2.tar.gz", hash = "sha256:bae794c30d07f6d910d32a7048af09b5a39ed740918da923c6b780790ebac612"}, +] + +[package.dependencies] +parso = ">=0.8.0,<0.9.0" + +[package.extras] +docs = ["Jinja2 (==2.11.3)", "MarkupSafe (==1.1.1)", "Pygments (==2.8.1)", "alabaster (==0.7.12)", "babel (==2.9.1)", "chardet (==4.0.0)", "commonmark (==0.8.1)", "docutils (==0.17.1)", "future (==0.18.2)", "idna (==2.10)", "imagesize (==1.2.0)", "mock (==1.0.1)", "packaging (==20.9)", "pyparsing (==2.4.7)", "pytz (==2021.1)", "readthedocs-sphinx-ext (==2.1.4)", "recommonmark (==0.5.0)", "requests (==2.25.1)", "six (==1.15.0)", "snowballstemmer (==2.1.0)", "sphinx (==1.8.5)", "sphinx-rtd-theme (==0.4.3)", "sphinxcontrib-serializinghtml (==1.1.4)", "sphinxcontrib-websupport (==1.2.4)", "urllib3 (==1.26.4)"] +qa = ["flake8 (==3.8.3)", "mypy (==0.782)"] +testing = ["Django (<3.1)", "attrs", "colorama", "docopt", "pytest (<7.0.0)"] + [[package]] name = "jinja2" version = "3.1.2" @@ -1149,6 +1408,85 @@ MarkupSafe = ">=2.0" [package.extras] i18n = ["Babel (>=2.7)"] +[[package]] +name = "jsonschema" +version = "4.17.3" +description = "An implementation of JSON Schema validation for Python" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "jsonschema-4.17.3-py3-none-any.whl", hash = "sha256:a870ad254da1a8ca84b6a2905cac29d265f805acc57af304784962a2aa6508f6"}, + {file = "jsonschema-4.17.3.tar.gz", hash = "sha256:0f864437ab8b6076ba6707453ef8f98a6a0d512a80e93f8abdb676f737ecb60d"}, +] + +[package.dependencies] +attrs = ">=17.4.0" +importlib-resources = {version = ">=1.4.0", markers = "python_version < \"3.9\""} +pkgutil-resolve-name = {version = ">=1.3.10", markers = "python_version < \"3.9\""} +pyrsistent = ">=0.14.0,<0.17.0 || >0.17.0,<0.17.1 || >0.17.1,<0.17.2 || >0.17.2" + +[package.extras] +format = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3987", "uri-template", "webcolors (>=1.11)"] +format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "uri-template", "webcolors (>=1.11)"] + +[[package]] +name = "jupyter-client" +version = "8.1.0" +description = "Jupyter protocol implementation and client libraries" +category = "dev" +optional = false +python-versions = ">=3.8" +files = [ + {file = "jupyter_client-8.1.0-py3-none-any.whl", hash = "sha256:d5b8e739d7816944be50f81121a109788a3d92732ecf1ad1e4dadebc948818fe"}, + {file = "jupyter_client-8.1.0.tar.gz", hash = "sha256:3fbab64100a0dcac7701b1e0f1a4412f1ccb45546ff2ad9bc4fcbe4e19804811"}, +] + +[package.dependencies] +importlib-metadata = {version = ">=4.8.3", markers = "python_version < \"3.10\""} +jupyter-core = ">=4.12,<5.0.0 || >=5.1.0" +python-dateutil = ">=2.8.2" +pyzmq = ">=23.0" +tornado = ">=6.2" +traitlets = ">=5.3" + +[package.extras] +docs = ["ipykernel", "myst-parser", "pydata-sphinx-theme", "sphinx (>=4)", "sphinx-autodoc-typehints", "sphinxcontrib-github-alt", "sphinxcontrib-spelling"] +test = ["codecov", "coverage", "ipykernel (>=6.14)", "mypy", "paramiko", "pre-commit", "pytest", "pytest-cov", "pytest-jupyter[client] (>=0.4.1)", "pytest-timeout"] + +[[package]] +name = "jupyter-core" +version = "5.3.0" +description = "Jupyter core package. A base package on which Jupyter projects rely." +category = "dev" +optional = false +python-versions = ">=3.8" +files = [ + {file = "jupyter_core-5.3.0-py3-none-any.whl", hash = "sha256:d4201af84559bc8c70cead287e1ab94aeef3c512848dde077b7684b54d67730d"}, + {file = "jupyter_core-5.3.0.tar.gz", hash = "sha256:6db75be0c83edbf1b7c9f91ec266a9a24ef945da630f3120e1a0046dc13713fc"}, +] + +[package.dependencies] +platformdirs = ">=2.5" +pywin32 = {version = ">=300", markers = "sys_platform == \"win32\" and platform_python_implementation != \"PyPy\""} +traitlets = ">=5.3" + +[package.extras] +docs = ["myst-parser", "sphinx-autodoc-typehints", "sphinxcontrib-github-alt", "sphinxcontrib-spelling", "traitlets"] +test = ["ipykernel", "pre-commit", "pytest", "pytest-cov", "pytest-timeout"] + +[[package]] +name = "jupyterlab-pygments" +version = "0.2.2" +description = "Pygments theme using JupyterLab CSS variables" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "jupyterlab_pygments-0.2.2-py2.py3-none-any.whl", hash = "sha256:2405800db07c9f770863bcf8049a529c3dd4d3e28536638bd7c1c01d2748309f"}, + {file = "jupyterlab_pygments-0.2.2.tar.gz", hash = "sha256:7405d7fde60819d905a9fa8ce89e4cd830e318cdad22a0030f7a901da705585d"}, +] + [[package]] name = "lazy-object-proxy" version = "1.9.0" @@ -1259,6 +1597,22 @@ files = [ six = "*" tornado = {version = "*", markers = "python_version > \"2.7\""} +[[package]] +name = "lsprotocol" +version = "2023.0.0a1" +description = "Python implementation of the Language Server Protocol." +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "lsprotocol-2023.0.0a1-py3-none-any.whl", hash = "sha256:133c339a7cccb299a5b357f9b8ef6aebe27616e0daf4ba54e63476afe0e12e47"}, + {file = "lsprotocol-2023.0.0a1.tar.gz", hash = "sha256:32edfd4856abba1349bf5a070567445b3d7286951afba3644b472629796f82d0"}, +] + +[package.dependencies] +attrs = "*" +cattrs = "*" + [[package]] name = "markupsafe" version = "2.1.2" @@ -1349,6 +1703,42 @@ numpy = ">=1.24.2" openpyxl = ">=3.0.9" pandas = ">=1.4.1" +[[package]] +name = "memestra" +version = "0.2.1" +description = "Memestra checks code for places where deprecated functions are called" +category = "dev" +optional = false +python-versions = ">=3.4" +files = [ + {file = "memestra-0.2.1-py3-none-any.whl", hash = "sha256:cd3ea54ca2a5b48763b58954d882b15b94b2a1abe2d830c3863bf8082a3e24ea"}, + {file = "memestra-0.2.1.tar.gz", hash = "sha256:eac8707fd0680df64ccb48ad3fc7ac34fe28bfa7f0e8b2693b763965a8700d9c"}, +] + +[package.dependencies] +beniget = "*" +frilouz = "*" +gast = "*" +nbconvert = "*" +nbformat = "*" +pyyaml = "*" + +[package.extras] +dev = ["pytest"] +test = ["pytest"] + +[[package]] +name = "mistune" +version = "2.0.5" +description = "A sane Markdown parser with useful plugins and renderers" +category = "dev" +optional = false +python-versions = "*" +files = [ + {file = "mistune-2.0.5-py2.py3-none-any.whl", hash = "sha256:bad7f5d431886fcbaf5f758118ecff70d31f75231b34024a1341120340a65ce8"}, + {file = "mistune-2.0.5.tar.gz", hash = "sha256:0246113cb2492db875c6be56974a7c893333bf26cd92891c85f63151cee09d34"}, +] + [[package]] name = "mr-proper" version = "0.0.7" @@ -1441,6 +1831,90 @@ files = [ {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, ] +[[package]] +name = "nbclient" +version = "0.7.2" +description = "A client library for executing notebooks. Formerly nbconvert's ExecutePreprocessor." +category = "dev" +optional = false +python-versions = ">=3.7.0" +files = [ + {file = "nbclient-0.7.2-py3-none-any.whl", hash = "sha256:d97ac6257de2794f5397609df754fcbca1a603e94e924eb9b99787c031ae2e7c"}, + {file = "nbclient-0.7.2.tar.gz", hash = "sha256:884a3f4a8c4fc24bb9302f263e0af47d97f0d01fe11ba714171b320c8ac09547"}, +] + +[package.dependencies] +jupyter-client = ">=6.1.12" +jupyter-core = ">=4.12,<5.0.0 || >=5.1.0" +nbformat = ">=5.1" +traitlets = ">=5.3" + +[package.extras] +dev = ["pre-commit"] +docs = ["autodoc-traits", "mock", "moto", "myst-parser", "nbclient[test]", "sphinx (>=1.7)", "sphinx-book-theme"] +test = ["ipykernel", "ipython", "ipywidgets", "nbconvert (>=7.0.0)", "pytest (>=7.0)", "pytest-asyncio", "pytest-cov (>=4.0)", "testpath", "xmltodict"] + +[[package]] +name = "nbconvert" +version = "7.2.10" +description = "Converting Jupyter Notebooks" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "nbconvert-7.2.10-py3-none-any.whl", hash = "sha256:e41118f81698d3d59b3c7c2887937446048f741aba6c367c1c1a77810b3e2d08"}, + {file = "nbconvert-7.2.10.tar.gz", hash = "sha256:8eed67bd8314f3ec87c4351c2f674af3a04e5890ab905d6bd927c05aec1cf27d"}, +] + +[package.dependencies] +beautifulsoup4 = "*" +bleach = "*" +defusedxml = "*" +importlib-metadata = {version = ">=3.6", markers = "python_version < \"3.10\""} +jinja2 = ">=3.0" +jupyter-core = ">=4.7" +jupyterlab-pygments = "*" +markupsafe = ">=2.0" +mistune = ">=2.0.3,<3" +nbclient = ">=0.5.0" +nbformat = ">=5.1" +packaging = "*" +pandocfilters = ">=1.4.1" +pygments = ">=2.4.1" +tinycss2 = "*" +traitlets = ">=5.0" + +[package.extras] +all = ["nbconvert[docs,qtpdf,serve,test,webpdf]"] +docs = ["ipykernel", "ipython", "myst-parser", "nbsphinx (>=0.2.12)", "pydata-sphinx-theme", "sphinx (==5.0.2)", "sphinxcontrib-spelling"] +qtpdf = ["nbconvert[qtpng]"] +qtpng = ["pyqtwebengine (>=5.15)"] +serve = ["tornado (>=6.1)"] +test = ["ipykernel", "ipywidgets (>=7)", "pre-commit", "pytest", "pytest-dependency"] +webpdf = ["pyppeteer (>=1,<1.1)"] + +[[package]] +name = "nbformat" +version = "5.8.0" +description = "The Jupyter Notebook format" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "nbformat-5.8.0-py3-none-any.whl", hash = "sha256:d910082bd3e0bffcf07eabf3683ed7dda0727a326c446eeb2922abe102e65162"}, + {file = "nbformat-5.8.0.tar.gz", hash = "sha256:46dac64c781f1c34dfd8acba16547024110348f9fc7eab0f31981c2a3dc48d1f"}, +] + +[package.dependencies] +fastjsonschema = "*" +jsonschema = ">=2.6" +jupyter-core = "*" +traitlets = ">=5.1" + +[package.extras] +docs = ["myst-parser", "pydata-sphinx-theme", "sphinx", "sphinxcontrib-github-alt", "sphinxcontrib-spelling"] +test = ["pep440", "pre-commit", "pytest", "testpath"] + [[package]] name = "nodeenv" version = "1.7.0" @@ -1669,6 +2143,34 @@ files = [ attrs = "*" flake8 = ">3.0.0" +[[package]] +name = "pandocfilters" +version = "1.5.0" +description = "Utilities for writing pandoc filters in python" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "pandocfilters-1.5.0-py2.py3-none-any.whl", hash = "sha256:33aae3f25fd1a026079f5d27bdd52496f0e0803b3469282162bafdcbdf6ef14f"}, + {file = "pandocfilters-1.5.0.tar.gz", hash = "sha256:0b679503337d233b4339a817bfc8c50064e2eff681314376a47cb582305a7a38"}, +] + +[[package]] +name = "parso" +version = "0.8.3" +description = "A Python Parser" +category = "dev" +optional = false +python-versions = ">=3.6" +files = [ + {file = "parso-0.8.3-py2.py3-none-any.whl", hash = "sha256:c001d4636cd3aecdaf33cbb40aebb59b094be2a74c556778ef5576c175e19e75"}, + {file = "parso-0.8.3.tar.gz", hash = "sha256:8c07be290bb59f03588915921e29e8a50002acaf2cdc5fa0e0114f91709fafa0"}, +] + +[package.extras] +qa = ["flake8 (==3.8.3)", "mypy (==0.782)"] +testing = ["docopt", "pytest (<6.0.0)"] + [[package]] name = "pathspec" version = "0.10.3" @@ -1708,6 +2210,18 @@ files = [ [package.dependencies] flake8 = ">=5.0.0" +[[package]] +name = "pkgutil-resolve-name" +version = "1.3.10" +description = "Resolve a name to an object." +category = "dev" +optional = false +python-versions = ">=3.6" +files = [ + {file = "pkgutil_resolve_name-1.3.10-py3-none-any.whl", hash = "sha256:ca27cc078d25c5ad71a9de0a7a330146c4e014c2462d9af19c6b828280649c5e"}, + {file = "pkgutil_resolve_name-1.3.10.tar.gz", hash = "sha256:357d6c9e6a755653cfd78893817c0853af365dd51ec97f3d358a819373bbd174"}, +] + [[package]] name = "platformdirs" version = "3.2.0" @@ -1802,6 +2316,18 @@ files = [ {file = "pycodestyle-2.10.0.tar.gz", hash = "sha256:347187bdb476329d98f695c213d7295a846d1152ff4fe9bacb8a9590b8ee7053"}, ] +[[package]] +name = "pycparser" +version = "2.21" +description = "C parser in Python" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, + {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, +] + [[package]] name = "pydantic" version = "1.10.7" @@ -1900,6 +2426,28 @@ files = [ {file = "pyflakes-3.0.1.tar.gz", hash = "sha256:ec8b276a6b60bd80defed25add7e439881c19e64850afd9b346283d4165fd0fd"}, ] +[[package]] +name = "pygls" +version = "1.0.1" +description = "a pythonic generic language server (pronounced like \"pie glass\")." +category = "dev" +optional = false +python-versions = "<4,>=3.7" +files = [ + {file = "pygls-1.0.1-py3-none-any.whl", hash = "sha256:adacc96da77598c70f46acfdfd1481d3da90cd54f639f7eee52eb6e4dbd57b55"}, + {file = "pygls-1.0.1.tar.gz", hash = "sha256:f3ee98ddbb4690eb5c755bc32ba7e129607f14cbd313575f33d0cea443b78cb2"}, +] + +[package.dependencies] +lsprotocol = "*" +typeguard = ">=2.10.0,<3" + +[package.extras] +dev = ["bandit (==1.7.4)", "flake8 (==4.0.1)", "mypy (==0.961)"] +docs = ["sphinx (==5.0.1)", "sphinx-rtd-theme (==1.0.0)"] +test = ["mock (==4.0.3)", "pytest (==7.1.2)", "pytest-asyncio (==0.18.3)"] +ws = ["websockets (>=10.0.0,<11.0.0)"] + [[package]] name = "pygments" version = "2.14.0" @@ -1945,6 +2493,78 @@ typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\"" spelling = ["pyenchant (>=3.2,<4.0)"] testutils = ["gitpython (>3)"] +[[package]] +name = "pyls-isort" +version = "0.2.2" +description = "Isort plugin for python-lsp-server" +category = "dev" +optional = false +python-versions = "*" +files = [ + {file = "pyls-isort-0.2.2.tar.gz", hash = "sha256:2192bd2203db00459f85eb329521feba58af63075d2dd10a051a4eccd000bba0"}, +] + +[package.dependencies] +isort = "*" +python-lsp-server = "*" + +[[package]] +name = "pyls-memestra" +version = "0.0.16" +description = "Memestra plugin for the Python Language Server" +category = "dev" +optional = false +python-versions = "*" +files = [ + {file = "pyls-memestra-0.0.16.tar.gz", hash = "sha256:ccc543776b81e339f0dfccf7c9bd0db7ba901f97461d36d004864efeaa35fedf"}, + {file = "pyls_memestra-0.0.16-py3-none-any.whl", hash = "sha256:59dea636aa061026b51a01607fae3c678c19c18678b865cddc34e84491ab3ec1"}, +] + +[package.dependencies] +Deprecated = "*" +memestra = "*" +python-lsp-server = "*" + +[[package]] +name = "pylsp-mypy" +version = "0.6.6" +description = "Mypy linter for the Python LSP Server" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pylsp-mypy-0.6.6.tar.gz", hash = "sha256:aa5d547b25ca431b5b17689c495c55aa374b19b35c59746987e417044fb722ce"}, + {file = "pylsp_mypy-0.6.6-py3-none-any.whl", hash = "sha256:46666ffa282e1b44b86b3b03f55b95ca12df82af77c88cf4b85fba3d532b7290"}, +] + +[package.dependencies] +mypy = "*" +python-lsp-server = ">=1.7.0" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} + +[package.extras] +test = ["coverage", "pytest", "pytest-cov", "tox"] + +[[package]] +name = "pylsp-rope" +version = "0.1.11" +description = "Extended refactoring capabilities for Python LSP Server using Rope." +category = "dev" +optional = false +python-versions = ">=3.6" +files = [ + {file = "pylsp-rope-0.1.11.tar.gz", hash = "sha256:48aadf993dafa5e8fca1108b4a5431314cf80bc78cffdd56400ead9c407553be"}, + {file = "pylsp_rope-0.1.11-py3-none-any.whl", hash = "sha256:71fb08dc6ead9a69202f2e7c5f7bbc5ada037a0f0722d7eb2d1f8cac2c9a18af"}, +] + +[package.dependencies] +python-lsp-server = "*" +rope = ">=0.21.0" + +[package.extras] +dev = ["build", "pytest", "twine"] +test = ["pytest"] + [[package]] name = "pyparsing" version = "3.0.9" @@ -1960,6 +2580,43 @@ files = [ [package.extras] diagrams = ["jinja2", "railroad-diagrams"] +[[package]] +name = "pyrsistent" +version = "0.19.3" +description = "Persistent/Functional/Immutable data structures" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pyrsistent-0.19.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:20460ac0ea439a3e79caa1dbd560344b64ed75e85d8703943e0b66c2a6150e4a"}, + {file = "pyrsistent-0.19.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4c18264cb84b5e68e7085a43723f9e4c1fd1d935ab240ce02c0324a8e01ccb64"}, + {file = "pyrsistent-0.19.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4b774f9288dda8d425adb6544e5903f1fb6c273ab3128a355c6b972b7df39dcf"}, + {file = "pyrsistent-0.19.3-cp310-cp310-win32.whl", hash = "sha256:5a474fb80f5e0d6c9394d8db0fc19e90fa540b82ee52dba7d246a7791712f74a"}, + {file = "pyrsistent-0.19.3-cp310-cp310-win_amd64.whl", hash = "sha256:49c32f216c17148695ca0e02a5c521e28a4ee6c5089f97e34fe24163113722da"}, + {file = "pyrsistent-0.19.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:f0774bf48631f3a20471dd7c5989657b639fd2d285b861237ea9e82c36a415a9"}, + {file = "pyrsistent-0.19.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3ab2204234c0ecd8b9368dbd6a53e83c3d4f3cab10ecaf6d0e772f456c442393"}, + {file = "pyrsistent-0.19.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e42296a09e83028b3476f7073fcb69ffebac0e66dbbfd1bd847d61f74db30f19"}, + {file = "pyrsistent-0.19.3-cp311-cp311-win32.whl", hash = "sha256:64220c429e42a7150f4bfd280f6f4bb2850f95956bde93c6fda1b70507af6ef3"}, + {file = "pyrsistent-0.19.3-cp311-cp311-win_amd64.whl", hash = "sha256:016ad1afadf318eb7911baa24b049909f7f3bb2c5b1ed7b6a8f21db21ea3faa8"}, + {file = "pyrsistent-0.19.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c4db1bd596fefd66b296a3d5d943c94f4fac5bcd13e99bffe2ba6a759d959a28"}, + {file = "pyrsistent-0.19.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aeda827381f5e5d65cced3024126529ddc4289d944f75e090572c77ceb19adbf"}, + {file = "pyrsistent-0.19.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:42ac0b2f44607eb92ae88609eda931a4f0dfa03038c44c772e07f43e738bcac9"}, + {file = "pyrsistent-0.19.3-cp37-cp37m-win32.whl", hash = "sha256:e8f2b814a3dc6225964fa03d8582c6e0b6650d68a232df41e3cc1b66a5d2f8d1"}, + {file = "pyrsistent-0.19.3-cp37-cp37m-win_amd64.whl", hash = "sha256:c9bb60a40a0ab9aba40a59f68214eed5a29c6274c83b2cc206a359c4a89fa41b"}, + {file = "pyrsistent-0.19.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:a2471f3f8693101975b1ff85ffd19bb7ca7dd7c38f8a81701f67d6b4f97b87d8"}, + {file = "pyrsistent-0.19.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cc5d149f31706762c1f8bda2e8c4f8fead6e80312e3692619a75301d3dbb819a"}, + {file = "pyrsistent-0.19.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3311cb4237a341aa52ab8448c27e3a9931e2ee09561ad150ba94e4cfd3fc888c"}, + {file = "pyrsistent-0.19.3-cp38-cp38-win32.whl", hash = "sha256:f0e7c4b2f77593871e918be000b96c8107da48444d57005b6a6bc61fb4331b2c"}, + {file = "pyrsistent-0.19.3-cp38-cp38-win_amd64.whl", hash = "sha256:c147257a92374fde8498491f53ffa8f4822cd70c0d85037e09028e478cababb7"}, + {file = "pyrsistent-0.19.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:b735e538f74ec31378f5a1e3886a26d2ca6351106b4dfde376a26fc32a044edc"}, + {file = "pyrsistent-0.19.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99abb85579e2165bd8522f0c0138864da97847875ecbd45f3e7e2af569bfc6f2"}, + {file = "pyrsistent-0.19.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3a8cb235fa6d3fd7aae6a4f1429bbb1fec1577d978098da1252f0489937786f3"}, + {file = "pyrsistent-0.19.3-cp39-cp39-win32.whl", hash = "sha256:c74bed51f9b41c48366a286395c67f4e894374306b197e62810e0fdaf2364da2"}, + {file = "pyrsistent-0.19.3-cp39-cp39-win_amd64.whl", hash = "sha256:878433581fc23e906d947a6814336eee031a00e6defba224234169ae3d3d6a98"}, + {file = "pyrsistent-0.19.3-py3-none-any.whl", hash = "sha256:ccf0d6bd208f8111179f0c26fdf84ed7c3891982f2edaeae7422575f47e66b64"}, + {file = "pyrsistent-0.19.3.tar.gz", hash = "sha256:1a2994773706bbb4995c31a97bc94f1418314923bd1048c6d964837040376440"}, +] + [[package]] name = "pytest" version = "7.2.2" @@ -2072,6 +2729,101 @@ files = [ [package.dependencies] six = ">=1.5" +[[package]] +name = "python-lsp-black" +version = "1.2.1" +description = "Black plugin for the Python LSP Server" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "python-lsp-black-1.2.1.tar.gz", hash = "sha256:d7eaeab2a377e96a82cc26afe2f8f2e1cf7c6eaefdcdeab026343e2e559dcce9"}, + {file = "python_lsp_black-1.2.1-py3-none-any.whl", hash = "sha256:9793e69122f7ab51dffa980f026e456b4be62a3400df5c89b6ecf9278b74913a"}, +] + +[package.dependencies] +black = ">=22.3.0" +python-lsp-server = ">=1.4.0" +toml = "*" + +[package.extras] +dev = ["flake8", "isort (>=5.0)", "mypy", "pre-commit", "pytest", "types-pkg-resources", "types-setuptools", "types-toml"] + +[[package]] +name = "python-lsp-jsonrpc" +version = "1.0.0" +description = "JSON RPC 2.0 server library" +category = "dev" +optional = false +python-versions = "*" +files = [ + {file = "python-lsp-jsonrpc-1.0.0.tar.gz", hash = "sha256:7bec170733db628d3506ea3a5288ff76aa33c70215ed223abdb0d95e957660bd"}, + {file = "python_lsp_jsonrpc-1.0.0-py3-none-any.whl", hash = "sha256:079b143be64b0a378bdb21dff5e28a8c1393fe7e8a654ef068322d754e545fc7"}, +] + +[package.dependencies] +ujson = ">=3.0.0" + +[package.extras] +test = ["coverage", "pycodestyle", "pyflakes", "pylint", "pytest", "pytest-cov"] + +[[package]] +name = "python-lsp-server" +version = "1.7.1" +description = "Python Language Server for the Language Server Protocol" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "python-lsp-server-1.7.1.tar.gz", hash = "sha256:67473bb301f35434b5fa8b21fc5ed5fac27dc8a8446ccec8bae456af52a0aef6"}, + {file = "python_lsp_server-1.7.1-py3-none-any.whl", hash = "sha256:8f8b382868b161199aa385659b28427890be628d86f54810463a4d0ee0d6d091"}, +] + +[package.dependencies] +docstring-to-markdown = "*" +jedi = ">=0.17.2,<0.19.0" +pluggy = ">=1.0.0" +python-lsp-jsonrpc = ">=1.0.0" +setuptools = ">=39.0.0" +ujson = ">=3.0.0" + +[package.extras] +all = ["autopep8 (>=1.6.0,<1.7.0)", "flake8 (>=5.0.0,<7)", "mccabe (>=0.7.0,<0.8.0)", "pycodestyle (>=2.9.0,<2.11.0)", "pydocstyle (>=6.2.0,<6.3.0)", "pyflakes (>=2.5.0,<3.1.0)", "pylint (>=2.5.0,<3)", "rope (>1.2.0)", "whatthepatch (>=1.0.2,<2.0.0)", "yapf"] +autopep8 = ["autopep8 (>=1.6.0,<1.7.0)"] +flake8 = ["flake8 (>=5.0.0,<7)"] +mccabe = ["mccabe (>=0.7.0,<0.8.0)"] +pycodestyle = ["pycodestyle (>=2.9.0,<2.11.0)"] +pydocstyle = ["pydocstyle (>=6.2.0,<6.3.0)"] +pyflakes = ["pyflakes (>=2.5.0,<3.1.0)"] +pylint = ["pylint (>=2.5.0,<3)"] +rope = ["rope (>1.2.0)"] +test = ["coverage", "flaky", "matplotlib", "numpy", "pandas", "pylint (>=2.5.0,<3)", "pyqt5", "pytest", "pytest-cov"] +websockets = ["websockets (>=10.3)"] +yapf = ["whatthepatch (>=1.0.2,<2.0.0)", "yapf"] + +[[package]] +name = "pytoolconfig" +version = "1.2.2" +description = "Python tool configuration" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pytoolconfig-1.2.2-py3-none-any.whl", hash = "sha256:825d97b052e58b609c2684b04efeb543075588d33a4916a6dc2ae39676458c7d"}, + {file = "pytoolconfig-1.2.2.tar.gz", hash = "sha256:2512a1f261a40e73cef2e58e786184261b60c802ae7ed01249342b1949ec3aa2"}, +] + +[package.dependencies] +appdirs = {version = ">=1.4.4", optional = true, markers = "extra == \"global\""} +packaging = ">=21.3" +tomli = {version = ">=2.0", markers = "python_version < \"3.11\""} + +[package.extras] +doc = ["sphinx (>=4.5.0)", "tabulate (>=0.8.9)"] +gen-docs = ["pytoolconfig[doc]", "sphinx (>=4.5.0)", "sphinx-autodoc-typehints (>=1.18.1)", "sphinx-rtd-theme (>=1.0.0)"] +global = ["appdirs (>=1.4.4)"] +validation = ["pydantic (>=1.7.4)"] + [[package]] name = "pytz" version = "2023.2" @@ -2084,6 +2836,30 @@ files = [ {file = "pytz-2023.2.tar.gz", hash = "sha256:a27dcf612c05d2ebde626f7d506555f10dfc815b3eddccfaadfc7d99b11c9a07"}, ] +[[package]] +name = "pywin32" +version = "306" +description = "Python for Window Extensions" +category = "dev" +optional = false +python-versions = "*" +files = [ + {file = "pywin32-306-cp310-cp310-win32.whl", hash = "sha256:06d3420a5155ba65f0b72f2699b5bacf3109f36acbe8923765c22938a69dfc8d"}, + {file = "pywin32-306-cp310-cp310-win_amd64.whl", hash = "sha256:84f4471dbca1887ea3803d8848a1616429ac94a4a8d05f4bc9c5dcfd42ca99c8"}, + {file = "pywin32-306-cp311-cp311-win32.whl", hash = "sha256:e65028133d15b64d2ed8f06dd9fbc268352478d4f9289e69c190ecd6818b6407"}, + {file = "pywin32-306-cp311-cp311-win_amd64.whl", hash = "sha256:a7639f51c184c0272e93f244eb24dafca9b1855707d94c192d4a0b4c01e1100e"}, + {file = "pywin32-306-cp311-cp311-win_arm64.whl", hash = "sha256:70dba0c913d19f942a2db25217d9a1b726c278f483a919f1abfed79c9cf64d3a"}, + {file = "pywin32-306-cp312-cp312-win32.whl", hash = "sha256:383229d515657f4e3ed1343da8be101000562bf514591ff383ae940cad65458b"}, + {file = "pywin32-306-cp312-cp312-win_amd64.whl", hash = "sha256:37257794c1ad39ee9be652da0462dc2e394c8159dfd913a8a4e8eb6fd346da0e"}, + {file = "pywin32-306-cp312-cp312-win_arm64.whl", hash = "sha256:5821ec52f6d321aa59e2db7e0a35b997de60c201943557d108af9d4ae1ec7040"}, + {file = "pywin32-306-cp37-cp37m-win32.whl", hash = "sha256:1c73ea9a0d2283d889001998059f5eaaba3b6238f767c9cf2833b13e6a685f65"}, + {file = "pywin32-306-cp37-cp37m-win_amd64.whl", hash = "sha256:72c5f621542d7bdd4fdb716227be0dd3f8565c11b280be6315b06ace35487d36"}, + {file = "pywin32-306-cp38-cp38-win32.whl", hash = "sha256:e4c092e2589b5cf0d365849e73e02c391c1349958c5ac3e9d5ccb9a28e017b3a"}, + {file = "pywin32-306-cp38-cp38-win_amd64.whl", hash = "sha256:e8ac1ae3601bee6ca9f7cb4b5363bf1c0badb935ef243c4733ff9a393b1690c0"}, + {file = "pywin32-306-cp39-cp39-win32.whl", hash = "sha256:e25fd5b485b55ac9c057f67d94bc203f3f6595078d1fb3b458c9c28b7153a802"}, + {file = "pywin32-306-cp39-cp39-win_amd64.whl", hash = "sha256:39b61c15272833b5c329a2989999dcae836b1eed650252ab1b7bfbe1d59f30f4"}, +] + [[package]] name = "pyyaml" version = "6.0" @@ -2134,6 +2910,96 @@ files = [ {file = "PyYAML-6.0.tar.gz", hash = "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"}, ] +[[package]] +name = "pyzmq" +version = "25.0.2" +description = "Python bindings for 0MQ" +category = "dev" +optional = false +python-versions = ">=3.6" +files = [ + {file = "pyzmq-25.0.2-cp310-cp310-macosx_10_15_universal2.whl", hash = "sha256:ac178e666c097c8d3deb5097b58cd1316092fc43e8ef5b5fdb259b51da7e7315"}, + {file = "pyzmq-25.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:659e62e1cbb063151c52f5b01a38e1df6b54feccfa3e2509d44c35ca6d7962ee"}, + {file = "pyzmq-25.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8280ada89010735a12b968ec3ea9a468ac2e04fddcc1cede59cb7f5178783b9c"}, + {file = "pyzmq-25.0.2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a9b5eeb5278a8a636bb0abdd9ff5076bcbb836cd2302565df53ff1fa7d106d54"}, + {file = "pyzmq-25.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9a2e5fe42dfe6b73ca120b97ac9f34bfa8414feb15e00e37415dbd51cf227ef6"}, + {file = "pyzmq-25.0.2-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:827bf60e749e78acb408a6c5af6688efbc9993e44ecc792b036ec2f4b4acf485"}, + {file = "pyzmq-25.0.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:7b504ae43d37e282301da586529e2ded8b36d4ee2cd5e6db4386724ddeaa6bbc"}, + {file = "pyzmq-25.0.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:cb1f69a0a2a2b1aae8412979dd6293cc6bcddd4439bf07e4758d864ddb112354"}, + {file = "pyzmq-25.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:2b9c9cc965cdf28381e36da525dcb89fc1571d9c54800fdcd73e3f73a2fc29bd"}, + {file = "pyzmq-25.0.2-cp310-cp310-win32.whl", hash = "sha256:24abbfdbb75ac5039205e72d6c75f10fc39d925f2df8ff21ebc74179488ebfca"}, + {file = "pyzmq-25.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:6a821a506822fac55d2df2085a52530f68ab15ceed12d63539adc32bd4410f6e"}, + {file = "pyzmq-25.0.2-cp311-cp311-macosx_10_15_universal2.whl", hash = "sha256:9af0bb0277e92f41af35e991c242c9c71920169d6aa53ade7e444f338f4c8128"}, + {file = "pyzmq-25.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:54a96cf77684a3a537b76acfa7237b1e79a8f8d14e7f00e0171a94b346c5293e"}, + {file = "pyzmq-25.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88649b19ede1cab03b96b66c364cbbf17c953615cdbc844f7f6e5f14c5e5261c"}, + {file = "pyzmq-25.0.2-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:715cff7644a80a7795953c11b067a75f16eb9fc695a5a53316891ebee7f3c9d5"}, + {file = "pyzmq-25.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:312b3f0f066b4f1d17383aae509bacf833ccaf591184a1f3c7a1661c085063ae"}, + {file = "pyzmq-25.0.2-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:d488c5c8630f7e782e800869f82744c3aca4aca62c63232e5d8c490d3d66956a"}, + {file = "pyzmq-25.0.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:38d9f78d69bcdeec0c11e0feb3bc70f36f9b8c44fc06e5d06d91dc0a21b453c7"}, + {file = "pyzmq-25.0.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:3059a6a534c910e1d5d068df42f60d434f79e6cc6285aa469b384fa921f78cf8"}, + {file = "pyzmq-25.0.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:6526d097b75192f228c09d48420854d53dfbc7abbb41b0e26f363ccb26fbc177"}, + {file = "pyzmq-25.0.2-cp311-cp311-win32.whl", hash = "sha256:5c5fbb229e40a89a2fe73d0c1181916f31e30f253cb2d6d91bea7927c2e18413"}, + {file = "pyzmq-25.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:ed15e3a2c3c2398e6ae5ce86d6a31b452dfd6ad4cd5d312596b30929c4b6e182"}, + {file = "pyzmq-25.0.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:032f5c8483c85bf9c9ca0593a11c7c749d734ce68d435e38c3f72e759b98b3c9"}, + {file = "pyzmq-25.0.2-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:374b55516393bfd4d7a7daa6c3b36d6dd6a31ff9d2adad0838cd6a203125e714"}, + {file = "pyzmq-25.0.2-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:08bfcc21b5997a9be4fefa405341320d8e7f19b4d684fb9c0580255c5bd6d695"}, + {file = "pyzmq-25.0.2-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:1a843d26a8da1b752c74bc019c7b20e6791ee813cd6877449e6a1415589d22ff"}, + {file = "pyzmq-25.0.2-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:b48616a09d7df9dbae2f45a0256eee7b794b903ddc6d8657a9948669b345f220"}, + {file = "pyzmq-25.0.2-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:d4427b4a136e3b7f85516c76dd2e0756c22eec4026afb76ca1397152b0ca8145"}, + {file = "pyzmq-25.0.2-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:26b0358e8933990502f4513c991c9935b6c06af01787a36d133b7c39b1df37fa"}, + {file = "pyzmq-25.0.2-cp36-cp36m-win32.whl", hash = "sha256:c8fedc3ccd62c6b77dfe6f43802057a803a411ee96f14e946f4a76ec4ed0e117"}, + {file = "pyzmq-25.0.2-cp36-cp36m-win_amd64.whl", hash = "sha256:2da6813b7995b6b1d1307329c73d3e3be2fd2d78e19acfc4eff2e27262732388"}, + {file = "pyzmq-25.0.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a35960c8b2f63e4ef67fd6731851030df68e4b617a6715dd11b4b10312d19fef"}, + {file = "pyzmq-25.0.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eef2a0b880ab40aca5a878933376cb6c1ec483fba72f7f34e015c0f675c90b20"}, + {file = "pyzmq-25.0.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:85762712b74c7bd18e340c3639d1bf2f23735a998d63f46bb6584d904b5e401d"}, + {file = "pyzmq-25.0.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:64812f29d6eee565e129ca14b0c785744bfff679a4727137484101b34602d1a7"}, + {file = "pyzmq-25.0.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:510d8e55b3a7cd13f8d3e9121edf0a8730b87d925d25298bace29a7e7bc82810"}, + {file = "pyzmq-25.0.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:b164cc3c8acb3d102e311f2eb6f3c305865ecb377e56adc015cb51f721f1dda6"}, + {file = "pyzmq-25.0.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:28fdb9224a258134784a9cf009b59265a9dde79582fb750d4e88a6bcbc6fa3dc"}, + {file = "pyzmq-25.0.2-cp37-cp37m-win32.whl", hash = "sha256:dd771a440effa1c36d3523bc6ba4e54ff5d2e54b4adcc1e060d8f3ca3721d228"}, + {file = "pyzmq-25.0.2-cp37-cp37m-win_amd64.whl", hash = "sha256:9bdc40efb679b9dcc39c06d25629e55581e4c4f7870a5e88db4f1c51ce25e20d"}, + {file = "pyzmq-25.0.2-cp38-cp38-macosx_10_15_universal2.whl", hash = "sha256:1f82906a2d8e4ee310f30487b165e7cc8ed09c009e4502da67178b03083c4ce0"}, + {file = "pyzmq-25.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:21ec0bf4831988af43c8d66ba3ccd81af2c5e793e1bf6790eb2d50e27b3c570a"}, + {file = "pyzmq-25.0.2-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:abbce982a17c88d2312ec2cf7673985d444f1beaac6e8189424e0a0e0448dbb3"}, + {file = "pyzmq-25.0.2-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:9e1d2f2d86fc75ed7f8845a992c5f6f1ab5db99747fb0d78b5e4046d041164d2"}, + {file = "pyzmq-25.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a2e92ff20ad5d13266bc999a29ed29a3b5b101c21fdf4b2cf420c09db9fb690e"}, + {file = "pyzmq-25.0.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:edbbf06cc2719889470a8d2bf5072bb00f423e12de0eb9ffec946c2c9748e149"}, + {file = "pyzmq-25.0.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:77942243ff4d14d90c11b2afd8ee6c039b45a0be4e53fb6fa7f5e4fd0b59da39"}, + {file = "pyzmq-25.0.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ab046e9cb902d1f62c9cc0eca055b1d11108bdc271caf7c2171487298f229b56"}, + {file = "pyzmq-25.0.2-cp38-cp38-win32.whl", hash = "sha256:ad761cfbe477236802a7ab2c080d268c95e784fe30cafa7e055aacd1ca877eb0"}, + {file = "pyzmq-25.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:8560756318ec7c4c49d2c341012167e704b5a46d9034905853c3d1ade4f55bee"}, + {file = "pyzmq-25.0.2-cp39-cp39-macosx_10_15_universal2.whl", hash = "sha256:ab2c056ac503f25a63f6c8c6771373e2a711b98b304614151dfb552d3d6c81f6"}, + {file = "pyzmq-25.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:cca8524b61c0eaaa3505382dc9b9a3bc8165f1d6c010fdd1452c224225a26689"}, + {file = "pyzmq-25.0.2-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:cfb9f7eae02d3ac42fbedad30006b7407c984a0eb4189a1322241a20944d61e5"}, + {file = "pyzmq-25.0.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:5eaeae038c68748082137d6896d5c4db7927e9349237ded08ee1bbd94f7361c9"}, + {file = "pyzmq-25.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4a31992a8f8d51663ebf79df0df6a04ffb905063083d682d4380ab8d2c67257c"}, + {file = "pyzmq-25.0.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:6a979e59d2184a0c8f2ede4b0810cbdd86b64d99d9cc8a023929e40dce7c86cc"}, + {file = "pyzmq-25.0.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:1f124cb73f1aa6654d31b183810febc8505fd0c597afa127c4f40076be4574e0"}, + {file = "pyzmq-25.0.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:65c19a63b4a83ae45d62178b70223adeee5f12f3032726b897431b6553aa25af"}, + {file = "pyzmq-25.0.2-cp39-cp39-win32.whl", hash = "sha256:83d822e8687621bed87404afc1c03d83fa2ce39733d54c2fd52d8829edb8a7ff"}, + {file = "pyzmq-25.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:24683285cc6b7bf18ad37d75b9db0e0fefe58404e7001f1d82bf9e721806daa7"}, + {file = "pyzmq-25.0.2-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:4a4b4261eb8f9ed71f63b9eb0198dd7c934aa3b3972dac586d0ef502ba9ab08b"}, + {file = "pyzmq-25.0.2-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:62ec8d979f56c0053a92b2b6a10ff54b9ec8a4f187db2b6ec31ee3dd6d3ca6e2"}, + {file = "pyzmq-25.0.2-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:affec1470351178e892121b3414c8ef7803269f207bf9bef85f9a6dd11cde264"}, + {file = "pyzmq-25.0.2-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ffc71111433bd6ec8607a37b9211f4ef42e3d3b271c6d76c813669834764b248"}, + {file = "pyzmq-25.0.2-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:6fadc60970714d86eff27821f8fb01f8328dd36bebd496b0564a500fe4a9e354"}, + {file = "pyzmq-25.0.2-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:269968f2a76c0513490aeb3ba0dc3c77b7c7a11daa894f9d1da88d4a0db09835"}, + {file = "pyzmq-25.0.2-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:f7c8b8368e84381ae7c57f1f5283b029c888504aaf4949c32e6e6fb256ec9bf0"}, + {file = "pyzmq-25.0.2-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:25e6873a70ad5aa31e4a7c41e5e8c709296edef4a92313e1cd5fc87bbd1874e2"}, + {file = "pyzmq-25.0.2-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b733076ff46e7db5504c5e7284f04a9852c63214c74688bdb6135808531755a3"}, + {file = "pyzmq-25.0.2-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:a6f6ae12478fdc26a6d5fdb21f806b08fa5403cd02fd312e4cb5f72df078f96f"}, + {file = "pyzmq-25.0.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:67da1c213fbd208906ab3470cfff1ee0048838365135a9bddc7b40b11e6d6c89"}, + {file = "pyzmq-25.0.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:531e36d9fcd66f18de27434a25b51d137eb546931033f392e85674c7a7cea853"}, + {file = "pyzmq-25.0.2-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:34a6fddd159ff38aa9497b2e342a559f142ab365576284bc8f77cb3ead1f79c5"}, + {file = "pyzmq-25.0.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b491998ef886662c1f3d49ea2198055a9a536ddf7430b051b21054f2a5831800"}, + {file = "pyzmq-25.0.2-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:5d496815074e3e3d183fe2c7fcea2109ad67b74084c254481f87b64e04e9a471"}, + {file = "pyzmq-25.0.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:56a94ab1d12af982b55ca96c6853db6ac85505e820d9458ac76364c1998972f4"}, + {file = "pyzmq-25.0.2.tar.gz", hash = "sha256:6b8c1bbb70e868dc88801aa532cae6bd4e3b5233784692b786f17ad2962e5149"}, +] + +[package.dependencies] +cffi = {version = "*", markers = "implementation_name == \"pypy\""} + [[package]] name = "requests" version = "2.28.2" @@ -2190,6 +3056,25 @@ typing-extensions = {version = ">=4.0.0,<5.0", markers = "python_version < \"3.9 [package.extras] jupyter = ["ipywidgets (>=7.5.1,<8.0.0)"] +[[package]] +name = "rope" +version = "1.7.0" +description = "a python refactoring library..." +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "rope-1.7.0-py3-none-any.whl", hash = "sha256:893dd80ba7077fc9f6f42b0a849372076b70f1d6e405b9f0cc52781ffa0e6890"}, + {file = "rope-1.7.0.tar.gz", hash = "sha256:ba39581d0f8dee4ae8b5b5e82e35d03cebad965ccb127b7eaab9755cdc85e85a"}, +] + +[package.dependencies] +pytoolconfig = {version = ">=1.2.2", extras = ["global"]} + +[package.extras] +dev = ["build (>=0.7.0)", "pre-commit (>=2.20.0)", "pytest (>=7.0.1)", "pytest-timeout (>=2.1.0)"] +doc = ["pytoolconfig[doc]", "sphinx (>=4.5.0)", "sphinx-autodoc-typehints (>=1.18.1)", "sphinx-rtd-theme (>=1.0.0)"] + [[package]] name = "rstcheck" version = "6.1.2" @@ -2300,6 +3185,54 @@ files = [ {file = "ruamel.yaml.clib-0.2.7.tar.gz", hash = "sha256:1f08fd5a2bea9c4180db71678e850b995d2a5f4537be0e94557668cf0f5f9497"}, ] +[[package]] +name = "ruff" +version = "0.0.259" +description = "An extremely fast Python linter, written in Rust." +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "ruff-0.0.259-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:f3938dc45e2a3f818e9cbd53007265c22246fbfded8837b2c563bf0ebde1a226"}, + {file = "ruff-0.0.259-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:22e1e35bf5f12072cd644d22afd9203641ccf258bc14ff91aa1c43dc14f6047d"}, + {file = "ruff-0.0.259-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d2fb20e89e85d147c85caa807707a1488bccc1f3854dc3d53533e89b52a0c5ff"}, + {file = "ruff-0.0.259-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:49e903bcda19f6bb0725a962c058eb5d61f40d84ef52ed53b61939b69402ab4e"}, + {file = "ruff-0.0.259-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:71f0ef1985e9a6696fa97da8459917fa34bdaa2c16bd33bd5edead585b7d44f7"}, + {file = "ruff-0.0.259-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:7cfef26619cba184d59aa7fa17b48af5891d51fc0b755a9bc533478a10d4d066"}, + {file = "ruff-0.0.259-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:79b02fa17ec1fd8d306ae302cb47fb614b71e1f539997858243769bcbe78c6d9"}, + {file = "ruff-0.0.259-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:428507fb321b386dda70d66cd1a8aa0abf51d7c197983d83bb9e4fa5ee60300b"}, + {file = "ruff-0.0.259-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c5fbaea9167f1852757f02133e5daacdb8c75b3431343205395da5b10499927a"}, + {file = "ruff-0.0.259-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:40ae87f2638484b7e8a7567b04a7af719f1c484c5bf132038b702bb32e1f6577"}, + {file = "ruff-0.0.259-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:29e2b77b7d5da6a7dd5cf9b738b511355c5734ece56f78e500d4b5bffd58c1a0"}, + {file = "ruff-0.0.259-py3-none-musllinux_1_2_i686.whl", hash = "sha256:5b3c1beacf6037e7f0781d4699d9a2dd4ba2462f475be5b1f45cf84c4ba3c69d"}, + {file = "ruff-0.0.259-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:daaea322e7e85f4c13d82be9536309e1c4b8b9851bb0cbc7eeb15d490fd46bf9"}, + {file = "ruff-0.0.259-py3-none-win32.whl", hash = "sha256:38704f151323aa5858370a2f792e122cc25e5d1aabe7d42ceeab83da18f0b456"}, + {file = "ruff-0.0.259-py3-none-win_amd64.whl", hash = "sha256:aa9449b898287e621942cc71b9327eceb8f0c357e4065fecefb707ef2d978df8"}, + {file = "ruff-0.0.259-py3-none-win_arm64.whl", hash = "sha256:e4f39e18702de69faaaee3969934b92d7467285627f99a5b6ecd55a7d9f5d086"}, + {file = "ruff-0.0.259.tar.gz", hash = "sha256:8b56496063ab3bfdf72339a5fbebb8bd46e5c5fee25ef11a9f03b208fa0562ec"}, +] + +[[package]] +name = "ruff-lsp" +version = "0.0.24" +description = "A Language Server Protocol implementation for Ruff." +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "ruff_lsp-0.0.24-py3-none-any.whl", hash = "sha256:71207b0a64f40577db3e9aef0b1331fcf4122f9b98bba66b905d41706d639e65"}, + {file = "ruff_lsp-0.0.24.tar.gz", hash = "sha256:d617bf19893c3bd2ea3d71f79aeede196b91ca08831b53a727e24d4f63f29f3a"}, +] + +[package.dependencies] +lsprotocol = ">=2023.0.0a1" +pygls = ">=1.0.1" +ruff = ">=0.0.253" +typing-extensions = "*" + +[package.extras] +dev = ["black (==22.12.0)", "mypy (==0.991)", "python-lsp-jsonrpc (==1.0.0)"] + [[package]] name = "safety" version = "2.3.5" @@ -2389,6 +3322,18 @@ files = [ {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, ] +[[package]] +name = "soupsieve" +version = "2.4" +description = "A modern CSS selector implementation for Beautiful Soup." +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "soupsieve-2.4-py3-none-any.whl", hash = "sha256:49e5368c2cda80ee7e84da9dbe3e110b70a4575f196efb74e51b94549d921955"}, + {file = "soupsieve-2.4.tar.gz", hash = "sha256:e28dba9ca6c7c00173e34e4ba57448f0688bb681b7c5e8bf4971daafc093d69a"}, +] + [[package]] name = "sphinx" version = "6.1.3" @@ -2590,6 +3535,25 @@ files = [ [package.dependencies] pbr = ">=2.0.0,<2.1.0 || >2.1.0" +[[package]] +name = "tinycss2" +version = "1.2.1" +description = "A tiny CSS parser" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tinycss2-1.2.1-py3-none-any.whl", hash = "sha256:2b80a96d41e7c3914b8cda8bc7f705a4d9c49275616e886103dd839dfc847847"}, + {file = "tinycss2-1.2.1.tar.gz", hash = "sha256:8cff3a8f066c2ec677c06dbc7b45619804a6938478d9d73c284b29d14ecb0627"}, +] + +[package.dependencies] +webencodings = ">=0.4" + +[package.extras] +doc = ["sphinx", "sphinx_rtd_theme"] +test = ["flake8", "isort", "pytest"] + [[package]] name = "toml" version = "0.10.2" @@ -2647,6 +3611,22 @@ files = [ {file = "tornado-6.2.tar.gz", hash = "sha256:9b630419bde84ec666bfd7ea0a4cb2a8a651c2d5cccdbdd1972a0c859dfc3c13"}, ] +[[package]] +name = "traitlets" +version = "5.9.0" +description = "Traitlets Python configuration system" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "traitlets-5.9.0-py3-none-any.whl", hash = "sha256:9e6ec080259b9a5940c797d58b613b5e31441c2257b87c2e795c5228ae80d2d8"}, + {file = "traitlets-5.9.0.tar.gz", hash = "sha256:f6cde21a9c68cf756af02035f72d5a723bf607e862e7be33ece505abf4a3bad9"}, +] + +[package.extras] +docs = ["myst-parser", "pydata-sphinx-theme", "sphinx"] +test = ["argcomplete (>=2.0)", "pre-commit", "pytest", "pytest-mock"] + [[package]] name = "tryceratops" version = "1.1.0" @@ -2666,23 +3646,19 @@ toml = ">=0.10.2" [[package]] name = "typeguard" -version = "3.0.2" +version = "2.13.3" description = "Run-time type checker for Python" category = "dev" optional = false -python-versions = ">=3.7.4" +python-versions = ">=3.5.3" files = [ - {file = "typeguard-3.0.2-py3-none-any.whl", hash = "sha256:bbe993854385284ab42fd5bd3bee6f6556577ce8b50696d6cb956d704f286c8e"}, - {file = "typeguard-3.0.2.tar.gz", hash = "sha256:fee5297fdb28f8e9efcb8142b5ee219e02375509cd77ea9d270b5af826358d5a"}, + {file = "typeguard-2.13.3-py3-none-any.whl", hash = "sha256:5e3e3be01e887e7eafae5af63d1f36c849aaa94e3a0112097312aabfa16284f1"}, + {file = "typeguard-2.13.3.tar.gz", hash = "sha256:00edaa8da3a133674796cf5ea87d9f4b4c367d77476e185e80251cc13dfbb8c4"}, ] -[package.dependencies] -importlib-metadata = {version = ">=3.6", markers = "python_version < \"3.10\""} -typing-extensions = {version = ">=4.4.0", markers = "python_version < \"3.11\""} - [package.extras] -doc = ["packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] -test = ["mypy (>=0.991)", "pytest (>=7)"] +doc = ["sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] +test = ["mypy", "pytest", "typing-extensions"] [[package]] name = "typer" @@ -2710,14 +3686,14 @@ test = ["black (>=22.3.0,<23.0.0)", "coverage (>=6.2,<7.0)", "isort (>=5.0.6,<6. [[package]] name = "types-docutils" -version = "0.19.1.6" +version = "0.19.1.7" description = "Typing stubs for docutils" category = "dev" optional = false python-versions = "*" files = [ - {file = "types-docutils-0.19.1.6.tar.gz", hash = "sha256:a334a703a8688910d0869464f1f6f8bd330d75843bdab4f893547bfb29417a01"}, - {file = "types_docutils-0.19.1.6-py3-none-any.whl", hash = "sha256:b7e182f371cbe20828a8750ffb150219968452445946f66f33778b08e81c7d89"}, + {file = "types-docutils-0.19.1.7.tar.gz", hash = "sha256:cb6e0dd1c895c723002ec4dc8334bf9df04726ef0cf13f5597501578b47eef30"}, + {file = "types_docutils-0.19.1.7-py3-none-any.whl", hash = "sha256:bbf89cf3b9460ce780434f8cc52ce846b0f14505ff3496fc6a17acd9967aee9e"}, ] [[package]] @@ -2760,6 +3736,81 @@ files = [ mypy-extensions = ">=0.3.0" typing-extensions = ">=3.7.4" +[[package]] +name = "ujson" +version = "5.7.0" +description = "Ultra fast JSON encoder and decoder for Python" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "ujson-5.7.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5eba5e69e4361ac3a311cf44fa71bc619361b6e0626768a494771aacd1c2f09b"}, + {file = "ujson-5.7.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:aae4d9e1b4c7b61780f0a006c897a4a1904f862fdab1abb3ea8f45bd11aa58f3"}, + {file = "ujson-5.7.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d2e43ccdba1cb5c6d3448eadf6fc0dae7be6c77e357a3abc968d1b44e265866d"}, + {file = "ujson-5.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:54384ce4920a6d35fa9ea8e580bc6d359e3eb961fa7e43f46c78e3ed162d56ff"}, + {file = "ujson-5.7.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:24ad1aa7fc4e4caa41d3d343512ce68e41411fb92adf7f434a4d4b3749dc8f58"}, + {file = "ujson-5.7.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:afff311e9f065a8f03c3753db7011bae7beb73a66189c7ea5fcb0456b7041ea4"}, + {file = "ujson-5.7.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:6e80f0d03e7e8646fc3d79ed2d875cebd4c83846e129737fdc4c2532dbd43d9e"}, + {file = "ujson-5.7.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:137831d8a0db302fb6828ee21c67ad63ac537bddc4376e1aab1c8573756ee21c"}, + {file = "ujson-5.7.0-cp310-cp310-win32.whl", hash = "sha256:7df3fd35ebc14dafeea031038a99232b32f53fa4c3ecddb8bed132a43eefb8ad"}, + {file = "ujson-5.7.0-cp310-cp310-win_amd64.whl", hash = "sha256:af4639f684f425177d09ae409c07602c4096a6287027469157bfb6f83e01448b"}, + {file = "ujson-5.7.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:9b0f2680ce8a70f77f5d70aaf3f013d53e6af6d7058727a35d8ceb4a71cdd4e9"}, + {file = "ujson-5.7.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:67a19fd8e7d8cc58a169bea99fed5666023adf707a536d8f7b0a3c51dd498abf"}, + {file = "ujson-5.7.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6abb8e6d8f1ae72f0ed18287245f5b6d40094e2656d1eab6d99d666361514074"}, + {file = "ujson-5.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d8cd622c069368d5074bd93817b31bdb02f8d818e57c29e206f10a1f9c6337dd"}, + {file = "ujson-5.7.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:14f9082669f90e18e64792b3fd0bf19f2b15e7fe467534a35ea4b53f3bf4b755"}, + {file = "ujson-5.7.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d7ff6ebb43bc81b057724e89550b13c9a30eda0f29c2f506f8b009895438f5a6"}, + {file = "ujson-5.7.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:f7f241488879d91a136b299e0c4ce091996c684a53775e63bb442d1a8e9ae22a"}, + {file = "ujson-5.7.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5593263a7fcfb934107444bcfba9dde8145b282de0ee9f61e285e59a916dda0f"}, + {file = "ujson-5.7.0-cp311-cp311-win32.whl", hash = "sha256:26c2b32b489c393106e9cb68d0a02e1a7b9d05a07429d875c46b94ee8405bdb7"}, + {file = "ujson-5.7.0-cp311-cp311-win_amd64.whl", hash = "sha256:ed24406454bb5a31df18f0a423ae14beb27b28cdfa34f6268e7ebddf23da807e"}, + {file = "ujson-5.7.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:18679484e3bf9926342b1c43a3bd640f93a9eeeba19ef3d21993af7b0c44785d"}, + {file = "ujson-5.7.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ee295761e1c6c30400641f0a20d381633d7622633cdf83a194f3c876a0e4b7e"}, + {file = "ujson-5.7.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b738282e12a05f400b291966630a98d622da0938caa4bc93cf65adb5f4281c60"}, + {file = "ujson-5.7.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:00343501dbaa5172e78ef0e37f9ebd08040110e11c12420ff7c1f9f0332d939e"}, + {file = "ujson-5.7.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:c0d1f7c3908357ee100aa64c4d1cf91edf99c40ac0069422a4fd5fd23b263263"}, + {file = "ujson-5.7.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:a5d2f44331cf04689eafac7a6596c71d6657967c07ac700b0ae1c921178645da"}, + {file = "ujson-5.7.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:16b2254a77b310f118717715259a196662baa6b1f63b1a642d12ab1ff998c3d7"}, + {file = "ujson-5.7.0-cp37-cp37m-win32.whl", hash = "sha256:6faf46fa100b2b89e4db47206cf8a1ffb41542cdd34dde615b2fc2288954f194"}, + {file = "ujson-5.7.0-cp37-cp37m-win_amd64.whl", hash = "sha256:ff0004c3f5a9a6574689a553d1b7819d1a496b4f005a7451f339dc2d9f4cf98c"}, + {file = "ujson-5.7.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:75204a1dd7ec6158c8db85a2f14a68d2143503f4bafb9a00b63fe09d35762a5e"}, + {file = "ujson-5.7.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7312731c7826e6c99cdd3ac503cd9acd300598e7a80bcf41f604fee5f49f566c"}, + {file = "ujson-5.7.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7b9dc5a90e2149643df7f23634fe202fed5ebc787a2a1be95cf23632b4d90651"}, + {file = "ujson-5.7.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b6a6961fc48821d84b1198a09516e396d56551e910d489692126e90bf4887d29"}, + {file = "ujson-5.7.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b01a9af52a0d5c46b2c68e3f258fdef2eacaa0ce6ae3e9eb97983f5b1166edb6"}, + {file = "ujson-5.7.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:b7316d3edeba8a403686cdcad4af737b8415493101e7462a70ff73dd0609eafc"}, + {file = "ujson-5.7.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:4ee997799a23227e2319a3f8817ce0b058923dbd31904761b788dc8f53bd3e30"}, + {file = "ujson-5.7.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:dda9aa4c33435147262cd2ea87c6b7a1ca83ba9b3933ff7df34e69fee9fced0c"}, + {file = "ujson-5.7.0-cp38-cp38-win32.whl", hash = "sha256:bea8d30e362180aafecabbdcbe0e1f0b32c9fa9e39c38e4af037b9d3ca36f50c"}, + {file = "ujson-5.7.0-cp38-cp38-win_amd64.whl", hash = "sha256:c96e3b872bf883090ddf32cc41957edf819c5336ab0007d0cf3854e61841726d"}, + {file = "ujson-5.7.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6411aea4c94a8e93c2baac096fbf697af35ba2b2ed410b8b360b3c0957a952d3"}, + {file = "ujson-5.7.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3d3b3499c55911f70d4e074c626acdb79a56f54262c3c83325ffb210fb03e44d"}, + {file = "ujson-5.7.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:341f891d45dd3814d31764626c55d7ab3fd21af61fbc99d070e9c10c1190680b"}, + {file = "ujson-5.7.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2f242eec917bafdc3f73a1021617db85f9958df80f267db69c76d766058f7b19"}, + {file = "ujson-5.7.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c3af9f9f22a67a8c9466a32115d9073c72a33ae627b11de6f592df0ee09b98b6"}, + {file = "ujson-5.7.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4a3d794afbf134df3056a813e5c8a935208cddeae975bd4bc0ef7e89c52f0ce0"}, + {file = "ujson-5.7.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:800bf998e78dae655008dd10b22ca8dc93bdcfcc82f620d754a411592da4bbf2"}, + {file = "ujson-5.7.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:b5ac3d5c5825e30b438ea92845380e812a476d6c2a1872b76026f2e9d8060fc2"}, + {file = "ujson-5.7.0-cp39-cp39-win32.whl", hash = "sha256:cd90027e6d93e8982f7d0d23acf88c896d18deff1903dd96140613389b25c0dd"}, + {file = "ujson-5.7.0-cp39-cp39-win_amd64.whl", hash = "sha256:523ee146cdb2122bbd827f4dcc2a8e66607b3f665186bce9e4f78c9710b6d8ab"}, + {file = "ujson-5.7.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:e87cec407ec004cf1b04c0ed7219a68c12860123dfb8902ef880d3d87a71c172"}, + {file = "ujson-5.7.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bab10165db6a7994e67001733f7f2caf3400b3e11538409d8756bc9b1c64f7e8"}, + {file = "ujson-5.7.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b522be14a28e6ac1cf818599aeff1004a28b42df4ed4d7bc819887b9dac915fc"}, + {file = "ujson-5.7.0-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7592f40175c723c032cdbe9fe5165b3b5903604f774ab0849363386e99e1f253"}, + {file = "ujson-5.7.0-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:ed22f9665327a981f288a4f758a432824dc0314e4195a0eaeb0da56a477da94d"}, + {file = "ujson-5.7.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:adf445a49d9a97a5a4c9bb1d652a1528de09dd1c48b29f79f3d66cea9f826bf6"}, + {file = "ujson-5.7.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:64772a53f3c4b6122ed930ae145184ebaed38534c60f3d859d8c3f00911eb122"}, + {file = "ujson-5.7.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:35209cb2c13fcb9d76d249286105b4897b75a5e7f0efb0c0f4b90f222ce48910"}, + {file = "ujson-5.7.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:90712dfc775b2c7a07d4d8e059dd58636bd6ff1776d79857776152e693bddea6"}, + {file = "ujson-5.7.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:0e4e8981c6e7e9e637e637ad8ffe948a09e5434bc5f52ecbb82b4b4cfc092bfb"}, + {file = "ujson-5.7.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:581c945b811a3d67c27566539bfcb9705ea09cb27c4be0002f7a553c8886b817"}, + {file = "ujson-5.7.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d36a807a24c7d44f71686685ae6fbc8793d784bca1adf4c89f5f780b835b6243"}, + {file = "ujson-5.7.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8b4257307e3662aa65e2644a277ca68783c5d51190ed9c49efebdd3cbfd5fa44"}, + {file = "ujson-5.7.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ea7423d8a2f9e160c5e011119741682414c5b8dce4ae56590a966316a07a4618"}, + {file = "ujson-5.7.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:4c592eb91a5968058a561d358d0fef59099ed152cfb3e1cd14eee51a7a93879e"}, + {file = "ujson-5.7.0.tar.gz", hash = "sha256:e788e5d5dcae8f6118ac9b45d0b891a0d55f7ac480eddcb7f07263f2bcf37b23"}, +] + [[package]] name = "urllib3" version = "1.26.15" @@ -2798,6 +3849,18 @@ platformdirs = ">=2.4,<4" docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=6.1.3)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=22.12)"] test = ["covdefaults (>=2.2.2)", "coverage (>=7.1)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23)", "pytest (>=7.2.1)", "pytest-env (>=0.8.1)", "pytest-freezegun (>=0.4.2)", "pytest-mock (>=3.10)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)"] +[[package]] +name = "webencodings" +version = "0.5.1" +description = "Character encoding aliases for legacy web content" +category = "dev" +optional = false +python-versions = "*" +files = [ + {file = "webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78"}, + {file = "webencodings-0.5.1.tar.gz", hash = "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"}, +] + [[package]] name = "wrapt" version = "1.15.0" @@ -2957,4 +4020,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "2.0" python-versions = ">=3.8.1,<4.0" -content-hash = "6a94d46546d761f4aa966b6e06f2649c9776f6349cfe42d2fd6430be27c14a0f" +content-hash = "f27445064962e71a6f6142162cd36f44fa133f172a97a52420e8e6bf33e07775" diff --git a/pyproject.toml b/pyproject.toml index 2fc1038..ad29467 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -145,10 +145,21 @@ sphinx-autodoc-typehints = ">=1.19.5" sphinx-autobuild = ">=2021.3.14" +[tool.poetry.group.pylsp.dependencies] +pylsp-mypy = ">=0.6.6" +pyls-isort = ">=0.2.2" +python-lsp-black = ">=1.2.1" +pyls-memestra = ">=0.0.16" +pylsp-rope = ">=0.1.11" +ruff-lsp = "^0.0.24" + +[tool.poetry.group.ruff.dependencies] +ruff = ">=0.0.259" + [tool.isort] atomic = true ensure_newline_before_comments = true -known_first_party = "xpypact" +known_first_party = "src" known_third_party = "mpl_toolkits,matplotlib,numpy,scipy" known_typing = "typing,types,typing_extensions,mypy,mypy_extensions" sections = "FUTURE,TYPING,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER" @@ -362,3 +373,50 @@ summary-quotes-same-line = true good-names-rgxs=["."] # a single character variable is okay logging-format-style="new" # use {} in logging messages deprecated-modules=["six"] + +[tool.ruff] +# Same as Black. +line-length = 100 + +# show an enumeration of all autofixed lint violations +show-fixes = true + +# show source code snippets when reporting violations +show-source = true + +src = ["src", "test"] + +# Allow unused variables when underscore-prefixed. +# dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" +dummy-variable-rgx = "^_$" +exclude = [ + "docs/source/conf.py", + "__pycache__", + "adhoc", + "wrk", + "*.egg-info", + ".cache", + "notebooks/dvp/*.py" +] +# Assume Python 3.10. +# target-version = "py310" + +[tool.ruff.per-file-ignores] +"__init__.py" = ["E402"] +"src/xpypact/Fluxes.py" = ["F811"] + +[tool.ruff.mccabe] +# Unlike Flake8, default to a complexity level of 10. +max-complexity = 10 + +[tool.ruff.flake8-type-checking] +strict = true + +[tool.ruff.isort] +known-first-party = ["src"] +known-third-party = ["mpl_toolkits", "matplotlib", "numpy", "scipy"] +required-imports = ["from __future__ import annotations"] + +[tool.ruff.pydocstyle] +# Use Google-style docstrings. +convention = "google" From e46f823383669fea7b773804c652c66633ec265f Mon Sep 17 00:00:00 2001 From: dvp Date: Tue, 28 Mar 2023 19:05:43 +0300 Subject: [PATCH 23/32] build: add ruff as major linter --- .flake8 | 3 +++ pyproject.toml | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/.flake8 b/.flake8 index 36c9561..5df8e51 100644 --- a/.flake8 +++ b/.flake8 @@ -58,6 +58,9 @@ exclude= .cache .eggs notebooks/dvp/*.py + .nox + .idea + per-file-ignores = benchmarks/*:S101,DAR101 noxfile.py:ANN,DAR101 diff --git a/pyproject.toml b/pyproject.toml index ad29467..9285e64 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -375,6 +375,63 @@ logging-format-style="new" # use {} in logging messages deprecated-modules=["six"] [tool.ruff] +#see full list: https://beta.ruff.rs/docs/rules/#pyflakes-f +select= [ + "A", + "B", + "C", + "D", + "E", + "F", + "G", + "I", + "N", + "PIE", + "PT", + "PL", + "PLC", + "PLE", + "PLR", + "PLW", + "PYI", + "Q", + "R", + "S", + "T", + "U", + "W", + "YTT" +] + +# Ignore rules that currently fail on the codebase +ignore = [ + # "E401", # Multiple imports on one line + "E402", # Module level import not at top of file + "E501", # Line too long ( > 88 characters) + # "E701", # Multiple statements on one line (colon) + # "E702", # Multiple statements on one line (semicolon) + # "E703", # Statement ends with an unnecessary semicolon + # "E704", # Multiple statements on one line (def) + # "E711", # Comparison to `None` should be `cond is not None` + # "E712", # Comparison to `` should be `cond is ` + # "E713", # Test for membership should be `not in` + # "E714", # Test for object identity should be `is not` + # "E721", # Do not compare types, use `isinstance()` + # "E722", # Do not use bare `except` + # "E731", # Do not assign a `lambda` expression, use a `def` + # "E741", # Ambiguous variable name: `` + # "E743", # Ambiguous function name: `` + # "F401", # `` imported but unused + # "F403", # `from import *` used; unable to detect undefined names + # "F405", # `` may be undefined, or defined from star imports: `` + # "F523", # `.format` call has unused arguments at position(s): + # "F601", # Dictionary key literal `''` repeated + # "F811", # Redefinition of unused `` from line + # "F821", # Undefined name `VARIABLE` + # "F823", # Local variable `VARIABLE` referenced before assignment + # "F841", # Local variable `VARIABLE` is assigned to but never used +] + # Same as Black. line-length = 100 From f21f29d1a4489579acf9aa10b633e1060c855917 Mon Sep 17 00:00:00 2001 From: dvp Date: Wed, 29 Mar 2023 14:22:18 +0300 Subject: [PATCH 24/32] build: fix ruff config and warnings --- .flake8 | 4 +- .pre-commit-config.yaml | 1 + benchmarks/test_inventory.py | 8 +++- notebooks/dvp/try_ducdb.py | 6 ++- noxfile.py | 4 +- pyproject.toml | 39 ++++++++++++++++++- src/xpypact/__init__.py | 2 + src/xpypact/data_arrays.py | 25 ++++++------ src/xpypact/{Fluxes.py => fluxes.py} | 17 +++++--- src/xpypact/{Inventory.py => inventory.py} | 21 +++++----- src/xpypact/{Nuclide.py => nuclide.py} | 8 ++-- src/xpypact/{RunData.py => run_data.py} | 2 +- src/xpypact/{TimeStep.py => time_step.py} | 30 +++++++------- src/xpypact/utils/io.py | 5 ++- src/xpypact/utils/resource.py | 5 +-- src/xpypact/utils/types.py | 2 + tests/conftest.py | 6 ++- tests/test_data_arrays.py | 13 ++++--- tests/{test_Fluxes.py => test_fluxes.py} | 21 +++++----- .../{test_Inventory.py => test_inventory.py} | 8 ++-- tests/test_package.py | 5 ++- tests/{test_RunData.py => test_run_data.py} | 5 ++- tests/utils/test_resource.py | 9 +++-- tools/clear-prev-dist-info.py | 8 ++-- 24 files changed, 162 insertions(+), 92 deletions(-) rename src/xpypact/{Fluxes.py => fluxes.py} (96%) rename src/xpypact/{Inventory.py => inventory.py} (93%) rename src/xpypact/{Nuclide.py => nuclide.py} (91%) rename src/xpypact/{RunData.py => run_data.py} (87%) rename src/xpypact/{TimeStep.py => time_step.py} (87%) rename tests/{test_Fluxes.py => test_fluxes.py} (90%) rename tests/{test_Inventory.py => test_inventory.py} (93%) rename tests/{test_RunData.py => test_run_data.py} (86%) diff --git a/.flake8 b/.flake8 index 5df8e51..18f9bf8 100644 --- a/.flake8 +++ b/.flake8 @@ -66,10 +66,10 @@ per-file-ignores = noxfile.py:ANN,DAR101 tools/clear-prev-dist-info.py:S404,S603,S607 tests/*:ANN,B950,DAR100,D100,D101,D102,D103,D104,DAR101,DAR103,S101 - src/xpypact/Inventory.py:F811 + src/xpypact/inventory.py:F811 src/xpypact/data_arrays.py:ANN401,PD011 src/xpypact/utils/resource.py:ANN202 - src/xpypact/Fluxes.py:F811 + src/xpypact/fluxes.py:F811 ignore-decorators=click,pytest docstring-convention = google rst-roles = class,const,func,meth,mod,ref diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 140f1d3..1a2979d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -81,6 +81,7 @@ repos: entry: poetry run black language: system types: [python] + exclude: ^notebooks # Lint # - id: flake8 # name: flake8 diff --git a/benchmarks/test_inventory.py b/benchmarks/test_inventory.py index d8bc456..0a3ee96 100644 --- a/benchmarks/test_inventory.py +++ b/benchmarks/test_inventory.py @@ -2,11 +2,15 @@ See https://pytest-benchmark.readthedocs.io/en/latest/index.html """ +from __future__ import annotations + import bz2 -from xpypact.Inventory import Inventory, from_json +from xpypact.inventory import Inventory, from_json from xpypact.utils.resource import path_resolver +EXPECTED_TIME_STEPS = 65 + data_path_resolver = path_resolver("benchmarks") with bz2.open(data_path_resolver("data/Ag-1.json.bz2")) as fid: @@ -16,4 +20,4 @@ def test_load_from_string(benchmark) -> None: """Loading from string.""" inventory: Inventory = benchmark(from_json, AG_1_TEXT) - assert len(inventory.inventory_data) == 65 + assert len(inventory.inventory_data) == EXPECTED_TIME_STEPS diff --git a/notebooks/dvp/try_ducdb.py b/notebooks/dvp/try_ducdb.py index b9d8bd0..b9bb8c0 100644 --- a/notebooks/dvp/try_ducdb.py +++ b/notebooks/dvp/try_ducdb.py @@ -41,7 +41,7 @@ import xpypact.data_arrays as da -from xpypact.Inventory import from_json +from xpypact.inventory import from_json # In[8]: @@ -492,7 +492,9 @@ def save_gamma_spectra(con, ds): # In[103]: -con.execute("select boundary, intensity from timestep_gamma where time_step_number = 42").df() +con.execute( + "select boundary, intensity from timestep_gamma where time_step_number = 42" +).df() # In[104]: diff --git a/noxfile.py b/noxfile.py index 54f4f19..ddce4d1 100644 --- a/noxfile.py +++ b/noxfile.py @@ -4,7 +4,7 @@ """ from __future__ import annotations -from typing import Final, List +from typing import Final import re import shutil @@ -207,7 +207,7 @@ def isort(s: Session) -> None: "profiles/*.py", "adhoc/*.py", ] - files_to_process: List[str] = sum((glob(p, recursive=True) for p in search_patterns), []) + files_to_process: list[str] = sum((glob(p, recursive=True) for p in search_patterns), []) if files_to_process: s.run( "poetry", diff --git a/pyproject.toml b/pyproject.toml index 9285e64..9eb1475 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -375,6 +375,7 @@ logging-format-style="new" # use {} in logging messages deprecated-modules=["six"] [tool.ruff] +target-version = "py38" #see full list: https://beta.ruff.rs/docs/rules/#pyflakes-f select= [ "A", @@ -405,9 +406,20 @@ select= [ # Ignore rules that currently fail on the codebase ignore = [ + "ANN001", # ANN001 Missing type annotation for function argument: doesn't allow to use functools dispatching + "ANN002", # ANN002 Missing type annotation for *drop_items: ... as above + "ANN101", # ANN101 Missing type annotation for self in method + "ANN102", # ANN102 Missing type annotation for cls in classmethod + "ANN202", # ANN202 Missing return type annotation for protected function: ... dispatching + "ANN204", # ANN204 Missing return type annotation for special method + "B905", # B905 `zip()` without an explicit `strict=` parameter - ignore while support 3.8, 3.9 + # "C812", # C812 Missing trailing comma: black compatibility + "D105", # D105 Missing docstring in magic method (__hash__, __eq__) + "D107", # Missing docstring in __init__ + # "E203", # E203: Whitespace before ‘:' # "E401", # Multiple imports on one line "E402", # Module level import not at top of file - "E501", # Line too long ( > 88 characters) + "E501", # Line too long ( > 100 characters) # "E701", # Multiple statements on one line (colon) # "E702", # Multiple statements on one line (semicolon) # "E703", # Statement ends with an unnecessary semicolon @@ -430,6 +442,18 @@ ignore = [ # "F821", # Undefined name `VARIABLE` # "F823", # Local variable `VARIABLE` referenced before assignment # "F841", # Local variable `VARIABLE` is assigned to but never used + + "I001", # import order is controlled by isort + # "I101", + # "I201", + # "I202", + +# ignore some questionable pandas-vet warnings + # "PD005", # use operator instead of method + # "PD008", # We use at() to access single values + # "PD009", # And we use iat() + # "W503", # Line break before binary operator: for compatibility with black settings + "PT019", # Fixture `_bin` without value is injected as parameter (false positive?) ] # Same as Black. @@ -460,7 +484,14 @@ exclude = [ [tool.ruff.per-file-ignores] "__init__.py" = ["E402"] -"src/xpypact/Fluxes.py" = ["F811"] +"src/xpypact/fluxes.py" = ["F811"] +"benchmarks/*" = ["S101"] +"noxfile.py" = ["ANN"] +"tests/*" = ["ANN", "D100", "D101", "D102", "D103", "D104", "PLR2004", "S101"] +"src/xpypact/inventory.py" = ["F811"] +"src/xpypact/data_arrays.py" = ["ANN401", "PD011"] +"src/xpypact/utils/resource.py" = ["ANN202"] +"tools/*" = ["T201"] [tool.ruff.mccabe] # Unlike Flake8, default to a complexity level of 10. @@ -474,6 +505,10 @@ known-first-party = ["src"] known-third-party = ["mpl_toolkits", "matplotlib", "numpy", "scipy"] required-imports = ["from __future__ import annotations"] + +[tool.ruff.flake8-pytest-style] +parametrize-names-type = "list" + [tool.ruff.pydocstyle] # Use Google-style docstrings. convention = "google" diff --git a/src/xpypact/__init__.py b/src/xpypact/__init__.py index 1be5d81..1fda642 100644 --- a/src/xpypact/__init__.py +++ b/src/xpypact/__init__.py @@ -2,6 +2,8 @@ Wraps FISPACT workflow. Transforms FISPACT output to xarray datasets. """ +from __future__ import annotations + from importlib import metadata as _meta from importlib.metadata import PackageNotFoundError, version diff --git a/src/xpypact/data_arrays.py b/src/xpypact/data_arrays.py index c8fd4b8..b25506c 100644 --- a/src/xpypact/data_arrays.py +++ b/src/xpypact/data_arrays.py @@ -15,7 +15,7 @@ """ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Literal, TextIO, Tuple, Union, cast +from typing import TYPE_CHECKING, Any, Literal, TextIO, cast from functools import reduce from pathlib import Path @@ -30,9 +30,9 @@ from mckit_nuclides.elements import ELEMENTS_TABLE from mckit_nuclides.nuclides import NUCLIDES_TABLE from xarray.core.accessor_dt import DatetimeAccessor -from xpypact.Inventory import Inventory -from xpypact.Inventory import from_json as inventory_from_json -from xpypact.TimeStep import TimeStep +from xpypact.inventory import Inventory +from xpypact.inventory import from_json as inventory_from_json +from xpypact.time_step import TimeStep from xpypact.utils.types import MayBePath if TYPE_CHECKING: # pragma: no cover @@ -70,18 +70,18 @@ ] -def _make_var(value, dtype=float) -> Tuple[str, ArrayLike]: +def _make_var(value, dtype=float) -> tuple[str, ArrayLike]: value = np.array([value], dtype=dtype) return "time_step_number", value -def _make_nuclide_var(getter, nuclides, dtype=float) -> Tuple[str, ArrayLike]: +def _make_nuclide_var(getter, nuclides, dtype=float) -> tuple[str, ArrayLike]: return "nuclide", np.fromiter(map(getter, nuclides), dtype=dtype) def _make_time_step_and_nuclide_var( getter, nuclides, dtype=float -) -> Tuple[Tuple[str, str], ArrayLike]: +) -> tuple[tuple[str, str], ArrayLike]: _data = np.fromiter(map(getter, nuclides), dtype=dtype) return ("time_step_number", "nuclide"), _data.reshape(1, _data.size) @@ -148,8 +148,7 @@ def _add_time_step_record(_ds: xr.Dataset, ts: TimeStep) -> xr.Dataset: coords["gamma_boundaries"] = gamma_boundaries tsr = xr.Dataset(data_vars=data_vars, coords=coords) - _ds = xr.merge([_ds, tsr]) - return _ds + return xr.merge([_ds, tsr]) def create_dataset(inventory: Inventory) -> xr.Dataset: @@ -337,8 +336,7 @@ def scale_by_mass(ds: xr.Dataset, scale: float) -> xr.Dataset: A new dataset with scaled columns. """ columns = [x for x in SCALABLE_COLUMNS if x in ds.variables] - scaled = ds.merge(ds[columns] * scale, overwrite_vars=columns, join="exact") - return scaled + return ds.merge(ds[columns] * scale, overwrite_vars=columns, join="exact") def _encode_multiindex(ds: xr.Dataset, idx_name: str) -> xr.Dataset: @@ -402,11 +400,10 @@ def load_nc( The loaded dataset """ encoded = xr.load_dataset(cn, engine=engine, **kwargs) - ds = _decode_to_multiindex(encoded, "nuclide") - return ds + return _decode_to_multiindex(encoded, "nuclide") -def from_json(path: Union[str, Path, TextIO]) -> xr.Dataset: +def from_json(path: str | Path | TextIO) -> xr.Dataset: """Load Dataset from the FISPACT JSON output. Args: diff --git a/src/xpypact/Fluxes.py b/src/xpypact/fluxes.py similarity index 96% rename from src/xpypact/Fluxes.py rename to src/xpypact/fluxes.py index f99bf4b..3714500 100644 --- a/src/xpypact/Fluxes.py +++ b/src/xpypact/fluxes.py @@ -1,6 +1,9 @@ """The Class to represent FISPACT fluxes file content.""" -from typing import Callable, TextIO, Tuple, cast +from __future__ import annotations +from typing import TextIO, cast + +from collections.abc import Callable from dataclasses import dataclass from io import StringIO, TextIOBase from pathlib import Path @@ -13,6 +16,8 @@ from xpypact.utils.io import print_cols from xpypact.utils.types import NDArrayFloat +FISPACT_709_BINS_NUMBER = 709 + # pylint: disable=function-redefined LAST_TWO_DECADES = np.fromstring( @@ -232,7 +237,7 @@ def is_709_fluxes(fluxes: Fluxes) -> bool: Returns: bool: True, if fluxes are 709 kind of fluxes. """ - return fluxes.energy_bins is FISPACT_709_BINS and fluxes.fluxes.size == 709 + return fluxes.energy_bins is FISPACT_709_BINS and fluxes.fluxes.size == FISPACT_709_BINS_NUMBER def are_fluxes_equal(a: Fluxes, b: Fluxes) -> bool: @@ -285,7 +290,7 @@ def are_fluxes_close( def read_fluxes( stream: TextIO, - define_bins_and_fluxes: Callable[[NDArrayFloat], Tuple[NDArrayFloat, NDArrayFloat]], + define_bins_and_fluxes: Callable[[NDArrayFloat], tuple[NDArrayFloat, NDArrayFloat]], ) -> Fluxes: """Load Fluxes from a stream. @@ -407,7 +412,7 @@ class ArbitraryFluxesDataSizeError(FluxesDataSizeError): """The number of float values from arb_flux file should be odd.""" -def define_arb_bins_and_fluxes(data: NDArrayFloat) -> Tuple[NDArrayFloat, NDArrayFloat]: +def define_arb_bins_and_fluxes(data: NDArrayFloat) -> tuple[NDArrayFloat, NDArrayFloat]: """Extract energy bins and values of arbitrary flux. Args: @@ -434,7 +439,7 @@ class StandardFluxesDataSizeError(FluxesDataSizeError): """Invalid data for standard FISPACT 709-group fluxes.""" -def define_709_bins_and_fluxes(data: NDArrayFloat) -> Tuple[NDArrayFloat, NDArrayFloat]: +def define_709_bins_and_fluxes(data: NDArrayFloat) -> tuple[NDArrayFloat, NDArrayFloat]: """Strategy to define energy bins and values of standard 709 group flux. Args: @@ -446,7 +451,7 @@ def define_709_bins_and_fluxes(data: NDArrayFloat) -> Tuple[NDArrayFloat, NDArra Raises: StandardFluxesDataSizeError: if size of data is not 709. """ - if data.size != 709: + if data.size != FISPACT_709_BINS_NUMBER: raise StandardFluxesDataSizeError() return FISPACT_709_BINS, data[::-1] diff --git a/src/xpypact/Inventory.py b/src/xpypact/inventory.py similarity index 93% rename from src/xpypact/Inventory.py rename to src/xpypact/inventory.py index dfb1964..4f4e097 100644 --- a/src/xpypact/Inventory.py +++ b/src/xpypact/inventory.py @@ -1,10 +1,11 @@ """Classes to load information from FISPACT output JSON file.""" from __future__ import annotations -from typing import Any, Callable, Iterable, cast +from typing import Any, cast import io +from collections.abc import Callable, Iterable from dataclasses import dataclass from functools import singledispatch from pathlib import Path @@ -13,10 +14,12 @@ import orjson as json -from xpypact.RunData import RunData -from xpypact.TimeStep import TimeStep +from xpypact.run_data import RunData +from xpypact.time_step import TimeStep from xpypact.utils.types import NDArrayFloat +FLOAT_ZERO = 0.0 + @dataclass class RunDataCorrected: @@ -47,21 +50,21 @@ def __str__(self) -> str: def _create_json_inventory_data_mapper() -> Callable[[dict[str, Any]], TimeStep]: - prev_irradiation_time = prev_cooling_time = prev_elapsed_time = 0.0 + prev_irradiation_time = prev_cooling_time = prev_elapsed_time = FLOAT_ZERO number = 1 def json_inventory_data_mapper(jts: dict[str, Any]) -> TimeStep: nonlocal number, prev_irradiation_time, prev_cooling_time, prev_elapsed_time ts = TimeStep.from_json(jts) duration = ts.irradiation_time - prev_irradiation_time - if duration == 0.0: + if duration == FLOAT_ZERO: duration = ts.cooling_time - prev_cooling_time - if duration < 0.0: + if duration < FLOAT_ZERO: raise InventoryNonMonotonicTimesError() # pragma: no cover ts.duration = duration prev_elapsed_time = ts.elapsed_time = prev_elapsed_time + duration - if duration == 0.0: - ts.flux = 0.0 + if duration == FLOAT_ZERO: + ts.flux = FLOAT_ZERO ts.number = number number += 1 prev_irradiation_time, prev_cooling_time = ( @@ -104,7 +107,7 @@ def meta_info(self) -> RunDataCorrected: ) @classmethod - def from_json(cls, json_dict: dict[str, Any]) -> "Inventory": + def from_json(cls, json_dict: dict[str, Any]) -> Inventory: """Construct Inventory instance from JSON dictionary. Args: diff --git a/src/xpypact/Nuclide.py b/src/xpypact/nuclide.py similarity index 91% rename from src/xpypact/Nuclide.py rename to src/xpypact/nuclide.py index 1b0faff..caaec6c 100644 --- a/src/xpypact/Nuclide.py +++ b/src/xpypact/nuclide.py @@ -5,6 +5,8 @@ from dataclasses import dataclass +FLOAT_ZERO = 0.0 + try: from scipy.constants import Avogadro except ImportError: # pragma: no cover @@ -44,9 +46,9 @@ def __post_init__(self) -> None: _z = z(self.element) if self.zai == 0: self.zai = _z * 10000 + self.isotope * 10 - if self.state != "": + if self.state: self.zai += 1 - if self.atoms == 0.0 and 0.0 < self.grams: + if self.atoms == FLOAT_ZERO and FLOAT_ZERO < self.grams: self.atoms = Avogadro * self.grams / get_nuclide_mass(_z, self.isotope) @property @@ -59,7 +61,7 @@ def a(self) -> int: return self.isotope @classmethod - def from_json(cls, json_dict: dict[str, Any]) -> "Nuclide": + def from_json(cls, json_dict: dict[str, Any]) -> Nuclide: """Construct the Nuclide from JSON dictionary. Args: diff --git a/src/xpypact/RunData.py b/src/xpypact/run_data.py similarity index 87% rename from src/xpypact/RunData.py rename to src/xpypact/run_data.py index 06003b9..c32ceea 100644 --- a/src/xpypact/RunData.py +++ b/src/xpypact/run_data.py @@ -13,7 +13,7 @@ class RunData: flux_name: str @classmethod - def from_json(cls, json_dict: dict[str, str]) -> "RunData": + def from_json(cls, json_dict: dict[str, str]) -> RunData: """Construct RunData instance from JSON. Args: diff --git a/src/xpypact/TimeStep.py b/src/xpypact/time_step.py similarity index 87% rename from src/xpypact/TimeStep.py rename to src/xpypact/time_step.py index 4d2da25..7cc3340 100644 --- a/src/xpypact/TimeStep.py +++ b/src/xpypact/time_step.py @@ -1,15 +1,17 @@ """Classes to read a FISPACT time step attributes from JSON.""" from __future__ import annotations -from typing import Any, Optional +from typing import Any from dataclasses import dataclass, field import numpy as np -from xpypact.Nuclide import Nuclide +from xpypact.nuclide import Nuclide from xpypact.utils.types import NDArrayFloat +FLOAT_ZERO = 0.0 + @dataclass class DoseRate: @@ -23,14 +25,14 @@ class DoseRate: mass: mass for point source, always 1g """ - type: str = "" + type: str = "" # noqa: A003 distance: float = 0.0 mass: float = 0.0 dose: float = 0.0 def __post_init__(self) -> None: """Correct wrong value coming from FISPACT.""" - if self.mass == 0.0: + if self.mass == FLOAT_ZERO: # According to FISPACT manual (both v.4 and v.5 (p.63)) # should be 1 gram always, but FISPACT shows 0 at the first step # and less, than 1 in the following steps. Fixing here. @@ -52,7 +54,7 @@ class GammaSpectrum: intensities: NDArrayFloat @classmethod - def from_json(cls, json: dict[str, list[float]]) -> "GammaSpectrum": + def from_json(cls, json: dict[str, list[float]]) -> GammaSpectrum: """Construct GammaSpectrum instance from JSON dictionary. Args: @@ -95,22 +97,22 @@ class TimeStep: # pylint: disable=too-many-instance-attributes inhalation_dose: float = 0.0 dose_rate: DoseRate = field(default_factory=DoseRate) nuclides: list[Nuclide] = field(default_factory=list) - gamma_spectrum: Optional[GammaSpectrum] = None + gamma_spectrum: GammaSpectrum | None = None def __post_init__(self) -> None: # noqa: ignore[CAC001] """Correct data missed in FISPACT-4.""" # workarounds for FISPACT v.4 - if self.total_mass == 0.0: + if self.total_mass == FLOAT_ZERO: self.total_mass = 1e-3 * sum(n.grams for n in self.nuclides) - if self.total_atoms == 0.0: + if self.total_atoms == FLOAT_ZERO: self.total_atoms = sum(n.atoms for n in self.nuclides) - if self.total_activity == 0.0: + if self.total_activity == FLOAT_ZERO: self.total_activity = sum(n.activity for n in self.nuclides) - if self.alpha_activity == 0.0: + if self.alpha_activity == FLOAT_ZERO: self.alpha_activity = sum(n.alpha_activity for n in self.nuclides) - if self.beta_activity == 0.0: + if self.beta_activity == FLOAT_ZERO: self.beta_activity = sum(n.beta_activity for n in self.nuclides) - if self.gamma_activity == 0.0: + if self.gamma_activity == FLOAT_ZERO: self.gamma_activity = sum(n.gamma_activity for n in self.nuclides) @property @@ -129,10 +131,10 @@ def is_cooling(self) -> bool: Returns: Is the irradiation flux zero? """ - return self.flux == 0.0 + return self.flux == FLOAT_ZERO @classmethod - def from_json(cls, json_dict: dict[str, Any]) -> "TimeStep": + def from_json(cls, json_dict: dict[str, Any]) -> TimeStep: """Construct TimeStep instance from JSON dictionary. Args: diff --git a/src/xpypact/utils/io.py b/src/xpypact/utils/io.py index fe7278d..b88aa19 100644 --- a/src/xpypact/utils/io.py +++ b/src/xpypact/utils/io.py @@ -1,9 +1,12 @@ """Output utilities.""" +from __future__ import annotations -from typing import Any, Iterable, TextIO +from typing import Any, TextIO import sys +from collections.abc import Iterable + def print_cols( seq: Iterable[Any], fid: TextIO = sys.stdout, max_columns: int = 6, fmt: str = "{}" diff --git a/src/xpypact/utils/resource.py b/src/xpypact/utils/resource.py index e14c534..d5b65f6 100644 --- a/src/xpypact/utils/resource.py +++ b/src/xpypact/utils/resource.py @@ -1,10 +1,9 @@ """Utility methods to access a package data.""" from __future__ import annotations -from typing import Callable - import sys +from collections.abc import Callable from pathlib import Path if sys.version_info >= (3, 9): @@ -21,6 +20,6 @@ def path_resolver(package: Package) -> Callable[[str], Path | Traversable]: package: the package below which the data is stored. Returns: - callable which appends the argument to the package folder adt returns as Path. + callable which appends the argument to the package folder as Path. """ return files(package).joinpath diff --git a/src/xpypact/utils/types.py b/src/xpypact/utils/types.py index 49f19e9..6b62e7e 100644 --- a/src/xpypact/utils/types.py +++ b/src/xpypact/utils/types.py @@ -1,4 +1,6 @@ """Utility types for the package.""" +from __future__ import annotations + from typing import Union import os diff --git a/tests/conftest.py b/tests/conftest.py index 54e35b0..4c4cf0c 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import os from pathlib import Path @@ -17,8 +19,8 @@ def data() -> Path: return path_resolver("tests")("data") -@pytest.fixture -def cd_tmpdir(tmpdir): +@pytest.fixture() +def cd_tmpdir(tmpdir): # noqa: PT004 """Temporarily switch to temp directory. Args: diff --git a/tests/test_data_arrays.py b/tests/test_data_arrays.py index a4221b5..df59614 100644 --- a/tests/test_data_arrays.py +++ b/tests/test_data_arrays.py @@ -15,8 +15,7 @@ import xarray as xr import xpypact.data_arrays as da -from pytest import approx -from xpypact.Inventory import Inventory, from_json +from xpypact.inventory import Inventory, from_json @pytest.fixture(scope="module") @@ -41,9 +40,9 @@ def test_first_time_step(ds): ts = ts.isel(nuclide=(ts.nuclide_atoms > 0.0)) assert ts.nuclide.size == 2, "Only Ag107 and Ag109 present before irradiation" assert ts.nuclide_grams.units == "g" - assert ts.nuclide_grams.sum().item() == approx(1.0, rel=1e-3), "Expected 1g mass" + assert ts.nuclide_grams.sum().item() == pytest.approx(1.0, rel=1e-3), "Expected 1g mass" assert ts.total_mass.units == "kg" - assert ts.total_mass == approx(1e-3, rel=1e-3), "Total mass is to be about 0.001kg" + assert ts.total_mass == pytest.approx(1e-3, rel=1e-3), "Total mass is to be about 0.001kg" def test_elapsed_time(ds: xr.Dataset, inventory: Inventory) -> None: @@ -78,7 +77,9 @@ def test_atomic_masses_column(ds: xr.Dataset) -> None: argentum = ds.sel(nuclide=("Ag", 111, "")) assert argentum.element == "Ag" a = argentum.a - assert a.item() == approx(110.905, rel=1e-4), " the Ag atomic mass is to be about 110.905" + assert a.item() == pytest.approx( + 110.905, rel=1e-4 + ), " the Ag atomic mass is to be about 110.905" def test_scale_by_mass(ds): @@ -171,7 +172,7 @@ def test_inventory_with_gamma(data): with bz2.open(data / "with-gamma.json.bz2") as fid: ds = da.from_json(fid.read().decode("utf-8")) assert ds.gamma is not None - assert ds.gamma.sel(time_step_number=2, gamma_boundaries=1.0).item() == approx( + assert ds.gamma.sel(time_step_number=2, gamma_boundaries=1.0).item() == pytest.approx( 17857.24443195 ) diff --git a/tests/test_Fluxes.py b/tests/test_fluxes.py similarity index 90% rename from tests/test_Fluxes.py rename to tests/test_fluxes.py index b901143..fafe5e1 100644 --- a/tests/test_Fluxes.py +++ b/tests/test_fluxes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Any from copy import copy, deepcopy @@ -10,7 +12,7 @@ import pytest -from xpypact.Fluxes import ( +from xpypact.fluxes import ( Fluxes, StandardFluxesDataSizeError, are_fluxes_close, @@ -45,7 +47,7 @@ def test_flux_constructor(): assert flux.norm == 2.0 assert not is_709_fluxes(flux) assert are_fluxes_close(flux, flux) - with pytest.raises(ValueError) as exc_info: + with pytest.raises(ValueError, match="Incompatible sizes of bins and fluxes") as exc_info: Fluxes(ebins[:-2], bins, "test") assert exc_info.type == ValueError assert exc_info.value.args[0].startswith("Incompatible sizes of bins and fluxes") @@ -59,7 +61,7 @@ def test_flux_constructor(): @pytest.mark.parametrize( - "_bin, expected_e0, expected_e1,expected_flux", + ["_bin", "expected_e0", "expected_e1", "expected_flux"], [ (0, 1e-5, 1e6, 1), (1, 1e6, 1e7, 90), @@ -93,7 +95,7 @@ def assert_one(_: Any, f: Any) -> Any: @pytest.mark.parametrize( - "_bin, expected_e0, expected_e1,expected_flux", + ["_bin", "expected_e0", "expected_e1", "expected_flux"], [ (0, 1.1e-5, 0.25, 3.600000e05), (6, 7.800000e06, 1.410000e07, 2.870000e03), @@ -114,7 +116,7 @@ def fluxes_1(data): @pytest.mark.parametrize( - "_bin, expected_e0, expected_e1,expected_flux", + ["_bin", "expected_e0", "expected_e1", "expected_flux"], [ (0, 1e-5, 1.0471e-5, 1.8182e-3), (1, 1.0471e-5, 1.0965e-5, 1.8182e-3), @@ -154,14 +156,15 @@ def test_print_arbitrary_fluxes(data, arb_flux_1): def test_define_arb_flux_fail(): data = np.linspace(1, 10, 4) - with pytest.raises(ValueError): + with pytest.raises( + ValueError, match="The number of float values from arb_flux file should be odd." + ): define_arb_bins_and_fluxes(data) def test_print_709_fluxes_fail(arb_flux_1): - with pytest.raises(ValueError) as exc_info: - stream = StringIO() - print_709_fluxes(arb_flux_1, stream, max_columns=3) + with pytest.raises(ValueError, match="Expected 709-group fluxes.") as exc_info: + print_709_fluxes(arb_flux_1, StringIO(), max_columns=3) assert str(exc_info.value) == "Expected 709-group fluxes." diff --git a/tests/test_Inventory.py b/tests/test_inventory.py similarity index 93% rename from tests/test_Inventory.py rename to tests/test_inventory.py index d4f7575..30d3b3c 100644 --- a/tests/test_Inventory.py +++ b/tests/test_inventory.py @@ -1,11 +1,13 @@ """Test loading Inventory from FISPACT JSON file.""" +from __future__ import annotations + import bz2 import pytest -from xpypact.Inventory import Inventory, RunDataCorrected, from_json # extract_times, -from xpypact.RunData import RunData -from xpypact.TimeStep import DoseRate, TimeStep +from xpypact.inventory import Inventory, RunDataCorrected, from_json # extract_times, +from xpypact.run_data import RunData +from xpypact.time_step import DoseRate, TimeStep SECONDS_PER_YEAR = int(365.24 * 24 * 3600) diff --git a/tests/test_package.py b/tests/test_package.py index d84e4f8..13f6600 100644 --- a/tests/test_package.py +++ b/tests/test_package.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import re import sys @@ -16,8 +18,7 @@ def find_version_from_project_toml(): toml_path = Path(__file__).parent.parent / "pyproject.toml" assert toml_path.exists() pyproject = tomllib.loads(toml_path.read_text()) - version = pyproject["tool"]["poetry"]["version"] - return version + return pyproject["tool"]["poetry"]["version"] _VERSION_NORM_PATTERN = re.compile(r"-(?P.)[^.]*\.(?P.*)$") diff --git a/tests/test_RunData.py b/tests/test_run_data.py similarity index 86% rename from tests/test_RunData.py rename to tests/test_run_data.py index af0b12b..8a78c4d 100644 --- a/tests/test_RunData.py +++ b/tests/test_run_data.py @@ -1,12 +1,13 @@ """Tests for FISPACT header.""" +from __future__ import annotations import pytest -from xpypact.RunData import RunData +from xpypact.run_data import RunData @pytest.mark.parametrize( - "inp, expected", + ["inp", "expected"], [ ( { diff --git a/tests/utils/test_resource.py b/tests/utils/test_resource.py index 5abcd67..5df5a80 100644 --- a/tests/utils/test_resource.py +++ b/tests/utils/test_resource.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from pathlib import Path import pytest @@ -9,7 +11,7 @@ # noinspection PyCompatibility @pytest.mark.parametrize( - "package, resource, expected", + ["package", "resource", "expected"], [ ("tests", "data/Ag-1.json", "data/Ag-1.json"), ], @@ -22,7 +24,7 @@ def test_path_resolver(package, resource, expected) -> None: @pytest.mark.parametrize( - "package, resource, expected", + ["package", "resource", "expected"], [ ("tests", "data/not_existing", "tests/data/not_existing"), ("xpypact", "data/not_existing", "xpypact/data/not_existing"), @@ -36,8 +38,7 @@ def test_path_resolver_when_resource_doesnt_exist(package, resource, expected) - def test_path_resolver_when_package_doesnt_exist() -> None: with pytest.raises(ModuleNotFoundError): - resolver = path_resolver("not_existing") - resolver("something.txt") + path_resolver("not_existing")("something.txt") def test_path_resolver_local() -> None: diff --git a/tools/clear-prev-dist-info.py b/tools/clear-prev-dist-info.py index f72f265..3a0a0f5 100755 --- a/tools/clear-prev-dist-info.py +++ b/tools/clear-prev-dist-info.py @@ -5,7 +5,9 @@ Should be fixed in poetry 1.2, but it's not available yet. Run this if test_package() fails on pytest run. """ -from typing import Optional, TypeVar +from __future__ import annotations + +from typing import TypeVar import shutil import site @@ -22,7 +24,7 @@ PathLike = TypeVar("PathLike", str, Path) -def search_upwards_for_file(filename: PathLike) -> Optional[Path]: +def search_upwards_for_file(filename: PathLike) -> Path | None: """Search upward from the current directory for a `filename`. Args: @@ -54,7 +56,7 @@ def get_project_name() -> str: """ pyproject_path = search_upwards_for_file("pyproject.toml") if pyproject_path is None: - raise EnvironmentError( + raise OSError( "Illegal directory: cannot find file pyproject.toml " f"from current directory: {Path.cwd()}" ) From 9e78ed0e1dbfcd0105998d8cd4782a890d04df85 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Mar 2023 11:38:30 +0000 Subject: [PATCH 25/32] build(deps): bump pypa/gh-action-pypi-publish from 1.7.1 to 1.8.3 Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.7.1 to 1.8.3. - [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases) - [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.7.1...v1.8.3) --- updated-dependencies: - dependency-name: pypa/gh-action-pypi-publish dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5439096..871fe84 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,14 +71,14 @@ jobs: - name: Publish package on PyPI if: steps.check-version.outputs.tag - uses: pypa/gh-action-pypi-publish@v1.8.1 + uses: pypa/gh-action-pypi-publish@v1.8.3 with: user: __token__ password: ${{ secrets.PYPI_TOKEN }} - name: Publish package on TestPyPI if: "! steps.check-version.outputs.tag" - uses: pypa/gh-action-pypi-publish@v1.8.1 + uses: pypa/gh-action-pypi-publish@v1.8.3 with: user: __token__ password: ${{ secrets.TEST_PYPI_TOKEN }} From 8060d139cf0abf0a384c363d11e516d325473186 Mon Sep 17 00:00:00 2001 From: dvp Date: Wed, 29 Mar 2023 14:46:57 +0300 Subject: [PATCH 26/32] test: use ruff in precommit depdencies instead of flake8 --- noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index ddce4d1..ca325fb 100644 --- a/noxfile.py +++ b/noxfile.py @@ -115,7 +115,7 @@ def precommit(s: Session) -> None: "install", "--no-root", "--only", - "pre_commit,style,isort,black,flake8", + "pre_commit,style,isort,black,ruff", external=True, ) s.run("pre-commit", *args) From 6e3b4fbad78cddb28c8ee742dedaed62029e71e4 Mon Sep 17 00:00:00 2001 From: dvp Date: Wed, 29 Mar 2023 14:48:46 +0300 Subject: [PATCH 27/32] docs: remove obsolete reference --- noxfile.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/noxfile.py b/noxfile.py index ca325fb..b0e3bac 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1,7 +1,4 @@ -"""Nox sessions. - -See `Cjolowicz's article `_ -""" +"""Nox sessions.""" from __future__ import annotations from typing import Final From 1f51fc8f1cdc4591170f4ef1e72154933466909b Mon Sep 17 00:00:00 2001 From: dvp Date: Sun, 2 Apr 2023 15:26:19 +0300 Subject: [PATCH 28/32] feat: implemented export to duckdb --- poetry.lock | 59 +- pyproject.toml | 1 + src/xpypact/__init__.py | 28 + src/xpypact/dao/__init__.py | 6 + src/xpypact/dao/api.py | 6 + src/xpypact/dao/duckdb/__init__.py | 6 + src/xpypact/dao/duckdb/create_schema.sql | 85 +++ src/xpypact/dao/duckdb/implementation.py | 167 +++++ src/xpypact/data_frames.py | 190 ++++++ tests/conftest.py | 16 + tests/data/Ag-with-gamma.json | 797 +++++++++++++++++++++++ tests/test_data_arrays.py | 14 +- tests/test_data_frames.py | 69 ++ tests/test_duckdb_dao.py | 54 ++ 14 files changed, 1488 insertions(+), 10 deletions(-) create mode 100644 src/xpypact/dao/__init__.py create mode 100644 src/xpypact/dao/api.py create mode 100644 src/xpypact/dao/duckdb/__init__.py create mode 100644 src/xpypact/dao/duckdb/create_schema.sql create mode 100644 src/xpypact/dao/duckdb/implementation.py create mode 100644 src/xpypact/data_frames.py create mode 100644 tests/data/Ag-with-gamma.json create mode 100644 tests/test_data_frames.py create mode 100644 tests/test_duckdb_dao.py diff --git a/poetry.lock b/poetry.lock index ee21036..90d01f2 100644 --- a/poetry.lock +++ b/poetry.lock @@ -687,6 +687,63 @@ toml = "*" conda = ["pyyaml"] pipenv = ["pipenv"] +[[package]] +name = "duckdb" +version = "0.7.1" +description = "DuckDB embedded database" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "duckdb-0.7.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3e0170be6cc315c179169dfa3e06485ef7009ef8ce399cd2908f29105ef2c67b"}, + {file = "duckdb-0.7.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6360d41023e726646507d5479ba60960989a09f04527b36abeef3643c61d8c48"}, + {file = "duckdb-0.7.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:578c269d7aa27184e8d45421694f89deda3f41fe6bd2a8ce48b262b9fc975326"}, + {file = "duckdb-0.7.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:36aae9a923c9f78da1cf3fcf75873f62d32ea017d4cef7c706d16d3eca527ca2"}, + {file = "duckdb-0.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:630e0122a02f19bb1fafae00786350b2c31ae8422fce97c827bd3686e7c386af"}, + {file = "duckdb-0.7.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:9b9ca2d294725e523ce207bc37f28787478ae6f7a223e2cf3a213a2d498596c3"}, + {file = "duckdb-0.7.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0bd89f388205b6c99b62650169efe9a02933555ee1d46ddf79fbd0fb9e62652b"}, + {file = "duckdb-0.7.1-cp310-cp310-win32.whl", hash = "sha256:a9e987565a268fd8da9f65e54621d28f39c13105b8aee34c96643074babe6d9c"}, + {file = "duckdb-0.7.1-cp310-cp310-win_amd64.whl", hash = "sha256:5d986b5ad1307b069309f9707c0c5051323e29865aefa059eb6c3b22dc9751b6"}, + {file = "duckdb-0.7.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:54606dfd24d7181d3098030ca6858f6be52f3ccbf42fff05f7587f2d9cdf4343"}, + {file = "duckdb-0.7.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bd9367ae650b6605ffe00412183cf0edb688a5fc9fbb03ed757e8310e7ec3b6c"}, + {file = "duckdb-0.7.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:aaf33aeb543c7816bd915cd10141866d54f92f698e1b5712de9d8b7076da19df"}, + {file = "duckdb-0.7.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2e56b0329c38c0356b40449917bab6fce6ac27d356257b9a9da613d2a0f064e0"}, + {file = "duckdb-0.7.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:604b8b476d6cc6bf91625d8c2722ef9c50c402b3d64bc518c838d6c279e6d93b"}, + {file = "duckdb-0.7.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:32a268508c6d7fdc99d5442736051de74c28a5166c4cc3dcbbf35d383299b941"}, + {file = "duckdb-0.7.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:90794406fa2111414877ee9db154fef940911f3920c312c1cf69947621737c8d"}, + {file = "duckdb-0.7.1-cp311-cp311-win32.whl", hash = "sha256:bf20c5ee62cbbf10b39ebdfd70d454ce914e70545c7cb6cb78cb5befef96328a"}, + {file = "duckdb-0.7.1-cp311-cp311-win_amd64.whl", hash = "sha256:bb2700785cab37cd1e7a76c4547a5ab0f8a7c28ad3f3e4d02a8fae52be223090"}, + {file = "duckdb-0.7.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:b09741cfa31388b8f9cdf5c5200e0995d55a5b54d2d1a75b54784e2f5c042f7f"}, + {file = "duckdb-0.7.1-cp36-cp36m-win32.whl", hash = "sha256:766e6390f7ace7f1e322085c2ca5d0ad94767bde78a38d168253d2b0b4d5cd5c"}, + {file = "duckdb-0.7.1-cp36-cp36m-win_amd64.whl", hash = "sha256:6a3f3315e2b553db3463f07324f62dfebaf3b97656a87558e59e2f1f816eaf15"}, + {file = "duckdb-0.7.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:278edb8c912d836b3b77fd1695887e1dbd736137c3912478af3608c9d7307bb0"}, + {file = "duckdb-0.7.1-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e189b558d10b58fe6ed85ce79f728e143eb4115db1e63147a44db613cd4dd0d9"}, + {file = "duckdb-0.7.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b91ec3544ee4dc9e6abbdf2669475d5adedaaea51987c67acf161673e6b7443"}, + {file = "duckdb-0.7.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:3fe3f3dbd62b76a773144eef31aa29794578c359da932e77fef04516535318ca"}, + {file = "duckdb-0.7.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:1e78c7f59325e99f0b3d9fe7c2bad4aaadf42d2c7711925cc26331d7647a91b2"}, + {file = "duckdb-0.7.1-cp37-cp37m-win32.whl", hash = "sha256:bc2a12d9f4fc8ef2fd1022d610287c9fc9972ea06b7510fc87387f1fa256a390"}, + {file = "duckdb-0.7.1-cp37-cp37m-win_amd64.whl", hash = "sha256:53e3db1bc0f445ee48b23cde47bfba08c7fa5a69976c740ec8cdf89543d2405d"}, + {file = "duckdb-0.7.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:1247cc11bac17f2585d11681329806c86295e32242f84a10a604665e697d5c81"}, + {file = "duckdb-0.7.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:5feaff16a012075b49dfa09d4cb24455938d6b0e06b08e1404ec00089119dba2"}, + {file = "duckdb-0.7.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b411a0c361eab9b26dcd0d0c7a0d1bc0ad6b214068555de7e946fbdd2619961a"}, + {file = "duckdb-0.7.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c7c76d8694ecdb579241ecfeaf03c51d640b984dbbe8e1d9f919089ebf3cdea6"}, + {file = "duckdb-0.7.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:193b896eed44d8751a755ccf002a137630020af0bc3505affa21bf19fdc90df3"}, + {file = "duckdb-0.7.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:7da132ee452c80a3784b8daffd86429fa698e1b0e3ecb84660db96d36c27ad55"}, + {file = "duckdb-0.7.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5fd08c97c3e8cb5bec3822cf78b966b489213dcaab24b25c05a99f7caf8db467"}, + {file = "duckdb-0.7.1-cp38-cp38-win32.whl", hash = "sha256:9cb956f94fa55c4782352dac7cc7572a58312bd7ce97332bb14591d6059f0ea4"}, + {file = "duckdb-0.7.1-cp38-cp38-win_amd64.whl", hash = "sha256:289a5f65213e66d320ebcd51a94787e7097b9d1c3492d01a121a2c809812bf19"}, + {file = "duckdb-0.7.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:8085ad58c9b5854ee3820804fa1797e6b3134429c1506c3faab3cb96e71b07e9"}, + {file = "duckdb-0.7.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b47c19d1f2f662a5951fc6c5f6939d0d3b96689604b529cdcffd9afdcc95bff2"}, + {file = "duckdb-0.7.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6a611f598226fd634b7190f509cc6dd668132ffe436b0a6b43847b4b32b99e4a"}, + {file = "duckdb-0.7.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6730f03b5b78f3943b752c90bdf37b62ae3ac52302282a942cc675825b4a8dc9"}, + {file = "duckdb-0.7.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fe23e938d29cd8ea6953d77dc828b7f5b95a4dbc7cd7fe5bcc3531da8cec3dba"}, + {file = "duckdb-0.7.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:feffe503c2e2a99480e1e5e15176f37796b3675e4dadad446fe7c2cc672aed3c"}, + {file = "duckdb-0.7.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:72fceb06f5bf24ad6bb5974c60d397a7a7e61b3d847507a22276de076f3392e2"}, + {file = "duckdb-0.7.1-cp39-cp39-win32.whl", hash = "sha256:c4d5217437d20d05fe23317bbc161befa1f9363f3622887cd1d2f4719b407936"}, + {file = "duckdb-0.7.1-cp39-cp39-win_amd64.whl", hash = "sha256:066885e1883464ce3b7d1fd844f9431227dcffe1ee39bfd2a05cd6d53f304557"}, + {file = "duckdb-0.7.1.tar.gz", hash = "sha256:a7db6da0366b239ea1e4541fcc19556b286872f5015c9a54c2e347146e25a2ad"}, +] + [[package]] name = "et-xmlfile" version = "1.1.0" @@ -4020,4 +4077,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "2.0" python-versions = ">=3.8.1,<4.0" -content-hash = "f27445064962e71a6f6142162cd36f44fa133f172a97a52420e8e6bf33e07775" +content-hash = "d262cdfaa5f5ddb156180ea2302918b0743c171eb4fa5e6899f03f6c7ab3e4a3" diff --git a/pyproject.toml b/pyproject.toml index 9eb1475..4cc3c46 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,6 +52,7 @@ orjson = ">=3.6.7" pandas = ">=1.4.1" xarray = ">=2022.3.0" multipledispatch = ">=0.6.0" +duckdb = "^0.7.1" [tool.poetry.group.dev.dependencies] Pygments = ">=2.10.0" diff --git a/src/xpypact/__init__.py b/src/xpypact/__init__.py index 1fda642..b0eb716 100644 --- a/src/xpypact/__init__.py +++ b/src/xpypact/__init__.py @@ -7,6 +7,15 @@ from importlib import metadata as _meta from importlib.metadata import PackageNotFoundError, version +from .data_arrays import from_json, scale_by_flux, scale_by_mass +from .data_frames import ( + get_gamma, + get_nuclides, + get_run_data, + get_time_steps, + get_timestep_nuclides, +) + try: __version__ = version(__name__) except PackageNotFoundError: # pragma: no cover @@ -19,3 +28,22 @@ __license__ = __meta_data__["License"] __summary__ = __meta_data__["Summary"] __copyright__ = f"Copyright 2021 {__author__}" + +__all__ = [ + "__version__", + "__distribution__", + "__meta_data__", + "__author__", + "__author_email__", + "__license__", + "__summary__", + "__copyright__", + "get_run_data", + "get_gamma", + "get_nuclides", + "get_timestep_nuclides", + "get_time_steps", + "from_json", + "scale_by_flux", + "scale_by_mass", +] diff --git a/src/xpypact/dao/__init__.py b/src/xpypact/dao/__init__.py new file mode 100644 index 0000000..d6fd546 --- /dev/null +++ b/src/xpypact/dao/__init__.py @@ -0,0 +1,6 @@ +"""Interface and implementations of data access objects (DAO).""" +from __future__ import annotations + +from .api import DataAccessInterface + +__all__ = ["DataAccessInterface"] diff --git a/src/xpypact/dao/api.py b/src/xpypact/dao/api.py new file mode 100644 index 0000000..aafbe92 --- /dev/null +++ b/src/xpypact/dao/api.py @@ -0,0 +1,6 @@ +"""Interface to data access facilities.""" +from __future__ import annotations + + +class DataAccessInterface: + """Abstract DAO.""" diff --git a/src/xpypact/dao/duckdb/__init__.py b/src/xpypact/dao/duckdb/__init__.py new file mode 100644 index 0000000..557463e --- /dev/null +++ b/src/xpypact/dao/duckdb/__init__.py @@ -0,0 +1,6 @@ +"""DAO implementation for DuckDB.""" +from __future__ import annotations + +from .implementation import DuckDBDAO + +__all__ = ["DuckDBDAO"] diff --git a/src/xpypact/dao/duckdb/create_schema.sql b/src/xpypact/dao/duckdb/create_schema.sql new file mode 100644 index 0000000..206d646 --- /dev/null +++ b/src/xpypact/dao/duckdb/create_schema.sql @@ -0,0 +1,85 @@ +CREATE TABLE IF NOT EXISTS rundata ( + material_id uinteger not null, + case_id varchar not null, + timestamp timestamp not null, + run_name varchar not null, + flux_name varchar NOT NULL, + dose_rate_type varchar NOT NULL, + dose_rate_distance real NOT NULL, + primary key(material_id, case_id) +); + +CREATE TABLE IF NOT EXISTS timestep( + material_id uinteger not null, + case_id varchar not null, + time_step_number uinteger not null, + elapsed_time float4 not null, + irradiation_time float4 not null, + cooling_time float4 not null, + duration float4 not null, + flux float4 not null, + atoms float4 not null, + activity float4 not null, + alpha_activity float4 not null, + beta_activity float4 not null, + gamma_activity float4 not null, + mass float4 not null, + heat float4 not null, + alpha_heat float4 null, + beta_heat float4 not null, + gamma_heat float4 not null, + ingest1ion_dose float4 not null, + inhalation_dose float4 not null, + dose_rate float4 not null, + primary key(material_id, case_id, time_step_number), + foreign key(material_id, case_id) references rundata(material_id, case_id) +); + + +CREATE TABLE IF NOT EXISTS nuclide( + element varchar(2) not null, + mass_number usmallint not null check(0 < mass_number), + state varchar(1) not null, + zai integer not null check(10010 <= zai) unique, + half_life float4 not null check(0 <= half_life), + primary key(element, mass_number, state) +); + +CREATE TABLE IF NOT EXISTS timestep_nuclide( + material_id uinteger not null, + case_id varchar not null, + time_step_number uinteger not null, + element varchar(2) not null, + mass_number usmallint not null, + + state varchar(1) not null, + atoms float4 not null, + grams float4 not null, + activity float4 not null, + alpha_activity float4 not null, + + beta_activity float4 not null, + gamma_activity float4 not null, + heat float4 not null, + alpha_heat float4 not null, + beta_heat float4 not null, + + gamma_heat float4 not null, + dose float4 not null, + ingestion float4 not null, + inhalation float4 not null, + + primary key(material_id, case_id, time_step_number, element, mass_number, state), + foreign key(material_id, case_id, time_step_number) references timestep(material_id, case_id, time_step_number), + foreign key(element, mass_number, state) references nuclide(element, mass_number, state) +); + +CREATE TABLE IF NOT EXISTS timestep_gamma( + material_id uinteger not null, + case_id varchar not null, + time_step_number uinteger not null, + boundary real not null check(0 <= boundary), + rate real not null, + primary key(material_id, case_id, time_step_number, boundary), + foreign key(material_id, case_id, time_step_number) references timestep(material_id, case_id, time_step_number), +); diff --git a/src/xpypact/dao/duckdb/implementation.py b/src/xpypact/dao/duckdb/implementation.py new file mode 100644 index 0000000..ea40b41 --- /dev/null +++ b/src/xpypact/dao/duckdb/implementation.py @@ -0,0 +1,167 @@ +"""Code to implement DuckDB DAO.""" +from __future__ import annotations + +from dataclasses import dataclass, field +from pathlib import Path + +import duckdb as db +import pandas as pd +import xarray as xr + +from xpypact import get_gamma, get_nuclides, get_run_data, get_time_steps, get_timestep_nuclides +from xpypact.utils.resource import path_resolver + +from ...dao import DataAccessInterface + + +# noinspection SqlNoDataSourceInspection +@dataclass +class DuckDBDAO(DataAccessInterface): + """Implementation of DataAccessInterface for DuckDB.""" + + path: Path | None = None + read_only: bool = False + config: dict | None = None + con: db.DuckDBPyConnection = field(init=False) + + def __enter__(self): + if self.path is not None: + self.path.parent.mkdir(parents=True, exist_ok=True) + database_name = str(self.path) if self.path else ":memory:" + # duckdb.connect(... config=None) - doesn't work + if self.config is None: + self.con = db.connect(database_name, self.read_only) + else: + self.con = db.connect(database_name, self.read_only, self.config) + if not self.read_only: + self.create_schema() + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + self.con.close() + + def get_tables_info(self): + """Get information on tables in schema.""" + return self.con.execute("select * from information_schema.tables").df() + + def create_schema(self) -> None: + """Create tables to store xpypact dataset. + + Retain existing tables. + """ + sql_path: Path = path_resolver(__package__)("create_schema.sql") + sql = sql_path.read_text(encoding="utf-8") + self.con.execute(sql) + + def drop_schema(self): + """Drop our DB objects.""" + tables = [ + "timestep_nuclide", + "timestep_gamma", + "timestep", + "nuclide", + "rundata", + ] + for table in tables: + self.con.execute(f"drop table if exists {table}") + + def save(self, ds: xr.Dataset, material_id=1, case_id="") -> None: + """Save xpypact dataset to database. + + Args: + ds: xpypact dataset to save + material_id: additional key to distinguish multiple FISPACT run + case_id: second additional key + """ + self._save_run_data(ds, material_id, case_id) + self._save_nuclides(ds) + self._save_time_steps(ds) + self._save_time_step_nuclides(ds) + self._save_gamma(ds) + + def load_rundata(self) -> pd.DataFrame: + """Load FISPACT run data as table. + + Returns: + FISPACT run data + """ + return self.con.execute("select * from rundata").df() + + def load_nuclides(self) -> pd.DataFrame: + """Load nuclide table. + + Returns: + time nuclide + """ + return self.con.execute("select * from nuclide").df() + + def load_time_steps(self) -> pd.DataFrame: + """Load time step table. + + Returns: + time step table + """ + return self.con.execute("select * from timestep").df() + + def load_time_step_nuclides(self) -> pd.DataFrame: + """Load time step x nuclides table. + + Returns: + time step x nuclides table + """ + return self.con.execute("select * from timestep_nuclide").df() + + def load_gamma(self, time_step_number: int = None) -> pd.DataFrame: + """Load time step x gamma table. + + Args: + time_step_number: filter for time_step_number + + Returns: + time step x gamma table + """ + sql = "select * from timestep_gamma" + if time_step_number is not None: + sql += f" where time_step_number == {time_step_number}" + return self.con.execute(sql).df() + + def _save_run_data(self, ds: xr.Dataset, material_id=1, case_id=""): + _table = get_run_data(ds) + _table = _add_material_and_case_columns(_table, material_id, case_id) + self.con.execute("insert into rundata from _table") + self.con.commit() + + def _save_nuclides(self, ds: xr.Dataset): + _table = get_nuclides(ds) # noqa: F841 - used below + sql = "insert or ignore into nuclide select * from _table" + self.con.execute(sql) + self.con.commit() + + def _save_time_steps(self, ds: xr.Dataset, material_id=1, case_id=""): + _table = get_time_steps(ds) + _table = _add_material_and_case_columns(_table, material_id, case_id) + self.con.execute("insert into timestep from _table") + self.con.commit() + + def _save_time_step_nuclides(self, ds: xr.Dataset, material_id=1, case_id=""): + _table = get_timestep_nuclides(ds) + _table = _add_material_and_case_columns(_table, material_id, case_id) + self.con.execute("insert into timestep_nuclide from _table") + self.con.commit() + + def _save_gamma(self, ds: xr.Dataset, material_id=1, case_id=""): + _table = get_gamma(ds) + _table = _add_material_and_case_columns(_table, material_id, case_id) + self.con.execute("insert into timestep_gamma from _table") + self.con.commit() + + +def _add_material_and_case_columns( + table: pd.DataFrame, material_id: int, case_id: str +) -> pd.DataFrame: + columns = table.columns.values + table["material_id"] = material_id + table["case_id"] = case_id + new_columns = ["material_id", "case_id"] + new_columns.extend(columns) + return table[new_columns] diff --git a/src/xpypact/data_frames.py b/src/xpypact/data_frames.py new file mode 100644 index 0000000..b6a5a3b --- /dev/null +++ b/src/xpypact/data_frames.py @@ -0,0 +1,190 @@ +"""Export xpypact dataset to pandas dataframes. + +This can be used to store the data in databases or parquet datasets. +""" +from __future__ import annotations + +import pandas as pd + +from xarray import Dataset + + +def get_run_data(ds: Dataset) -> pd.DataFrame: + """Extract FISPACT run data as dataframe. + + Args: + ds: xpypact dataset loaded from FISPACT output JSON file + + Returns: + pd.DataFrame: one row table with the run data + """ + return pd.DataFrame.from_dict( + { + "timestamp": ds.timestamp, + "run_name": ds.attrs["run_name"], + "flux_name": ds.attrs["flux_name"], + "dose_rate_type": ds.attrs["dose_rate_type"], + "dose_rate_distance": ds.attrs["dose_rate_distance"], + } + ) + + +def get_time_steps(ds: Dataset) -> pd.DataFrame: + """Extract time steps table from xpypact dataset. + + Drops "total_" prefix from column names. + + Args: + ds: xpypact dataset to extract from + + Returns: + Time step totals table. + """ + return ( + ds[ + [ + "time_step_number", + "elapsed_time", + "irradiation_time", + "cooling_time", + "duration", + "flux", + "total_atoms", + "total_activity", + "total_alpha_activity", + "total_beta_activity", + "total_gamma_activity", + "total_mass", + "total_heat", + "total_alpha_heat", + "total_beta_heat", + "total_gamma_heat", + "total_ingest1ion_dose", + "total_inhalation_dose", + "total_dose_rate", + ] + ] + .to_dataframe() + .reset_index() + .rename( + columns={ + "total_atoms": "atoms", + "total_activity": "activity", + "total_alpha_activity": "alpha_activity", + "total_beta_activity": "beta_activity", + "total_gamma_activity": "gamma_activity", + "total_mass": "mass", + "total_heat": "heat", + "total_alpha_heat": "alpha_heat", + "total_beta_heat": "beta_heat", + "total_gamma_heat": "gamma_heat", + "total_ingest1ion_dose": "ingest1ion_dose", + "total_inhalation_dose": "inhalation_dose", + "total_dose_rate": "dose_rate", + } + ) + ) + + +def get_nuclides(ds: Dataset) -> pd.DataFrame: + """Extract nuclides table from xpypact dataset. + + Sets 'half_life' column name instead 'nuclide_half_life'. + + Args: + ds: xpypact dataset to extract from + + Returns: + Nuclide table + """ + columns_all = ["element", "mass_number", "state", "zai", "nuclide_half_life"] + columns = ["zai", "nuclide_half_life"] + return ( + ds[columns] + .to_dataframe()[columns] + .reset_index()[columns_all] + .rename(columns={"nuclide_half_life": "half_life"}) + ) + + +def get_timestep_nuclides(ds: Dataset) -> pd.DataFrame: + """Extract timestep X nuclides table from xpypact dataset. + + Removes "nuclide_" prefix from column names. + + Args: + ds: xpypact dataset to extract from + + Returns: + Time step x Nuclide table + """ + columns = [ + "nuclide_atoms", + "nuclide_grams", + "nuclide_activity", + "nuclide_alpha_activity", + "nuclide_beta_activity", + "nuclide_gamma_activity", + "nuclide_heat", + "nuclide_alpha_heat", + "nuclide_beta_heat", + "nuclide_gamma_heat", + "nuclide_dose", + "nuclide_ingestion", + "nuclide_inhalation", + ] + columns_all = [ + "time_step_number", + "element", + "mass_number", + "state", + ] + columns + + return ( + ds[columns] + .to_dataframe()[columns] + .reset_index()[columns_all] + .fillna(0.0) + .rename( + columns={ + "nuclide_atoms": "atoms", + "nuclide_grams": "grams", + "nuclide_activity": "activity", + "nuclide_alpha_activity": "alpha_activity", + "nuclide_beta_activity": "beta_activity", + "nuclide_gamma_activity": "gamma_activity", + "nuclide_heat": "heat", + "nuclide_alpha_heat": "alpha_heat", + "nuclide_beta_heat": "beta_heat", + "nuclide_gamma_heat": "gamma_heat", + "nuclide_dose": "dose", + "nuclide_ingestion": "ingestion", + "nuclide_inhalation": "inhalation", + } + ) + ) + + +def get_gamma(ds: Dataset) -> pd.DataFrame | None: + """Extract timestep X gamma table from xpypact dataset. + + Set column names to "boundary" and "rate". + + Args: + ds: xpypact dataset to extract from + + Returns: + Time step x gamma rate table + """ + if "gamma" not in ds: + return None + columns = [ + "time_step_number", + "gamma_boundaries", + "gamma", + ] + return ( + ds.gamma.to_dataframe() + .reset_index()[columns] + .rename(columns={"gamma_boundaries": "boundary", "gamma": "rate"}) + ) diff --git a/tests/conftest.py b/tests/conftest.py index 4c4cf0c..3823a43 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,10 +1,12 @@ from __future__ import annotations +import bz2 import os from pathlib import Path import pytest +import xpypact.data_arrays as da from xpypact.utils.resource import path_resolver @@ -34,3 +36,17 @@ def cd_tmpdir(tmpdir): # noqa: PT004 yield finally: os.chdir(old_dir) + + +@pytest.fixture() +def dataset_with_gamma(data): + """Load dataset with gamma information. + + Args: + data: fixture - path to test data + + Returns: + Dataset with gamma information. + """ + with bz2.open(data / "with-gamma.json.bz2") as fid: + return da.from_json(fid.read().decode("utf-8")) diff --git a/tests/data/Ag-with-gamma.json b/tests/data/Ag-with-gamma.json new file mode 100644 index 0000000..c20259a --- /dev/null +++ b/tests/data/Ag-with-gamma.json @@ -0,0 +1,797 @@ +{ + "run_data": { + "timestamp": "23:01:19 12 July 2020", + "run_name": "* Material Ag, fluxes 1", + "flux_name": "55.F9.10 11-L2-02W HFS_GLRY_08_U" + }, + "inventory_data": [ + { + "irradiation_time": 0.0E+0, + "cooling_time": 0.0E+0, + "flux": 0.22204460492503131E-15, + "total_heat": 0.0E+0, + "alpha_heat": 0.0E+0, + "beta_heat": 0.0E+0, + "gamma_heat": 0.0E+0, + "ingestion_dose": 0.0E+0, + "inhalation_dose": 0.0E+0, + "dose_rate": { + "type": "", + "distance": 0.0E+0, + "mass": 0.0E+0, + "dose": 0.0E+0 + }, + "nuclides": [ + { + "element": "Ag", + "isotope": 107, + "state": "", + "half_life": 0.0E+0, + "grams": 0.51331081722407967E+0, + "activity": 0.0E+0, + "heat": 0.0E+0, + "alpha_heat": 0.0E+0, + "beta_heat": 0.0E+0, + "gamma_heat": 0.0E+0, + "dose": 0.0E+0, + "ingestion": 0.0E+0, + "inhalation": 0.0E+0 + }, + { + "element": "Ag", + "isotope": 109, + "state": "", + "half_life": 0.0E+0, + "grams": 0.48580881498719353E+0, + "activity": 0.0E+0, + "heat": 0.0E+0, + "alpha_heat": 0.0E+0, + "beta_heat": 0.0E+0, + "gamma_heat": 0.0E+0, + "dose": 0.0E+0, + "ingestion": 0.0E+0, + "inhalation": 0.0E+0 + } + ] + }, + { + "irradiation_time": 0.631152E+8, + "cooling_time": 0.0E+0, + "flux": 0.24452E+11, + "total_heat": 0.11030165034397161E-5, + "alpha_heat": 0.0E+0, + "beta_heat": 0.98949233746662077E-6, + "gamma_heat": 0.11352416597309523E-6, + "ingestion_dose": 0.54460209506958901E+0, + "inhalation_dose": 0.23233747877698998E+1, + "dose_rate": { + "type": "Point source", + "distance": 0.1E+1, + "mass": 0.99912027864633153E-3, + "dose": 0.91720603767081113E-4 + }, + "nuclides": [ + { + "element": "H", + "isotope": 1, + "state": "", + "half_life": 0.0E+0, + "grams": 0.11468776343339874E-10, + "activity": 0.0E+0, + "heat": 0.0E+0, + "alpha_heat": 0.0E+0, + "beta_heat": 0.0E+0, + "gamma_heat": 0.0E+0, + "dose": 0.0E+0, + "ingestion": 0.0E+0, + "inhalation": 0.0E+0 + }, + { + "element": "H", + "isotope": 2, + "state": "", + "half_life": 0.0E+0, + "grams": 0.25119780426357819E-11, + "activity": 0.0E+0, + "heat": 0.0E+0, + "alpha_heat": 0.0E+0, + "beta_heat": 0.0E+0, + "gamma_heat": 0.0E+0, + "dose": 0.0E+0, + "ingestion": 0.0E+0, + "inhalation": 0.0E+0 + }, + { + "element": "H", + "isotope": 3, + "state": "", + "half_life": 0.389105E+9, + "grams": 0.61154162665727945E-12, + "activity": 0.21751901447801447E+3, + "heat": 0.19890508451476908E-15, + "alpha_heat": 0.0E+0, + "beta_heat": 0.19890508451476908E-15, + "gamma_heat": 0.0E+0, + "dose": 0.0E+0, + "ingestion": 0.91357987602394283E-8, + "inhalation": 0.56554942406295335E-7 + }, + { + "element": "He", + "isotope": 3, + "state": "", + "half_life": 0.0E+0, + "grams": 0.35721237859544966E-13, + "activity": 0.0E+0, + "heat": 0.0E+0, + "alpha_heat": 0.0E+0, + "beta_heat": 0.0E+0, + "gamma_heat": 0.0E+0, + "dose": 0.0E+0, + "ingestion": 0.0E+0, + "inhalation": 0.0E+0 + }, + { + "element": "He", + "isotope": 4, + "state": "", + "half_life": 0.0E+0, + "grams": 0.12570001773575198E-10, + "activity": 0.0E+0, + "heat": 0.0E+0, + "alpha_heat": 0.0E+0, + "beta_heat": 0.0E+0, + "gamma_heat": 0.0E+0, + "dose": 0.0E+0, + "ingestion": 0.0E+0, + "inhalation": 0.0E+0 + }, + { + "element": "Ru", + "isotope": 102, + "state": "", + "half_life": 0.0E+0, + "grams": 0.34983189029929211E-16, + "activity": 0.0E+0, + "heat": 0.0E+0, + "alpha_heat": 0.0E+0, + "beta_heat": 0.0E+0, + "gamma_heat": 0.0E+0, + "dose": 0.0E+0, + "ingestion": 0.0E+0, + "inhalation": 0.0E+0 + }, + { + "element": "Ru", + "isotope": 103, + "state": "", + "half_life": 0.339206E+7, + "grams": 0.16575227268243544E-15, + "activity": 0.19821278802068654E+0, + "heat": 0.17868225356182745E-16, + "alpha_heat": 0.0E+0, + "beta_heat": 0.21136122399604529E-17, + "gamma_heat": 0.15754613116222291E-16, + "dose": 0.13230920407999039E-13, + "ingestion": 0.14469533622422684E-9, + "inhalation": 0.5946383692505783E-9 + }, + { + "element": "Ru", + "isotope": 104, + "state": "", + "half_life": 0.0E+0, + "grams": 0.78098597967151158E-12, + "activity": 0.0E+0, + "heat": 0.0E+0, + "alpha_heat": 0.0E+0, + "beta_heat": 0.0E+0, + "gamma_heat": 0.0E+0, + "dose": 0.0E+0, + "ingestion": 0.0E+0, + "inhalation": 0.0E+0 + }, + { + "element": "Rh", + "isotope": 102, + "state": "", + "half_life": 0.91584E+8, + "grams": 0.47529342765226241E-16, + "activity": 0.21257739785167816E-2, + "heat": 0.72688169051230951E-18, + "alpha_heat": 0.0E+0, + "beta_heat": 0.41401014154912007E-20, + "gamma_heat": 0.72274158909681832E-18, + "dose": 0.70533418048997551E-15, + "ingestion": 0.55270123294340411E-11, + "inhalation": 0.36138156848736712E-10 + }, + { + "element": "Rh", + "isotope": 102, + "state": "m", + "half_life": 0.179712E+8, + "grams": 0.1807574806542313E-16, + "activity": 0.41199703216124803E-2, + "heat": 0.44012620726989438E-18, + "alpha_heat": 0.0E+0, + "beta_heat": 0.11459196205867686E-18, + "gamma_heat": 0.32553424521121757E-18, + "dose": 0.40926370211948791E-15, + "ingestion": 0.49439643375918323E-11, + "inhalation": 0.29251789874118144E-10 + }, + { + "element": "Rh", + "isotope": 103, + "state": "", + "half_life": 0.0E+0, + "grams": 0.72816218375166359E-10, + "activity": 0.0E+0, + "heat": 0.0E+0, + "alpha_heat": 0.0E+0, + "beta_heat": 0.0E+0, + "gamma_heat": 0.0E+0, + "dose": 0.0E+0, + "ingestion": 0.0E+0, + "inhalation": 0.0E+0 + }, + { + "element": "Rh", + "isotope": 103, + "state": "m", + "half_life": 0.33668400000000001E+4, + "grams": 0.47782354393586436E-14, + "activity": 0.57568515124209252E+4, + "heat": 0.34581942887455871E-13, + "alpha_heat": 0.0E+0, + "beta_heat": 0.33027111172490276E-13, + "gamma_heat": 0.1554831714965595E-14, + "dose": 0.56361666282878643E-11, + "ingestion": 0.21876034661132645E-7, + "inhalation": 0.15543498771764103E-7 + }, + { + "element": "Rh", + "isotope": 104, + "state": "", + "half_life": 0.42299999999999997E+2, + "grams": 0.16781177648979457E-15, + "activity": 0.15937322231871565E+5, + "heat": 0.25419942034355789E-11, + "alpha_heat": 0.0E+0, + "beta_heat": 0.25036354025530524E-11, + "gamma_heat": 0.38358800882526654E-13, + "dose": 0.2908039091278662E-10, + "ingestion": 0.20718519509817094E-7, + "inhalation": 0.17531054039422499E-7 + }, + { + "element": "Rh", + "isotope": 104, + "state": "m", + "half_life": 0.26039999999999998E+3, + "grams": 0.62711823500049545E-15, + "activity": 0.96747941929768895E+4, + "heat": 0.20418317839063147E-12, + "alpha_heat": 0.0E+0, + "beta_heat": 0.1336201464963603E-12, + "gamma_heat": 0.70563031894271183E-13, + "dose": 0.11294151806974513E-9, + "ingestion": 0.85138186879691948E-7, + "inhalation": 0.7643087507784667E-7 + }, + { + "element": "Rh", + "isotope": 105, + "state": "", + "half_life": 0.127296E+6, + "grams": 0.56960634187864451E-13, + "activity": 0.17804900593715608E+4, + "heat": 0.65824427877425153E-13, + "alpha_heat": 0.0E+0, + "beta_heat": 0.43781758585326912E-13, + "gamma_heat": 0.22042669292098241E-13, + "dose": 0.18171063686754697E-10, + "ingestion": 0.65878132705676198E-6, + "inhalation": 0.62317152292296262E-6 + }, + { + "element": "Rh", + "isotope": 106, + "state": "", + "half_life": 0.3E+2, + "grams": 0.18282862636809004E-16, + "activity": 0.24020142976885086E+4, + "heat": 0.62178649386905616E-12, + "alpha_heat": 0.0E+0, + "beta_heat": 0.54316649310621356E-12, + "gamma_heat": 0.78620000762842566E-13, + "dose": 0.64766975006516908E-10, + "ingestion": 0.36030214321357996E-8, + "inhalation": 0.3122618678688458E-8 + }, + { + "element": "Rh", + "isotope": 106, + "state": "m", + "half_life": 0.792E+4, + "grams": 0.61912880308184219E-14, + "activity": 0.30810896665849959E+4, + "heat": 0.15208445143222765E-11, + "alpha_heat": 0.0E+0, + "beta_heat": 0.15876953922344431E-12, + "gamma_heat": 0.1362074975098832E-11, + "dose": 0.10882809651416794E-8, + "ingestion": 0.49297434468377103E-6, + "inhalation": 0.33891986998735049E-6 + }, + { + "element": "Pd", + "isotope": 104, + "state": "", + "half_life": 0.0E+0, + "grams": 0.17291405536225811E-9, + "activity": 0.0E+0, + "heat": 0.0E+0, + "alpha_heat": 0.0E+0, + "beta_heat": 0.0E+0, + "gamma_heat": 0.0E+0, + "dose": 0.0E+0, + "ingestion": 0.0E+0, + "inhalation": 0.0E+0 + }, + { + "element": "Pd", + "isotope": 105, + "state": "", + "half_life": 0.0E+0, + "grams": 0.14146432725678464E-9, + "activity": 0.0E+0, + "heat": 0.0E+0, + "alpha_heat": 0.0E+0, + "beta_heat": 0.0E+0, + "gamma_heat": 0.0E+0, + "dose": 0.0E+0, + "ingestion": 0.0E+0, + "inhalation": 0.0E+0 + }, + { + "element": "Pd", + "isotope": 106, + "state": "", + "half_life": 0.0E+0, + "grams": 0.14210385219612697E-7, + "activity": 0.0E+0, + "heat": 0.0E+0, + "alpha_heat": 0.0E+0, + "beta_heat": 0.0E+0, + "gamma_heat": 0.0E+0, + "dose": 0.0E+0, + "ingestion": 0.0E+0, + "inhalation": 0.0E+0 + }, + { + "element": "Pd", + "isotope": 107, + "state": "", + "half_life": 0.20512E+15, + "grams": 0.39633319673083002E-9, + "activity": 0.75444811874428612E-2, + "heat": 0.11241458864166168E-19, + "alpha_heat": 0.0E+0, + "beta_heat": 0.11241458864166168E-19, + "gamma_heat": 0.0E+0, + "dose": 0.0E+0, + "ingestion": 0.27914580609187146E-12, + "inhalation": 0.44512438500860233E-11 + }, + { + "element": "Pd", + "isotope": 107, + "state": "m", + "half_life": 0.21300000000000001E+2, + "grams": 0.64731257293271914E-16, + "activity": 0.1186619215091158E+5, + "heat": 0.4078665191160592E-12, + "alpha_heat": 0.0E+0, + "beta_heat": 0.11917714435122994E-12, + "gamma_heat": 0.28868937476482928E-12, + "dose": 0.24415019644634223E-9, + "ingestion": 0.29665480258741542E-8, + "inhalation": 0.32038719451361944E-8 + }, + { + "element": "Pd", + "isotope": 108, + "state": "", + "half_life": 0.0E+0, + "grams": 0.47321578991090471E-6, + "activity": 0.0E+0, + "heat": 0.0E+0, + "alpha_heat": 0.0E+0, + "beta_heat": 0.0E+0, + "gamma_heat": 0.0E+0, + "dose": 0.0E+0, + "ingestion": 0.0E+0, + "inhalation": 0.0E+0 + }, + { + "element": "Pd", + "isotope": 109, + "state": "", + "half_life": 0.49324300000000003E+5, + "grams": 0.30677648627474233E-12, + "activity": 0.2383897476828357E+5, + "heat": 0.13804871382305134E-11, + "alpha_heat": 0.0E+0, + "beta_heat": 0.13780254160640154E-11, + "gamma_heat": 0.24617221664980343E-14, + "dose": 0.20508469964837483E-11, + "ingestion": 0.13111435884072119E-4, + "inhalation": 0.88204207324053329E-5 + }, + { + "element": "Pd", + "isotope": 109, + "state": "m", + "half_life": 0.28139999999999998E+3, + "grams": 0.68385133792707974E-15, + "activity": 0.9314596437997594E+4, + "heat": 0.27983293298945572E-12, + "alpha_heat": 0.0E+0, + "beta_heat": 0.11374639389644993E-12, + "gamma_heat": 0.16608653909300582E-12, + "dose": 0.13897751194534847E-9, + "ingestion": 0.5588757840466982E-7, + "inhalation": 0.49367361328081239E-7 + }, + { + "element": "Pd", + "isotope": 110, + "state": "", + "half_life": 0.18934600000000001E+26, + "grams": 0.1546957204955023E-6, + "activity": 0.31029917525433945E-10, + "heat": 0.99430806954103107E-26, + "alpha_heat": 0.0E+0, + "beta_heat": 0.99430806954103107E-26, + "gamma_heat": 0.0E+0, + "dose": 0.0E+0, + "ingestion": 0.62059834673701044E-18, + "inhalation": 0.15514958944026292E-17 + }, + { + "element": "Ag", + "isotope": 105, + "state": "", + "half_life": 0.356832E+7, + "grams": 0.94927767872743138E-11, + "activity": 0.10585339549066579E+5, + "heat": 0.93334328316713467E-12, + "alpha_heat": 0.0E+0, + "beta_heat": 0.33793493233943999E-13, + "gamma_heat": 0.89954978993319077E-12, + "dose": 0.81006482658430914E-9, + "ingestion": 0.49751094120993204E-5, + "inhalation": 0.85741251565658307E-5 + }, + { + "element": "Ag", + "isotope": 105, + "state": "m", + "half_life": 0.43380000000000001E+3, + "grams": 0.88840159621411246E-15, + "activity": 0.81488270636557409E+4, + "heat": 0.34676243773644742E-13, + "alpha_heat": 0.0E+0, + "beta_heat": 0.33082240902939207E-13, + "gamma_heat": 0.15940028707055333E-14, + "dose": 0.38122859413734422E-11, + "ingestion": 0.2607624614610379E-8, + "inhalation": 0.22001833514054075E-8 + }, + { + "element": "Ag", + "isotope": 106, + "state": "", + "half_life": 0.144E+4, + "grams": 0.25623373600250572E-12, + "activity": 0.70133653490005806E+6, + "heat": 0.13590704348967376E-9, + "alpha_heat": 0.0E+0, + "beta_heat": 0.56578886814995987E-10, + "gamma_heat": 0.79328156674677776E-10, + "dose": 0.68125282717686622E-7, + "ingestion": 0.2244276902712498E-4, + "inhalation": 0.1122138451356249E-4 + }, + { + "element": "Ag", + "isotope": 106, + "state": "m", + "half_life": 0.730944E+6, + "grams": 0.10051383627008998E-9, + "activity": 0.54199388899810566E+6, + "heat": 0.24025308516506763E-9, + "alpha_heat": 0.0E+0, + "beta_heat": 0.10658197883348133E-11, + "gamma_heat": 0.23918726537673284E-9, + "dose": 0.19452980153336471E-6, + "ingestion": 0.81299084059091218E-3, + "inhalation": 0.59619326705375971E-3 + }, + { + "element": "Ag", + "isotope": 107, + "state": "", + "half_life": 0.0E+0, + "grams": 0.51329420065723108E+0, + "activity": 0.0E+0, + "heat": 0.0E+0, + "alpha_heat": 0.0E+0, + "beta_heat": 0.0E+0, + "gamma_heat": 0.0E+0, + "dose": 0.0E+0, + "ingestion": 0.0E+0, + "inhalation": 0.0E+0 + }, + { + "element": "Ag", + "isotope": 107, + "state": "m", + "half_life": 0.44299999999999997E+2, + "grams": 0.660879448591702E-13, + "activity": 0.58249936752201235E+7, + "heat": 0.85773096274286314E-10, + "alpha_heat": 0.0E+0, + "beta_heat": 0.73894663405594378E-10, + "gamma_heat": 0.11878432868691933E-10, + "dose": 0.29753303272889411E-7, + "ingestion": 0.54172442794571284E-6, + "inhalation": 0.34949961438007276E-6 + }, + { + "element": "Ag", + "isotope": 108, + "state": "", + "half_life": 0.144E+3, + "grams": 0.53604771440652259E-10, + "activity": 0.14400313919500124E+10, + "heat": 0.1449731546271876E-6, + "alpha_heat": 0.0E+0, + "beta_heat": 0.1397069370170044E-6, + "gamma_heat": 0.5266217610183196E-8, + "dose": 0.43097570399810856E-5, + "ingestion": 0.86401882000791984E-4, + "inhalation": 0.54721190958031695E-4 + }, + { + "element": "Ag", + "isotope": 108, + "state": "m", + "half_life": 0.131911E+11, + "grams": 0.48618486571333499E-6, + "activity": 0.14257764140518595E+6, + "heat": 0.37602632648470844E-10, + "alpha_heat": 0.0E+0, + "beta_heat": 0.36643184732535899E-12, + "gamma_heat": 0.37236200801145486E-10, + "dose": 0.31746662995780599E-7, + "ingestion": 0.32792857070626361E-3, + "inhalation": 0.52753726619406398E-2 + }, + { + "element": "Ag", + "isotope": 109, + "state": "", + "half_life": 0.0E+0, + "grams": 0.48575518606565266E+0, + "activity": 0.0E+0, + "heat": 0.0E+0, + "alpha_heat": 0.0E+0, + "beta_heat": 0.0E+0, + "gamma_heat": 0.0E+0, + "dose": 0.0E+0, + "ingestion": 0.0E+0, + "inhalation": 0.0E+0 + }, + { + "element": "Ag", + "isotope": 109, + "state": "m", + "half_life": 0.39700000000000003E+2, + "grams": 0.58283960068471687E-13, + "activity": 0.56271566234365366E+7, + "heat": 0.79372851869381988E-10, + "alpha_heat": 0.0E+0, + "beta_heat": 0.6918691639319512E-10, + "gamma_heat": 0.1018593547618687E-10, + "dose": 0.27438457466793909E-7, + "ingestion": 0.45017252197514684E-6, + "inhalation": 0.28698498466571095E-6 + }, + { + "element": "Ag", + "isotope": 110, + "state": "", + "half_life": 0.24559999999999999E+2, + "grams": 0.28952987609614811E-10, + "activity": 0.44773339984219284E+10, + "heat": 0.86982623942326058E-6, + "alpha_heat": 0.0E+0, + "beta_heat": 0.84734570354017081E-6, + "gamma_heat": 0.22480535883089762E-7, + "dose": 0.18626136845818681E-4, + "ingestion": 0.30445871261786826E-2, + "inhalation": 0.19252536310458365E-2 + }, + { + "element": "Ag", + "isotope": 110, + "state": "m", + "half_life": 0.21581E+8, + "grams": 0.10964187218367905E-5, + "activity": 0.19295647152856052E+9, + "heat": 0.87629689879889588E-7, + "alpha_heat": 0.0E+0, + "beta_heat": 0.2233097849885987E-8, + "gamma_heat": 0.85396592030003597E-7, + "dose": 0.6843052221354352E-4, + "ingestion": 0.5402781221378381E+0, + "inhalation": 0.23154776785464328E+1 + }, + { + "element": "Ag", + "isotope": 111, + "state": "", + "half_life": 0.64368E+6, + "grams": 0.10471451900220665E-11, + "activity": 0.61229306518999847E+4, + "heat": 0.37022379971382907E-12, + "alpha_heat": 0.0E+0, + "beta_heat": 0.34424324931120938E-12, + "gamma_heat": 0.25980550402619689E-13, + "dose": 0.21307903061641942E-10, + "ingestion": 0.79598098262857418E-5, + "inhalation": 0.10408982289691157E-4 + }, + { + "element": "Ag", + "isotope": 111, + "state": "m", + "half_life": 0.64799999999999997E+2, + "grams": 0.1010031095388864E-15, + "activity": 0.58665421084955906E+4, + "heat": 0.59108494057051247E-13, + "alpha_heat": 0.0E+0, + "beta_heat": 0.52643521171169564E-13, + "gamma_heat": 0.64649728858816768E-14, + "dose": 0.1671967925860669E-10, + "ingestion": 0.12906392809737019E-8, + "inhalation": 0.13493046413993241E-8 + }, + { + "element": "Cd", + "isotope": 106, + "state": "", + "half_life": 0.20828000000000001E+27, + "grams": 0.38922197013032626E-10, + "activity": 0.73655032273496197E-15, + "heat": 0.32688315447555532E-30, + "alpha_heat": 0.0E+0, + "beta_heat": 0.32688315447555532E-30, + "gamma_heat": 0.0E+0, + "dose": 0.0E+0, + "ingestion": 0.3535441579976322E-22, + "inhalation": 0.11048255231810652E-21 + }, + { + "element": "Cd", + "isotope": 107, + "state": "", + "half_life": 0.23472E+5, + "grams": 0.19523358677244556E-15, + "activity": 0.32477102542653306E+2, + "heat": 0.14317397600348717E-15, + "alpha_heat": 0.0E+0, + "beta_heat": 0.32646370634266384E-16, + "gamma_heat": 0.11052760536922079E-15, + "dose": 0.30709031342403621E-12, + "ingestion": 0.20135804341068232E-8, + "inhalation": 0.26955995988620265E-8 + }, + { + "element": "Cd", + "isotope": 108, + "state": "", + "half_life": 0.129386E+26, + "grams": 0.15813025497622825E-4, + "activity": 0.47278839390078124E-8, + "heat": 0.2060343686886307E-24, + "alpha_heat": 0.0E+0, + "beta_heat": 0.2060343686886307E-24, + "gamma_heat": 0.0E+0, + "dose": 0.0E+0, + "ingestion": 0.2222105425231277E-16, + "inhalation": 0.70918256554511287E-16 + }, + { + "element": "Cd", + "isotope": 109, + "state": "", + "half_life": 0.399686E+8, + "grams": 0.59080382436402523E-11, + "activity": 0.56657162401414041E+3, + "heat": 0.18934283050730958E-14, + "alpha_heat": 0.0E+0, + "beta_heat": 0.51854453083456525E-15, + "gamma_heat": 0.13748837742385306E-14, + "dose": 0.46274824006278327E-11, + "ingestion": 0.11331432159808012E-5, + "inhalation": 0.45892300310124533E-5 + }, + { + "element": "Cd", + "isotope": 110, + "state": "", + "half_life": 0.0E+0, + "grams": 0.52852819343633571E-4, + "activity": 0.0E+0, + "heat": 0.0E+0, + "alpha_heat": 0.0E+0, + "beta_heat": 0.0E+0, + "gamma_heat": 0.0E+0, + "dose": 0.0E+0, + "ingestion": 0.0E+0, + "inhalation": 0.0E+0 + }, + { + "element": "Cd", + "isotope": 111, + "state": "", + "half_life": 0.0E+0, + "grams": 0.30241515766100312E-9, + "activity": 0.0E+0, + "heat": 0.0E+0, + "alpha_heat": 0.0E+0, + "beta_heat": 0.0E+0, + "gamma_heat": 0.0E+0, + "dose": 0.0E+0, + "ingestion": 0.0E+0, + "inhalation": 0.0E+0 + }, + { + "element": "Cd", + "isotope": 111, + "state": "m", + "half_life": 0.29244000000000001E+4, + "grams": 0.65830389339780975E-15, + "activity": 0.84726643488654486E+3, + "heat": 0.53792205630193643E-13, + "alpha_heat": 0.0E+0, + "beta_heat": 0.14877060433432532E-13, + "gamma_heat": 0.3891514519676111E-13, + "dose": 0.3325050339232257E-10, + "ingestion": 0.93199309669773339E-7, + "inhalation": 0.12708996399026879E-6 + }, + { + "element": "Cd", + "isotope": 112, + "state": "", + "half_life": 0.0E+0, + "grams": 0.69587465556908194E-15, + "activity": 0.0E+0, + "heat": 0.0E+0, + "alpha_heat": 0.0E+0, + "beta_heat": 0.0E+0, + "gamma_heat": 0.0E+0, + "dose": 0.0E+0, + "ingestion": 0.0E+0, + "inhalation": 0.0E+0 + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/test_data_arrays.py b/tests/test_data_arrays.py index df59614..7450099 100644 --- a/tests/test_data_arrays.py +++ b/tests/test_data_arrays.py @@ -2,8 +2,6 @@ from typing import cast -import bz2 - from copy import deepcopy import numpy as np @@ -168,13 +166,11 @@ def test_net_cdf_writing_with_group_and_appending(cd_tmpdir, ds): assert actual.total_dose_rate.attrs["units"] == "Sv/h" -def test_inventory_with_gamma(data): - with bz2.open(data / "with-gamma.json.bz2") as fid: - ds = da.from_json(fid.read().decode("utf-8")) - assert ds.gamma is not None - assert ds.gamma.sel(time_step_number=2, gamma_boundaries=1.0).item() == pytest.approx( - 17857.24443195 - ) +def test_inventory_with_gamma(dataset_with_gamma): + assert dataset_with_gamma.gamma is not None + assert dataset_with_gamma.gamma.sel( + time_step_number=2, gamma_boundaries=1.0 + ).item() == pytest.approx(17857.24443195) if __name__ == "__main__": diff --git a/tests/test_data_frames.py b/tests/test_data_frames.py new file mode 100644 index 0000000..0637dfc --- /dev/null +++ b/tests/test_data_frames.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +import pandas as pd +import pytest +import xarray as xr +import xpypact.data_arrays as da + +from xpypact.data_frames import ( + get_gamma, + get_nuclides, + get_run_data, + get_time_steps, + get_timestep_nuclides, +) +from xpypact.inventory import Inventory, from_json + + +@pytest.fixture(scope="module") +def inventory(data) -> Inventory: + return from_json(data / "Ag-1.json") + + +@pytest.fixture(scope="module") +def ds(inventory: Inventory) -> xr.Dataset: + return da.create_dataset(inventory) + + +def test_get_run_data(ds): + run_data = get_run_data(ds) + assert isinstance(run_data, pd.DataFrame) + assert run_data["timestamp"].item() == pd.Timestamp("2020-07-12 23:01:19") + assert run_data["run_name"].item() == "* Material Ag, fluxes 1" + + +def test_get_time_steps(ds): + time_steps = get_time_steps(ds) + assert isinstance(time_steps, pd.DataFrame) + assert "time_step_number" in time_steps.columns + assert time_steps.iloc[1].flux == 0.24452e11 + assert time_steps.iloc[1].heat == 1.103016503439716e-06, "Should have column 'heat'" + + +def test_get_nuclides(ds): + nuclides = get_nuclides(ds) + nuclides = nuclides.set_index(["element", "mass_number", "state"]) + assert nuclides.loc[("H", 1, "")].half_life == 0.0 + + +def test_get_timestep_nuclides(ds): + timestep_nuclides = get_timestep_nuclides(ds) + timestep_nuclides = timestep_nuclides.set_index( + ["time_step_number", "element", "mass_number", "state"] + ) + assert timestep_nuclides.loc[2, "H", 1, ""].grams == 0.11468776343339874e-10 + + +def test_get_gamma_with_dataset_without_gamma(ds): + gamma = get_gamma(ds) + assert gamma is None + + +def test_get_gamma_with_dataset_with_gamma(dataset_with_gamma): + gamma = get_gamma(dataset_with_gamma) + gamma = gamma.set_index(["time_step_number", "boundary"]) + assert gamma.loc[2, 1.0].rate == pytest.approx(17857.24443195) + + +if __name__ == "__main__": + pytest.main() diff --git a/tests/test_duckdb_dao.py b/tests/test_duckdb_dao.py new file mode 100644 index 0000000..e8182fe --- /dev/null +++ b/tests/test_duckdb_dao.py @@ -0,0 +1,54 @@ +from __future__ import annotations + +import pandas as pd +import pytest + +from duckdb import InvalidInputException +from xpypact.dao.duckdb import DuckDBDAO as DataAccessObject + + +def test_ddl(tmp_path): + with DataAccessObject(tmp_path / "test-ddl.duckdb") as dao: + tables = dao.get_tables_info() + assert 5 == len(tables) + table_names = tables["table_name"] + for name in ["rundata", "timestep", "nuclide", "timestep_nuclide", "timestep_gamma"]: + assert name in table_names.values + dao.drop_schema() + tables = dao.get_tables_info() + assert 0 == len(tables) + dao.create_schema() + tables = dao.get_tables_info() + assert 5 == len(tables) + with DataAccessObject(tmp_path / "test-ddl.duckdb", read_only=True) as dao: + tables = dao.get_tables_info() + assert 5 == len(tables) + with pytest.raises(InvalidInputException, match="Cannot execute statement"): + dao.drop_schema() + + +def test_save(dataset_with_gamma): + with DataAccessObject(config={"default_null_order": "nulls_last"}) as dao: + dao.save(dataset_with_gamma) + run_data = dao.load_rundata() + assert run_data["timestamp"].item() == pd.Timestamp("2022-02-21 01:52:45") + assert run_data["run_name"].item() == "* Material Cu, fluxes 104_2_1_1" + nuclides = dao.load_nuclides() + nuclides = nuclides.set_index(["element", "mass_number", "state"]) + assert not nuclides.loc["Cu"].empty + time_steps = dao.load_time_steps() + assert not time_steps.empty + time_steps = time_steps.set_index("time_step_number") + assert not time_steps.loc[2].empty + time_step_nuclides = dao.load_time_step_nuclides() + assert not time_step_nuclides.empty + time_step_nuclides = time_step_nuclides.set_index( + ["time_step_number", "element", "mass_number", "state"] + ) + assert not time_step_nuclides.loc[2, "Cu"].empty + gamma = dao.load_gamma() + assert not gamma.empty + gamma = gamma.set_index(["time_step_number", "boundary"]) + assert not gamma.loc[2, 1.0].empty + gamma2 = dao.load_gamma(2) + assert not gamma2.empty From 8c8b483ff569d9acfbcf06d738f07c4a3d6e1095 Mon Sep 17 00:00:00 2001 From: dvp Date: Sun, 2 Apr 2023 15:26:52 +0300 Subject: [PATCH 29/32] bump: version xpypact 0.2.0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4cc3c46..fbccddf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "xpypact" -version = "0.1.12a0" +version = "0.2.0" description = "\"Python tools to work with elements and isotopes\"" authors = ["dvp "] license = "MIT" From c3ff9d14adc21c7c8b9edd0e55d7e237b98001b1 Mon Sep 17 00:00:00 2001 From: dvp Date: Sun, 2 Apr 2023 17:22:39 +0300 Subject: [PATCH 30/32] style: more ruff linters --- poetry.lock | 44 ++++++------ pyproject.toml | 79 ++++++++++++++-------- src/xpypact/dao/api.py | 86 +++++++++++++++++++++++- src/xpypact/dao/duckdb/implementation.py | 24 ++++--- src/xpypact/data_arrays.py | 26 ++++--- src/xpypact/data_frames.py | 18 +++-- src/xpypact/fluxes.py | 41 +++++------ src/xpypact/inventory.py | 16 +++-- src/xpypact/nuclide.py | 6 +- src/xpypact/time_step.py | 14 ++-- src/xpypact/utils/io.py | 14 ++-- src/xpypact/utils/resource.py | 16 +++-- src/xpypact/utils/types.py | 1 - tests/conftest.py | 4 +- tests/test_data_arrays.py | 16 +++-- tests/test_data_frames.py | 12 +++- tests/test_duckdb_dao.py | 17 +++-- tests/test_fluxes.py | 7 +- tests/test_inventory.py | 7 +- tests/test_package.py | 2 +- tests/test_run_data.py | 2 +- tests/utils/test_resource.py | 8 +-- 22 files changed, 306 insertions(+), 154 deletions(-) diff --git a/poetry.lock b/poetry.lock index 90d01f2..8710cd4 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1163,14 +1163,14 @@ flake8-simplify = ">=0.18.2" [[package]] name = "flake8-simplify" -version = "0.19.3" +version = "0.20.0" description = "flake8 plugin which checks for code that can be simplified" category = "dev" optional = false python-versions = ">=3.6.1" files = [ - {file = "flake8_simplify-0.19.3-py3-none-any.whl", hash = "sha256:1057320e9312d75849541fee822900d27bcad05b2405edc84713affee635629e"}, - {file = "flake8_simplify-0.19.3.tar.gz", hash = "sha256:2fb083bf5142a98d9c9554755cf2f56f8926eb4a33eae30c0809041b1546879e"}, + {file = "flake8_simplify-0.20.0-py3-none-any.whl", hash = "sha256:599a47824726c93fadcf0274e569daed45052e38cd906360d9080eaa3bd76d61"}, + {file = "flake8_simplify-0.20.0.tar.gz", hash = "sha256:7b8796bbea8aed45f56621c389d0556cc86f0afa5d992581139451240a8fbeca"}, ] [package.dependencies] @@ -3244,29 +3244,29 @@ files = [ [[package]] name = "ruff" -version = "0.0.259" +version = "0.0.260" description = "An extremely fast Python linter, written in Rust." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.0.259-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:f3938dc45e2a3f818e9cbd53007265c22246fbfded8837b2c563bf0ebde1a226"}, - {file = "ruff-0.0.259-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:22e1e35bf5f12072cd644d22afd9203641ccf258bc14ff91aa1c43dc14f6047d"}, - {file = "ruff-0.0.259-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d2fb20e89e85d147c85caa807707a1488bccc1f3854dc3d53533e89b52a0c5ff"}, - {file = "ruff-0.0.259-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:49e903bcda19f6bb0725a962c058eb5d61f40d84ef52ed53b61939b69402ab4e"}, - {file = "ruff-0.0.259-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:71f0ef1985e9a6696fa97da8459917fa34bdaa2c16bd33bd5edead585b7d44f7"}, - {file = "ruff-0.0.259-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:7cfef26619cba184d59aa7fa17b48af5891d51fc0b755a9bc533478a10d4d066"}, - {file = "ruff-0.0.259-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:79b02fa17ec1fd8d306ae302cb47fb614b71e1f539997858243769bcbe78c6d9"}, - {file = "ruff-0.0.259-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:428507fb321b386dda70d66cd1a8aa0abf51d7c197983d83bb9e4fa5ee60300b"}, - {file = "ruff-0.0.259-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c5fbaea9167f1852757f02133e5daacdb8c75b3431343205395da5b10499927a"}, - {file = "ruff-0.0.259-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:40ae87f2638484b7e8a7567b04a7af719f1c484c5bf132038b702bb32e1f6577"}, - {file = "ruff-0.0.259-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:29e2b77b7d5da6a7dd5cf9b738b511355c5734ece56f78e500d4b5bffd58c1a0"}, - {file = "ruff-0.0.259-py3-none-musllinux_1_2_i686.whl", hash = "sha256:5b3c1beacf6037e7f0781d4699d9a2dd4ba2462f475be5b1f45cf84c4ba3c69d"}, - {file = "ruff-0.0.259-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:daaea322e7e85f4c13d82be9536309e1c4b8b9851bb0cbc7eeb15d490fd46bf9"}, - {file = "ruff-0.0.259-py3-none-win32.whl", hash = "sha256:38704f151323aa5858370a2f792e122cc25e5d1aabe7d42ceeab83da18f0b456"}, - {file = "ruff-0.0.259-py3-none-win_amd64.whl", hash = "sha256:aa9449b898287e621942cc71b9327eceb8f0c357e4065fecefb707ef2d978df8"}, - {file = "ruff-0.0.259-py3-none-win_arm64.whl", hash = "sha256:e4f39e18702de69faaaee3969934b92d7467285627f99a5b6ecd55a7d9f5d086"}, - {file = "ruff-0.0.259.tar.gz", hash = "sha256:8b56496063ab3bfdf72339a5fbebb8bd46e5c5fee25ef11a9f03b208fa0562ec"}, + {file = "ruff-0.0.260-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:c559650b623f3fbdc39c7ed1bcb064765c666a53ee738c53d1461afbf3f23db2"}, + {file = "ruff-0.0.260-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:90ff1479e292a84c388a8a035d223247ddeea5f6760752a9142b88b6d59ac334"}, + {file = "ruff-0.0.260-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:25584d1b9f445fde72651caab97e7430a4c5bfd2a0ce9af39868753826cba10d"}, + {file = "ruff-0.0.260-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8032e35357384a29791c75194a71e314031171eb0731fcaa872dfaf4c1f4470a"}, + {file = "ruff-0.0.260-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e4fa7293f97c021825b3b72f2bf53f0eb4f59625608a889678c1fc6660f412d"}, + {file = "ruff-0.0.260-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:8bec0271e2c8cd36bcf915cb9f6a93e40797a3ff3d2cda4ca87b7bed9e598472"}, + {file = "ruff-0.0.260-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3e075a61aaff8ebe56172217f0ac14c5df9637b289bf161ac697445a9003d5c2"}, + {file = "ruff-0.0.260-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f8678f54eb2696481618902a10c3cb28325f3323799af99997ad6f06005ea4f5"}, + {file = "ruff-0.0.260-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:57d9f0bfdef739b76aa3112b9182a214f0f34589a2659f88353492c7670fe2fe"}, + {file = "ruff-0.0.260-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:3ec1f77219ba5adaa194289cb82ba924ff2ed931fd00b8541d66a1724c89fbc9"}, + {file = "ruff-0.0.260-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:aae2170a7ec6f7fc4a73db30aa7aa7fce936176bf66bf85f77f69ddd1dd4a665"}, + {file = "ruff-0.0.260-py3-none-musllinux_1_2_i686.whl", hash = "sha256:5f847b72ef994ab88e9da250c7eb5cbb3f1555b92a9f22c5ed1c27a44b7e98d6"}, + {file = "ruff-0.0.260-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:6dd705d4eff405c2b70513188fbff520f49db6df91f0d5e8258c5d469efa58bc"}, + {file = "ruff-0.0.260-py3-none-win32.whl", hash = "sha256:3866a96b2ef92c7d837ba6bf8fc9dd125a67886f1c5512ad6fa5d5fefaceff87"}, + {file = "ruff-0.0.260-py3-none-win_amd64.whl", hash = "sha256:0733d524946decbd4f1e63f7dc26820f5c1e6c31da529ba20fb995057f8e79b1"}, + {file = "ruff-0.0.260-py3-none-win_arm64.whl", hash = "sha256:12542a26f189a5a10c719bfa14d415d0511ac05e5c9ff5e79cc9d5cc50b81bc8"}, + {file = "ruff-0.0.260.tar.gz", hash = "sha256:ea8f94262f33b81c47ee9d81f455b144e94776f5c925748cb0c561a12206eae1"}, ] [[package]] @@ -4077,4 +4077,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "2.0" python-versions = ">=3.8.1,<4.0" -content-hash = "d262cdfaa5f5ddb156180ea2302918b0743c171eb4fa5e6899f03f6c7ab3e4a3" +content-hash = "e890862398264672a03751c20463cb4f89762c8e6cc8c94590d0af040c0a22e6" diff --git a/pyproject.toml b/pyproject.toml index fbccddf..fb3e21e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,6 +44,7 @@ Changelog = "https://github.com/MC-kit/xpypact/releases" [tool.poetry.dependencies] python = ">=3.8.1,<4.0" +duckdb = ">=0.7.1" h5netcdf = ">=0.13.1" mckit-nuclides = {version = ">=0.1.1", allow-prereleases = true} numpy = ">=1.24.2" @@ -52,7 +53,6 @@ orjson = ">=3.6.7" pandas = ">=1.4.1" xarray = ">=2022.3.0" multipledispatch = ">=0.6.0" -duckdb = "^0.7.1" [tool.poetry.group.dev.dependencies] Pygments = ">=2.10.0" @@ -248,7 +248,7 @@ omit = ["*_tab.py", "**/__init__.py"] show_missing = true skip_covered = true fail_under = 100 -omit = ["*_tab.py", "**/__init__.py"] +omit = ["*_tab.py", "**/__init__.py", "**/types.py"] # Regexes for lines to exclude from consideration exclude_lines = [ # Have to re-enable the standard pragma @@ -262,6 +262,7 @@ exclude_lines = [ # Don't complain if non-runnable code isn't run: "if 0:", "if __name__ == .__main__.:", + "if TYPE_CHECKING:", ] ignore_errors = true sort = "Cover" @@ -379,30 +380,52 @@ deprecated-modules=["six"] target-version = "py38" #see full list: https://beta.ruff.rs/docs/rules/#pyflakes-f select= [ - "A", - "B", - "C", - "D", - "E", - "F", - "G", - "I", - "N", - "PIE", - "PT", - "PL", - "PLC", - "PLE", - "PLR", - "PLW", - "PYI", - "Q", - "R", - "S", - "T", - "U", - "W", - "YTT" + "A", # flake8-builtins + "ANN", # flake8-annotations + "ARG", # flake8-unused-arguments + "B", # flake8-bugbear + "BLE", # flake8-blind-except + "C4", # flake8-comprehensions + "C90", # mccabe + "COM", # flake8-commas + "DJ", # flake8-django + "D", # pydocstyle + "DTZ", # flake8-datetimez + "EM", # flake8-errmsg + "ERA", # eradicate + "E", # pycodestyle + "EXE", # flake8-executable + "FBT", # flake8-boolean-trap + "F", # Pyflakes + "G", # flake8-logging-format + "ICN", # flake8-import-conventions + "I", # isort + "INP", # flake8-no-pep420 + "ISC", # flake8-implicit-str-concat + "N", # pep8-naming + "NPY", # NumPy-specific rules + "PD", # pandas-vet + "PGH", # pygrep-hooks + "PIE", # flake8-pie + "PL", # Pylint + "PT", # flake8-pytest-style + "PTH", # flake8-use-pathlib + "PYI", # flake8-pyi + "Q", # flake8-quotes + "RET", # flake8-return + "RSE", # flake8-raise + "RUF", # Ruff-specific rules + "S", # flake8-bandit + "SIM", # flake8-simplify + "SLF", # flake8-self + "T10", # flake8-debugger + "T20", # flake8-print + "TCH", # flake8-type-checking + "TID", # flake8-tidy-imports + "TRY", # tryceratops + "UP", # pyupgrade + "W", # pycodestyle 2 + "YTT", # flake8-2020 ] # Ignore rules that currently fail on the codebase @@ -419,8 +442,8 @@ ignore = [ "D107", # Missing docstring in __init__ # "E203", # E203: Whitespace before ‘:' # "E401", # Multiple imports on one line - "E402", # Module level import not at top of file - "E501", # Line too long ( > 100 characters) + # "E402", # Module level import not at top of file + # "E501", # Line too long ( > 100 characters) # "E701", # Multiple statements on one line (colon) # "E702", # Multiple statements on one line (semicolon) # "E703", # Statement ends with an unnecessary semicolon diff --git a/src/xpypact/dao/api.py b/src/xpypact/dao/api.py index aafbe92..65b19de 100644 --- a/src/xpypact/dao/api.py +++ b/src/xpypact/dao/api.py @@ -1,6 +1,90 @@ """Interface to data access facilities.""" from __future__ import annotations +from typing import TYPE_CHECKING -class DataAccessInterface: +from abc import ABC, abstractmethod + +if TYPE_CHECKING: + import pandas as pd + import xarray as xr + + +class DataAccessInterface(ABC): """Abstract DAO.""" + + @abstractmethod + def __enter__(self): + """Use DAO as context manager.""" + + @abstractmethod + def __exit__(self, exc_type, exc_val, exc_tb): + """Use DAO as context manager.""" + + @abstractmethod + def get_tables_info(self) -> pd.DataFrame: + """Get information on tables in schema.""" + + @abstractmethod + def create_schema(self) -> None: + """Create tables to store xpypact dataset. + + Retain existing tables. + """ + + @abstractmethod + def drop_schema(self) -> None: + """Drop our DB objects.""" + + @abstractmethod + def save(self, ds: xr.Dataset, material_id=1, case_id="") -> None: + """Save xpypact dataset to database. + + Args: + ds: xpypact dataset to save + material_id: additional key to distinguish multiple FISPACT run + case_id: second additional key + """ + + @abstractmethod + def load_rundata(self) -> pd.DataFrame: + """Load FISPACT run data as table. + + Returns: + FISPACT run data + """ + + @abstractmethod + def load_nuclides(self) -> pd.DataFrame: + """Load nuclide table. + + Returns: + time nuclide + """ + + @abstractmethod + def load_time_steps(self) -> pd.DataFrame: + """Load time step table. + + Returns: + time step table + """ + + @abstractmethod + def load_time_step_nuclides(self) -> pd.DataFrame: + """Load time step x nuclides table. + + Returns: + time step x nuclides table + """ + + @abstractmethod + def load_gamma(self, time_step_number: int | None = None) -> pd.DataFrame: + """Load time step x gamma table. + + Args: + time_step_number: filter for time_step_number + + Returns: + time step x gamma table + """ diff --git a/src/xpypact/dao/duckdb/implementation.py b/src/xpypact/dao/duckdb/implementation.py index ea40b41..0e4bdb4 100644 --- a/src/xpypact/dao/duckdb/implementation.py +++ b/src/xpypact/dao/duckdb/implementation.py @@ -1,17 +1,21 @@ """Code to implement DuckDB DAO.""" from __future__ import annotations +from typing import TYPE_CHECKING, cast + from dataclasses import dataclass, field from pathlib import Path import duckdb as db -import pandas as pd -import xarray as xr from xpypact import get_gamma, get_nuclides, get_run_data, get_time_steps, get_timestep_nuclides +from xpypact.dao import DataAccessInterface from xpypact.utils.resource import path_resolver -from ...dao import DataAccessInterface +if TYPE_CHECKING: + + import pandas as pd + import xarray as xr # noinspection SqlNoDataSourceInspection @@ -40,7 +44,7 @@ def __enter__(self): def __exit__(self, exc_type, exc_val, exc_tb): self.con.close() - def get_tables_info(self): + def get_tables_info(self) -> pd.DataFrame: """Get information on tables in schema.""" return self.con.execute("select * from information_schema.tables").df() @@ -49,11 +53,11 @@ def create_schema(self) -> None: Retain existing tables. """ - sql_path: Path = path_resolver(__package__)("create_schema.sql") + sql_path: Path = cast(Path, path_resolver(__package__)("create_schema.sql")) sql = sql_path.read_text(encoding="utf-8") self.con.execute(sql) - def drop_schema(self): + def drop_schema(self) -> None: """Drop our DB objects.""" tables = [ "timestep_nuclide", @@ -111,7 +115,7 @@ def load_time_step_nuclides(self) -> pd.DataFrame: """ return self.con.execute("select * from timestep_nuclide").df() - def load_gamma(self, time_step_number: int = None) -> pd.DataFrame: + def load_gamma(self, time_step_number: int | None = None) -> pd.DataFrame: """Load time step x gamma table. Args: @@ -157,9 +161,11 @@ def _save_gamma(self, ds: xr.Dataset, material_id=1, case_id=""): def _add_material_and_case_columns( - table: pd.DataFrame, material_id: int, case_id: str + table: pd.DataFrame, + material_id: int, + case_id: str, ) -> pd.DataFrame: - columns = table.columns.values + columns = table.columns.to_numpy() table["material_id"] = material_id table["case_id"] = case_id new_columns = ["material_id", "case_id"] diff --git a/src/xpypact/data_arrays.py b/src/xpypact/data_arrays.py index b25506c..7bc57c7 100644 --- a/src/xpypact/data_arrays.py +++ b/src/xpypact/data_arrays.py @@ -18,7 +18,6 @@ from typing import TYPE_CHECKING, Any, Literal, TextIO, cast from functools import reduce -from pathlib import Path import numpy as np @@ -30,12 +29,11 @@ from mckit_nuclides.elements import ELEMENTS_TABLE from mckit_nuclides.nuclides import NUCLIDES_TABLE from xarray.core.accessor_dt import DatetimeAccessor -from xpypact.inventory import Inventory from xpypact.inventory import from_json as inventory_from_json -from xpypact.time_step import TimeStep -from xpypact.utils.types import MayBePath if TYPE_CHECKING: # pragma: no cover + from pathlib import Path + try: from dask.delayed import Delayed except ImportError: @@ -45,6 +43,10 @@ except ImportError: DaskDataFrame = None + from xpypact.inventory import Inventory + from xpypact.time_step import TimeStep + from xpypact.utils.types import MayBePath + SCALABLE_COLUMNS = [ "total_mass", "total_heat", @@ -80,7 +82,9 @@ def _make_nuclide_var(getter, nuclides, dtype=float) -> tuple[str, ArrayLike]: def _make_time_step_and_nuclide_var( - getter, nuclides, dtype=float + getter, + nuclides, + dtype=float, ) -> tuple[tuple[str, str], ArrayLike]: _data = np.fromiter(map(getter, nuclides), dtype=dtype) return ("time_step_number", "nuclide"), _data.reshape(1, _data.size) @@ -111,13 +115,16 @@ def _add_time_step_record(_ds: xr.Dataset, ts: TimeStep) -> xr.Dataset: "nuclide_grams": _make_time_step_and_nuclide_var(lambda n: n.grams, ts.nuclides), "nuclide_activity": _make_time_step_and_nuclide_var(lambda n: n.activity, ts.nuclides), "nuclide_alpha_activity": _make_time_step_and_nuclide_var( - lambda n: n.alpha_activity, ts.nuclides + lambda n: n.alpha_activity, + ts.nuclides, ), "nuclide_beta_activity": _make_time_step_and_nuclide_var( - lambda n: n.beta_activity, ts.nuclides + lambda n: n.beta_activity, + ts.nuclides, ), "nuclide_gamma_activity": _make_time_step_and_nuclide_var( - lambda n: n.gamma_activity, ts.nuclides + lambda n: n.gamma_activity, + ts.nuclides, ), "nuclide_heat": _make_time_step_and_nuclide_var(lambda n: n.heat, ts.nuclides), "nuclide_alpha_heat": _make_time_step_and_nuclide_var(lambda n: n.alpha_heat, ts.nuclides), @@ -252,7 +259,8 @@ def get_atomic_numbers(ds: xr.Dataset) -> ArrayLike: def add_atomic_number_coordinate( - ds: xr.Dataset, coordinate_name: str = "atomic_number" + ds: xr.Dataset, + coordinate_name: str = "atomic_number", ) -> xr.Dataset: """Add coordinate for Z. diff --git a/src/xpypact/data_frames.py b/src/xpypact/data_frames.py index b6a5a3b..f092ffd 100644 --- a/src/xpypact/data_frames.py +++ b/src/xpypact/data_frames.py @@ -4,9 +4,12 @@ """ from __future__ import annotations +from typing import TYPE_CHECKING + import pandas as pd -from xarray import Dataset +if TYPE_CHECKING: + from xarray import Dataset def get_run_data(ds: Dataset) -> pd.DataFrame: @@ -25,7 +28,7 @@ def get_run_data(ds: Dataset) -> pd.DataFrame: "flux_name": ds.attrs["flux_name"], "dose_rate_type": ds.attrs["dose_rate_type"], "dose_rate_distance": ds.attrs["dose_rate_distance"], - } + }, ) @@ -81,7 +84,7 @@ def get_time_steps(ds: Dataset) -> pd.DataFrame: "total_ingest1ion_dose": "ingest1ion_dose", "total_inhalation_dose": "inhalation_dose", "total_dose_rate": "dose_rate", - } + }, ) ) @@ -133,12 +136,7 @@ def get_timestep_nuclides(ds: Dataset) -> pd.DataFrame: "nuclide_ingestion", "nuclide_inhalation", ] - columns_all = [ - "time_step_number", - "element", - "mass_number", - "state", - ] + columns + columns_all = ["time_step_number", "element", "mass_number", "state", *columns] return ( ds[columns] @@ -160,7 +158,7 @@ def get_timestep_nuclides(ds: Dataset) -> pd.DataFrame: "nuclide_dose": "dose", "nuclide_ingestion": "ingestion", "nuclide_inhalation": "inhalation", - } + }, ) ) diff --git a/src/xpypact/fluxes.py b/src/xpypact/fluxes.py index 3714500..c8695f2 100644 --- a/src/xpypact/fluxes.py +++ b/src/xpypact/fluxes.py @@ -1,9 +1,8 @@ """The Class to represent FISPACT fluxes file content.""" from __future__ import annotations -from typing import TextIO, cast +from typing import TYPE_CHECKING, TextIO, cast -from collections.abc import Callable from dataclasses import dataclass from io import StringIO, TextIOBase from pathlib import Path @@ -14,10 +13,14 @@ from multipledispatch import dispatch from xpypact.utils.io import print_cols -from xpypact.utils.types import NDArrayFloat FISPACT_709_BINS_NUMBER = 709 +if TYPE_CHECKING: + from collections.abc import Callable + + from xpypact.utils.types import NDArrayFloat + # pylint: disable=function-redefined LAST_TWO_DECADES = np.fromstring( @@ -174,10 +177,11 @@ def __post_init__(self) -> None: ValueError: if sizes of bins and fluxes are not compatible. """ if self.fluxes.size != self.energy_bins.size - 1: - raise ValueError( + msg = ( "Incompatible sizes of bins and fluxes, " - f"{self.fluxes.size} and {self.energy_bins.size}" + f"{self.fluxes.size} and {self.energy_bins.size}", ) + raise ValueError(msg) @property def total(self) -> float: @@ -264,7 +268,7 @@ def are_fluxes_close( b: Fluxes, rtol: float = 1.0e-5, atol: float = 1.0e-8, - equal_nan: bool = False, + equal_nan: bool = False, # noqa: FBT - not worse than in allclose() ) -> bool: """Compare data of fluxes approximately. @@ -426,7 +430,7 @@ def define_arb_bins_and_fluxes(data: NDArrayFloat) -> tuple[NDArrayFloat, NDArra """ sz = data.size if sz & 1 == 0: - raise ArbitraryFluxesDataSizeError() + raise ArbitraryFluxesDataSizeError bins_end = sz // 2 + 1 energy_bins = data[:bins_end] fluxes = data[bins_end:] @@ -452,24 +456,19 @@ def define_709_bins_and_fluxes(data: NDArrayFloat) -> tuple[NDArrayFloat, NDArra StandardFluxesDataSizeError: if size of data is not 709. """ if data.size != FISPACT_709_BINS_NUMBER: - raise StandardFluxesDataSizeError() + raise StandardFluxesDataSizeError return FISPACT_709_BINS, data[::-1] -def print_fluxes(fluxes: Fluxes, fid: TextIO, arbitrary: bool, max_columns: int = 5) -> None: - """Print fluxes for FISPACT. +def _print_bin_values(fluxes: Fluxes, fid: TextIO, max_columns: int = 5) -> None: + """Print fluxes bins for FISPACT. Args: - fluxes: to print + fluxes: to print bins from fid: a stream to print to arbitrary: if True - arbitrary, otherwise 709 max_columns: max columns in output """ - if arbitrary: - sequence = fluxes.energy_bins[::-1] - column = print_cols(sequence, fid, max_columns, fmt="{:.6e}") - if column != 0: - print(file=fid) sequence = fluxes.fluxes[::-1] column = print_cols(sequence, fid, max_columns, fmt="{:.5e}") if column != 0: @@ -494,8 +493,8 @@ def print_709_fluxes(fluxes: Fluxes, fid: TextIO, max_columns: int = 7) -> None: NotA709Error: if not a valid 709 group "Fluxes" object is provided. """ if not is_709_fluxes(fluxes): - raise NotA709Error() - print_fluxes(fluxes, fid, False, max_columns) + raise NotA709Error + _print_bin_values(fluxes, fid, max_columns) def print_arbitrary_fluxes(fluxes: Fluxes, fid: TextIO, max_columns: int = 5) -> None: @@ -506,4 +505,8 @@ def print_arbitrary_fluxes(fluxes: Fluxes, fid: TextIO, max_columns: int = 5) -> fid: output stream max_columns: max number of columns in a row """ - print_fluxes(fluxes, fid, True, max_columns) + sequence = fluxes.energy_bins[::-1] + column = print_cols(sequence, fid, max_columns, fmt="{:.6e}") + if column != 0: + print(file=fid) + _print_bin_values(fluxes, fid, max_columns) diff --git a/src/xpypact/inventory.py b/src/xpypact/inventory.py index 4f4e097..e3d1d7c 100644 --- a/src/xpypact/inventory.py +++ b/src/xpypact/inventory.py @@ -1,14 +1,13 @@ """Classes to load information from FISPACT output JSON file.""" from __future__ import annotations -from typing import Any, cast +from typing import TYPE_CHECKING, Any, cast -import io +import io # noqa: TCH003 - needed for dispatch -from collections.abc import Callable, Iterable from dataclasses import dataclass from functools import singledispatch -from pathlib import Path +from pathlib import Path # noqa: TCH003 - needed for dispatch import numpy as np @@ -16,7 +15,12 @@ from xpypact.run_data import RunData from xpypact.time_step import TimeStep -from xpypact.utils.types import NDArrayFloat + +if TYPE_CHECKING: + + from collections.abc import Callable, Iterable + + from xpypact.utils.types import NDArrayFloat FLOAT_ZERO = 0.0 @@ -60,7 +64,7 @@ def json_inventory_data_mapper(jts: dict[str, Any]) -> TimeStep: if duration == FLOAT_ZERO: duration = ts.cooling_time - prev_cooling_time if duration < FLOAT_ZERO: - raise InventoryNonMonotonicTimesError() # pragma: no cover + raise InventoryNonMonotonicTimesError # pragma: no cover ts.duration = duration prev_elapsed_time = ts.elapsed_time = prev_elapsed_time + duration if duration == FLOAT_ZERO: diff --git a/src/xpypact/nuclide.py b/src/xpypact/nuclide.py index caaec6c..6fc6ecf 100644 --- a/src/xpypact/nuclide.py +++ b/src/xpypact/nuclide.py @@ -5,8 +5,6 @@ from dataclasses import dataclass -FLOAT_ZERO = 0.0 - try: from scipy.constants import Avogadro except ImportError: # pragma: no cover @@ -17,6 +15,8 @@ __all__ = ["Avogadro", "Nuclide"] +FLOAT_ZERO = 0.0 + @dataclass class Nuclide: # pylint: disable=too-many-instance-attributes @@ -48,7 +48,7 @@ def __post_init__(self) -> None: self.zai = _z * 10000 + self.isotope * 10 if self.state: self.zai += 1 - if self.atoms == FLOAT_ZERO and FLOAT_ZERO < self.grams: + if self.atoms == FLOAT_ZERO and self.grams > FLOAT_ZERO: self.atoms = Avogadro * self.grams / get_nuclide_mass(_z, self.isotope) @property diff --git a/src/xpypact/time_step.py b/src/xpypact/time_step.py index 7cc3340..bea6e8b 100644 --- a/src/xpypact/time_step.py +++ b/src/xpypact/time_step.py @@ -1,14 +1,16 @@ """Classes to read a FISPACT time step attributes from JSON.""" from __future__ import annotations -from typing import Any +from typing import TYPE_CHECKING, Any from dataclasses import dataclass, field import numpy as np from xpypact.nuclide import Nuclide -from xpypact.utils.types import NDArrayFloat + +if TYPE_CHECKING: + from xpypact.utils.types import NDArrayFloat # pragma: no cover FLOAT_ZERO = 0.0 @@ -82,7 +84,6 @@ class TimeStep: # pylint: disable=too-many-instance-attributes duration: float = 0.0 elapsed_time: float = 0.0 flux: float = 0.0 - # TODO dvp: compute the values in case of FISPACT v.4 to maintain same logic. total_atoms: float = 0.0 # FISPACT 5.0 total_activity: float = 0.0 # -/- alpha_activity: float = 0.0 # -/- @@ -99,7 +100,7 @@ class TimeStep: # pylint: disable=too-many-instance-attributes nuclides: list[Nuclide] = field(default_factory=list) gamma_spectrum: GammaSpectrum | None = None - def __post_init__(self) -> None: # noqa: ignore[CAC001] + def __post_init__(self) -> None: """Correct data missed in FISPACT-4.""" # workarounds for FISPACT v.4 if self.total_mass == FLOAT_ZERO: @@ -146,10 +147,7 @@ def from_json(cls, json_dict: dict[str, Any]) -> TimeStep: json_dose_rate = json_dict.pop("dose_rate") dose_rate = DoseRate(**json_dose_rate) json_nuclides = json_dict.pop("nuclides") - if json_nuclides: - nuclides = [Nuclide.from_json(n) for n in json_nuclides] - else: - nuclides = [] # pragma: no cover + nuclides = [Nuclide.from_json(n) for n in json_nuclides] if json_nuclides else [] json_gamma_spectrum = json_dict.pop("gamma_spectrum", None) if json_gamma_spectrum: gamma_spectrum = GammaSpectrum.from_json(json_gamma_spectrum) diff --git a/src/xpypact/utils/io.py b/src/xpypact/utils/io.py index b88aa19..33bca1c 100644 --- a/src/xpypact/utils/io.py +++ b/src/xpypact/utils/io.py @@ -1,15 +1,19 @@ """Output utilities.""" from __future__ import annotations -from typing import Any, TextIO +from typing import TYPE_CHECKING, Any, TextIO import sys -from collections.abc import Iterable +if TYPE_CHECKING: + from collections.abc import Iterable def print_cols( - seq: Iterable[Any], fid: TextIO = sys.stdout, max_columns: int = 6, fmt: str = "{}" + seq: Iterable[Any], + fid: TextIO = sys.stdout, + max_columns: int = 6, + fmt: str = "{}", ) -> int: """Print sequence in columns. @@ -22,10 +26,10 @@ def print_cols( Returns: int: the number of the last column printed on the last row """ - i = 0 # noqa: ignore[SIM113] + i = 0 for s in seq: print(fmt.format(s), file=fid, end="") - if (0 < i) and (i % max_columns == 0): + if (i > 0) and (i % max_columns == 0): print(file=fid) else: print(" ", file=fid, end="") diff --git a/src/xpypact/utils/resource.py b/src/xpypact/utils/resource.py index d5b65f6..1719fe8 100644 --- a/src/xpypact/utils/resource.py +++ b/src/xpypact/utils/resource.py @@ -1,16 +1,20 @@ """Utility methods to access a package data.""" from __future__ import annotations -import sys +from typing import TYPE_CHECKING -from collections.abc import Callable -from pathlib import Path +import sys if sys.version_info >= (3, 9): - from importlib.abc import Traversable - from importlib.resources import Package, files + from importlib.resources import files else: - from importlib_resources import files + from importlib_resources import files # pragma: no cover + +if TYPE_CHECKING: + from collections.abc import Callable + from importlib.abc import Traversable + from importlib.resources import Package + from pathlib import Path def path_resolver(package: Package) -> Callable[[str], Path | Traversable]: diff --git a/src/xpypact/utils/types.py b/src/xpypact/utils/types.py index 6b62e7e..2b7b496 100644 --- a/src/xpypact/utils/types.py +++ b/src/xpypact/utils/types.py @@ -10,6 +10,5 @@ from numpy.typing import NDArray MayBePath = Union[str, os.PathLike, None] - NDArrayFloat = NDArray[np.float_] NDArrayInt = NDArray[np.int_] diff --git a/tests/conftest.py b/tests/conftest.py index 3823a43..6a46923 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import cast + import bz2 import os @@ -18,7 +20,7 @@ def data() -> Path: Returns: Path to tests/data directory """ - return path_resolver("tests")("data") + return cast(Path, path_resolver("tests")("data")) @pytest.fixture() diff --git a/tests/test_data_arrays.py b/tests/test_data_arrays.py index 7450099..3755d37 100644 --- a/tests/test_data_arrays.py +++ b/tests/test_data_arrays.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import cast +from typing import TYPE_CHECKING, cast from copy import deepcopy @@ -10,11 +10,13 @@ import pandas as pd import pytest -import xarray as xr import xpypact.data_arrays as da from xpypact.inventory import Inventory, from_json +if TYPE_CHECKING: + import xarray as xr + @pytest.fixture(scope="module") def inventory(data) -> Inventory: @@ -76,7 +78,8 @@ def test_atomic_masses_column(ds: xr.Dataset) -> None: assert argentum.element == "Ag" a = argentum.a assert a.item() == pytest.approx( - 110.905, rel=1e-4 + 110.905, + rel=1e-4, ), " the Ag atomic mass is to be about 110.905" @@ -147,7 +150,7 @@ def test_scale_by_flux_on_dose_rate(ds): assert_equal(actual.attrs, ds.attrs) -def test_net_cdf_writing(cd_tmpdir, ds): +def test_net_cdf_writing(cd_tmpdir, ds): # noqa: ARG001 assert ds.total_dose_rate is not None da.save_nc(ds, "Ag-1.nc") actual = da.load_nc("Ag-1.nc") @@ -156,7 +159,7 @@ def test_net_cdf_writing(cd_tmpdir, ds): assert actual.total_dose_rate.attrs["units"] == "Sv/h" -def test_net_cdf_writing_with_group_and_appending(cd_tmpdir, ds): +def test_net_cdf_writing_with_group_and_appending(cd_tmpdir, ds): # noqa: ARG001 group = "some-group" assert ds.total_dose_rate is not None da.save_nc(ds, "Ag-1.nc", mode="a", group=group) @@ -169,7 +172,8 @@ def test_net_cdf_writing_with_group_and_appending(cd_tmpdir, ds): def test_inventory_with_gamma(dataset_with_gamma): assert dataset_with_gamma.gamma is not None assert dataset_with_gamma.gamma.sel( - time_step_number=2, gamma_boundaries=1.0 + time_step_number=2, + gamma_boundaries=1.0, ).item() == pytest.approx(17857.24443195) diff --git a/tests/test_data_frames.py b/tests/test_data_frames.py index 0637dfc..7c10492 100644 --- a/tests/test_data_frames.py +++ b/tests/test_data_frames.py @@ -1,8 +1,9 @@ from __future__ import annotations +from typing import TYPE_CHECKING + import pandas as pd import pytest -import xarray as xr import xpypact.data_arrays as da from xpypact.data_frames import ( @@ -12,7 +13,12 @@ get_time_steps, get_timestep_nuclides, ) -from xpypact.inventory import Inventory, from_json +from xpypact.inventory import from_json + +if TYPE_CHECKING: + import xarray as xr + + from xpypact.inventory import Inventory @pytest.fixture(scope="module") @@ -49,7 +55,7 @@ def test_get_nuclides(ds): def test_get_timestep_nuclides(ds): timestep_nuclides = get_timestep_nuclides(ds) timestep_nuclides = timestep_nuclides.set_index( - ["time_step_number", "element", "mass_number", "state"] + ["time_step_number", "element", "mass_number", "state"], ) assert timestep_nuclides.loc[2, "H", 1, ""].grams == 0.11468776343339874e-10 diff --git a/tests/test_duckdb_dao.py b/tests/test_duckdb_dao.py index e8182fe..b34dd82 100644 --- a/tests/test_duckdb_dao.py +++ b/tests/test_duckdb_dao.py @@ -10,19 +10,19 @@ def test_ddl(tmp_path): with DataAccessObject(tmp_path / "test-ddl.duckdb") as dao: tables = dao.get_tables_info() - assert 5 == len(tables) + assert len(tables) == 5 table_names = tables["table_name"] for name in ["rundata", "timestep", "nuclide", "timestep_nuclide", "timestep_gamma"]: - assert name in table_names.values + assert name in table_names.to_numpy() dao.drop_schema() tables = dao.get_tables_info() - assert 0 == len(tables) + assert len(tables) == 0 dao.create_schema() tables = dao.get_tables_info() - assert 5 == len(tables) + assert len(tables) == 5 with DataAccessObject(tmp_path / "test-ddl.duckdb", read_only=True) as dao: tables = dao.get_tables_info() - assert 5 == len(tables) + assert len(tables) == 5 with pytest.raises(InvalidInputException, match="Cannot execute statement"): dao.drop_schema() @@ -43,7 +43,12 @@ def test_save(dataset_with_gamma): time_step_nuclides = dao.load_time_step_nuclides() assert not time_step_nuclides.empty time_step_nuclides = time_step_nuclides.set_index( - ["time_step_number", "element", "mass_number", "state"] + [ + "time_step_number", + "element", + "mass_number", + "state", + ], ) assert not time_step_nuclides.loc[2, "Cu"].empty gamma = dao.load_gamma() diff --git a/tests/test_fluxes.py b/tests/test_fluxes.py index fafe5e1..1e4f8dc 100644 --- a/tests/test_fluxes.py +++ b/tests/test_fluxes.py @@ -47,10 +47,8 @@ def test_flux_constructor(): assert flux.norm == 2.0 assert not is_709_fluxes(flux) assert are_fluxes_close(flux, flux) - with pytest.raises(ValueError, match="Incompatible sizes of bins and fluxes") as exc_info: + with pytest.raises(ValueError, match="Incompatible sizes of bins and fluxes"): Fluxes(ebins[:-2], bins, "test") - assert exc_info.type == ValueError - assert exc_info.value.args[0].startswith("Incompatible sizes of bins and fluxes") ebins, bins = define_709_bins_and_fluxes(np.ones(709, dtype=float)) f709 = Fluxes(ebins, bins, "test 709") assert f709.total == 709 @@ -157,7 +155,8 @@ def test_print_arbitrary_fluxes(data, arb_flux_1): def test_define_arb_flux_fail(): data = np.linspace(1, 10, 4) with pytest.raises( - ValueError, match="The number of float values from arb_flux file should be odd." + ValueError, + match="The number of float values from arb_flux file should be odd.", ): define_arb_bins_and_fluxes(data) diff --git a/tests/test_inventory.py b/tests/test_inventory.py index 30d3b3c..375aef5 100644 --- a/tests/test_inventory.py +++ b/tests/test_inventory.py @@ -1,14 +1,19 @@ """Test loading Inventory from FISPACT JSON file.""" from __future__ import annotations +from typing import TYPE_CHECKING + import bz2 import pytest -from xpypact.inventory import Inventory, RunDataCorrected, from_json # extract_times, +from xpypact.inventory import Inventory, from_json from xpypact.run_data import RunData from xpypact.time_step import DoseRate, TimeStep +if TYPE_CHECKING: + from xpypact.inventory import RunDataCorrected + SECONDS_PER_YEAR = int(365.24 * 24 * 3600) diff --git a/tests/test_package.py b/tests/test_package.py index 13f6600..826934f 100644 --- a/tests/test_package.py +++ b/tests/test_package.py @@ -32,5 +32,5 @@ def test_package(): """This test checks if only current version is installed in working environment.""" version = find_version_from_project_toml() assert __version__ == normalize_version( - version + version, ), "Run 'poetry install' and, if this doesn't help, run `tools/clear-prev-dist-info.py`" diff --git a/tests/test_run_data.py b/tests/test_run_data.py index 8a78c4d..ea23df3 100644 --- a/tests/test_run_data.py +++ b/tests/test_run_data.py @@ -20,7 +20,7 @@ run_name="* Material Ag, fluxes 1", flux_name="55.F9.10 11-L2-02W HFS_GLRY_08_U", ), - ) + ), ], ) def test_from_json(inp, expected): diff --git a/tests/utils/test_resource.py b/tests/utils/test_resource.py index 5df5a80..8c1dc99 100644 --- a/tests/utils/test_resource.py +++ b/tests/utils/test_resource.py @@ -24,13 +24,13 @@ def test_path_resolver(package, resource, expected) -> None: @pytest.mark.parametrize( - ["package", "resource", "expected"], + ["package", "resource"], [ - ("tests", "data/not_existing", "tests/data/not_existing"), - ("xpypact", "data/not_existing", "xpypact/data/not_existing"), + ("tests", "data/not_existing"), + ("xpypact", "data/not_existing"), ], ) -def test_path_resolver_when_resource_doesnt_exist(package, resource, expected) -> None: +def test_path_resolver_when_resource_doesnt_exist(package, resource) -> None: resolver = path_resolver(package) actual = resolver(resource) assert not Path(actual).exists(), f"The resource {resource!r} should not be available" From c52b863c9c42937387c13b85a02443398b54c09e Mon Sep 17 00:00:00 2001 From: dvp Date: Sun, 2 Apr 2023 17:33:22 +0300 Subject: [PATCH 31/32] build: sync with mckit-nuclides similar files --- .pre-commit-config.yaml | 6 +----- pyproject.toml | 5 +++-- tests/test_fluxes.py | 6 +++--- tests/test_run_data.py | 2 +- tests/utils/test_resource.py | 4 ++-- tools/reset-pyenv | 8 +++++--- 6 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c0b3dd7..aac2609 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -83,16 +83,12 @@ repos: types: [python] exclude: ^notebooks # Lint - # - id: flake8 - # name: flake8 - # entry: poetry run flake8 - # language: system - # types: [python] - id: ruff name: ruff entry: poetry run ruff --force-exclude --fix --config pyproject.toml language: system types: [python] + exclude: ^notebooks # Also code format the docs # - id: blacken-docs # name: blacken-docs diff --git a/pyproject.toml b/pyproject.toml index fb3e21e..579d87c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -476,8 +476,9 @@ ignore = [ # "PD005", # use operator instead of method # "PD008", # We use at() to access single values # "PD009", # And we use iat() - # "W503", # Line break before binary operator: for compatibility with black settings "PT019", # Fixture `_bin` without value is injected as parameter (false positive?) + + # "W503", # Line break before binary operator: for compatibility with black settings ] # Same as Black. @@ -531,7 +532,7 @@ required-imports = ["from __future__ import annotations"] [tool.ruff.flake8-pytest-style] -parametrize-names-type = "list" +parametrize-names-type = "csv" [tool.ruff.pydocstyle] # Use Google-style docstrings. diff --git a/tests/test_fluxes.py b/tests/test_fluxes.py index 1e4f8dc..64fbbaa 100644 --- a/tests/test_fluxes.py +++ b/tests/test_fluxes.py @@ -59,7 +59,7 @@ def test_flux_constructor(): @pytest.mark.parametrize( - ["_bin", "expected_e0", "expected_e1", "expected_flux"], + "_bin,expected_e0,expected_e1,expected_flux", [ (0, 1e-5, 1e6, 1), (1, 1e6, 1e7, 90), @@ -93,7 +93,7 @@ def assert_one(_: Any, f: Any) -> Any: @pytest.mark.parametrize( - ["_bin", "expected_e0", "expected_e1", "expected_flux"], + "_bin,expected_e0,expected_e1,expected_flux", [ (0, 1.1e-5, 0.25, 3.600000e05), (6, 7.800000e06, 1.410000e07, 2.870000e03), @@ -114,7 +114,7 @@ def fluxes_1(data): @pytest.mark.parametrize( - ["_bin", "expected_e0", "expected_e1", "expected_flux"], + "_bin,expected_e0,expected_e1,expected_flux", [ (0, 1e-5, 1.0471e-5, 1.8182e-3), (1, 1.0471e-5, 1.0965e-5, 1.8182e-3), diff --git a/tests/test_run_data.py b/tests/test_run_data.py index ea23df3..af31c83 100644 --- a/tests/test_run_data.py +++ b/tests/test_run_data.py @@ -7,7 +7,7 @@ @pytest.mark.parametrize( - ["inp", "expected"], + "inp,expected", [ ( { diff --git a/tests/utils/test_resource.py b/tests/utils/test_resource.py index 8c1dc99..4de9488 100644 --- a/tests/utils/test_resource.py +++ b/tests/utils/test_resource.py @@ -11,7 +11,7 @@ # noinspection PyCompatibility @pytest.mark.parametrize( - ["package", "resource", "expected"], + "package,resource,expected", [ ("tests", "data/Ag-1.json", "data/Ag-1.json"), ], @@ -24,7 +24,7 @@ def test_path_resolver(package, resource, expected) -> None: @pytest.mark.parametrize( - ["package", "resource"], + "package,resource", [ ("tests", "data/not_existing"), ("xpypact", "data/not_existing"), diff --git a/tools/reset-pyenv b/tools/reset-pyenv index 39c91fc..d6993fc 100755 --- a/tools/reset-pyenv +++ b/tools/reset-pyenv @@ -1,9 +1,10 @@ #!/bin/bash +. ~/.bash-functions.rc + # set -exu -env="xpypact" -pkg="${env//-/_}" +env=($(pyenv local))[1] last_python="3.11.2" eval "$(pyenv init -)" @@ -17,7 +18,8 @@ poetry install pyenv shell --unset pyenv local "$env" "3.10.10" "3.9.16" "3.8.16" pyenv rehash -python -c "import ${pkg}; print(${pkg}.__version__)" +pkg=($(ls src))[1] +python -c "import ${pkg}; print(${pkg}.__version__)" && success "Environment $env is reset" # vim: set ts=4 sw=4 tw=92 ss=0 ft=sh et ai : From 316a1c5ca7729cb394d0a00e2c64f698e91af4dd Mon Sep 17 00:00:00 2001 From: dvp Date: Sun, 2 Apr 2023 17:45:53 +0300 Subject: [PATCH 32/32] style: fix I001 --- benchmarks/test_inventory.py | 11 +++++++++-- noxfile.py | 10 +++++++--- pyproject.toml | 5 ++++- tools/clear-prev-dist-info.py | 5 +++-- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/benchmarks/test_inventory.py b/benchmarks/test_inventory.py index 0a3ee96..100662e 100644 --- a/benchmarks/test_inventory.py +++ b/benchmarks/test_inventory.py @@ -4,16 +4,23 @@ """ from __future__ import annotations +from typing import TYPE_CHECKING, cast + import bz2 -from xpypact.inventory import Inventory, from_json +from pathlib import Path + +from xpypact.inventory import from_json from xpypact.utils.resource import path_resolver +if TYPE_CHECKING: + from xpypact.inventory import Inventory + EXPECTED_TIME_STEPS = 65 data_path_resolver = path_resolver("benchmarks") -with bz2.open(data_path_resolver("data/Ag-1.json.bz2")) as fid: +with bz2.open(cast(Path, data_path_resolver("data/Ag-1.json.bz2"))) as fid: AG_1_TEXT = fid.read().decode("utf-8") diff --git a/noxfile.py b/noxfile.py index b0e3bac..4d66505 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1,7 +1,7 @@ """Nox sessions.""" from __future__ import annotations -from typing import Final +from typing import TYPE_CHECKING, Final import re import shutil @@ -13,7 +13,10 @@ import nox -from nox import Session, session +from nox import session + +if TYPE_CHECKING: + from nox import Session nox.options.sessions = ( "safety", @@ -98,7 +101,8 @@ def activate_virtualenv_in_precommit_hooks(s: Session) -> None: return for hook in filter( - lambda x: not x.name.endswith(".sample") and x.is_file(), hook_dir.iterdir() + lambda x: not x.name.endswith(".sample") and x.is_file(), + hook_dir.iterdir(), ): _update_hook(hook, virtualenv, s) diff --git a/pyproject.toml b/pyproject.toml index 579d87c..2238eef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -516,7 +516,10 @@ exclude = [ "src/xpypact/inventory.py" = ["F811"] "src/xpypact/data_arrays.py" = ["ANN401", "PD011"] "src/xpypact/utils/resource.py" = ["ANN202"] -"tools/*" = ["T201"] +"tools/*" = [ + "T201", + "INP001", # file ... is part of implicit namespace ... add __init__.py - there are no modules in tools +] [tool.ruff.mccabe] # Unlike Flake8, default to a complexity level of 10. diff --git a/tools/clear-prev-dist-info.py b/tools/clear-prev-dist-info.py index 3a0a0f5..6021b8e 100755 --- a/tools/clear-prev-dist-info.py +++ b/tools/clear-prev-dist-info.py @@ -56,10 +56,11 @@ def get_project_name() -> str: """ pyproject_path = search_upwards_for_file("pyproject.toml") if pyproject_path is None: - raise OSError( + msg = ( "Illegal directory: cannot find file pyproject.toml " - f"from current directory: {Path.cwd()}" + f"from current directory: {Path.cwd()}", ) + raise OSError(msg) pyproject = tomllib.loads(pyproject_path.read_text()) name: str = pyproject["tool"]["poetry"]["name"].replace("-", "_") print(f"Package {name} is found in {pyproject_path.absolute()}")