From 80e75a88e362dc870ada65930fadccbd62c387ae Mon Sep 17 00:00:00 2001 From: jvivian Date: Tue, 5 Mar 2024 16:51:23 -0800 Subject: [PATCH 1/4] Update dependencies for env issue --- poetry.lock | 176 +++++++++++++++++++++++++++++++++++++++++++++---- pyproject.toml | 2 + 2 files changed, 165 insertions(+), 13 deletions(-) diff --git a/poetry.lock b/poetry.lock index 63f81e3..dc488bf 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,9 +1,10 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.4.0 and should not be changed by hand. [[package]] name = "altair" version = "5.2.0" description = "Vega-Altair: A declarative statistical visualization library for Python." +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -28,6 +29,7 @@ doc = ["docutils", "jinja2", "myst-parser", "numpydoc", "pillow (>=9,<10)", "pyd name = "arviz" version = "0.17.0" description = "Exploratory analysis of Bayesian models" +category = "main" optional = false python-versions = ">=3.9" files = [ @@ -54,6 +56,7 @@ all = ["bokeh (>=1.4.0,<3.0)", "contourpy", "dask[distributed]", "netcdf4", "num name = "attrs" version = "23.2.0" description = "Classes Without Boilerplate" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -73,6 +76,7 @@ tests-no-zope = ["attrs[tests-mypy]", "cloudpickle", "hypothesis", "pympler", "p name = "babel" version = "2.14.0" description = "Internationalization utilities" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -87,6 +91,7 @@ dev = ["freezegun (>=1.0,<2.0)", "pytest (>=6.0)", "pytest-cov"] name = "blinker" version = "1.7.0" description = "Fast, simple object-to-object and broadcast signaling" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -98,6 +103,7 @@ files = [ name = "cachetools" version = "5.3.3" description = "Extensible memoizing collections and decorators" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -109,6 +115,7 @@ files = [ name = "certifi" version = "2024.2.2" description = "Python package for providing Mozilla's CA Bundle." +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -120,6 +127,7 @@ files = [ name = "cffi" version = "1.16.0" description = "Foreign Function Interface for Python calling C code." +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -184,6 +192,7 @@ pycparser = "*" name = "cfgv" version = "3.4.0" description = "Validate configuration and produce human readable error messages." +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -195,6 +204,7 @@ files = [ name = "chardet" version = "5.2.0" description = "Universal encoding detector for Python 3" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -206,6 +216,7 @@ files = [ name = "charset-normalizer" version = "3.3.2" 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 = [ @@ -305,6 +316,7 @@ files = [ name = "clarabel" version = "0.7.1" description = "Clarabel Conic Interior Point Solver for Rust / Python" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -326,6 +338,7 @@ scipy = "*" name = "click" version = "8.1.7" description = "Composable command line interface toolkit" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -340,6 +353,7 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""} name = "cloudpickle" version = "3.0.0" description = "Pickler class to extend the standard pickle.Pickler functionality" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -351,6 +365,7 @@ files = [ 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 = [ @@ -362,6 +377,7 @@ files = [ name = "cons" version = "0.4.6" description = "An implementation of Lisp/Scheme-like cons in Python." +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -375,6 +391,7 @@ logical-unification = ">=0.4.0" name = "contourpy" version = "1.2.0" description = "Python library for calculating contours of 2D quadrilateral grids" +category = "main" optional = false python-versions = ">=3.9" files = [ @@ -438,6 +455,7 @@ test-no-images = ["pytest", "pytest-cov", "pytest-xdist", "wurlitzer"] name = "coverage" version = "7.4.3" description = "Code coverage measurement for Python" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -505,6 +523,7 @@ toml = ["tomli"] name = "cramjam" version = "2.8.2" description = "Thin Python bindings to de/compression algorithms in Rust" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -583,6 +602,7 @@ dev = ["black (==22.3.0)", "hypothesis", "numpy", "pytest (>=5.30)", "pytest-xdi name = "cvxpy" version = "1.4.2" description = "A domain-specific language for modeling convex optimization problems in Python." +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -641,6 +661,7 @@ xpress = ["xpress"] name = "cycler" version = "0.12.1" description = "Composable style cycles" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -652,10 +673,23 @@ files = [ docs = ["ipython", "matplotlib", "numpydoc", "sphinx"] tests = ["pytest", "pytest-cov", "pytest-xdist"] +[[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 = "deptry" version = "0.6.6" description = "A command line utility to check for obsolete, missing and transitive dependencies in a Python project." +category = "dev" optional = false python-versions = ">=3.7,<4.0" files = [ @@ -672,6 +706,7 @@ tomli = {version = ">=2.0.1,<3.0.0", markers = "python_version < \"3.11\""} name = "distlib" version = "0.3.8" description = "Distribution utilities" +category = "dev" optional = false python-versions = "*" files = [ @@ -683,6 +718,7 @@ files = [ name = "ecos" version = "2.0.13" description = "This is the Python package for ECOS: Embedded Cone Solver. See Github page for more information." +category = "main" optional = false python-versions = "*" files = [ @@ -715,6 +751,7 @@ scipy = ">=0.9" 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 = [ @@ -726,6 +763,7 @@ files = [ name = "etuples" version = "0.3.9" description = "Python S-expression emulation using tuple-like objects." +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -740,6 +778,7 @@ multipledispatch = "*" name = "exceptiongroup" version = "1.2.0" description = "Backport of PEP 654 (exception groups)" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -754,6 +793,7 @@ test = ["pytest (>=6)"] name = "fastjsonschema" version = "2.19.1" description = "Fastest Python implementation of JSON schema" +category = "main" optional = false python-versions = "*" files = [ @@ -768,6 +808,7 @@ devel = ["colorama", "json-spec", "jsonschema", "pylint", "pytest", "pytest-benc name = "fastparquet" version = "2023.10.1" description = "Python support for Parquet file format" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -825,6 +866,7 @@ lzo = ["python-lzo"] name = "fastprogress" version = "1.0.3" description = "A nested progress with plotting options for fastai" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -836,6 +878,7 @@ files = [ name = "filelock" version = "3.13.1" description = "A platform independent file lock." +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -852,6 +895,7 @@ typing = ["typing-extensions (>=4.8)"] name = "fonttools" version = "4.49.0" description = "Tools to manipulate font files" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -917,6 +961,7 @@ woff = ["brotli (>=1.0.1)", "brotlicffi (>=0.8.0)", "zopfli (>=0.1.4)"] name = "fsspec" version = "2024.2.0" description = "File-system specification" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -952,6 +997,7 @@ tqdm = ["tqdm"] name = "ghp-import" version = "2.1.0" description = "Copy your docs directly to the gh-pages branch." +category = "dev" optional = false python-versions = "*" files = [ @@ -969,6 +1015,7 @@ dev = ["flake8", "markdown", "twine", "wheel"] name = "gitdb" version = "4.0.11" description = "Git Object Database" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -983,6 +1030,7 @@ smmap = ">=3.0.1,<6" name = "gitpython" version = "3.1.42" description = "GitPython is a Python library used to interact with Git repositories" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1000,6 +1048,7 @@ test = ["black", "coverage[toml]", "ddt (>=1.1.1,!=1.4.3)", "mock", "mypy", "pre name = "griffe" version = "0.41.2" description = "Signatures for entire Python programs. Extract the structure, the frame, the skeleton of your project, to generate API documentation or find breaking changes in your API." +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1014,6 +1063,7 @@ colorama = ">=0.4" name = "h5netcdf" version = "1.3.0" description = "netCDF4 via h5py" +category = "main" optional = false python-versions = ">=3.9" files = [ @@ -1032,6 +1082,7 @@ test = ["netCDF4", "pytest"] name = "h5py" version = "3.10.0" description = "Read and write HDF5 files from Python" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1069,6 +1120,7 @@ numpy = ">=1.17.3" name = "identify" version = "2.5.35" description = "File identification library for Python" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1083,6 +1135,7 @@ license = ["ukkonen"] name = "idna" version = "3.6" description = "Internationalized Domain Names in Applications (IDNA)" +category = "main" optional = false python-versions = ">=3.5" files = [ @@ -1094,6 +1147,7 @@ files = [ name = "importlib-metadata" version = "7.0.1" description = "Read metadata from Python packages" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1113,6 +1167,7 @@ testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs name = "importlib-resources" version = "6.1.2" description = "Read resources from Python packages" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1131,6 +1186,7 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-ena name = "iniconfig" version = "2.0.0" description = "brain-dead simple config-ini parsing" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1142,6 +1198,7 @@ files = [ name = "jinja2" version = "3.1.3" description = "A very fast and expressive template engine." +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1159,6 +1216,7 @@ i18n = ["Babel (>=2.7)"] name = "joblib" version = "1.3.2" description = "Lightweight pipelining with Python functions" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1170,6 +1228,7 @@ files = [ name = "jsonschema" version = "4.21.1" description = "An implementation of JSON Schema validation for Python" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1191,6 +1250,7 @@ format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339- name = "jsonschema-specifications" version = "2023.12.1" description = "The JSON Schema meta-schemas and vocabularies, exposed as a Registry" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1205,6 +1265,7 @@ referencing = ">=0.31.0" name = "jupyter-client" version = "8.6.0" description = "Jupyter protocol implementation and client libraries" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1214,7 +1275,7 @@ files = [ [package.dependencies] importlib-metadata = {version = ">=4.8.3", markers = "python_version < \"3.10\""} -jupyter-core = ">=4.12,<5.0.dev0 || >=5.1.dev0" +jupyter-core = ">=4.12,<5.0.0 || >=5.1.0" python-dateutil = ">=2.8.2" pyzmq = ">=23.0" tornado = ">=6.2" @@ -1228,6 +1289,7 @@ test = ["coverage", "ipykernel (>=6.14)", "mypy", "paramiko", "pre-commit", "pyt name = "jupyter-core" version = "5.7.1" description = "Jupyter core package. A base package on which Jupyter projects rely." +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1248,6 +1310,7 @@ test = ["ipykernel", "pre-commit", "pytest", "pytest-cov", "pytest-timeout"] name = "kiwisolver" version = "1.4.5" description = "A fast implementation of the Cassowary constraint solver" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1361,6 +1424,7 @@ files = [ name = "logical-unification" version = "0.4.6" description = "Logical unification in Python" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1375,6 +1439,7 @@ toolz = "*" name = "markdown" version = "3.5.2" description = "Python implementation of John Gruber's Markdown." +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1393,6 +1458,7 @@ testing = ["coverage", "pyyaml"] name = "markdown-it-py" version = "3.0.0" description = "Python port of markdown-it. Markdown parsing, done right!" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1417,6 +1483,7 @@ testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] name = "markupsafe" version = "2.1.5" description = "Safely add untrusted strings to HTML/XML markup." +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1486,6 +1553,7 @@ files = [ name = "matplotlib" version = "3.8.3" description = "Python plotting package" +category = "main" optional = false python-versions = ">=3.9" files = [ @@ -1535,6 +1603,7 @@ python-dateutil = ">=2.7" name = "mdurl" version = "0.1.2" description = "Markdown URL utilities" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1546,6 +1615,7 @@ files = [ name = "mergedeep" version = "1.3.4" description = "A deep merge function for 🐍." +category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1557,6 +1627,7 @@ files = [ name = "minikanren" version = "1.0.3" description = "Relational programming in Python" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1574,6 +1645,7 @@ toolz = "*" name = "mkdocs" version = "1.5.3" description = "Project documentation with Markdown." +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1605,6 +1677,7 @@ min-versions = ["babel (==2.9.0)", "click (==7.0)", "colorama (==0.4)", "ghp-imp name = "mkdocs-autorefs" version = "1.0.1" description = "Automatically link across pages in MkDocs." +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1621,6 +1694,7 @@ mkdocs = ">=1.1" name = "mkdocs-material" version = "9.5.12" description = "Documentation that simply works" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1650,6 +1724,7 @@ recommended = ["mkdocs-minify-plugin (>=0.7,<1.0)", "mkdocs-redirects (>=1.2,<2. name = "mkdocs-material-extensions" version = "1.3.1" description = "Extension pack for Python Markdown and MkDocs Material." +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1661,6 +1736,7 @@ files = [ name = "mkdocstrings" version = "0.23.0" description = "Automatic documentation from sources, for MkDocs." +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1688,6 +1764,7 @@ python-legacy = ["mkdocstrings-python-legacy (>=0.2.1)"] name = "mkdocstrings-python" version = "1.8.0" description = "A Python handler for mkdocstrings." +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1703,6 +1780,7 @@ mkdocstrings = ">=0.20" name = "multipledispatch" version = "1.0.0" description = "Multiple dispatch" +category = "main" optional = false python-versions = "*" files = [ @@ -1714,6 +1792,7 @@ files = [ name = "mypy" version = "0.981" description = "Optional static typing for Python" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1757,6 +1836,7 @@ reports = ["lxml"] name = "mypy-extensions" version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." +category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1768,6 +1848,7 @@ files = [ name = "nbclient" version = "0.9.0" description = "A client library for executing notebooks. Formerly nbconvert's ExecutePreprocessor." +category = "main" optional = false python-versions = ">=3.8.0" files = [ @@ -1777,7 +1858,7 @@ files = [ [package.dependencies] jupyter-client = ">=6.1.12" -jupyter-core = ">=4.12,<5.0.dev0 || >=5.1.dev0" +jupyter-core = ">=4.12,<5.0.0 || >=5.1.0" nbformat = ">=5.1" traitlets = ">=5.4" @@ -1790,6 +1871,7 @@ test = ["flaky", "ipykernel (>=6.19.3)", "ipython", "ipywidgets", "nbconvert (>= name = "nbformat" version = "5.9.2" description = "The Jupyter Notebook format" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1811,6 +1893,7 @@ test = ["pep440", "pre-commit", "pytest", "testpath"] name = "nodeenv" version = "1.8.0" description = "Node.js virtual environment builder" +category = "dev" optional = false python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*" files = [ @@ -1825,6 +1908,7 @@ setuptools = "*" name = "numpy" version = "1.26.4" description = "Fundamental package for array computing in Python" +category = "main" optional = false python-versions = ">=3.9" files = [ @@ -1870,6 +1954,7 @@ files = [ 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 = [ @@ -1884,6 +1969,7 @@ et-xmlfile = "*" name = "osqp" version = "0.6.4" description = "OSQP: The Operator Splitting QP Solver" +category = "main" optional = false python-versions = "*" files = [ @@ -1927,6 +2013,7 @@ scipy = ">=0.13.2" name = "packaging" version = "23.2" description = "Core utilities for Python packages" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1938,6 +2025,7 @@ files = [ name = "paginate" version = "0.5.6" description = "Divides large result sets into pages for easier browsing" +category = "dev" optional = false python-versions = "*" files = [ @@ -1948,6 +2036,7 @@ files = [ name = "pandas" version = "2.2.1" description = "Powerful data structures for data analysis, time series, and statistics" +category = "main" optional = false python-versions = ">=3.9" files = [ @@ -2020,6 +2109,7 @@ xml = ["lxml (>=4.9.2)"] name = "pathspec" version = "0.12.1" description = "Utility library for gitignore style pattern matching of file paths." +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -2031,6 +2121,7 @@ files = [ name = "patsy" version = "0.5.6" description = "A Python package for describing statistical models and for building design matrices." +category = "main" optional = false python-versions = "*" files = [ @@ -2049,6 +2140,7 @@ test = ["pytest", "pytest-cov", "scipy"] name = "pillow" version = "10.2.0" description = "Python Imaging Library (Fork)" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -2134,6 +2226,7 @@ xmp = ["defusedxml"] name = "platformdirs" version = "4.2.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -2149,6 +2242,7 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4.3)", "pytest- name = "plotly" version = "5.19.0" description = "An open-source, interactive data visualization library for Python" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -2164,6 +2258,7 @@ tenacity = ">=6.2.0" name = "plotly-express" version = "0.4.1" description = "Plotly Express - a high level wrapper for Plotly.py" +category = "main" optional = false python-versions = "*" files = [ @@ -2183,6 +2278,7 @@ statsmodels = ">=0.9.0" name = "pluggy" version = "1.4.0" description = "plugin and hook calling mechanisms for python" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -2198,6 +2294,7 @@ testing = ["pytest", "pytest-benchmark"] name = "pre-commit" version = "2.21.0" description = "A framework for managing and maintaining multi-language pre-commit hooks." +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2216,6 +2313,7 @@ virtualenv = ">=20.10.0" name = "protobuf" version = "4.25.3" description = "" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -2236,6 +2334,7 @@ files = [ name = "py" version = "1.11.0" description = "library with cross-python path, ini-parsing, io, code, log facilities" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -2247,6 +2346,7 @@ files = [ name = "pyarrow" version = "15.0.0" description = "Python library for Apache Arrow" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -2295,6 +2395,7 @@ numpy = ">=1.16.6,<2" name = "pybind11" version = "2.11.1" description = "Seamless operability between C++11 and Python" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -2309,6 +2410,7 @@ global = ["pybind11-global (==2.11.1)"] 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 = [ @@ -2320,6 +2422,7 @@ files = [ name = "pydeck" version = "0.8.0" description = "Widget for deck.gl maps" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2339,6 +2442,7 @@ jupyter = ["ipykernel (>=5.1.2)", "ipython (>=5.8.0)", "ipywidgets (>=7,<8)", "t name = "pygments" version = "2.17.2" description = "Pygments is a syntax highlighting package written in Python." +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2354,6 +2458,7 @@ windows-terminal = ["colorama (>=0.4.6)"] name = "pymc" version = "5.10.4" description = "Probabilistic Programming in Python: Bayesian Modeling and Probabilistic Machine Learning with PyTensor" +category = "main" optional = false python-versions = ">=3.9" files = [ @@ -2376,6 +2481,7 @@ typing-extensions = ">=3.7.4" name = "pymdown-extensions" version = "10.7" description = "Extension pack for Python Markdown." +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -2394,6 +2500,7 @@ extra = ["pygments (>=2.12)"] name = "pyparsing" version = "3.1.1" description = "pyparsing module - Classes and methods to define and execute parsing grammars" +category = "main" optional = false python-versions = ">=3.6.8" files = [ @@ -2408,6 +2515,7 @@ diagrams = ["jinja2", "railroad-diagrams"] name = "pytensor" version = "2.18.6" description = "Optimizing compiler for evaluating mathematical expressions on CPUs and GPUs." +category = "main" optional = false python-versions = "<3.12,>=3.9" files = [ @@ -2452,6 +2560,7 @@ tests = ["coverage (>=5.1)", "pre-commit", "pytest", "pytest-benchmark", "pytest name = "pytest" version = "7.4.4" description = "pytest: simple powerful testing with Python" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2474,6 +2583,7 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no name = "pytest-cov" version = "4.1.0" description = "Pytest plugin for measuring coverage." +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2492,6 +2602,7 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtuale name = "python-dateutil" version = "2.9.0.post0" description = "Extensions to the standard Python datetime module" +category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ @@ -2506,6 +2617,7 @@ six = ">=1.5" name = "pytz" version = "2024.1" description = "World timezone definitions, modern and historical" +category = "main" optional = false python-versions = "*" files = [ @@ -2517,6 +2629,7 @@ files = [ name = "pywin32" version = "306" description = "Python for Window Extensions" +category = "main" optional = false python-versions = "*" files = [ @@ -2540,6 +2653,7 @@ files = [ name = "pyyaml" version = "6.0.1" description = "YAML parser and emitter for Python" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -2600,6 +2714,7 @@ files = [ name = "pyyaml-env-tag" version = "0.1" description = "A custom YAML tag for referencing environment variables in YAML files. " +category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -2614,6 +2729,7 @@ pyyaml = "*" name = "pyzmq" version = "25.1.2" description = "Python bindings for 0MQ" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -2719,6 +2835,7 @@ cffi = {version = "*", markers = "implementation_name == \"pypy\""} name = "qdldl" version = "0.1.7.post0" description = "QDLDL, a free LDL factorization routine." +category = "main" optional = false python-versions = "*" files = [ @@ -2751,6 +2868,7 @@ scipy = ">=0.13.2" name = "referencing" version = "0.33.0" description = "JSON Referencing + Python" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -2766,6 +2884,7 @@ rpds-py = ">=0.7.0" name = "regex" version = "2023.12.25" description = "Alternative regular expression module, to replace re." +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2868,6 +2987,7 @@ files = [ name = "requests" version = "2.31.0" description = "Python HTTP for Humans." +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2889,6 +3009,7 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] name = "rich" version = "13.7.1" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" +category = "main" optional = false python-versions = ">=3.7.0" files = [ @@ -2907,6 +3028,7 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] name = "rpds-py" version = "0.18.0" description = "Python bindings to Rust's persistent data structures (rpds)" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -3015,6 +3137,7 @@ files = [ name = "scikit-learn" version = "1.4.1.post1" description = "A set of python modules for machine learning and data mining" +category = "main" optional = false python-versions = ">=3.9" files = [ @@ -3057,6 +3180,7 @@ tests = ["black (>=23.3.0)", "matplotlib (>=3.3.4)", "mypy (>=1.3)", "numpydoc ( name = "scipy" version = "1.12.0" description = "Fundamental algorithms for scientific computing in Python" +category = "main" optional = false python-versions = ">=3.9" files = [ @@ -3099,6 +3223,7 @@ test = ["asv", "gmpy2", "hypothesis", "mpmath", "pooch", "pytest", "pytest-cov", name = "scs" version = "3.2.4.post1" description = "Splitting conic solver" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3132,6 +3257,7 @@ scipy = "*" name = "seaborn" version = "0.13.2" description = "Statistical data visualization" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -3153,6 +3279,7 @@ stats = ["scipy (>=1.7)", "statsmodels (>=0.12)"] name = "setuptools" version = "69.1.1" description = "Easily download, build, install, upgrade, and uninstall Python packages" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -3169,6 +3296,7 @@ testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jar 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 = [ @@ -3180,6 +3308,7 @@ files = [ name = "smmap" version = "5.0.1" description = "A pure Python implementation of a sliding window memory map manager" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3191,6 +3320,7 @@ files = [ name = "statsmodels" version = "0.14.1" description = "Statistical computations and models for Python" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -3227,8 +3357,8 @@ files = [ [package.dependencies] numpy = [ - {version = ">=1.22.3,<2", markers = "python_version == \"3.10\" and platform_system == \"Windows\" and platform_python_implementation != \"PyPy\""}, {version = ">=1.18,<2", markers = "python_version != \"3.10\" or platform_system != \"Windows\" or platform_python_implementation == \"PyPy\""}, + {version = ">=1.22.3,<2", markers = "python_version == \"3.10\" and platform_system == \"Windows\" and platform_python_implementation != \"PyPy\""}, ] packaging = ">=21.3" pandas = ">=1.0,<2.1.0 || >2.1.0" @@ -3244,6 +3374,7 @@ docs = ["ipykernel", "jupyter-client", "matplotlib", "nbconvert", "nbformat", "n name = "streamlit" version = "1.31.1" description = "A faster way to build and share data apps" +category = "main" optional = false python-versions = ">=3.8, !=3.9.7" files = [ @@ -3283,6 +3414,7 @@ snowflake = ["snowflake-connector-python (>=2.8.0)", "snowflake-snowpark-python name = "syntheticcontrolmethods" version = "1.1.17" description = "A Python package for causal inference using various Synthetic Control Methods" +category = "main" optional = false python-versions = "*" files = [ @@ -3301,6 +3433,7 @@ scipy = ">=1.4.1" name = "tenacity" version = "8.2.3" description = "Retry code until it succeeds" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3315,6 +3448,7 @@ doc = ["reno", "sphinx", "tornado (>=4.5)"] name = "threadpoolctl" version = "3.3.0" description = "threadpoolctl" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -3326,6 +3460,7 @@ files = [ name = "toml" version = "0.10.2" description = "Python Library for Tom's Obvious, Minimal Language" +category = "main" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -3337,6 +3472,7 @@ files = [ name = "tomli" version = "2.0.1" description = "A lil' TOML parser" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -3348,6 +3484,7 @@ files = [ name = "toolz" version = "0.12.1" description = "List processing tools and functional utilities" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -3359,6 +3496,7 @@ files = [ name = "tornado" version = "6.4" description = "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed." +category = "main" optional = false python-versions = ">= 3.8" files = [ @@ -3379,6 +3517,7 @@ files = [ name = "tox" version = "3.28.0" description = "tox is a generic virtualenv management and test command line tool" +category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" files = [ @@ -3404,6 +3543,7 @@ testing = ["flaky (>=3.4.0)", "freezegun (>=0.3.11)", "pathlib2 (>=2.3.3)", "psu name = "traitlets" version = "5.14.1" description = "Traitlets Python configuration system" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -3419,6 +3559,7 @@ test = ["argcomplete (>=3.0.3)", "mypy (>=1.7.0)", "pre-commit", "pytest (>=7.0, name = "typer" version = "0.9.0" description = "Typer, build great CLIs. Easy to code. Based on Python type hints." +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -3440,6 +3581,7 @@ test = ["black (>=22.3.0,<23.0.0)", "coverage (>=6.2,<7.0)", "isort (>=5.0.6,<6. name = "typing-extensions" version = "4.10.0" description = "Backported and Experimental Type Hints for Python 3.8+" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -3451,6 +3593,7 @@ files = [ name = "tzdata" version = "2024.1" description = "Provider of IANA time zone data" +category = "main" optional = false python-versions = ">=2" files = [ @@ -3462,6 +3605,7 @@ files = [ name = "tzlocal" version = "5.2" description = "tzinfo object for the local timezone" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -3477,25 +3621,26 @@ devenv = ["check-manifest", "pytest (>=4.3)", "pytest-cov", "pytest-mock (>=3.3) [[package]] name = "urllib3" -version = "2.2.1" +version = "1.26.18" description = "HTTP library with thread-safe connection pooling, file post, and more." +category = "main" optional = false -python-versions = ">=3.8" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" files = [ - {file = "urllib3-2.2.1-py3-none-any.whl", hash = "sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d"}, - {file = "urllib3-2.2.1.tar.gz", hash = "sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19"}, + {file = "urllib3-1.26.18-py2.py3-none-any.whl", hash = "sha256:34b97092d7e0a3a8cf7cd10e386f401b3737364026c45e622aa02903dffe0f07"}, + {file = "urllib3-1.26.18.tar.gz", hash = "sha256:f8ecc1bba5667413457c529ab955bf8c67b45db799d159066261719e328580a0"}, ] [package.extras] -brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] -h2 = ["h2 (>=4,<5)"] -socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] -zstd = ["zstandard (>=0.18.0)"] +brotli = ["brotli (==1.0.9)", "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 = "validators" version = "0.22.0" description = "Python Data Validation for Humans™" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -3518,6 +3663,7 @@ tooling-extras = ["pyaml (>=23.7.0)", "pypandoc-binary (>=1.11)", "pytest (>=7.4 name = "virtualenv" version = "20.25.1" description = "Virtual Python Environment builder" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -3538,6 +3684,7 @@ test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess name = "watchdog" version = "4.0.0" description = "Filesystem events monitoring" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -3579,6 +3726,7 @@ watchmedo = ["PyYAML (>=3.10)"] name = "xarray" version = "2024.2.0" description = "N-D labeled arrays and datasets in Python" +category = "main" optional = false python-versions = ">=3.9" files = [ @@ -3603,6 +3751,7 @@ viz = ["matplotlib", "nc-time-axis", "seaborn"] name = "xarray-einstats" version = "0.7.0" description = "Stats, linear algebra and einops for xarray" +category = "main" optional = false python-versions = ">=3.9" files = [ @@ -3625,6 +3774,7 @@ test = ["hypothesis", "packaging", "pytest", "pytest-cov"] name = "zipp" version = "3.17.0" description = "Backport of pathlib-compatible object wrapper for zip files" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -3639,4 +3789,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = ">=3.9,<3.9.7 || >3.9.7,<3.12" -content-hash = "bf1b3bbe83e7c1e989b6971d78fd9802abb892181b263625609d7e4a415627b9" +content-hash = "f8d16475175f6870a61b62992f0c484c7b873da0cf0602880626ea54ab6d6eee" diff --git a/pyproject.toml b/pyproject.toml index 9c5e04b..ef8fd71 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,6 +32,8 @@ seaborn = "^0.13.0" syntheticcontrolmethods = "^1.1.17" plotly = "^5.18.0" pymc = "^5.10.4" +urllib3 = ">=1.26.16,<2.0.0" +decorator = "^5.1.1" [tool.poetry.group.dev.dependencies] pytest = "^7.2.0" From b834f3e78f4bde7d2bcb31d00631674e11098672 Mon Sep 17 00:00:00 2001 From: jvivian Date: Tue, 5 Mar 2024 16:51:58 -0800 Subject: [PATCH 2/4] Add raw data to filtered-factors.csv Fixes #55 --- covid19_drdfm/dfm.py | 10 ++++++---- covid19_drdfm/processing.py | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/covid19_drdfm/dfm.py b/covid19_drdfm/dfm.py index f5afe4e..2b4c757 100644 --- a/covid19_drdfm/dfm.py +++ b/covid19_drdfm/dfm.py @@ -4,7 +4,6 @@ - `c19_dfm run` """ -from dataclasses import dataclass from pathlib import Path from typing import Optional @@ -14,7 +13,7 @@ from statsmodels.tsa.stattools import adfuller from covid19_drdfm.constants import DIFF_COLS, FACTORS, LOG_DIFF_COLS -from covid19_drdfm.processing import diff_vars, normalize, get_raw, write +from covid19_drdfm.processing import diff_vars, get_raw, normalize, write def is_constant(column) -> bool: @@ -104,7 +103,8 @@ def _save_input(df, state, columns, outdir): out = outdir / state out.mkdir(exist_ok=True) raw = get_raw().query("State == @state") - raw = raw[columns] if columns else raw + raw = raw[columns + ["Time"]] if columns else raw + raw = raw.set_index("Time").loc[df.index] write(raw, out / "raw.csv") write(df, (out / "df.xlsx")) write(df, out / "df.csv") @@ -118,5 +118,7 @@ def _save_output(df, model, results, state, outdir): f.write(results.summary().as_csv()) filtered = results.factors["filtered"] filtered["State"] = state - filtered.index = df.index + raw = pd.read_csv(out / "raw.csv", index_col=0) + filtered.index = raw.index + filtered = filtered.merge(raw, left_index=True, right_index=True) filtered.to_csv(out / "filtered-factors.csv") diff --git a/covid19_drdfm/processing.py b/covid19_drdfm/processing.py index 1502388..f49bc7a 100644 --- a/covid19_drdfm/processing.py +++ b/covid19_drdfm/processing.py @@ -48,6 +48,7 @@ def get_raw() -> pd.DataFrame: .drop(columns=["Monetary_1_x", "Monetary_11_x"]) .rename(columns={"Monetary_1_y": "Monetary_1", "Monetary_11_y": "Monetary_11"}) .drop(columns=["Proportion", "proportion_vax2", "Pandemic_Response_8", "Distributed"]) + .pipe(add_datetime) .pipe(fix_names) ) @@ -59,7 +60,7 @@ def get_df() -> pd.DataFrame: Returns: pd.DataFrame: The cleaned DataFrame. """ - return get_raw().pipe(adjust_inflation).pipe(add_datetime).pipe(adjust_pandemic_response) + return get_raw().pipe(adjust_inflation).pipe(adjust_pandemic_response) def write(df: pd.DataFrame, outpath: Path) -> None: From 49d85988a9fd7745d44b924156da4950af90d556 Mon Sep 17 00:00:00 2001 From: jvivian Date: Tue, 5 Mar 2024 16:52:17 -0800 Subject: [PATCH 3/4] Add unittest for modified start date Fixes #59 --- coverage.xml | 130 ++++++++++++++++++++------------------- tests/test_dfm.py | 39 ++++++++++-- tests/test_processing.py | 8 +-- 3 files changed, 103 insertions(+), 74 deletions(-) diff --git a/coverage.xml b/coverage.xml index 1fcd95d..4fa8099 100644 --- a/coverage.xml +++ b/coverage.xml @@ -1,12 +1,12 @@ - - + + /home/jvivian/covid19-drDFM/covid19_drdfm - + @@ -47,54 +47,54 @@ - + - + - + - - - - + + + + - - + + - - - - + + + + - - - + + + - - + + - - - - + + + + - - + + - - + + - + @@ -114,6 +114,8 @@ + + @@ -137,53 +139,53 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - + + + + - - + + - - + + - - - + + + - - - - + + + + - + - - + + - + + diff --git a/tests/test_dfm.py b/tests/test_dfm.py index e6d21cc..3477ce1 100644 --- a/tests/test_dfm.py +++ b/tests/test_dfm.py @@ -1,10 +1,14 @@ import shutil +from datetime import datetime from pathlib import Path -import pytest + +import pandas as pd from covid19_drdfm.dfm import run_parameterized_model from covid19_drdfm.processing import get_df +COLUMNS = ["PCE", "CPIU", "Hosp1", "Deaths1"] + def test_run_model(): """ @@ -19,7 +23,7 @@ def test_run_model(): """ df = get_df() state = "SD" - run_parameterized_model(df, state, Path("./testdir"), global_multiplier=1) + run_parameterized_model(df, state, Path("./testdir"), columns=COLUMNS, global_multiplier=1) assert Path("./testdir/SD/model.csv").exists() assert Path("./testdir/SD/results.csv").exists() shutil.rmtree("./testdir") @@ -38,13 +42,12 @@ def test_run_model_global_0(): """ df = get_df() state = "SD" - run_parameterized_model(df, state, Path("./testdir"), global_multiplier=0) + run_parameterized_model(df, state, Path("./testdir"), columns=COLUMNS, global_multiplier=0) assert Path("./testdir/SD/model.csv").exists() assert Path("./testdir/SD/results.csv").exists() shutil.rmtree("./testdir") -# @pytest.mark.skip(reason="State no longer failing") def test_run_failure(): """ Test the run_parameterized_model function for a state with known failure conditions @@ -57,8 +60,32 @@ def test_run_failure(): None """ df = get_df() - df = df[df.Time > "2019-01-01"] - state = "PA" + date_object = datetime.strptime("2019-01-01", "%Y-%m-%d") + df = df[df.Time > date_object] + state = "WY" run_parameterized_model(df, state, Path("./testdir"), global_multiplier=2) assert Path("./testdir/failed.txt").exists() shutil.rmtree("./testdir") + + +def test_modified_start_date(): + """ + Test the run_parameterized_model function with a modified start date + + This function tests the run_parameterized_model function by running it with a sample dataframe, + a state code, and a test directory path. It then asserts that the model.csv and results.csv files + are the same length (due to subsetting on time) + + Returns: + None + """ + df = get_df() + date_string = "2020-01-01" + columns = ["PCE", "CPIU", "Hosp1", "Deaths1"] + date_object = datetime.strptime(date_string, "%Y-%m-%d") + df = df[df.Time > date_object] + state = "CA" + test_dir = Path("./testdir") + run_parameterized_model(df, state, test_dir, columns=columns, global_multiplier=2) + assert pd.read_csv(test_dir / state / "raw.csv").shape == pd.read_csv(test_dir / state / "df.csv").shape + shutil.rmtree("./testdir") diff --git a/tests/test_processing.py b/tests/test_processing.py index 0638ced..e0d3084 100644 --- a/tests/test_processing.py +++ b/tests/test_processing.py @@ -10,9 +10,9 @@ add_datetime, adjust_inflation, adjust_pandemic_response, + fix_names, get_df, get_govt_fund_dist, - fix_names, ) @@ -36,13 +36,13 @@ def test_get_govt_fund_dist(): assert int(sum(govt_fund) + 0.00001) == 1, "Distribution must sum to 1" -def test_adjust_inflation(raw_data): +def test_adjust_inflation(raw_data: pd.DataFrame): input_df = raw_data.copy().pipe(fix_names) output_df = adjust_inflation(input_df) assert input_df.Cons1.iloc[0] < output_df.Cons1.iloc[0] -def test_adjust_pandemic_response(raw_data): +def test_adjust_pandemic_response(raw_data: pd.DataFrame): input_df = raw_data.copy().pipe(fix_names) #! Note - this is testing functionality, but is used per-state not on whole df out = adjust_pandemic_response(input_df) @@ -52,7 +52,7 @@ def test_adjust_pandemic_response(raw_data): assert int(df[r].sum()) == int(out[r].sum()) -def test_fix_datetime(raw_data): +def test_fix_datetime(raw_data: pd.DataFrame): input_df = raw_data.copy() output_df = add_datetime(input_df) assert isinstance(output_df["Time"][0], pd.Timestamp) From 031f048401e956b6d750d88ef47044994b869aae Mon Sep 17 00:00:00 2001 From: jvivian Date: Tue, 5 Mar 2024 17:46:27 -0800 Subject: [PATCH 4/4] remove stochastic test --- coverage.xml | 14 +++++++------- tests/test_dfm.py | 2 ++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/coverage.xml b/coverage.xml index 4fa8099..0ba53e8 100644 --- a/coverage.xml +++ b/coverage.xml @@ -1,12 +1,12 @@ - + /home/jvivian/covid19-drDFM/covid19_drdfm - + @@ -47,7 +47,7 @@ - + @@ -88,10 +88,10 @@ - - - - + + + + diff --git a/tests/test_dfm.py b/tests/test_dfm.py index 3477ce1..c1a3799 100644 --- a/tests/test_dfm.py +++ b/tests/test_dfm.py @@ -3,6 +3,7 @@ from pathlib import Path import pandas as pd +import pytest from covid19_drdfm.dfm import run_parameterized_model from covid19_drdfm.processing import get_df @@ -48,6 +49,7 @@ def test_run_model_global_0(): shutil.rmtree("./testdir") +@pytest.mark.skip(reason="Stochastic failure state") def test_run_failure(): """ Test the run_parameterized_model function for a state with known failure conditions