[build-system] build-backend = 'mesonpy' requires = [ 'meson-python', "cython>=3.0.13,<4", # Sync with CYTHON_MIN_VER in setup "numpy>=2.0.0,<3", "setuptools_scm>=9.2.0,<10", ] [project] name = "arch" # Keep synced with requirements.txt dependencies = [ "numpy>=1.22.3,<3", "pandas>=1.4.0", "scipy>=1.8", "statsmodels>=0.13.0", "packaging", ] authors = [{ name = "Kevin Sheppard", email = "kevin.k.sheppard@gmail.com" }] classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: End Users/Desktop", "Intended Audience :: Financial and Insurance Industry", "Intended Audience :: Science/Research", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Cython", "Topic :: Scientific/Engineering", ] description = "ARCH for Python" dynamic = [ 'version' ] keywords = [ "arch", "ARCH", "variance", "econometrics", "volatility", "finance", "GARCH", "bootstrap", "random walk", "unit root", "Dickey Fuller", "time series", "confidence intervals", "multiple comparisons", "Reality Check", "SPA", "StepM", ] license = "NCSA" license-files = [ "LICENSE.md" ] maintainers = [ { name = "Kevin Sheppard", email = "kevin.k.sheppard@gmail.com" }, ] readme = "README.md" requires-python = ">=3.10" [project.optional-dependencies] test = [ # test "pytest>=8.4.1,<9", "pytest-randomly", "pytest-xdist", "pytest-cov", "coverage[toml]", "meson", "ninja", ] doc = [ # Documentation "setuptools>=61", "wheel", "setuptools_scm[toml]>=9.2.0,<10", "cython>=3.0.13,<4", # Sync with CYTHON_MIN_VER in setup "numpy >=2.3.4", "scipy >=1.16.0", "ipython >=8.0.1", "matplotlib >=3.10", "patsy >=0.5.3", "statsmodels >=0.13.5", "jinja2", "sphinx>=7", "seaborn", "numpydoc>=1.0.0", "nbsphinx", "sphinx-immaterial", "jupyter", "notebook", "sphinx-autodoc-typehints", "fonttools>=4.43.0", # not directly required, pinned by Snyk to avoid a vulnerability "jupyterlab>=4.4.8", # not directly required, pinned by Snyk to avoid a vulnerability "ipython>=7", "sphinx_immaterial", "nbconvert", "pickleshare", # Requirements for doc build, in addition to requirements.txt "pandas~=2.3.3", ] dev = [ # versioning "setuptools_scm[toml]>=9.2.0,<10", "packaging", # Performance "cython>=3.0.10", "numba>=0.55", # Graphics "matplotlib>=3", "seaborn", # Tests "pytest>=8.4.1,<9", "pytest-randomly", "pytest-xdist", "pytest-cov", # formatting "black[jupyter]~=25.9.0", "isort~=6.0", "colorama", "flake8", "flake8-bugbear", "mypy>=1.3", "ruff>=0.8.6", "pyupgrade>=3.4.0", "jupyterlab-code-formatter", "jupyterlab>=4.4.8", # not directly required, pinned by Snyk to avoid a vulnerability "zipp>=3.19.1", # not directly required, pinned by Snyk to avoid a vulnerability ] [project.urls] homepage = "https://github.com/bashtage/arch" documentation = "https://bashtage.github.io/arch/" repository = "https://github.com/bashtage/arch" changelog = "https://bashtage.github.io/arch/changes.html" [tool.meson-python.args] setup = ['--vsenv'] [tool.setuptools_scm] version_file = "arch/_version.py" [tool.black] target-version = ['py310'] exclude = ''' ( \.egg | \.git | \.mypy_cache | \.oytest_cache | _build | buck-out | build | dist ) ''' [tool.pyright] exclude = [ "**/tests/**", ] [tool.ruff] line-length = 88 fix = false target-version = "py310" [tool.ruff.lint] typing-modules = ["arch._typing"] select = [ "ALL", # pyflakes "F", # pycodestyle "E", "W", # flake8-2020 "YTT", # flake8-bugbear "B", # flake8-quotes "Q", # flake8-debugger "T10", # flake8-gettext "INT", # pylint "PL", # flake8-pytest-style "PT", # misc lints "PIE", # flake8-pyi "PYI", # tidy imports "TID", # implicit string concatenation "ISC", # flake8-type-checking "TC", # comprehensions "C4", # pygrep-hooks "PGH", # Ruff-specific rules "RUF", # flake8-bandit: exec-builtin "S102", # Perflint "PERF", # flynt "FLY", # flake8-future-annotations "FA", # unconventional-import-alias "ICN001", # flake8-slots "SLOT", # flake8-raise "RSE" ] ignore = [ # Required to allow black formatting # Whitespace before ':' (Needed for black) "E203", # Line too long (### > 88 characters) (Needed for black) "E501", # Multiple statements on one line (colon) (E701) "E701", # Always ignore # TC do not work with doc building # Move application import `linearmodels....` into a type-checking block "TC001", # Move third-party import `...` into a type-checking block "TC002", # Move standard library import `...` into a type-checking block "TC003", # TODO: enable "PTH" "PTH", # ### Intentionally disabled # Too many arguments to function call "PLR0913", # 55 # Too many branches "PLR0912", # 14 # Too many statements "PLR0915", # 21 # Magic number "PLR2004", # Like to suggest use [a, *b] instead of [a] + b "RUF005", # Logging issues with f-strings "G", # Commas interfere with black "COM", # Complains about asserts which are used in typing "S", # New temp ignores "FBT", "ANN", "D", "I", "RET", "BLE", "INP", "T", "SIM", "PD", "C901", "ERA", "LOG", "TRY", "EM", "A", "ARG", "SLF001", "NPY", "FIX", "TD", "EXE", "UP", "FURB", "N", "DTZ" ] [tool.ruff.lint.per-file-ignores] # Has function names test for running test suite, not a (pytest) )test "arch/utility/__init__.py" = ["PT028"] # Greek letters in comments "arch/unitroot/_phillips_ouliaris.py" = ["RUF002"] "arch/unitroot/_engle_granger.py" = ["RUF001"] [tool.pytest] strict_parametrization_ids = true minversion = "8.4.1" testpaths = ["arch"] xfail_strict = true addopts = ["--strict"] empty_parameter_set_mark = "xfail" filterwarnings = [ "ignore:`formatargspec`:DeprecationWarning:statsmodels", "ignore:Using or importing:DeprecationWarning", "ignore:Session._key_changed is deprecated:DeprecationWarning", "error:Support for multi-dimensional:DeprecationWarning", "error:Mutating unit root tests is deprecated:FutureWarning", "error:invalid value encountered in cos:RuntimeWarning", "error:invalid value encountered in log:RuntimeWarning", "error:divide by zero encountered in double_scalars:RuntimeWarning", "error:Lag selection has changed:DeprecationWarning", "error:More than 20 figures have been opened:RuntimeWarning:", "error:invalid value encountered in sqrt:RuntimeWarning:", "error:Inequality constraints incompatible::", "error:Parameters are not consistent with a::", "error:overflow encountered in double_scalars:RuntimeWarning:", "error:overflow encountered in multiply:RuntimeWarning:", "ignore:The --strict option is deprecated:pytest.PytestDeprecationWarning", "error:The default for reindex:FutureWarning:", "error:overflow encountered in square:RuntimeWarning", "error:Values in x were outside bounds:RuntimeWarning:", "error:The random_state property is deprecated:FutureWarning", "error:random_state is deprecated:FutureWarning", "error:seed is deprecated:FutureWarning", "error:get_state is deprecated:FutureWarning", "error:Conversion of an array with ndim:DeprecationWarning:arch", "error:invalid value encountered in divide:RuntimeWarning" ] junit_family = "xunit2" markers = [ "slow: mark a test as slow" ] [tool.isort] profile = "black" src_paths = ["arch"] sections = ["FUTURE","COMPAT","STDLIB","THIRDPARTY","FIRSTPARTY","LOCALFOLDER"] known_first_party = ["arch"] known_compat = ["arch.compat.*"] known_third_party=["Cython","numpy","matplotlib","pandas","pytest","cython","scipy","seaborn"] line_length=88 force_grid_wrap=0 multi_line_output=3 combine_as_imports=true force_sort_within_sections=true include_trailing_comma=true use_parentheses=true [tool.coverage.run] source = [ "arch" ] branch = true plugins = [ "Cython.Coverage" ] omit = [ # Version file "*/_version.py", # Compatibility code "*/compat/*", "*/conftest.py", ] [tool.coverage.report] show_missing = true ignore_errors = false # Regexes for lines to exclude from consideration exclude_also = [ # Have to re-enable the standard pragma "pragma: no cover", # Do not complain about missing debug-only code: "def __repr__", "if self\\.debug", # Don't complain if tests don't hit defensive assertion code: "raise NotImplementedError", "except NotImplementedError", "raise AssertionError", # Ignore pass "pass", # Ignore failure messages "pytest.xfail", # Ignore ImportError protection "raise ImportError", "except ImportError", # Ignore type checking code "if TYPE_CHECKING", "elif TYPE_CHECKING", # Cython function declarations "cdef", # Cython functions with void "cdef void", # Numba jit decorators "@jit", # Do not complain if non-runnable code is not run: "if 0:", "if __name__ == .__main__.:", ] include = [ "*/arch/*" ] omit = [ "*/_version.py", "*/compat/*", "*recursions.py", "*samplers.py", ] [tool.coverage.html] directory = "coverage_html_report" [tool.mypy] plugins="numpy.typing.mypy_plugin" exclude = [ "tests", "unitroot/critical_values/simulation", ] ignore_missing_imports=true no_implicit_optional=true strict_equality=true disallow_untyped_defs=true disallow_incomplete_defs=true show_error_context=true [tool.mypy-arch.conftest] check_untyped_defs=false disallow_untyped_defs=false [tool.mypy-arch._version] check_untyped_defs=false disallow_untyped_defs=false [[tool.mypy.overrides]] module = "arch.tests.*" check_untyped_defs=false disallow_untyped_defs=false disallow_incomplete_defs=false [[tool.mypy.overrides]] module = ["conftest", "arch.conftest"] check_untyped_defs=false disallow_untyped_defs=false disallow_incomplete_defs=false [tool.pyrefly] project-excludes = ["**/tests*"] preset = "legacy" ignore-missing-imports = ["*"] [[tool.mypy.overrides]] module = [ "unitroot.critical_values.simulation.*", "arch.unitroot.critical_values.simulation.*", ] check_untyped_defs=false disallow_untyped_defs=false disallow_incomplete_defs=false