diff --git a/poetry.lock b/poetry.lock index 46d8fa8..44f143d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -79,13 +79,13 @@ test-all = ["astropy[test]", "coverage[toml]", "ipython (>=4.2)", "objgraph", "s [[package]] name = "astropy-iers-data" -version = "0.2024.1.8.0.30.55" +version = "0.2024.1.22.0.30.30" description = "IERS Earth Rotation and Leap Second tables for the astropy core package" optional = false python-versions = ">=3.8" files = [ - {file = "astropy-iers-data-0.2024.1.8.0.30.55.tar.gz", hash = "sha256:e0e57b67c0f69733eb57f24ad1647e5a1c6d26f7936a994e52da87deec75ffb0"}, - {file = "astropy_iers_data-0.2024.1.8.0.30.55-py3-none-any.whl", hash = "sha256:51d0f2206c8e09540f3bc6b3123fa6c6b5c41ce37088be6c43216425eea173ec"}, + {file = "astropy-iers-data-0.2024.1.22.0.30.30.tar.gz", hash = "sha256:112e7367d5ed23b41ce86d2d0688d5b7ccd2587547544855010b616f10489ada"}, + {file = "astropy_iers_data-0.2024.1.22.0.30.30-py3-none-any.whl", hash = "sha256:9ffb20756667652503239cb2f7fd7a2871950991365d5e1e30f9643c1c151d10"}, ] [package.extras] @@ -109,13 +109,13 @@ tomli = {version = ">=2.0.1", markers = "python_version < \"3.11\""} [[package]] name = "bigtree" -version = "0.15.4" +version = "0.15.6" description = "Tree Implementation and Methods for Python, integrated with Python list, dictionary, and pandas DataFrame." optional = false python-versions = ">=3.7" files = [ - {file = "bigtree-0.15.4-py3-none-any.whl", hash = "sha256:a38295ef54bd7cfdc2d2aa2231d42969390323068b16ff52339140885b7e3338"}, - {file = "bigtree-0.15.4.tar.gz", hash = "sha256:71bd1c68957623868c694006bcf031c6ace90ad824f4214708d9ceaebf1ec46b"}, + {file = "bigtree-0.15.6-py3-none-any.whl", hash = "sha256:0cfd1a5abaa7b8dedb4d507b62050e19fc96b50174ddee9e894687ec440bfbd1"}, + {file = "bigtree-0.15.6.tar.gz", hash = "sha256:537834a06fda26f444718a65aaf4585bd0615ce23be5db39500dd1aab129c80d"}, ] [package.extras] @@ -263,22 +263,23 @@ toml = ["tomli"] [[package]] name = "dnspython" -version = "2.4.2" +version = "2.5.0" description = "DNS toolkit" optional = false -python-versions = ">=3.8,<4.0" +python-versions = ">=3.8" files = [ - {file = "dnspython-2.4.2-py3-none-any.whl", hash = "sha256:57c6fbaaeaaf39c891292012060beb141791735dbb4004798328fc2c467402d8"}, - {file = "dnspython-2.4.2.tar.gz", hash = "sha256:8dcfae8c7460a2f84b4072e26f1c9f4101ca20c071649cb7c34e8b6a93d58984"}, + {file = "dnspython-2.5.0-py3-none-any.whl", hash = "sha256:6facdf76b73c742ccf2d07add296f178e629da60be23ce4b0a9c927b1e02c3a6"}, + {file = "dnspython-2.5.0.tar.gz", hash = "sha256:a0034815a59ba9ae888946be7ccca8f7c157b286f8455b379c692efb51022a15"}, ] [package.extras] -dnssec = ["cryptography (>=2.6,<42.0)"] -doh = ["h2 (>=4.1.0)", "httpcore (>=0.17.3)", "httpx (>=0.24.1)"] +dev = ["black (>=23.1.0)", "coverage (>=7.0)", "flake8 (>=5.0.3)", "mypy (>=1.0.1)", "pylint (>=2.7)", "pytest (>=6.2.5)", "pytest-cov (>=3.0.0)", "sphinx (>=7.0.0)", "twine (>=4.0.0)", "wheel (>=0.41.0)"] +dnssec = ["cryptography (>=41)"] +doh = ["h2 (>=4.1.0)", "httpcore (>=0.17.3)", "httpx (>=0.25.1)"] doq = ["aioquic (>=0.9.20)"] -idna = ["idna (>=2.1,<4.0)"] -trio = ["trio (>=0.14,<0.23)"] -wmi = ["wmi (>=1.5.1,<2.0.0)"] +idna = ["idna (>=2.1)"] +trio = ["trio (>=0.14)"] +wmi = ["wmi (>=1.5.1)"] [[package]] name = "dotted-dict" @@ -546,71 +547,71 @@ testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] [[package]] name = "markupsafe" -version = "2.1.3" +version = "2.1.4" description = "Safely add untrusted strings to HTML/XML markup." optional = false python-versions = ">=3.7" files = [ - {file = "MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:cd0f502fe016460680cd20aaa5a76d241d6f35a1c3350c474bac1273803893fa"}, - {file = "MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e09031c87a1e51556fdcb46e5bd4f59dfb743061cf93c4d6831bf894f125eb57"}, - {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:68e78619a61ecf91e76aa3e6e8e33fc4894a2bebe93410754bd28fce0a8a4f9f"}, - {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65c1a9bcdadc6c28eecee2c119465aebff8f7a584dd719facdd9e825ec61ab52"}, - {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:525808b8019e36eb524b8c68acdd63a37e75714eac50e988180b169d64480a00"}, - {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:962f82a3086483f5e5f64dbad880d31038b698494799b097bc59c2edf392fce6"}, - {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:aa7bd130efab1c280bed0f45501b7c8795f9fdbeb02e965371bbef3523627779"}, - {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c9c804664ebe8f83a211cace637506669e7890fec1b4195b505c214e50dd4eb7"}, - {file = "MarkupSafe-2.1.3-cp310-cp310-win32.whl", hash = "sha256:10bbfe99883db80bdbaff2dcf681dfc6533a614f700da1287707e8a5d78a8431"}, - {file = "MarkupSafe-2.1.3-cp310-cp310-win_amd64.whl", hash = "sha256:1577735524cdad32f9f694208aa75e422adba74f1baee7551620e43a3141f559"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ad9e82fb8f09ade1c3e1b996a6337afac2b8b9e365f926f5a61aacc71adc5b3c"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3c0fae6c3be832a0a0473ac912810b2877c8cb9d76ca48de1ed31e1c68386575"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b076b6226fb84157e3f7c971a47ff3a679d837cf338547532ab866c57930dbee"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bfce63a9e7834b12b87c64d6b155fdd9b3b96191b6bd334bf37db7ff1fe457f2"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:338ae27d6b8745585f87218a3f23f1512dbf52c26c28e322dbe54bcede54ccb9"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e4dd52d80b8c83fdce44e12478ad2e85c64ea965e75d66dbeafb0a3e77308fcc"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:df0be2b576a7abbf737b1575f048c23fb1d769f267ec4358296f31c2479db8f9"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-win32.whl", hash = "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-win_amd64.whl", hash = "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:f698de3fd0c4e6972b92290a45bd9b1536bffe8c6759c62471efaa8acb4c37bc"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:aa57bd9cf8ae831a362185ee444e15a93ecb2e344c8e52e4d721ea3ab6ef1823"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ffcc3f7c66b5f5b7931a5aa68fc9cecc51e685ef90282f4a82f0f5e9b704ad11"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47d4f1c5f80fc62fdd7777d0d40a2e9dda0a05883ab11374334f6c4de38adffd"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1f67c7038d560d92149c060157d623c542173016c4babc0c1913cca0564b9939"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:9aad3c1755095ce347e26488214ef77e0485a3c34a50c5a5e2471dff60b9dd9c"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:14ff806850827afd6b07a5f32bd917fb7f45b046ba40c57abdb636674a8b559c"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8f9293864fe09b8149f0cc42ce56e3f0e54de883a9de90cd427f191c346eb2e1"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-win32.whl", hash = "sha256:715d3562f79d540f251b99ebd6d8baa547118974341db04f5ad06d5ea3eb8007"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-win_amd64.whl", hash = "sha256:1b8dd8c3fd14349433c79fa8abeb573a55fc0fdd769133baac1f5e07abf54aeb"}, - {file = "MarkupSafe-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2"}, - {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b"}, - {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707"}, - {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca379055a47383d02a5400cb0d110cef0a776fc644cda797db0c5696cfd7e18e"}, - {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:b7ff0f54cb4ff66dd38bebd335a38e2c22c41a8ee45aa608efc890ac3e3931bc"}, - {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c011a4149cfbcf9f03994ec2edffcb8b1dc2d2aede7ca243746df97a5d41ce48"}, - {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:56d9f2ecac662ca1611d183feb03a3fa4406469dafe241673d521dd5ae92a155"}, - {file = "MarkupSafe-2.1.3-cp37-cp37m-win32.whl", hash = "sha256:8758846a7e80910096950b67071243da3e5a20ed2546e6392603c096778d48e0"}, - {file = "MarkupSafe-2.1.3-cp37-cp37m-win_amd64.whl", hash = "sha256:787003c0ddb00500e49a10f2844fac87aa6ce977b90b0feaaf9de23c22508b24"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:2ef12179d3a291be237280175b542c07a36e7f60718296278d8593d21ca937d4"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2c1b19b3aaacc6e57b7e25710ff571c24d6c3613a45e905b1fde04d691b98ee0"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8afafd99945ead6e075b973fefa56379c5b5c53fd8937dad92c662da5d8fd5ee"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8c41976a29d078bb235fea9b2ecd3da465df42a562910f9022f1a03107bd02be"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d080e0a5eb2529460b30190fcfcc4199bd7f827663f858a226a81bc27beaa97e"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:69c0f17e9f5a7afdf2cc9fb2d1ce6aabdb3bafb7f38017c0b77862bcec2bbad8"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:504b320cd4b7eff6f968eddf81127112db685e81f7e36e75f9f84f0df46041c3"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:42de32b22b6b804f42c5d98be4f7e5e977ecdd9ee9b660fda1a3edf03b11792d"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-win32.whl", hash = "sha256:ceb01949af7121f9fc39f7d27f91be8546f3fb112c608bc4029aef0bab86a2a5"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-win_amd64.whl", hash = "sha256:1b40069d487e7edb2676d3fbdb2b0829ffa2cd63a2ec26c4938b2d34391b4ecc"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:8023faf4e01efadfa183e863fefde0046de576c6f14659e8782065bcece22198"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6b2b56950d93e41f33b4223ead100ea0fe11f8e6ee5f641eb753ce4b77a7042b"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9dcdfd0eaf283af041973bff14a2e143b8bd64e069f4c383416ecd79a81aab58"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:05fb21170423db021895e1ea1e1f3ab3adb85d1c2333cbc2310f2a26bc77272e"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:282c2cb35b5b673bbcadb33a585408104df04f14b2d9b01d4c345a3b92861c2c"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ab4a0df41e7c16a1392727727e7998a467472d0ad65f3ad5e6e765015df08636"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7ef3cb2ebbf91e330e3bb937efada0edd9003683db6b57bb108c4001f37a02ea"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:0a4e4a1aff6c7ac4cd55792abf96c915634c2b97e3cc1c7129578aa68ebd754e"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-win32.whl", hash = "sha256:fec21693218efe39aa7f8599346e90c705afa52c5b31ae019b2e57e8f6542bb2"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-win_amd64.whl", hash = "sha256:3fd4abcb888d15a94f32b75d8fd18ee162ca0c064f35b11134be77050296d6ba"}, - {file = "MarkupSafe-2.1.3.tar.gz", hash = "sha256:af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad"}, + {file = "MarkupSafe-2.1.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:de8153a7aae3835484ac168a9a9bdaa0c5eee4e0bc595503c95d53b942879c84"}, + {file = "MarkupSafe-2.1.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e888ff76ceb39601c59e219f281466c6d7e66bd375b4ec1ce83bcdc68306796b"}, + {file = "MarkupSafe-2.1.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0b838c37ba596fcbfca71651a104a611543077156cb0a26fe0c475e1f152ee8"}, + {file = "MarkupSafe-2.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dac1ebf6983148b45b5fa48593950f90ed6d1d26300604f321c74a9ca1609f8e"}, + {file = "MarkupSafe-2.1.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0fbad3d346df8f9d72622ac71b69565e621ada2ce6572f37c2eae8dacd60385d"}, + {file = "MarkupSafe-2.1.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d5291d98cd3ad9a562883468c690a2a238c4a6388ab3bd155b0c75dd55ece858"}, + {file = "MarkupSafe-2.1.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:a7cc49ef48a3c7a0005a949f3c04f8baa5409d3f663a1b36f0eba9bfe2a0396e"}, + {file = "MarkupSafe-2.1.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b83041cda633871572f0d3c41dddd5582ad7d22f65a72eacd8d3d6d00291df26"}, + {file = "MarkupSafe-2.1.4-cp310-cp310-win32.whl", hash = "sha256:0c26f67b3fe27302d3a412b85ef696792c4a2386293c53ba683a89562f9399b0"}, + {file = "MarkupSafe-2.1.4-cp310-cp310-win_amd64.whl", hash = "sha256:a76055d5cb1c23485d7ddae533229039b850db711c554a12ea64a0fd8a0129e2"}, + {file = "MarkupSafe-2.1.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9e9e3c4020aa2dc62d5dd6743a69e399ce3de58320522948af6140ac959ab863"}, + {file = "MarkupSafe-2.1.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0042d6a9880b38e1dd9ff83146cc3c9c18a059b9360ceae207805567aacccc69"}, + {file = "MarkupSafe-2.1.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:55d03fea4c4e9fd0ad75dc2e7e2b6757b80c152c032ea1d1de487461d8140efc"}, + {file = "MarkupSafe-2.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ab3a886a237f6e9c9f4f7d272067e712cdb4efa774bef494dccad08f39d8ae6"}, + {file = "MarkupSafe-2.1.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:abf5ebbec056817057bfafc0445916bb688a255a5146f900445d081db08cbabb"}, + {file = "MarkupSafe-2.1.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e1a0d1924a5013d4f294087e00024ad25668234569289650929ab871231668e7"}, + {file = "MarkupSafe-2.1.4-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:e7902211afd0af05fbadcc9a312e4cf10f27b779cf1323e78d52377ae4b72bea"}, + {file = "MarkupSafe-2.1.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c669391319973e49a7c6230c218a1e3044710bc1ce4c8e6eb71f7e6d43a2c131"}, + {file = "MarkupSafe-2.1.4-cp311-cp311-win32.whl", hash = "sha256:31f57d64c336b8ccb1966d156932f3daa4fee74176b0fdc48ef580be774aae74"}, + {file = "MarkupSafe-2.1.4-cp311-cp311-win_amd64.whl", hash = "sha256:54a7e1380dfece8847c71bf7e33da5d084e9b889c75eca19100ef98027bd9f56"}, + {file = "MarkupSafe-2.1.4-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:a76cd37d229fc385738bd1ce4cba2a121cf26b53864c1772694ad0ad348e509e"}, + {file = "MarkupSafe-2.1.4-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:987d13fe1d23e12a66ca2073b8d2e2a75cec2ecb8eab43ff5624ba0ad42764bc"}, + {file = "MarkupSafe-2.1.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5244324676254697fe5c181fc762284e2c5fceeb1c4e3e7f6aca2b6f107e60dc"}, + {file = "MarkupSafe-2.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78bc995e004681246e85e28e068111a4c3f35f34e6c62da1471e844ee1446250"}, + {file = "MarkupSafe-2.1.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a4d176cfdfde84f732c4a53109b293d05883e952bbba68b857ae446fa3119b4f"}, + {file = "MarkupSafe-2.1.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:f9917691f410a2e0897d1ef99619fd3f7dd503647c8ff2475bf90c3cf222ad74"}, + {file = "MarkupSafe-2.1.4-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:f06e5a9e99b7df44640767842f414ed5d7bedaaa78cd817ce04bbd6fd86e2dd6"}, + {file = "MarkupSafe-2.1.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:396549cea79e8ca4ba65525470d534e8a41070e6b3500ce2414921099cb73e8d"}, + {file = "MarkupSafe-2.1.4-cp312-cp312-win32.whl", hash = "sha256:f6be2d708a9d0e9b0054856f07ac7070fbe1754be40ca8525d5adccdbda8f475"}, + {file = "MarkupSafe-2.1.4-cp312-cp312-win_amd64.whl", hash = "sha256:5045e892cfdaecc5b4c01822f353cf2c8feb88a6ec1c0adef2a2e705eef0f656"}, + {file = "MarkupSafe-2.1.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:7a07f40ef8f0fbc5ef1000d0c78771f4d5ca03b4953fc162749772916b298fc4"}, + {file = "MarkupSafe-2.1.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d18b66fe626ac412d96c2ab536306c736c66cf2a31c243a45025156cc190dc8a"}, + {file = "MarkupSafe-2.1.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:698e84142f3f884114ea8cf83e7a67ca8f4ace8454e78fe960646c6c91c63bfa"}, + {file = "MarkupSafe-2.1.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:49a3b78a5af63ec10d8604180380c13dcd870aba7928c1fe04e881d5c792dc4e"}, + {file = "MarkupSafe-2.1.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:15866d7f2dc60cfdde12ebb4e75e41be862348b4728300c36cdf405e258415ec"}, + {file = "MarkupSafe-2.1.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:6aa5e2e7fc9bc042ae82d8b79d795b9a62bd8f15ba1e7594e3db243f158b5565"}, + {file = "MarkupSafe-2.1.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:54635102ba3cf5da26eb6f96c4b8c53af8a9c0d97b64bdcb592596a6255d8518"}, + {file = "MarkupSafe-2.1.4-cp37-cp37m-win32.whl", hash = "sha256:3583a3a3ab7958e354dc1d25be74aee6228938312ee875a22330c4dc2e41beb0"}, + {file = "MarkupSafe-2.1.4-cp37-cp37m-win_amd64.whl", hash = "sha256:d6e427c7378c7f1b2bef6a344c925b8b63623d3321c09a237b7cc0e77dd98ceb"}, + {file = "MarkupSafe-2.1.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:bf1196dcc239e608605b716e7b166eb5faf4bc192f8a44b81e85251e62584bd2"}, + {file = "MarkupSafe-2.1.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:4df98d4a9cd6a88d6a585852f56f2155c9cdb6aec78361a19f938810aa020954"}, + {file = "MarkupSafe-2.1.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b835aba863195269ea358cecc21b400276747cc977492319fd7682b8cd2c253d"}, + {file = "MarkupSafe-2.1.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:23984d1bdae01bee794267424af55eef4dfc038dc5d1272860669b2aa025c9e3"}, + {file = "MarkupSafe-2.1.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1c98c33ffe20e9a489145d97070a435ea0679fddaabcafe19982fe9c971987d5"}, + {file = "MarkupSafe-2.1.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:9896fca4a8eb246defc8b2a7ac77ef7553b638e04fbf170bff78a40fa8a91474"}, + {file = "MarkupSafe-2.1.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:b0fe73bac2fed83839dbdbe6da84ae2a31c11cfc1c777a40dbd8ac8a6ed1560f"}, + {file = "MarkupSafe-2.1.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c7556bafeaa0a50e2fe7dc86e0382dea349ebcad8f010d5a7dc6ba568eaaa789"}, + {file = "MarkupSafe-2.1.4-cp38-cp38-win32.whl", hash = "sha256:fc1a75aa8f11b87910ffd98de62b29d6520b6d6e8a3de69a70ca34dea85d2a8a"}, + {file = "MarkupSafe-2.1.4-cp38-cp38-win_amd64.whl", hash = "sha256:3a66c36a3864df95e4f62f9167c734b3b1192cb0851b43d7cc08040c074c6279"}, + {file = "MarkupSafe-2.1.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:765f036a3d00395a326df2835d8f86b637dbaf9832f90f5d196c3b8a7a5080cb"}, + {file = "MarkupSafe-2.1.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:21e7af8091007bf4bebf4521184f4880a6acab8df0df52ef9e513d8e5db23411"}, + {file = "MarkupSafe-2.1.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d5c31fe855c77cad679b302aabc42d724ed87c043b1432d457f4976add1c2c3e"}, + {file = "MarkupSafe-2.1.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7653fa39578957bc42e5ebc15cf4361d9e0ee4b702d7d5ec96cdac860953c5b4"}, + {file = "MarkupSafe-2.1.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:47bb5f0142b8b64ed1399b6b60f700a580335c8e1c57f2f15587bd072012decc"}, + {file = "MarkupSafe-2.1.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:fe8512ed897d5daf089e5bd010c3dc03bb1bdae00b35588c49b98268d4a01e00"}, + {file = "MarkupSafe-2.1.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:36d7626a8cca4d34216875aee5a1d3d654bb3dac201c1c003d182283e3205949"}, + {file = "MarkupSafe-2.1.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:b6f14a9cd50c3cb100eb94b3273131c80d102e19bb20253ac7bd7336118a673a"}, + {file = "MarkupSafe-2.1.4-cp39-cp39-win32.whl", hash = "sha256:c8f253a84dbd2c63c19590fa86a032ef3d8cc18923b8049d91bcdeeb2581fbf6"}, + {file = "MarkupSafe-2.1.4-cp39-cp39-win_amd64.whl", hash = "sha256:8b570a1537367b52396e53325769608f2a687ec9a4363647af1cded8928af959"}, + {file = "MarkupSafe-2.1.4.tar.gz", hash = "sha256:3aae9af4cac263007fd6309c64c6ab4506dd2b79382d9d19a1994f9240b8db4f"}, ] [[package]] @@ -707,36 +708,40 @@ files = [ [[package]] name = "pandas" -version = "2.1.4" +version = "2.2.0" description = "Powerful data structures for data analysis, time series, and statistics" optional = false python-versions = ">=3.9" files = [ - {file = "pandas-2.1.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bdec823dc6ec53f7a6339a0e34c68b144a7a1fd28d80c260534c39c62c5bf8c9"}, - {file = "pandas-2.1.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:294d96cfaf28d688f30c918a765ea2ae2e0e71d3536754f4b6de0ea4a496d034"}, - {file = "pandas-2.1.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b728fb8deba8905b319f96447a27033969f3ea1fea09d07d296c9030ab2ed1d"}, - {file = "pandas-2.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:00028e6737c594feac3c2df15636d73ace46b8314d236100b57ed7e4b9ebe8d9"}, - {file = "pandas-2.1.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:426dc0f1b187523c4db06f96fb5c8d1a845e259c99bda74f7de97bd8a3bb3139"}, - {file = "pandas-2.1.4-cp310-cp310-win_amd64.whl", hash = "sha256:f237e6ca6421265643608813ce9793610ad09b40154a3344a088159590469e46"}, - {file = "pandas-2.1.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b7d852d16c270e4331f6f59b3e9aa23f935f5c4b0ed2d0bc77637a8890a5d092"}, - {file = "pandas-2.1.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:bd7d5f2f54f78164b3d7a40f33bf79a74cdee72c31affec86bfcabe7e0789821"}, - {file = "pandas-2.1.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0aa6e92e639da0d6e2017d9ccff563222f4eb31e4b2c3cf32a2a392fc3103c0d"}, - {file = "pandas-2.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d797591b6846b9db79e65dc2d0d48e61f7db8d10b2a9480b4e3faaddc421a171"}, - {file = "pandas-2.1.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d2d3e7b00f703aea3945995ee63375c61b2e6aa5aa7871c5d622870e5e137623"}, - {file = "pandas-2.1.4-cp311-cp311-win_amd64.whl", hash = "sha256:dc9bf7ade01143cddc0074aa6995edd05323974e6e40d9dbde081021ded8510e"}, - {file = "pandas-2.1.4-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:482d5076e1791777e1571f2e2d789e940dedd927325cc3cb6d0800c6304082f6"}, - {file = "pandas-2.1.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8a706cfe7955c4ca59af8c7a0517370eafbd98593155b48f10f9811da440248b"}, - {file = "pandas-2.1.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b0513a132a15977b4a5b89aabd304647919bc2169eac4c8536afb29c07c23540"}, - {file = "pandas-2.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e9f17f2b6fc076b2a0078862547595d66244db0f41bf79fc5f64a5c4d635bead"}, - {file = "pandas-2.1.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:45d63d2a9b1b37fa6c84a68ba2422dc9ed018bdaa668c7f47566a01188ceeec1"}, - {file = "pandas-2.1.4-cp312-cp312-win_amd64.whl", hash = "sha256:f69b0c9bb174a2342818d3e2778584e18c740d56857fc5cdb944ec8bbe4082cf"}, - {file = "pandas-2.1.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3f06bda01a143020bad20f7a85dd5f4a1600112145f126bc9e3e42077c24ef34"}, - {file = "pandas-2.1.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ab5796839eb1fd62a39eec2916d3e979ec3130509930fea17fe6f81e18108f6a"}, - {file = "pandas-2.1.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:edbaf9e8d3a63a9276d707b4d25930a262341bca9874fcb22eff5e3da5394732"}, - {file = "pandas-2.1.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1ebfd771110b50055712b3b711b51bee5d50135429364d0498e1213a7adc2be8"}, - {file = "pandas-2.1.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8ea107e0be2aba1da619cc6ba3f999b2bfc9669a83554b1904ce3dd9507f0860"}, - {file = "pandas-2.1.4-cp39-cp39-win_amd64.whl", hash = "sha256:d65148b14788b3758daf57bf42725caa536575da2b64df9964c563b015230984"}, - {file = "pandas-2.1.4.tar.gz", hash = "sha256:fcb68203c833cc735321512e13861358079a96c174a61f5116a1de89c58c0ef7"}, + {file = "pandas-2.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:8108ee1712bb4fa2c16981fba7e68b3f6ea330277f5ca34fa8d557e986a11670"}, + {file = "pandas-2.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:736da9ad4033aeab51d067fc3bd69a0ba36f5a60f66a527b3d72e2030e63280a"}, + {file = "pandas-2.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:38e0b4fc3ddceb56ec8a287313bc22abe17ab0eb184069f08fc6a9352a769b18"}, + {file = "pandas-2.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:20404d2adefe92aed3b38da41d0847a143a09be982a31b85bc7dd565bdba0f4e"}, + {file = "pandas-2.2.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:7ea3ee3f125032bfcade3a4cf85131ed064b4f8dd23e5ce6fa16473e48ebcaf5"}, + {file = "pandas-2.2.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:f9670b3ac00a387620489dfc1bca66db47a787f4e55911f1293063a78b108df1"}, + {file = "pandas-2.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:5a946f210383c7e6d16312d30b238fd508d80d927014f3b33fb5b15c2f895430"}, + {file = "pandas-2.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a1b438fa26b208005c997e78672f1aa8138f67002e833312e6230f3e57fa87d5"}, + {file = "pandas-2.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8ce2fbc8d9bf303ce54a476116165220a1fedf15985b09656b4b4275300e920b"}, + {file = "pandas-2.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2707514a7bec41a4ab81f2ccce8b382961a29fbe9492eab1305bb075b2b1ff4f"}, + {file = "pandas-2.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:85793cbdc2d5bc32620dc8ffa715423f0c680dacacf55056ba13454a5be5de88"}, + {file = "pandas-2.2.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:cfd6c2491dc821b10c716ad6776e7ab311f7df5d16038d0b7458bc0b67dc10f3"}, + {file = "pandas-2.2.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:a146b9dcacc3123aa2b399df1a284de5f46287a4ab4fbfc237eac98a92ebcb71"}, + {file = "pandas-2.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:fbc1b53c0e1fdf16388c33c3cca160f798d38aea2978004dd3f4d3dec56454c9"}, + {file = "pandas-2.2.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:a41d06f308a024981dcaa6c41f2f2be46a6b186b902c94c2674e8cb5c42985bc"}, + {file = "pandas-2.2.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:159205c99d7a5ce89ecfc37cb08ed179de7783737cea403b295b5eda8e9c56d1"}, + {file = "pandas-2.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eb1e1f3861ea9132b32f2133788f3b14911b68102d562715d71bd0013bc45440"}, + {file = "pandas-2.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:761cb99b42a69005dec2b08854fb1d4888fdf7b05db23a8c5a099e4b886a2106"}, + {file = "pandas-2.2.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:a20628faaf444da122b2a64b1e5360cde100ee6283ae8effa0d8745153809a2e"}, + {file = "pandas-2.2.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:f5be5d03ea2073627e7111f61b9f1f0d9625dc3c4d8dda72cc827b0c58a1d042"}, + {file = "pandas-2.2.0-cp312-cp312-win_amd64.whl", hash = "sha256:a626795722d893ed6aacb64d2401d017ddc8a2341b49e0384ab9bf7112bdec30"}, + {file = "pandas-2.2.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9f66419d4a41132eb7e9a73dcec9486cf5019f52d90dd35547af11bc58f8637d"}, + {file = "pandas-2.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:57abcaeda83fb80d447f28ab0cc7b32b13978f6f733875ebd1ed14f8fbc0f4ab"}, + {file = "pandas-2.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e60f1f7dba3c2d5ca159e18c46a34e7ca7247a73b5dd1a22b6d59707ed6b899a"}, + {file = "pandas-2.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eb61dc8567b798b969bcc1fc964788f5a68214d333cade8319c7ab33e2b5d88a"}, + {file = "pandas-2.2.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:52826b5f4ed658fa2b729264d63f6732b8b29949c7fd234510d57c61dbeadfcd"}, + {file = "pandas-2.2.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:bde2bc699dbd80d7bc7f9cab1e23a95c4375de615860ca089f34e7c64f4a8de7"}, + {file = "pandas-2.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:3de918a754bbf2da2381e8a3dcc45eede8cd7775b047b923f9006d5f876802ae"}, + {file = "pandas-2.2.0.tar.gz", hash = "sha256:30b83f7c3eb217fb4d1b494a57a2fda5444f17834f5df2de6b2ffff68dc3c8e2"}, ] [package.dependencies] @@ -747,31 +752,31 @@ numpy = [ ] python-dateutil = ">=2.8.2" pytz = ">=2020.1" -tzdata = ">=2022.1" +tzdata = ">=2022.7" [package.extras] -all = ["PyQt5 (>=5.15.6)", "SQLAlchemy (>=1.4.36)", "beautifulsoup4 (>=4.11.1)", "bottleneck (>=1.3.4)", "dataframe-api-compat (>=0.1.7)", "fastparquet (>=0.8.1)", "fsspec (>=2022.05.0)", "gcsfs (>=2022.05.0)", "html5lib (>=1.1)", "hypothesis (>=6.46.1)", "jinja2 (>=3.1.2)", "lxml (>=4.8.0)", "matplotlib (>=3.6.1)", "numba (>=0.55.2)", "numexpr (>=2.8.0)", "odfpy (>=1.4.1)", "openpyxl (>=3.0.10)", "pandas-gbq (>=0.17.5)", "psycopg2 (>=2.9.3)", "pyarrow (>=7.0.0)", "pymysql (>=1.0.2)", "pyreadstat (>=1.1.5)", "pytest (>=7.3.2)", "pytest-xdist (>=2.2.0)", "pyxlsb (>=1.0.9)", "qtpy (>=2.2.0)", "s3fs (>=2022.05.0)", "scipy (>=1.8.1)", "tables (>=3.7.0)", "tabulate (>=0.8.10)", "xarray (>=2022.03.0)", "xlrd (>=2.0.1)", "xlsxwriter (>=3.0.3)", "zstandard (>=0.17.0)"] -aws = ["s3fs (>=2022.05.0)"] -clipboard = ["PyQt5 (>=5.15.6)", "qtpy (>=2.2.0)"] -compression = ["zstandard (>=0.17.0)"] -computation = ["scipy (>=1.8.1)", "xarray (>=2022.03.0)"] +all = ["PyQt5 (>=5.15.9)", "SQLAlchemy (>=2.0.0)", "adbc-driver-postgresql (>=0.8.0)", "adbc-driver-sqlite (>=0.8.0)", "beautifulsoup4 (>=4.11.2)", "bottleneck (>=1.3.6)", "dataframe-api-compat (>=0.1.7)", "fastparquet (>=2022.12.0)", "fsspec (>=2022.11.0)", "gcsfs (>=2022.11.0)", "html5lib (>=1.1)", "hypothesis (>=6.46.1)", "jinja2 (>=3.1.2)", "lxml (>=4.9.2)", "matplotlib (>=3.6.3)", "numba (>=0.56.4)", "numexpr (>=2.8.4)", "odfpy (>=1.4.1)", "openpyxl (>=3.1.0)", "pandas-gbq (>=0.19.0)", "psycopg2 (>=2.9.6)", "pyarrow (>=10.0.1)", "pymysql (>=1.0.2)", "pyreadstat (>=1.2.0)", "pytest (>=7.3.2)", "pytest-xdist (>=2.2.0)", "python-calamine (>=0.1.7)", "pyxlsb (>=1.0.10)", "qtpy (>=2.3.0)", "s3fs (>=2022.11.0)", "scipy (>=1.10.0)", "tables (>=3.8.0)", "tabulate (>=0.9.0)", "xarray (>=2022.12.0)", "xlrd (>=2.0.1)", "xlsxwriter (>=3.0.5)", "zstandard (>=0.19.0)"] +aws = ["s3fs (>=2022.11.0)"] +clipboard = ["PyQt5 (>=5.15.9)", "qtpy (>=2.3.0)"] +compression = ["zstandard (>=0.19.0)"] +computation = ["scipy (>=1.10.0)", "xarray (>=2022.12.0)"] consortium-standard = ["dataframe-api-compat (>=0.1.7)"] -excel = ["odfpy (>=1.4.1)", "openpyxl (>=3.0.10)", "pyxlsb (>=1.0.9)", "xlrd (>=2.0.1)", "xlsxwriter (>=3.0.3)"] -feather = ["pyarrow (>=7.0.0)"] -fss = ["fsspec (>=2022.05.0)"] -gcp = ["gcsfs (>=2022.05.0)", "pandas-gbq (>=0.17.5)"] -hdf5 = ["tables (>=3.7.0)"] -html = ["beautifulsoup4 (>=4.11.1)", "html5lib (>=1.1)", "lxml (>=4.8.0)"] -mysql = ["SQLAlchemy (>=1.4.36)", "pymysql (>=1.0.2)"] -output-formatting = ["jinja2 (>=3.1.2)", "tabulate (>=0.8.10)"] -parquet = ["pyarrow (>=7.0.0)"] -performance = ["bottleneck (>=1.3.4)", "numba (>=0.55.2)", "numexpr (>=2.8.0)"] -plot = ["matplotlib (>=3.6.1)"] -postgresql = ["SQLAlchemy (>=1.4.36)", "psycopg2 (>=2.9.3)"] -spss = ["pyreadstat (>=1.1.5)"] -sql-other = ["SQLAlchemy (>=1.4.36)"] +excel = ["odfpy (>=1.4.1)", "openpyxl (>=3.1.0)", "python-calamine (>=0.1.7)", "pyxlsb (>=1.0.10)", "xlrd (>=2.0.1)", "xlsxwriter (>=3.0.5)"] +feather = ["pyarrow (>=10.0.1)"] +fss = ["fsspec (>=2022.11.0)"] +gcp = ["gcsfs (>=2022.11.0)", "pandas-gbq (>=0.19.0)"] +hdf5 = ["tables (>=3.8.0)"] +html = ["beautifulsoup4 (>=4.11.2)", "html5lib (>=1.1)", "lxml (>=4.9.2)"] +mysql = ["SQLAlchemy (>=2.0.0)", "pymysql (>=1.0.2)"] +output-formatting = ["jinja2 (>=3.1.2)", "tabulate (>=0.9.0)"] +parquet = ["pyarrow (>=10.0.1)"] +performance = ["bottleneck (>=1.3.6)", "numba (>=0.56.4)", "numexpr (>=2.8.4)"] +plot = ["matplotlib (>=3.6.3)"] +postgresql = ["SQLAlchemy (>=2.0.0)", "adbc-driver-postgresql (>=0.8.0)", "psycopg2 (>=2.9.6)"] +spss = ["pyreadstat (>=1.2.0)"] +sql-other = ["SQLAlchemy (>=2.0.0)", "adbc-driver-postgresql (>=0.8.0)", "adbc-driver-sqlite (>=0.8.0)"] test = ["hypothesis (>=6.46.1)", "pytest (>=7.3.2)", "pytest-xdist (>=2.2.0)"] -xml = ["lxml (>=4.8.0)"] +xml = ["lxml (>=4.9.2)"] [[package]] name = "pathspec" @@ -952,13 +957,13 @@ typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" [[package]] name = "pydantic-xml" -version = "2.7.0" +version = "2.8.1" description = "pydantic xml extension" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic_xml-2.7.0-py3-none-any.whl", hash = "sha256:e336bca6e01984f5995ea197394bedff415a7d8449d0910a9647a1216990069c"}, - {file = "pydantic_xml-2.7.0.tar.gz", hash = "sha256:6bb16cee3166482365b7def95416285d56b325041d995fbfa58979a06ff1d51c"}, + {file = "pydantic_xml-2.8.1-py3-none-any.whl", hash = "sha256:568f916c593214b0d83402644ce5a314c23cd3fb2bad0660548f6c49b03eeaba"}, + {file = "pydantic_xml-2.8.1.tar.gz", hash = "sha256:d83136be5016c7d4b83a522fcb70ac2cd9da31d3caa0f6cb836f5373ffc5928a"}, ] [package.dependencies] diff --git a/sdRDM/base/datamodel.py b/sdRDM/base/datamodel.py index 87aa4e0..73a7b76 100644 --- a/sdRDM/base/datamodel.py +++ b/sdRDM/base/datamodel.py @@ -45,7 +45,6 @@ from sdRDM.generator.utils import extract_modules from sdRDM.tools.utils import YAMLDumper from sdRDM.tools.gitutils import ( - ObjectNode, build_library_from_git_specs, _import_library, ) diff --git a/sdRDM/base/datatypes/__init__.py b/sdRDM/base/datatypes/__init__.py index 69d2e31..f5ad235 100644 --- a/sdRDM/base/datatypes/__init__.py +++ b/sdRDM/base/datatypes/__init__.py @@ -1 +1,2 @@ from .unit import Unit +from .quantity import Quantity diff --git a/sdRDM/base/datatypes/quantity.py b/sdRDM/base/datatypes/quantity.py new file mode 100644 index 0000000..700f554 --- /dev/null +++ b/sdRDM/base/datatypes/quantity.py @@ -0,0 +1,192 @@ +from typing import List, Union +from uuid import uuid4 +import warnings + +from pydantic import PrivateAttr, model_validator +from pydantic_xml import attr, element +from sdRDM import DataModel +from sdRDM.base.datatypes import Unit + +import astropy +from astropy.units import Quantity as AstroQuantity + + +class Quantity( + DataModel, + nsmap={"": "https://www.github.com/software-driven-rdm"}, + tag="Quantity", +): + """ + Represents a quantity with a value and a unit. + + Args: + value (Union[float, int]): The numerical value of the quantity. + unit (Union[str, astropy.units.UnitBase]): The unit of measurement for the quantity. + + Attributes: + id (str): The unique identifier of the quantity. + _quantity (AstroQuantity): The underlying astropy quantity object. + + Methods: + __mul__(self, other): Multiply the quantity by another quantity or a scalar. + __truediv__(self, other): Divide the quantity by another quantity or a scalar. + __add__(self, other): Add the quantity to another quantity or a scalar. + __sub__(self, other): Subtract another quantity or a scalar from the quantity. + """ + + id: str = attr(name="id", default_factory=lambda: str(uuid4())) + + value: Union[float, int] = attr( + title="Value", + description="The numerical value of the quantity.", + ) + + unit: Unit = element( + title="Unit", + description="The unit of measurement for the quantity.", + ) + + _quantity: AstroQuantity = PrivateAttr(default=None) + + def __init__( + self, + value: Union[float, int], + unit: Union[str, Unit], + ): + super().__init__(value=value, unit=unit) + + @model_validator(mode="after") + def _set_quantity(self): + self._quantity = AstroQuantity(self.value, self.unit._unit) + return self + + # dunders + def __mul__(self, other): + if isinstance(other, Quantity): + new_quantity = self._quantity * other._quantity + return Quantity( + value=new_quantity.value, unit=new_quantity.unit.to_string() + ) + + if isinstance(other, (int, float)): + new_quantity = self._quantity.value * other * self._quantity.unit + return Quantity( + value=new_quantity.value, unit=new_quantity.unit.to_string() + ) + + else: + raise TypeError( + "unsupported operand type(s) for *: 'Quantity' and '{}'".format( + type(other).__name__ + ) + ) + + def __truediv__(self, other): + if isinstance(other, Quantity): + if other._quantity.value == 0: + raise ZeroDivisionError("division by zero") + + new_quantity = ( + self._quantity.value + / other._quantity.value + * self._quantity.unit + / other._quantity.unit + ) + return Quantity( + value=new_quantity.value, unit=new_quantity.unit.to_string() + ) + + if isinstance(other, (int, float)): + if other == 0: + raise ZeroDivisionError("division by zero") + + new_quantity = self._quantity.value / other * self._quantity.unit + return Quantity( + value=new_quantity.value, unit=new_quantity.unit.to_string() + ) + + raise TypeError( + "unsupported operand type(s) for /: 'Quantity' and '{}'".format( + type(other).__name__ + ) + ) + + def __add__(self, other): + if isinstance(other, Quantity) and self._quantity.unit == other._quantity.unit: + new_quantity = ( + self._quantity.value + other._quantity.value + ) * self._quantity.unit + return Quantity( + value=new_quantity.value, unit=new_quantity.unit.to_string() + ) + + if isinstance(other, (int, float)): + new_quantity = (self._quantity.value + other) * self._quantity.unit + return Quantity( + value=new_quantity.value, unit=new_quantity.unit.to_string() + ) + + raise TypeError( + "unsupported operand type(s) for +: 'Quantity' and '{}'".format( + type(other).__name__ + ) + ) + + def __sub__(self, other): + if isinstance(other, Quantity) and self._quantity.unit == other._quantity.unit: + new_quantity = self._quantity - other._quantity + return Quantity( + value=new_quantity.value, unit=new_quantity.unit.to_string() + ) + + if isinstance(other, (int, float)): + new_quantity = (self._quantity.value - other) * self._quantity.unit + return Quantity( + value=new_quantity.value, unit=new_quantity.unit.to_string() + ) + + raise TypeError( + "unsupported operand type(s) for -: 'Quantity' and '{}'".format( + type(other).__name__ + ) + ) + + def __eq__(self, other): + if isinstance(other, Quantity): + return self._quantity == other._quantity + + if isinstance(other, (int, float)): + if not self.value == other: + return False + + warnings.warn( + "Comparing a Quantity object to a scalar. This is not recommended. " + "Consider using the .value attribute to compare the value directly.", + UserWarning, + ) + return self.value == other + + raise TypeError( + "unsupported operand type(s) for ==: 'Quantity' and '{}'".format( + type(other).__name__ + ) + ) + + def __ne__(self, other): + return not self.__eq__(other) + + +if __name__ == "__main__": + quantity = Quantity(value=1, unit="m") + + # JSON + print(quantity.json(indent=2), end="\n\n") + + # XML + print(quantity.xml(), end="\n\n") + + # YAML + print(quantity.yaml(), end="\n\n") + + # Astropy Quantity object + print("Quantity object: ", quantity._quantity, end="\n\n") diff --git a/sdRDM/base/datatypes/test_dm.md b/sdRDM/base/datatypes/test_dm.md new file mode 100644 index 0000000..3904ae7 --- /dev/null +++ b/sdRDM/base/datatypes/test_dm.md @@ -0,0 +1,10 @@ +# QuanitiyTest + +## Objects + +### UnitStuff + +- only_unit + - Type: Unit + - Description: This is a unit + diff --git a/sdRDM/base/datatypes/test_quantity.ipynb b/sdRDM/base/datatypes/test_quantity.ipynb new file mode 100644 index 0000000..b1313a1 --- /dev/null +++ b/sdRDM/base/datatypes/test_quantity.ipynb @@ -0,0 +1,281 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 49, + "metadata": {}, + "outputs": [], + "source": [ + "from sdRDM.base import DataModel" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "metadata": {}, + "outputs": [], + "source": [ + "lib = DataModel.from_markdown(\"test_dm.md\")" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[4mUnitStuff\u001b[0m\n", + "├── \u001b[94mid\u001b[0m = 8fa1134e-a6e4-41fe-8442-022cdee6e6f2\n", + "└── \u001b[94monly_unit\u001b[0m\n", + " └── \u001b[4mUnit\u001b[0m\n", + " ├── \u001b[94mid\u001b[0m = 8434a947-65a6-4b23-bdb5-7fda5656051e\n", + " ├── \u001b[94mname\u001b[0m = mmol / l\n", + " └── \u001b[94mbases\u001b[0m\n", + " ├── 0\n", + " │ └── \u001b[4mBaseUnit\u001b[0m\n", + " │ ├── \u001b[94mscale\u001b[0m = 0.001\n", + " │ ├── \u001b[94mkind\u001b[0m = mol\n", + " │ └── \u001b[94mexponent\u001b[0m = 1.0\n", + " └── 1\n", + " └── \u001b[4mBaseUnit\u001b[0m\n", + " ├── \u001b[94mscale\u001b[0m = 1.0\n", + " ├── \u001b[94mkind\u001b[0m = l\n", + " └── \u001b[94mexponent\u001b[0m = -1.0\n", + "\n" + ] + } + ], + "source": [ + "unit = lib.UnitStuff(only_unit=\"mmol/l\")\n", + "print(unit)" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": {}, + "outputs": [], + "source": [ + "%reload_ext autoreload\n", + "%autoreload 2\n", + "from sdRDM.base.datatypes.quantity import Quantity" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "metadata": {}, + "outputs": [], + "source": [ + "volume = Quantity(value=4, unit=\"l\")\n", + "ammount = Quantity(value=2, unit=\"mmol\")" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Quantity(id='a476d64d-ac25-4285-a4bc-06ed90087944', value=0.5, unit=Unit(id='2dbbfb17-98cf-41bb-85a1-eab68d4ae608', name='mmol / l', bases=[BaseUnit(scale=0.001, kind=Unit(\"mol\"), exponent=1.0), BaseUnit(scale=1.0, kind=Unit(\"l\"), exponent=-1.0)]))" + ] + }, + "execution_count": 54, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "conc = ammount / volume\n", + "conc" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Quantity(id='0170149a-ae7a-48a5-8cff-100c4e863497', value=4, unit=Unit(id='877589fc-26c3-4337-8e84-44fa142f3171', name='l', bases=[BaseUnit(scale=1.0, kind=Unit(\"l\"), exponent=1.0)]))" + ] + }, + "execution_count": 55, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "volume" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Quantity(id='5ee41bd8-a9f1-4f68-80f8-211e68ea2f1d', value=5.0, unit=Unit(id='9b126978-bc26-4db3-b38d-ce73d7cdf72e', name='mmol', bases=[BaseUnit(scale=0.001, kind=Unit(\"mol\"), exponent=1.0)]))" + ] + }, + "execution_count": 56, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ammount + 3" + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[4mQuantity\u001b[0m\n", + "├── \u001b[94mid\u001b[0m = 36f9202f-1825-4d76-b48e-814d687bd440\n", + "├── \u001b[94mvalue\u001b[0m = 2.5\n", + "└── \u001b[94munit\u001b[0m\n", + " └── \u001b[4mUnit\u001b[0m\n", + " ├── \u001b[94mid\u001b[0m = a3f6a2a4-46d6-441e-b4be-b84aa792b8e4\n", + " ├── \u001b[94mname\u001b[0m = mmol / l\n", + " └── \u001b[94mbases\u001b[0m\n", + " ├── 0\n", + " │ └── \u001b[4mBaseUnit\u001b[0m\n", + " │ ├── \u001b[94mscale\u001b[0m = 0.001\n", + " │ ├── \u001b[94mkind\u001b[0m = mol\n", + " │ └── \u001b[94mexponent\u001b[0m = 1.0\n", + " └── 1\n", + " └── \u001b[4mBaseUnit\u001b[0m\n", + " ├── \u001b[94mscale\u001b[0m = 1.0\n", + " ├── \u001b[94mkind\u001b[0m = l\n", + " └── \u001b[94mexponent\u001b[0m = -1.0\n", + "\n" + ] + } + ], + "source": [ + "print(conc * 5)" + ] + }, + { + "cell_type": "code", + "execution_count": 58, + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$\\mathrm{\\frac{mmol}{\\mathcal{l}}}$" + ], + "text/plain": [ + "Unit(\"mmol / l\")" + ] + }, + "execution_count": 58, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "conc.unit._unit" + ] + }, + { + "cell_type": "code", + "execution_count": 61, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 61, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "Quantity(value=1, unit=\"mm\") == Quantity(value=1, unit=\"mm\")" + ] + }, + { + "cell_type": "code", + "execution_count": 68, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "False" + ] + }, + "execution_count": 68, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "q1 = Quantity(value=1, unit=\"mm\")\n", + "q2 = Quantity(value=1, unit=\"mm\")\n", + "\n", + "q1.__eq__(q2) is True" + ] + }, + { + "cell_type": "code", + "execution_count": 73, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "False" + ] + }, + "execution_count": 73, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "Quantity(value=1000, unit=\"mm\") == \"abx\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "sdrdm", + "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.3" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/sdRDM/generator/datatypes.py b/sdRDM/generator/datatypes.py index 2876ce0..1526ebb 100644 --- a/sdRDM/generator/datatypes.py +++ b/sdRDM/generator/datatypes.py @@ -141,6 +141,7 @@ class DataTypes(Enum): ) H5Dataset = ("H5Dataset", ["from h5py._hl.dataset import Dataset as H5Dataset"]) h5dataset = ("H5Dataset", ["from h5py._hl.dataset import Dataset as H5Dataset"]) + Quantity = ("Quantity", ["from sdRDM.base.datatypes import Quantity"]) @classmethod def get_value_list(cls): diff --git a/tests/unit/datatypes/__init__.py b/tests/unit/datatypes/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/unit/datatypes/test_quantity.py b/tests/unit/datatypes/test_quantity.py new file mode 100644 index 0000000..92f2632 --- /dev/null +++ b/tests/unit/datatypes/test_quantity.py @@ -0,0 +1,376 @@ +from pydantic import ValidationError +import pytest + +from sdRDM.base.datatypes.quantity import Quantity +from astropy.units import Unit as AstroUnit +from astropy.units import Quantity as AstroQuantity + + +class TestQuantity: + + # Creating a Quantity object with valid value and unit should set the value and unit attributes correctly. + @pytest.mark.unit + def test_valid_value_and_unit(self): + value = 10 + unit = "m" + quantity = Quantity(value, unit) + + assert quantity.value == value + assert quantity.unit.name == unit + + # The __mul__ method should correctly multiply two Quantity objects and return a new Quantity object with the correct value and unit. + @pytest.mark.unit + def test_multiply_two_quantity_objects(self): + value1 = 10 + unit1 = "m" + quantity1 = Quantity(value1, unit1) + + value2 = 5 + unit2 = "s" + quantity2 = Quantity(value2, unit2) + + result = quantity1 * quantity2 + + assert result.value == value1 * value2 + assert result.unit._unit == AstroUnit(unit1) * AstroUnit(unit2) + + # The __mul__ method should correctly multiply a Quantity object with a scalar and return a new Quantity object with the correct value and unit. + @pytest.mark.unit + def test_multiply_quantity_with_scalar(self): + value = 10 + unit = "m" + quantity = Quantity(value, unit) + + scalar = 5 + + result = quantity * scalar + + assert result.value == value * scalar + assert result.unit.name == unit + + # Creating a Quantity object with a non-numeric value should raise a validation error. + @pytest.mark.unit + def test_non_numeric_value_validation_error(self): + value = "invalid" + unit = "m" + + with pytest.raises(ValidationError): + Quantity(value, unit) + + # Creating a Quantity object with an invalid unit should raise a validation error. + @pytest.mark.unit + def test_invalid_unit_validation_error(self): + value = 10 + unit = "invalid" + + with pytest.raises(ValueError): + Quantity(value, unit) + + # The __mul__ method should raise a TypeError if the argument is not a Quantity object or a scalar. + @pytest.mark.unit + def test_multiply_invalid_argument_type_error(self): + value = 10 + unit = "m" + quantity = Quantity(value, unit) + + invalid_argument = "invalid" + + with pytest.raises(TypeError): + quantity * invalid_argument + + @pytest.mark.unit + def test_divide_invlid_type_error(self): + value = 10 + unit = "m" + quantity = Quantity(value, unit) + + invalid_argument = "invalid" + + with pytest.raises(TypeError): + quantity / invalid_argument + + @pytest.mark.unit + def test_add_invlid_type_error(self): + value = 10 + unit = "m" + quantity = Quantity(value, unit) + + invalid_argument = "invalid" + + with pytest.raises(TypeError): + quantity + invalid_argument + + @pytest.mark.unit + def test_subtract_invlid_type_error(self): + value = 10 + unit = "m" + quantity = Quantity(value, unit) + + invalid_argument = "invalid" + + with pytest.raises(TypeError): + quantity - invalid_argument + + def test_divide_two_quantity_objects(self): + # Create two Quantity objects + q1 = Quantity(value=10, unit="m") + q2 = Quantity(value=2, unit="s") + + # Divide q1 by q2 + result = q1 / q2 + + # Check the value and unit of the result + assert result.value == 5 + assert result.unit._unit == AstroUnit("m") / AstroUnit("s") + + def test_divide_quantity_by_scalar(self): + # Create a Quantity object + quantity = Quantity(value=10, unit="m") + + # Divide the quantity by a scalar + result = quantity.__truediv__(2) + + # Check that the result is a Quantity object + assert isinstance(result, Quantity) + + # Check that the value and unit of the result are correct + assert result.value == 5 + assert result.unit.bases == quantity.unit.bases + + # The __add__ method should correctly add two Quantity objects with the same unit and return a new Quantity object with the correct value and unit. + def test_add_method_with_same_unit(self): + # Create two Quantity objects with the same unit + q1 = Quantity(value=2, unit="m") + q2 = Quantity(value=3, unit="m") + + # Add the two Quantity objects + result = q1 + q2 + + # Check that the result is a new Quantity object with the correct value and unit + assert isinstance(result, Quantity) + assert result.value == 5 + assert result.unit.bases == q1.unit.bases + + def test_add_scalar_to_quantity(self): + # Create a Quantity object + quantity = Quantity(value=10, unit="m") + + # Add a scalar to the Quantity object + result = quantity + 5 + + # Check that the result is a Quantity object + assert isinstance(result, Quantity) + + # Check that the value and unit of the result are correct + assert result.value == 15 + assert result.unit.bases == quantity.unit.bases + + def test_subtract_two_quantity_objects_with_same_unit(self): + # Create two Quantity objects with the same unit + q1 = Quantity(value=10, unit="m") + q2 = Quantity(value=5, unit="m") + + # Subtract q2 from q1 + result = q1 - q2 + + # Check that the result is a Quantity object + assert isinstance(result, Quantity) + + # Check that the value and unit of the result are correct + assert result.value == 5 + assert result.unit.bases == q1.unit.bases + + def test_subtract_scalar_from_quantity(self): + # Create a Quantity object + quantity = Quantity(value=10, unit="m") + + # Subtract a scalar from the Quantity object + result = quantity - 5 + + # Check that the result is a Quantity object + assert isinstance(result, Quantity) + + # Check that the value and unit of the result are correct + assert result.value == 5 + assert result.unit.bases == quantity.unit.bases + + # subtracting a quantity object from another quantity object with different units should raise a ValueError + @pytest.mark.unit + def test_subtract_quantity_objects_with_different_units(self): + value1 = 10 + unit1 = "m" + quantity1 = Quantity(value1, unit1) + + value2 = 5 + unit2 = "s" + quantity2 = Quantity(value2, unit2) + + with pytest.raises(TypeError): + quantity1 - quantity2 + + # adding a quantity object to another quantity object with different units should raise a ValueError + @pytest.mark.unit + def test_add_quantity_objects_with_different_units(self): + value1 = 10 + unit1 = "m" + quantity1 = Quantity(value1, unit1) + + value2 = 5 + unit2 = "s" + quantity2 = Quantity(value2, unit2) + + with pytest.raises(TypeError): + quantity1 + quantity2 + + # _set_quantity sets the _quantity attribute of Quantity instance with an AstroQuantity object created from the value and unit attributes + def test_set_quantity_sets_quantity_attribute(self): + value = 10 + unit = "m" + quantity = Quantity(value, unit) + quantity._set_quantity() + assert isinstance(quantity._quantity, AstroQuantity) + + # test division by zero scalar + @pytest.mark.unit + def test_division_by_zero_scalar(self): + value = 10 + unit = "m" + quantity = Quantity(value, unit) + with pytest.raises(ZeroDivisionError): + quantity / 0 + + # test division by zero quantity + @pytest.mark.unit + def test_division_by_zero_quantity(self): + value1 = 10 + unit1 = "m" + quantity1 = Quantity(value1, unit1) + + value2 = 0 + unit2 = "s" + quantity2 = Quantity(value2, unit2) + + with pytest.raises(ZeroDivisionError): + quantity1 / quantity2 + + @pytest.mark.unit + def test_multiplication_with_different_units(self): + value1 = 10 + unit1 = "m" + quantity1 = Quantity(value1, unit1) + + value2 = 5 + unit2 = "s" + quantity2 = Quantity(value2, unit2) + + new_quantity = quantity1 * quantity2 + assert new_quantity.value == value1 * value2 + assert new_quantity.unit._unit == AstroUnit(unit1) * AstroUnit(unit2) + + # test division with different units + @pytest.mark.unit + def test_division_with_different_units(self): + value1 = 10 + unit1 = "mmol / l" + quantity1 = Quantity(value1, unit1) + + value2 = 5 + unit2 = "l" + quantity2 = Quantity(value2, unit2) + + new_quantity = quantity1 / quantity2 + assert new_quantity.value == value1 / value2 + assert new_quantity.unit._unit == AstroUnit(unit1) / AstroUnit(unit2) + + # test raise error bitwise operation + @pytest.mark.unit + def test_bitwise_operation_error(self): + value1 = 10 + unit1 = "m" + quantity1 = Quantity(value1, unit1) + + value2 = 5 + unit2 = "s" + quantity2 = Quantity(value2, unit2) + + with pytest.raises(TypeError): + quantity1 & quantity2 + + # test raise error module operation + @pytest.mark.unit + def test_module_operation_error(self): + value1 = 10 + unit1 = "m" + quantity1 = Quantity(value1, unit1) + + value2 = 5 + unit2 = "s" + quantity2 = Quantity(value2, unit2) + + with pytest.raises(TypeError): + quantity1 % quantity2 + + # Two Quantity objects with the same value and unit should be equal. + @pytest.mark.unit + def test_same_value_and_unit(self): + quantity1 = Quantity(value=10, unit="m") + quantity2 = Quantity(value=10, unit="m") + assert quantity1 == quantity2 + + @pytest.mark.unit + def test_compare_to_self(self): + quantity = Quantity(value=10, unit="m") + assert quantity == quantity + + @pytest.mark.unit + def test_compare_to_scalar_with_same_value(self): + quantity = Quantity(value=10, unit="m") + scalar = 10 + assert quantity == scalar + + @pytest.mark.unit + def test_compare_to_scalar_with_nan_value(self): + quantity = Quantity(value=float("nan"), unit="m") + scalar = float("nan") + assert quantity != scalar + + @pytest.mark.unit + def test_compare_to_scalar_with_infinity_value(self): + quantity = Quantity(value=float("inf"), unit="m") + scalar = float("inf") + assert quantity == scalar + + @pytest.mark.unit + def test_comparing_quantity_to_scalar_with_different_value_should_return_false( + self, + ): + quantity = Quantity(value=10, unit="m") + scalar = 5 + assert quantity != scalar + + @pytest.mark.unit + def test_comparing_quantity_to_none(self): + quantity = Quantity(value=10, unit="m") + with pytest.raises(TypeError): + quantity == None + + @pytest.mark.unit + def test_different_values(self): + quantity1 = Quantity(value=10, unit="m") + quantity2 = Quantity(value=20, unit="m") + assert quantity1.__eq__(quantity2) == False + + @pytest.mark.unit + def test_different_units(self): + quantity1 = Quantity(value=10, unit="m") + quantity2 = Quantity(value=10, unit="s") + assert quantity1.__eq__(quantity2) == False + + @pytest.mark.unit + def test_comparing_quantity_to_scalar_with_non_float_value_should_raise_type_error( + self, + ): + quantity = Quantity(value=10, unit="m") + scalar = "abc" + with pytest.raises(TypeError): + quantity.__eq__(scalar)