diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 16c26083f..d74e9eeda 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,6 +24,7 @@ jobs: - '3.10' - '3.11' - '3.12' + - '3.13' steps: - uses: actions/checkout@v4 - name: create build environment @@ -55,6 +56,8 @@ jobs: python-version: - '3.10' - '3.11' + - '3.12' + - '3.13' steps: - uses: actions/checkout@v4 - name: create build environment diff --git a/environment.yml b/environment.yml index da24f2ee1..89514bbba 100644 --- a/environment.yml +++ b/environment.yml @@ -9,7 +9,6 @@ dependencies: - pygmo>=2.19.0 # dev, tests - jupyterlab # dev, docs - nlopt # dev, tests, docs - - pdbpp # dev - pip # dev, tests, docs - pytest # dev, tests - pytest-cov # tests @@ -51,3 +50,4 @@ dependencies: - types-jinja2 # dev, tests - sqlalchemy-stubs # dev, tests - sphinxcontrib-mermaid # dev, tests, docs + - pdbp # dev diff --git a/pyproject.toml b/pyproject.toml index deedaf17b..818055a02 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,6 +43,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Scientific/Engineering", ] authors = [ @@ -183,7 +184,7 @@ filterwarnings = [ "ignore:The following exception was caught when calculating", "ignore:Usage of the parameter log_options", ] -addopts = ["--doctest-modules"] +addopts = ["--doctest-modules", "--pdbcls=pdbp:Pdb"] markers = [ "wip: Tests that are work-in-progress.", "slow: Tests that take a long time to run and are skipped in continuous integration.", @@ -195,9 +196,6 @@ norecursedirs = ["docs", ".tools"] # ====================================================================================== # Misc configuration # ====================================================================================== -[tool.pytask] -infer_latex_dependencies = true - [tool.yamlfix] line_length = 88 sequence_style = "block_style" @@ -379,5 +377,6 @@ module = [ "pathos.pools", "optimagic._version", "annotated_types", + "pdbp", ] ignore_missing_imports = true diff --git a/src/estimagic/__init__.py b/src/estimagic/__init__.py index 44a640486..056f823e4 100644 --- a/src/estimagic/__init__.py +++ b/src/estimagic/__init__.py @@ -1,6 +1,12 @@ +import contextlib import warnings from dataclasses import dataclass +try: + import pdbp # noqa: F401 +except ImportError: + contextlib.suppress(Exception) + from estimagic import utilities from estimagic.bootstrap import BootstrapResult, bootstrap from estimagic.estimate_ml import LikelihoodResult, estimate_ml diff --git a/src/optimagic/__init__.py b/src/optimagic/__init__.py index 28e912234..e1cbd6a3c 100644 --- a/src/optimagic/__init__.py +++ b/src/optimagic/__init__.py @@ -1,5 +1,12 @@ from __future__ import annotations +import contextlib + +try: + import pdbp # noqa: F401 +except ImportError: + contextlib.suppress(Exception) + from optimagic import constraints, mark, utilities from optimagic.algorithms import algos from optimagic.benchmarking.benchmark_reports import (