From 89fe963e5bd4be6d428b94f89d5dcaba471470f1 Mon Sep 17 00:00:00 2001 From: Akio Taniguchi Date: Sat, 16 Apr 2022 01:32:02 +0000 Subject: [PATCH 1/5] #152 Update project dependencies --- poetry.lock | 127 ++++++++++++++++++++++++++++++++++++------------- pyproject.toml | 14 +++++- 2 files changed, 107 insertions(+), 34 deletions(-) diff --git a/poetry.lock b/poetry.lock index b157008..ea897f8 100644 --- a/poetry.lock +++ b/poetry.lock @@ -398,13 +398,14 @@ python-versions = "*" [[package]] name = "myst-parser" -version = "0.17.0" +version = "0.17.1" description = "An extended commonmark compliant parser, with bridges to docutils & sphinx." category = "dev" optional = false python-versions = ">=3.7" [package.dependencies] +attrs = ">=19" docutils = ">=0.15,<0.18" jinja2 = "*" markdown-it-py = ">=1.0.0,<3.0.0" @@ -416,9 +417,17 @@ typing-extensions = "*" [package.extras] code_style = ["pre-commit (>=2.12,<3.0)"] linkify = ["linkify-it-py (>=1.0,<2.0)"] -rtd = ["ipython", "sphinx-book-theme (>=0.1.0,<0.2.0)", "sphinx-panels (>=0.5.2,<0.6.0)", "sphinxcontrib-bibtex (>=2.1,<3.0)", "sphinxext-rediraffe (>=0.2,<1.0)", "sphinxcontrib.mermaid (>=0.6.3,<0.7.0)", "sphinxext-opengraph (>=0.4.2,<0.5.0)"] +rtd = ["ipython", "sphinx-book-theme", "sphinx-panels", "sphinxcontrib-bibtex (>=2.4,<3.0)", "sphinxext-rediraffe (>=0.2.7,<0.3.0)", "sphinxcontrib.mermaid (>=0.7.1,<0.8.0)", "sphinxext-opengraph (>=0.6.3,<0.7.0)"] testing = ["beautifulsoup4", "coverage", "docutils (>=0.17.0,<0.18.0)", "pytest (>=6,<7)", "pytest-cov", "pytest-regressions", "pytest-param-files (>=0.3.4,<0.4.0)"] +[[package]] +name = "nodeenv" +version = "1.6.0" +description = "Node.js virtual environment builder" +category = "dev" +optional = false +python-versions = "*" + [[package]] name = "numpy" version = "1.21.6" @@ -427,6 +436,14 @@ category = "main" optional = false python-versions = ">=3.7,<3.11" +[[package]] +name = "numpy" +version = "1.22.3" +description = "NumPy is the fundamental package for array computing with Python." +category = "main" +optional = false +python-versions = ">=3.8" + [[package]] name = "packaging" version = "21.3" @@ -622,6 +639,22 @@ python-versions = ">=3.6.8" [package.extras] diagrams = ["railroad-diagrams", "jinja2"] +[[package]] +name = "pyright" +version = "1.1.237" +description = "Command line wrapper for pyright" +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +nodeenv = ">=1.6.0" +typing-extensions = {version = ">=3.7", markers = "python_version < \"3.8\""} + +[package.extras] +all = ["twine (>=3.4.1)"] +dev = ["twine (>=3.4.1)"] + [[package]] name = "pytest" version = "7.1.1" @@ -707,7 +740,7 @@ python-versions = "*" [[package]] name = "soupsieve" -version = "2.3.2" +version = "2.3.2.post1" description = "A modern CSS selector implementation for Beautiful Soup." category = "dev" optional = false @@ -853,7 +886,7 @@ test = ["pytest"] [[package]] name = "typed-ast" -version = "1.5.2" +version = "1.5.3" description = "a fork of Python 2 and 3 ast modules with type comment support" category = "dev" optional = false @@ -946,7 +979,7 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest- [metadata] lock-version = "1.1" python-versions = ">=3.7.1, <3.11" -content-hash = "ece808b500e08e31332049d5780a6263d3f4c01a120c6150df9a5d9c3f4c57f2" +content-hash = "cf9e90cc0c032fb3dc48dd140e43e0af3315228ae4fbf74bd4d8ceba993caf7e" [metadata.files] alabaster = [ @@ -1135,8 +1168,12 @@ mypy-extensions = [ {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, ] myst-parser = [ - {file = "myst-parser-0.17.0.tar.gz", hash = "sha256:d412347a5cacb77ebc03d7f7ffef050cd61957d46f234313d350e84e24972260"}, - {file = "myst_parser-0.17.0-py3-none-any.whl", hash = "sha256:555ec2950aba5ae5dac5c162c7e9a43ad4a7291cfac644d8f5f84da8efa6f356"}, + {file = "myst-parser-0.17.1.tar.gz", hash = "sha256:45fe6407d49221bdcc10d5000f4f2f3ff2614af268dd33f351f7230d6059f0d8"}, + {file = "myst_parser-0.17.1-py3-none-any.whl", hash = "sha256:84815cadbb9f3404651549e5fe332301e4e8c15712013738f67c253f00b8e58f"}, +] +nodeenv = [ + {file = "nodeenv-1.6.0-py2.py3-none-any.whl", hash = "sha256:621e6b7076565ddcacd2db0294c0381e01fd28945ab36bcf00f41c5daf63bef7"}, + {file = "nodeenv-1.6.0.tar.gz", hash = "sha256:3ef13ff90291ba2a4a7a4ff9a979b63ffdd00a464dbe04acf0ea6471517a4c2b"}, ] numpy = [ {file = "numpy-1.21.6-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:8737609c3bbdd48e380d463134a35ffad3b22dc56295eff6f79fd85bd0eeeb25"}, @@ -1170,6 +1207,26 @@ numpy = [ {file = "numpy-1.21.6-cp39-cp39-win_amd64.whl", hash = "sha256:e31f0bb5928b793169b87e3d1e070f2342b22d5245c755e2b81caa29756246c3"}, {file = "numpy-1.21.6-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:dd1c8f6bd65d07d3810b90d02eba7997e32abbdf1277a481d698969e921a3be0"}, {file = "numpy-1.21.6.zip", hash = "sha256:ecb55251139706669fdec2ff073c98ef8e9a84473e51e716211b41aa0f18e656"}, + {file = "numpy-1.22.3-cp310-cp310-macosx_10_14_x86_64.whl", hash = "sha256:92bfa69cfbdf7dfc3040978ad09a48091143cffb778ec3b03fa170c494118d75"}, + {file = "numpy-1.22.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8251ed96f38b47b4295b1ae51631de7ffa8260b5b087808ef09a39a9d66c97ab"}, + {file = "numpy-1.22.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:48a3aecd3b997bf452a2dedb11f4e79bc5bfd21a1d4cc760e703c31d57c84b3e"}, + {file = "numpy-1.22.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a3bae1a2ed00e90b3ba5f7bd0a7c7999b55d609e0c54ceb2b076a25e345fa9f4"}, + {file = "numpy-1.22.3-cp310-cp310-win32.whl", hash = "sha256:f950f8845b480cffe522913d35567e29dd381b0dc7e4ce6a4a9f9156417d2430"}, + {file = "numpy-1.22.3-cp310-cp310-win_amd64.whl", hash = "sha256:08d9b008d0156c70dc392bb3ab3abb6e7a711383c3247b410b39962263576cd4"}, + {file = "numpy-1.22.3-cp38-cp38-macosx_10_14_x86_64.whl", hash = "sha256:201b4d0552831f7250a08d3b38de0d989d6f6e4658b709a02a73c524ccc6ffce"}, + {file = "numpy-1.22.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:f8c1f39caad2c896bc0018f699882b345b2a63708008be29b1f355ebf6f933fe"}, + {file = "numpy-1.22.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:568dfd16224abddafb1cbcce2ff14f522abe037268514dd7e42c6776a1c3f8e5"}, + {file = "numpy-1.22.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ca688e1b9b95d80250bca34b11a05e389b1420d00e87a0d12dc45f131f704a1"}, + {file = "numpy-1.22.3-cp38-cp38-win32.whl", hash = "sha256:e7927a589df200c5e23c57970bafbd0cd322459aa7b1ff73b7c2e84d6e3eae62"}, + {file = "numpy-1.22.3-cp38-cp38-win_amd64.whl", hash = "sha256:07a8c89a04997625236c5ecb7afe35a02af3896c8aa01890a849913a2309c676"}, + {file = "numpy-1.22.3-cp39-cp39-macosx_10_14_x86_64.whl", hash = "sha256:2c10a93606e0b4b95c9b04b77dc349b398fdfbda382d2a39ba5a822f669a0123"}, + {file = "numpy-1.22.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fade0d4f4d292b6f39951b6836d7a3c7ef5b2347f3c420cd9820a1d90d794802"}, + {file = "numpy-1.22.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5bfb1bb598e8229c2d5d48db1860bcf4311337864ea3efdbe1171fb0c5da515d"}, + {file = "numpy-1.22.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:97098b95aa4e418529099c26558eeb8486e66bd1e53a6b606d684d0c3616b168"}, + {file = "numpy-1.22.3-cp39-cp39-win32.whl", hash = "sha256:fdf3c08bce27132395d3c3ba1503cac12e17282358cb4bddc25cc46b0aca07aa"}, + {file = "numpy-1.22.3-cp39-cp39-win_amd64.whl", hash = "sha256:639b54cdf6aa4f82fe37ebf70401bbb74b8508fddcf4797f9fe59615b8c5813a"}, + {file = "numpy-1.22.3-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c34ea7e9d13a70bf2ab64a2532fe149a9aced424cd05a2c4ba662fd989e3e45f"}, + {file = "numpy-1.22.3.zip", hash = "sha256:dbc7601a3b7472d559dc7b933b18b4b66f9aa7452c120e87dfb33d02008c8a18"}, ] packaging = [ {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"}, @@ -1275,6 +1332,10 @@ pyparsing = [ {file = "pyparsing-3.0.8-py3-none-any.whl", hash = "sha256:ef7b523f6356f763771559412c0d7134753f037822dad1b16945b7b846f7ad06"}, {file = "pyparsing-3.0.8.tar.gz", hash = "sha256:7bf433498c016c4314268d95df76c81b842a4cb2b276fa3312cfb1e1d85f6954"}, ] +pyright = [ + {file = "pyright-1.1.237-py3-none-any.whl", hash = "sha256:4e9ec6b21308925aadb01187f1f6c68cc27f9733365b7d0246ff53bda90d10cf"}, + {file = "pyright-1.1.237.tar.gz", hash = "sha256:b18e11cdc2620f48ad34817c93060243b81095ce5b17cdddb8d9e2ee6ad4d002"}, +] pytest = [ {file = "pytest-7.1.1-py3-none-any.whl", hash = "sha256:92f723789a8fdd7180b6b06483874feca4c48a5c76968e03bb3e7f806a1869ea"}, {file = "pytest-7.1.1.tar.gz", hash = "sha256:841132caef6b1ad17a9afde46dc4f6cfa59a05f9555aae5151f73bdf2820ca63"}, @@ -1335,8 +1396,8 @@ snowballstemmer = [ {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, ] soupsieve = [ - {file = "soupsieve-2.3.2-py3-none-any.whl", hash = "sha256:a714129d3021ec17ce5be346b1007300558b378332c289a1a20e7d4de6ff18a5"}, - {file = "soupsieve-2.3.2.tar.gz", hash = "sha256:0bcc6d7432153063e3df09c3ac9442af3eba488715bfcad6a4c38ccb2a523124"}, + {file = "soupsieve-2.3.2.post1-py3-none-any.whl", hash = "sha256:3b2503d3c7084a42b1ebd08116e5f81aadfaea95863628c80a3b774a11b7c759"}, + {file = "soupsieve-2.3.2.post1.tar.gz", hash = "sha256:fc53893b3da2c33de295667a0e19f078c14bf86544af307354de5fcf12a3f30d"}, ] sphinx = [ {file = "Sphinx-4.5.0-py3-none-any.whl", hash = "sha256:ebf612653238bcc8f4359627a9b7ce44ede6fdd75d9d30f68255c7383d3a6226"}, @@ -1379,30 +1440,30 @@ traitlets = [ {file = "traitlets-5.1.1.tar.gz", hash = "sha256:059f456c5a7c1c82b98c2e8c799f39c9b8128f6d0d46941ee118daace9eb70c7"}, ] typed-ast = [ - {file = "typed_ast-1.5.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:183b183b7771a508395d2cbffd6db67d6ad52958a5fdc99f450d954003900266"}, - {file = "typed_ast-1.5.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:676d051b1da67a852c0447621fdd11c4e104827417bf216092ec3e286f7da596"}, - {file = "typed_ast-1.5.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bc2542e83ac8399752bc16e0b35e038bdb659ba237f4222616b4e83fb9654985"}, - {file = "typed_ast-1.5.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:74cac86cc586db8dfda0ce65d8bcd2bf17b58668dfcc3652762f3ef0e6677e76"}, - {file = "typed_ast-1.5.2-cp310-cp310-win_amd64.whl", hash = "sha256:18fe320f354d6f9ad3147859b6e16649a0781425268c4dde596093177660e71a"}, - {file = "typed_ast-1.5.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:31d8c6b2df19a777bc8826770b872a45a1f30cfefcfd729491baa5237faae837"}, - {file = "typed_ast-1.5.2-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:963a0ccc9a4188524e6e6d39b12c9ca24cc2d45a71cfdd04a26d883c922b4b78"}, - {file = "typed_ast-1.5.2-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:0eb77764ea470f14fcbb89d51bc6bbf5e7623446ac4ed06cbd9ca9495b62e36e"}, - {file = "typed_ast-1.5.2-cp36-cp36m-win_amd64.whl", hash = "sha256:294a6903a4d087db805a7656989f613371915fc45c8cc0ddc5c5a0a8ad9bea4d"}, - {file = "typed_ast-1.5.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:26a432dc219c6b6f38be20a958cbe1abffcc5492821d7e27f08606ef99e0dffd"}, - {file = "typed_ast-1.5.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c7407cfcad702f0b6c0e0f3e7ab876cd1d2c13b14ce770e412c0c4b9728a0f88"}, - {file = "typed_ast-1.5.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f30ddd110634c2d7534b2d4e0e22967e88366b0d356b24de87419cc4410c41b7"}, - {file = "typed_ast-1.5.2-cp37-cp37m-win_amd64.whl", hash = "sha256:8c08d6625bb258179b6e512f55ad20f9dfef019bbfbe3095247401e053a3ea30"}, - {file = "typed_ast-1.5.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:90904d889ab8e81a956f2c0935a523cc4e077c7847a836abee832f868d5c26a4"}, - {file = "typed_ast-1.5.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:bbebc31bf11762b63bf61aaae232becb41c5bf6b3461b80a4df7e791fabb3aca"}, - {file = "typed_ast-1.5.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c29dd9a3a9d259c9fa19d19738d021632d673f6ed9b35a739f48e5f807f264fb"}, - {file = "typed_ast-1.5.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:58ae097a325e9bb7a684572d20eb3e1809802c5c9ec7108e85da1eb6c1a3331b"}, - {file = "typed_ast-1.5.2-cp38-cp38-win_amd64.whl", hash = "sha256:da0a98d458010bf4fe535f2d1e367a2e2060e105978873c04c04212fb20543f7"}, - {file = "typed_ast-1.5.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:33b4a19ddc9fc551ebabca9765d54d04600c4a50eda13893dadf67ed81d9a098"}, - {file = "typed_ast-1.5.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1098df9a0592dd4c8c0ccfc2e98931278a6c6c53cb3a3e2cf7e9ee3b06153344"}, - {file = "typed_ast-1.5.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42c47c3b43fe3a39ddf8de1d40dbbfca60ac8530a36c9b198ea5b9efac75c09e"}, - {file = "typed_ast-1.5.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f290617f74a610849bd8f5514e34ae3d09eafd521dceaa6cf68b3f4414266d4e"}, - {file = "typed_ast-1.5.2-cp39-cp39-win_amd64.whl", hash = "sha256:df05aa5b241e2e8045f5f4367a9f6187b09c4cdf8578bb219861c4e27c443db5"}, - {file = "typed_ast-1.5.2.tar.gz", hash = "sha256:525a2d4088e70a9f75b08b3f87a51acc9cde640e19cc523c7e41aa355564ae27"}, + {file = "typed_ast-1.5.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9ad3b48cf2b487be140072fb86feff36801487d4abb7382bb1929aaac80638ea"}, + {file = "typed_ast-1.5.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:542cd732351ba8235f20faa0fc7398946fe1a57f2cdb289e5497e1e7f48cfedb"}, + {file = "typed_ast-1.5.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5dc2c11ae59003d4a26dda637222d9ae924387f96acae9492df663843aefad55"}, + {file = "typed_ast-1.5.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:fd5df1313915dbd70eaaa88c19030b441742e8b05e6103c631c83b75e0435ccc"}, + {file = "typed_ast-1.5.3-cp310-cp310-win_amd64.whl", hash = "sha256:e34f9b9e61333ecb0f7d79c21c28aa5cd63bec15cb7e1310d7d3da6ce886bc9b"}, + {file = "typed_ast-1.5.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f818c5b81966d4728fec14caa338e30a70dfc3da577984d38f97816c4b3071ec"}, + {file = "typed_ast-1.5.3-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3042bfc9ca118712c9809201f55355479cfcdc17449f9f8db5e744e9625c6805"}, + {file = "typed_ast-1.5.3-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:4fff9fdcce59dc61ec1b317bdb319f8f4e6b69ebbe61193ae0a60c5f9333dc49"}, + {file = "typed_ast-1.5.3-cp36-cp36m-win_amd64.whl", hash = "sha256:8e0b8528838ffd426fea8d18bde4c73bcb4167218998cc8b9ee0a0f2bfe678a6"}, + {file = "typed_ast-1.5.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8ef1d96ad05a291f5c36895d86d1375c0ee70595b90f6bb5f5fdbee749b146db"}, + {file = "typed_ast-1.5.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed44e81517364cb5ba367e4f68fca01fba42a7a4690d40c07886586ac267d9b9"}, + {file = "typed_ast-1.5.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f60d9de0d087454c91b3999a296d0c4558c1666771e3460621875021bf899af9"}, + {file = "typed_ast-1.5.3-cp37-cp37m-win_amd64.whl", hash = "sha256:9e237e74fd321a55c90eee9bc5d44be976979ad38a29bbd734148295c1ce7617"}, + {file = "typed_ast-1.5.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ee852185964744987609b40aee1d2eb81502ae63ee8eef614558f96a56c1902d"}, + {file = "typed_ast-1.5.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:27e46cdd01d6c3a0dd8f728b6a938a6751f7bd324817501c15fb056307f918c6"}, + {file = "typed_ast-1.5.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d64dabc6336ddc10373922a146fa2256043b3b43e61f28961caec2a5207c56d5"}, + {file = "typed_ast-1.5.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:8cdf91b0c466a6c43f36c1964772918a2c04cfa83df8001ff32a89e357f8eb06"}, + {file = "typed_ast-1.5.3-cp38-cp38-win_amd64.whl", hash = "sha256:9cc9e1457e1feb06b075c8ef8aeb046a28ec351b1958b42c7c31c989c841403a"}, + {file = "typed_ast-1.5.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e20d196815eeffb3d76b75223e8ffed124e65ee62097e4e73afb5fec6b993e7a"}, + {file = "typed_ast-1.5.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:37e5349d1d5de2f4763d534ccb26809d1c24b180a477659a12c4bde9dd677d74"}, + {file = "typed_ast-1.5.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c9f1a27592fac87daa4e3f16538713d705599b0a27dfe25518b80b6b017f0a6d"}, + {file = "typed_ast-1.5.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:8831479695eadc8b5ffed06fdfb3e424adc37962a75925668deeb503f446c0a3"}, + {file = "typed_ast-1.5.3-cp39-cp39-win_amd64.whl", hash = "sha256:20d5118e494478ef2d3a2702d964dae830aedd7b4d3b626d003eea526be18718"}, + {file = "typed_ast-1.5.3.tar.gz", hash = "sha256:27f25232e2dd0edfe1f019d6bfaaf11e86e657d9bdb7b0956db95f560cceb2b3"}, ] typing-extensions = [ {file = "typing_extensions-3.10.0.2-py2-none-any.whl", hash = "sha256:d8226d10bc02a29bcc81df19a26e56a9647f8b0a6d4a83924139f4a8b01f17b7"}, diff --git a/pyproject.toml b/pyproject.toml index d370554..6e7e44f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,10 @@ documentation = "https://astropenguin.github.io/xarray-dataclasses/" python = ">=3.7.1, <3.11" morecopy = "^0.2" more-itertools = "^8.12" -numpy = "^1.15" +numpy = [ + { version = ">=1.15, <1.22", python = ">=3.7.1, <3.8" }, + { version = "^1.15", python = ">=3.8, <3.11" }, +] typing-extensions = "^3.10" xarray = [ { version = ">=0.18, <0.21", python = ">=3.7.1, <3.8" }, @@ -28,9 +31,18 @@ ipython = [ ] myst-parser = "^0.17" pydata-sphinx-theme = "^0.8" +pyright = "^1.1" pytest = "^7.1" sphinx = "^4.5" +[tool.pyright] +typeCheckingMode = "strict" +reportImportCycles = "warning" +reportUnknownArgumentType = "warning" +reportUnknownMemberType = "warning" +reportUnknownParameterType = "warning" +reportUnknownVariableType = "warning" + [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" From 1555e1d06956d869df072ba0d17d2b0048baf4d1 Mon Sep 17 00:00:00 2001 From: Akio Taniguchi Date: Sat, 16 Apr 2022 01:32:53 +0000 Subject: [PATCH 2/5] #152 Use Pyright installed from PyPI --- .devcontainer/devcontainer.json | 1 - .github/workflows/tests.yml | 7 ++----- package-lock.json | 33 --------------------------------- package.json | 5 ----- pyrightconfig.json | 8 -------- 5 files changed, 2 insertions(+), 52 deletions(-) delete mode 100644 package-lock.json delete mode 100644 package.json delete mode 100644 pyrightconfig.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 1319b2d..a16bc0e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -15,7 +15,6 @@ "settings": { "files.insertFinalNewline": true, "files.trimTrailingWhitespace": true, - "python.analysis.typeCheckingMode": "strict", "python.formatting.provider": "black", "python.languageServer": "Pylance", "[python]": { diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 96d91c6..a919a63 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,15 +22,12 @@ jobs: - uses: actions/setup-python@v2 with: python-version: ${{ matrix.python }} - - uses: actions/setup-node@v2 - with: - node-version: "lts/gallium" - name: Install project dependencies - run: pip install poetry && poetry install && npm install + run: pip install poetry && poetry install - name: Test code's formatting (Black) run: black --check docs tests xarray_dataclasses - name: Test code's typing (Pyright) - run: npx pyright docs tests xarray_dataclasses + run: pyright docs tests xarray_dataclasses - name: Test code's execution (pytest) run: pytest -v tests - name: Test docs' building (Sphinx) diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 8da1e9f..0000000 --- a/package-lock.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "xarray-dataclasses", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "devDependencies": { - "pyright": "~1.1" - } - }, - "node_modules/pyright": { - "version": "1.1.227", - "resolved": "https://registry.npmjs.org/pyright/-/pyright-1.1.227.tgz", - "integrity": "sha512-/nRQqbTpHraNiUZ0tpQfWYyqOV4nByx/rRHZp+wFjRv6v3Vfg1rIa973y9LsfH/vGkETbZMvRanb8VSlWp9Tlg==", - "dev": true, - "bin": { - "pyright": "index.js", - "pyright-langserver": "langserver.index.js" - }, - "engines": { - "node": ">=12.0.0" - } - } - }, - "dependencies": { - "pyright": { - "version": "1.1.227", - "resolved": "https://registry.npmjs.org/pyright/-/pyright-1.1.227.tgz", - "integrity": "sha512-/nRQqbTpHraNiUZ0tpQfWYyqOV4nByx/rRHZp+wFjRv6v3Vfg1rIa973y9LsfH/vGkETbZMvRanb8VSlWp9Tlg==", - "dev": true - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index 75e98e4..0000000 --- a/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "devDependencies": { - "pyright": "~1.1" - } -} diff --git a/pyrightconfig.json b/pyrightconfig.json deleted file mode 100644 index 750f675..0000000 --- a/pyrightconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "typeCheckingMode": "strict", - "reportImportCycles": "warning", - "reportUnknownArgumentType": "warning", - "reportUnknownMemberType": "warning", - "reportUnknownParameterType": "warning", - "reportUnknownVariableType": "warning" -} From b9750cfed733c88739b081caddd549363b4e2fd0 Mon Sep 17 00:00:00 2001 From: Akio Taniguchi Date: Sat, 16 Apr 2022 01:43:55 +0000 Subject: [PATCH 3/5] #152 Update generic type hints --- pyproject.toml | 4 +--- xarray_dataclasses/__init__.py | 12 ------------ xarray_dataclasses/dataarray.py | 8 ++++---- xarray_dataclasses/datamodel.py | 5 +++-- xarray_dataclasses/dataset.py | 10 +++++----- xarray_dataclasses/typing.py | 6 +++++- 6 files changed, 18 insertions(+), 27 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6e7e44f..cb8f142 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,12 +36,10 @@ pytest = "^7.1" sphinx = "^4.5" [tool.pyright] -typeCheckingMode = "strict" reportImportCycles = "warning" reportUnknownArgumentType = "warning" reportUnknownMemberType = "warning" -reportUnknownParameterType = "warning" -reportUnknownVariableType = "warning" +typeCheckingMode = "strict" [build-system] requires = ["poetry-core>=1.0.0"] diff --git a/xarray_dataclasses/__init__.py b/xarray_dataclasses/__init__.py index 760f9ea..6538432 100644 --- a/xarray_dataclasses/__init__.py +++ b/xarray_dataclasses/__init__.py @@ -2,18 +2,6 @@ __version__ = "1.1.0" -# for Python 3.7 and 3.8 -def _make_field_generic(): - from dataclasses import Field - from typing import Sequence - - GenericAlias = type(Sequence[int]) - Field.__class_getitem__ = classmethod(GenericAlias) - - -_make_field_generic() - - # submodules from . import dataarray from . import dataset diff --git a/xarray_dataclasses/dataarray.py b/xarray_dataclasses/dataarray.py index 145f3fa..b9baa11 100644 --- a/xarray_dataclasses/dataarray.py +++ b/xarray_dataclasses/dataarray.py @@ -27,7 +27,7 @@ # submodules from .datamodel import DataModel from .dataoptions import DataOptions -from .typing import DataClass, DataClassFields, DataType, Order, Shape, Sizes +from .typing import AnyArray, DataClass, DataClassFields, DataType, Order, Shape, Sizes # type hints @@ -168,7 +168,7 @@ def new(cls: Any, *args: Any, **kwargs: Any) -> Any: @classmethod def shaped( cls: Type[OptionedClass[PInit, TDataArray]], - func: Callable[[Shape], np.ndarray], + func: Callable[[Shape], AnyArray], shape: Union[Shape, Sizes], **kwargs: Any, ) -> TDataArray: @@ -178,7 +178,7 @@ def shaped( @classmethod def shaped( cls: Type[DataClass[PInit]], - func: Callable[[Shape], np.ndarray], + func: Callable[[Shape], AnyArray], shape: Union[Shape, Sizes], **kwargs: Any, ) -> xr.DataArray: @@ -187,7 +187,7 @@ def shaped( @classmethod def shaped( cls: Any, - func: Callable[[Shape], np.ndarray], + func: Callable[[Shape], AnyArray], shape: Union[Shape, Sizes], **kwargs: Any, ) -> Any: diff --git a/xarray_dataclasses/datamodel.py b/xarray_dataclasses/datamodel.py index 222828e..6e9e8dd 100644 --- a/xarray_dataclasses/datamodel.py +++ b/xarray_dataclasses/datamodel.py @@ -3,7 +3,7 @@ # standard library -from dataclasses import Field, dataclass, field, is_dataclass +from dataclasses import dataclass, field, is_dataclass from typing import Any, Dict, Hashable, List, Optional, Tuple, Type, Union, cast @@ -15,6 +15,7 @@ # submodules from .typing import ( + AnyField, DataClass, DataType, Dims, @@ -204,7 +205,7 @@ def eval_dataclass(dataclass: AnyDataClass[PInit]) -> None: field.type = types[field.name] -def get_entry(field: Field[Any], value: Any) -> AnyEntry: +def get_entry(field: AnyField, value: Any) -> AnyEntry: """Create an entry from a field and its value.""" field_type = get_field_type(field.type) repr_type = get_repr_type(field.type) diff --git a/xarray_dataclasses/dataset.py b/xarray_dataclasses/dataset.py index 54c73e2..d559ebc 100644 --- a/xarray_dataclasses/dataset.py +++ b/xarray_dataclasses/dataset.py @@ -18,7 +18,7 @@ # submodules from .datamodel import DataModel from .dataoptions import DataOptions -from .typing import DataClass, DataClassFields, DataType, Order, Shape, Sizes +from .typing import AnyArray, DataClass, DataClassFields, DataType, Order, Shape, Sizes # type hints @@ -159,7 +159,7 @@ def new(cls: Any, *args: Any, **kwargs: Any) -> Any: @classmethod def shaped( cls: Type[OptionedClass[PInit, TDataset]], - func: Callable[[Shape], np.ndarray], + func: Callable[[Shape], AnyArray], sizes: Sizes, **kwargs: Any, ) -> TDataset: @@ -169,7 +169,7 @@ def shaped( @classmethod def shaped( cls: Type[DataClass[PInit]], - func: Callable[[Shape], np.ndarray], + func: Callable[[Shape], AnyArray], sizes: Sizes, **kwargs: Any, ) -> xr.Dataset: @@ -178,7 +178,7 @@ def shaped( @classmethod def shaped( cls: Any, - func: Callable[[Shape], np.ndarray], + func: Callable[[Shape], AnyArray], sizes: Sizes, **kwargs: Any, ) -> Any: @@ -194,7 +194,7 @@ def shaped( """ model = DataModel.from_dataclass(cls) - data_vars: Dict[str, np.ndarray] = {} + data_vars: Dict[str, AnyArray] = {} for key, entry in model.data_vars_items: shape = tuple(sizes[dim] for dim in entry.dims) diff --git a/xarray_dataclasses/typing.py b/xarray_dataclasses/typing.py index 7248abd..bb9d58d 100644 --- a/xarray_dataclasses/typing.py +++ b/xarray_dataclasses/typing.py @@ -35,6 +35,7 @@ # dependencies +import numpy as np import xarray as xr from more_itertools import collapse from typing_extensions import ( @@ -42,6 +43,7 @@ Literal, ParamSpec, Protocol, + TypeAlias, get_args, get_origin, get_type_hints, @@ -56,7 +58,9 @@ TDtype = TypeVar("TDtype", covariant=True) TName = TypeVar("TName", bound=Hashable) -DataClassFields = Dict[str, Field[Any]] +AnyArray: TypeAlias = "np.ndarray[Any, Any]" +AnyField: TypeAlias = "Field[Any]" +DataClassFields = Dict[str, AnyField] DataType = Union[xr.DataArray, xr.Dataset] Dims = Tuple[str, ...] Dtype = Optional[str] From 163121e03268ae11abd050901ac02e1a3953931d Mon Sep 17 00:00:00 2001 From: Akio Taniguchi Date: Sat, 16 Apr 2022 01:45:27 +0000 Subject: [PATCH 4/5] #152 Do not allow fail-fast in test workflow --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a919a63..e9fe5da 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,6 +15,7 @@ jobs: env: POETRY_VIRTUALENVS_CREATE: false strategy: + fail-fast: false matrix: python: ["3.7", "3.8", "3.9", "3.10"] steps: From 7502f510f5a98f5572d63524c63a70d99840d295 Mon Sep 17 00:00:00 2001 From: Akio Taniguchi Date: Sat, 16 Apr 2022 01:50:27 +0000 Subject: [PATCH 5/5] #152 Update Pyright config --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index cb8f142..8c665a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,6 +39,7 @@ sphinx = "^4.5" reportImportCycles = "warning" reportUnknownArgumentType = "warning" reportUnknownMemberType = "warning" +reportUnknownVariableType = "warning" typeCheckingMode = "strict" [build-system]