这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ Changed
~~~~~~~
- Dropped support for Python 3.9, as it has reached end-of-life.
- Dropped support for pyspark <3.5.0 on Macs after discovering that these configurations frequently crash. Older versions of the library may also be affected.
- Removed ``pytest`` and ``parameterized`` as dependencies.
:mod:`tmlt.core.utils.testing` can now only be imported when the ``testing`` extra is installed;
for most users, this module will not be used, and so the extra does not need to be installed.

.. _v0.18.2:

Expand Down
15 changes: 9 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,17 @@ dependencies = [
"scipy >=1.11.2,<2.0.0 ; python_version >= '3.12'",
"sympy >=1.8,<1.13",
"typeguard >=4.0.0,<5",
# TODO: These should potentially be pulled out into an extra -- normal
# operation of Core doesn't depend on them.
"parameterized >=0.7.4,<0.8",
"pytest >=7.3.1,<8",
# This works around a bug in some older versions of PySpark. We should
# determine what versions are affected and, when possible, remove the extra
# dependency.
"setuptools >=70.0.0",
]

[project.optional-dependencies]
testing = [
"pytest >=7.3.1,<8",
]

[project.urls]
documentation = "https://tmlt.dev/core/latest"
repository = "https://github.com/opendp/tumult-core"
Expand All @@ -70,9 +71,10 @@ build = ["cibuildwheel >=2,<3"]
black = ["black >=23.3,<24"]
isort = ["isort >=5.11,<6"]
mypy = ["mypy >=1.14.0"]
pylint = ["pylint >=3.2.5"]
pylint = ["pylint >=3.2.5", "parameterized", "pytest"]
pydocstyle = ["pydocstyle[toml] >=6.3"]
test = [
"parameterized >=0.7.4,<0.8",
"pytest",
"pytest-cov >=5.0,<6",
"pytest-xdist >=3.6,<4",
Expand All @@ -88,6 +90,7 @@ docs = [
"sphinx-reredirects >=0.1.5,<0.2",
"sphinxcontrib-bibtex >=2.6.2,<3",
"sphinxcontrib-images >=0.9.4,<0.10",
"pytest",
]
docs-examples = [
"matplotlib >=3.1.0,<4",
Expand Down Expand Up @@ -161,7 +164,7 @@ artifacts = [
build = "cp310-* cp311-* cp312-*"
skip = "*-musllinux*"
before-all = """
if [ -d src/tmlt/core/ext/lib ] && [ ! -z ${CI+x} ]; then
if [ -d src/tmlt/core/ext/lib ] && [ ! -z ${CI+x} ]; then
echo 'Found compiled vendor libraries, but these must be built fresh by cibuildwheel.'
exit 1
fi"""
Expand Down
15 changes: 13 additions & 2 deletions src/tmlt/core/utils/testing.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
"""Utilities for testing."""
"""Utilities for testing.

This module can only be imported if Core is installed with the ``testing``
extra, e.g. via ``pip install tmlt.core[testing]``.
"""

# SPDX-License-Identifier: Apache-2.0
# Copyright Tumult Labs 2025

# TODO(#1218): Move dummy aggregate class back to the test.

try:
import pytest
except ImportError as e:
raise ImportError(
"tmlt.core.utils.testing requires the 'testing' extra, which can be "
"installed with: pip install tmlt.core[testing]"
) from e

import logging
import math
import shutil
Expand All @@ -26,7 +38,6 @@

import numpy as np
import pandas as pd
import pytest
from pyspark.sql import DataFrame, SparkSession
from pyspark.sql.types import DoubleType, StringType, StructField, StructType

Expand Down
25 changes: 19 additions & 6 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.