From 6ff429d9b1f4c7efc144b6517c76ee6e5303d033 Mon Sep 17 00:00:00 2001 From: Charles Carlson Date: Wed, 8 Oct 2025 16:06:55 -0400 Subject: [PATCH] initial push --- .gitlab-ci.yml | 663 ------------------ LICENSE | 2 +- NOTICE | 2 +- README.md | 9 +- benchmark/benchmarking_utils.py | 2 +- benchmark/bounds.py | 2 +- benchmark/count_sum.py | 2 +- benchmark/noise_mechanism.py | 2 +- benchmark/private_join.py | 2 +- benchmark/public_join.py | 2 +- benchmark/quantile.py | 2 +- benchmark/sparkflatmap.py | 2 +- benchmark/sparkmap.py | 2 +- doc/_static/css/custom.css | 2 +- doc/_static/js/version-banner.js | 2 +- doc/_templates/build-info.html | 2 +- doc/_templates/layout.html | 2 +- doc/_templates/package-name.html | 2 +- doc/_templates/sidebar-nav-bs.html | 2 +- doc/additional-resources/index.rst | 2 +- doc/additional-resources/license.rst | 8 +- doc/additional-resources/privacy_policy.rst | 73 -- doc/conf.py | 7 +- doc/index.rst | 2 +- doc/installation.rst | 4 +- doc/ref.bib | 2 +- doc/topic-guides/architecture.rst | 2 +- doc/topic-guides/index.rst | 2 +- doc/topic-guides/known-vulnerabilities.rst | 2 +- doc/topic-guides/privacy-guarantee.rst | 2 +- doc/topic-guides/real-numbers.rst | 2 +- doc/topic-guides/spark.rst | 2 +- doc/topic-guides/special-values.rst | 2 +- doc/tutorials/first-tutorial.rst | 2 +- doc/tutorials/index.rst | 2 +- doc/zcitations.rst | 2 +- src/tmlt/core/__init__.py | 2 +- src/tmlt/core/domains/__init__.py | 2 +- src/tmlt/core/domains/base.py | 2 +- src/tmlt/core/domains/collections.py | 2 +- src/tmlt/core/domains/numpy_domains.py | 2 +- src/tmlt/core/domains/pandas_domains.py | 2 +- src/tmlt/core/domains/spark_domains.py | 2 +- src/tmlt/core/exceptions.py | 2 +- src/tmlt/core/measurements/__init__.py | 2 +- src/tmlt/core/measurements/aggregations.py | 2 +- src/tmlt/core/measurements/base.py | 2 +- src/tmlt/core/measurements/chaining.py | 2 +- src/tmlt/core/measurements/composition.py | 2 +- src/tmlt/core/measurements/converters.py | 2 +- .../measurements/interactive_measurements.py | 2 +- .../core/measurements/noise_mechanisms.py | 2 +- .../pandas_measurements/__init__.py | 2 +- .../pandas_measurements/dataframe.py | 2 +- .../pandas_measurements/series.py | 2 +- src/tmlt/core/measurements/postprocess.py | 2 +- .../core/measurements/spark_measurements.py | 2 +- src/tmlt/core/measures.py | 2 +- src/tmlt/core/metrics.py | 2 +- src/tmlt/core/random/__init__.py | 2 +- src/tmlt/core/random/continuous_gaussian.py | 2 +- src/tmlt/core/random/discrete_gaussian.py | 2 +- src/tmlt/core/random/inverse_cdf.py | 2 +- src/tmlt/core/random/laplace.py | 2 +- src/tmlt/core/random/rng.py | 2 +- src/tmlt/core/random/uniform.py | 2 +- src/tmlt/core/transformations/__init__.py | 2 +- src/tmlt/core/transformations/base.py | 2 +- src/tmlt/core/transformations/chaining.py | 2 +- src/tmlt/core/transformations/converters.py | 2 +- src/tmlt/core/transformations/dictionary.py | 2 +- src/tmlt/core/transformations/identity.py | 2 +- .../spark_transformations/__init__.py | 2 +- .../spark_transformations/add_remove_keys.py | 2 +- .../spark_transformations/agg.py | 2 +- .../spark_transformations/filter.py | 2 +- .../spark_transformations/groupby.py | 2 +- .../spark_transformations/id.py | 2 +- .../spark_transformations/join.py | 2 +- .../spark_transformations/map.py | 2 +- .../spark_transformations/nan.py | 2 +- .../spark_transformations/partition.py | 2 +- .../spark_transformations/persist.py | 2 +- .../spark_transformations/rename.py | 2 +- .../spark_transformations/select.py | 2 +- .../spark_transformations/truncation.py | 2 +- src/tmlt/core/utils/__init__.py | 2 +- src/tmlt/core/utils/arb.py | 2 +- src/tmlt/core/utils/cleanup.py | 2 +- src/tmlt/core/utils/configuration.py | 2 +- src/tmlt/core/utils/distributions.py | 6 +- src/tmlt/core/utils/exact_number.py | 3 +- src/tmlt/core/utils/grouped_dataframe.py | 2 +- src/tmlt/core/utils/join.py | 2 +- src/tmlt/core/utils/misc.py | 2 +- src/tmlt/core/utils/parameters.py | 2 +- src/tmlt/core/utils/prdp.py | 2 +- src/tmlt/core/utils/testing.py | 2 +- src/tmlt/core/utils/truncation.py | 2 +- src/tmlt/core/utils/type_utils.py | 2 +- src/tmlt/core/utils/validation.py | 2 +- test/__init__.py | 2 +- test/conftest.py | 2 +- test/system/__init__.py | 2 +- .../test_interactive_measurements.py | 2 +- .../noise_distribution_tests/__init__.py | 2 +- .../noise_distribution_tests/test_average.py | 2 +- .../test_base_mechanisms.py | 2 +- .../noise_distribution_tests/test_count.py | 2 +- .../test_count_distinct.py | 2 +- .../noise_distribution_tests/test_quantile.py | 2 +- .../noise_distribution_tests/test_samplers.py | 2 +- .../test_standard_deviation.py | 2 +- .../noise_distribution_tests/test_sum.py | 2 +- .../noise_distribution_tests/test_variance.py | 2 +- test/unit/__init__.py | 2 +- test/unit/budget_abstract.py | 2 +- test/unit/domains/__init__.py | 2 +- test/unit/domains/abstract.py | 2 +- test/unit/domains/test_base.py | 2 +- test/unit/domains/test_collections.py | 2 +- test/unit/domains/test_numpy_domains.py | 2 +- test/unit/domains/test_pandas_domains.py | 2 +- test/unit/domains/test_spark_domains.py | 2 +- test/unit/measurements/__init__.py | 2 +- test/unit/measurements/abstract.py | 2 +- .../pandas_measurements/__init__.py | 2 +- .../pandas_measurements/test_dataframe.py | 2 +- .../pandas_measurements/test_series.py | 2 +- test/unit/measurements/test_aggregations.py | 2 +- test/unit/measurements/test_chaining.py | 2 +- test/unit/measurements/test_composition.py | 2 +- test/unit/measurements/test_converters.py | 2 +- .../test_interactive_measurements.py | 2 +- .../measurements/test_noise_mechanisms.py | 2 +- test/unit/measurements/test_postprocess.py | 2 +- .../measurements/test_spark_measurements.py | 2 +- test/unit/measures_abstract.py | 2 +- test/unit/metric_abstract.py | 2 +- test/unit/random/__init__.py | 2 +- test/unit/random/test_continuous_gaussian.py | 2 +- test/unit/random/test_discrete_gaussian.py | 2 +- test/unit/random/test_inverse_cdf.py | 2 +- test/unit/random/test_laplace.py | 2 +- test/unit/random/test_rng.py | 2 +- test/unit/random/test_uniform.py | 2 +- test/unit/test_measures.py | 2 +- test/unit/test_metrics.py | 2 +- test/unit/transformations/__init__.py | 2 +- test/unit/transformations/abstract.py | 2 +- .../spark_transformations/__init__.py | 2 +- .../spark_transformations/map/__init__.py | 2 +- .../map/test_flat_map.py | 2 +- .../map/test_flat_map_by_key.py | 2 +- .../map/test_grouping_flat_map.py | 2 +- .../spark_transformations/map/test_map.py | 2 +- .../map/test_row_to_row_transformation.py | 2 +- .../map/test_row_to_rows_transformation.py | 2 +- .../map/test_rows_to_rows_transformation.py | 2 +- .../test_add_remove_keys.py | 2 +- .../spark_transformations/test_agg.py | 2 +- .../spark_transformations/test_filter.py | 2 +- .../spark_transformations/test_groupby.py | 2 +- .../spark_transformations/test_id.py | 2 +- .../spark_transformations/test_join.py | 2 +- .../spark_transformations/test_nan.py | 2 +- .../spark_transformations/test_partition.py | 2 +- .../spark_transformations/test_persist.py | 2 +- .../spark_transformations/test_rename.py | 2 +- .../spark_transformations/test_select.py | 2 +- .../spark_transformations/test_truncation.py | 2 +- test/unit/transformations/test_chaining.py | 2 +- test/unit/transformations/test_converters.py | 2 +- test/unit/transformations/test_dictionary.py | 2 +- test/unit/transformations/test_identity.py | 2 +- test/unit/utils/__init__.py | 2 +- test/unit/utils/test_arb.py | 2 +- test/unit/utils/test_cleanup.py | 2 +- test/unit/utils/test_configuration.py | 2 +- test/unit/utils/test_distributions.py | 2 +- test/unit/utils/test_exact_number.py | 2 +- test/unit/utils/test_grouped_dataframe.py | 2 +- test/unit/utils/test_join.py | 2 +- test/unit/utils/test_misc.py | 2 +- test/unit/utils/test_prdp.py | 2 +- test/unit/utils/test_testing.py | 2 +- test/unit/utils/test_truncation.py | 5 +- test/unit/utils/test_type_utils.py | 2 +- tutorials/FirstSteps.ipynb | 7 - tutorials/index.rst | 2 +- 190 files changed, 194 insertions(+), 951 deletions(-) delete mode 100644 .gitlab-ci.yml delete mode 100644 doc/additional-resources/privacy_policy.rst diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index ad61565..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,663 +0,0 @@ -# GitLab CI can create duplicate pipelines in certain cases when one event that -# triggers a pipeline (e.g. a push) causes another such event (e.g. the -# resulting update to an MR). This block prevents that in common cases. -workflow: - rules: - # If pushing to a branch that has an open MR associated with it, don't - # launch the on-push pipeline. - - if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"' - when: never - - when: always - -# Define the potential stages that can be run in a GitLab CI pipeline job -stages: - - setup - - lint - - test - - docs - - benchmark - - test-release - - release - - handler - -variables: - PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" - POETRY_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pypoetry" - POETRY_VIRTUALENVS_IN_PROJECT: "true" - # Force nox to produce colorful logs: - FORCE_COLOR: "true" - # Enable feature flags - # https://docs.gitlab.com/runner/configuration/feature-flags.html - FF_SCRIPT_SECTIONS: "true" - FF_USE_FASTZIP: "true" - -.base: - image: registry.gitlab.com/tumult-labs/ops/ci/linux:python3.9 - before_script: - - java -version - - python --version - - poetry self show - # Force git to use 8 characters as the short-hash length. This avoids an - # issue[0] with poetry-dynamic-versioning where it doesn't generate a - # consistent name for the package generated in the CI, using either 7 or 8 - # characters across different jobs depending on how much of the repository - # is pulled down onto the CI runner for each job. - # [0] https://github.com/mtkennerly/dunamai/issues/89 - - git config core.abbrev 8 - # Fail if the Poetry lock file is out of date. - - poetry lock --check - # Set up SSH config so that the runner can `pip install` out of GitLab - # repositories. - - mkdir -p ~/.ssh/ - - cp $GITLAB_SSH_KNOWN_HOSTS ~/.ssh/known_hosts - - chmod 600 "$CI_SSH_KEY" - - cp -pv "$CI_SSH_KEY" ~/.ssh/id_ed25519 - - poetry install --no-root --only scripting - - source .venv/bin/activate - artifacts: - when: always - expire_in: 1 week - cache: - # Cache the pip cache. While the cache could be persisted across changes to - # the Poetry lock file, clearing it when that changes provides a good way to - # keep the cache from growing too large due to old packages. - - key: - files: ["poetry.lock"] - paths: [".cache/pip"] - tags: [aws-small] - interruptible: true - after_script: - # Just to be safe, remove the key after the job finishes - - rm -v ~/.ssh/id_ed25519 - -.analytics_base: - extends: .base - before_script: - - java -version - - python --version - # Set up SSH config so that the runner can `pip install` out of GitLab - # repositories. - - mkdir -p ~/.ssh/ - - cp $GITLAB_SSH_KNOWN_HOSTS ~/.ssh/known_hosts - - chmod 600 "$CI_SSH_KEY" - - cp -pv "$CI_SSH_KEY" ~/.ssh/id_ed25519 - - export CORE_WHEEL_DIR="$(pwd)/dist" - - git clone $analytics_git ../analytics - - cd ../analytics - - poetry install --no-root --only scripting - - source .venv/bin/activate - - nox -s build - -# "Fake" job to prevent dev pipelines from being interrupted on new commits. -# See gitlab-org/gitlab#34221 -prevent_dev_interrupt: - stage: setup - script: - - echo "No-op job to prevent dev pipelines from being interrupted" - variables: - GIT_STRATEGY: none - timeout: 1m - rules: - - if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH" - -package: - extends: .base - stage: setup - needs: [] - image: registry.gitlab.com/tumult-labs/ops/ci/linux:python3.9 - # make a docker daemon available for cibuildwheel to use - services: - - name: docker:dind - entrypoint: ["env", "-u", "DOCKER_HOST"] - command: ["dockerd-entrypoint.sh"] - variables: - DOCKER_HOST: tcp://docker:2375/ - DOCKER_DRIVER: overlay2 - # See https://github.com/docker-library/docker/pull/166 - DOCKER_TLS_CERTDIR: "" - script: - - curl -sSL https://get.docker.com/ | sh - - nox -s build - artifacts: - paths: ["dist/"] - timeout: 15m - interruptible: true - tags: [saas-linux-large-amd64] - -# Requires the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY variables to be set. -# We use an access key from the core-ci AWS user, which has permissions to list -# and modify all objects in the tumult.core-wheel-cache bucket. -get_mac_wheels: - extends: .base - stage: setup - needs: [] - artifacts: - paths: ["dist/"] - expire_in: 1 week - script: - - nox --no-venv -s get_mac_wheels - rules: - # Start this job with a short delay to allow the CircleCI pipeline - # to be created - - if: "$CI_COMMIT_TAG" - when: delayed - start_in: 30 seconds - - if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH" - when: delayed - start_in: 30 seconds - - when: never - -lint: - extends: .base - stage: lint - needs: ["package"] - script: - - nox -t lint -- --check - timeout: 20m - rules: - - if: "$CI_COMMIT_TAG" - when: never - - if: '$CI_PIPELINE_SOURCE == "schedule"' - when: never - - when: on_success - -sanity_checks: - extends: lint - stage: lint - script: - - nox -t sanity-checks - -test: - extends: .base - stage: test - needs: ["package"] - script: - - nox -s test_smoketest test_fast - coverage: '/^TOTAL.+?(\d+\%)$/' - artifacts: - paths: ["coverage/"] - reports: - coverage_report: - coverage_format: cobertura - path: "coverage.xml" - junit: "junit*.xml" - expose_as: "Coverage" - timeout: 1h - rules: - - if: '$CI_PIPELINE_SOURCE == "schedule" || $CI_COMMIT_TAG' - when: never - - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - - if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH" - - when: manual - allow_failure: true - tags: [aws-c6a.xlarge] - -test_docs: - extends: test - script: - - nox -s test_doctest - -test_slow: - extends: test - script: - - nox -s test_slow - timeout: 23h - rules: - - if: '$CI_COMMIT_TAG' - when: never - - if: '$CI_PIPELINE_SOURCE == "schedule"' - - when: manual - allow_failure: true - -test_dep_matrix: - extends: .base - stage: test - needs: ["package"] - parallel: - matrix: - - PYTHON_VERSION: ["3.9", "3.10", "3.11", "3.12"] - TEST_TYPE: ["oldest", "newest"] - - PYTHON_VERSION: ["3.9"] - TEST_TYPE: ["pyspark3.4"] - image: registry.gitlab.com/tumult-labs/ops/ci/linux:python${PYTHON_VERSION} - rules: - - if: '$CI_PIPELINE_SOURCE == "schedule"' - - if: '$CI_COMMIT_TAG' - when: never - - when: manual - allow_failure: true - script: - - nox -s "test_dependency_matrix(${PYTHON_VERSION}-${TEST_TYPE})" - cache: - - key: - prefix: "$PYTHON_VERSION-$TEST_TYPE" - files: ["poetry.lock"] - paths: [".cache/pip"] - timeout: 3h - tags: [aws-c6a.xlarge] - interruptible: true - -.analytics_tests: - extends: .analytics_base - variables: - analytics_git: "git@gitlab.com:tumult-labs/analytics.git" - stage: test - needs: - - job: package - artifacts: true - - job: test_slow - artifacts: false - rules: - - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - when: manual - - if: '$CI_PIPELINE_SOURCE == "schedule"' - allow_failure: true - tags: [aws-c6a.xlarge] - -test_analytics: - extends: .analytics_tests - script: - - nox -s test_smoketest test_fast - -test_analytics_docs: - extends: .analytics_tests - script: - - nox -s test_doctest - -.analytics_pro_tests: - extends: .analytics_base - variables: - analytics_git: "git@gitlab.com:tumult-labs/analytics-ee.git" - stage: test - needs: - - job: package - artifacts: true - - job: test_slow - artifacts: false - rules: - - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - when: manual - - if: '$CI_PIPELINE_SOURCE == "schedule"' - allow_failure: true - tags: [aws-c6a.xlarge] - -test_analytics_pro: - extends: .analytics_pro_tests - script: - - nox -s test_smoketest test_fast - -test_analytics_pro_docs: - extends: .analytics_pro_tests - script: - - nox -s test_doctest - -# Requires the following CI variables to be set: -# * NIGHTLY_HANDLER_TOKEN, a GitLab project access token with the read_api permission -# * NIGHTLY_SLACK_WEBHOOK_URL, a Slack incoming webhook for posting to the appropriate -# channel -nightly_handler: - stage: handler - image: registry.gitlab.com/tumult-labs/ops/ci/linux:python3.9 - script: - - source .pipeline_handlers - - nightly_handler - variables: - GIT_DEPTH: 1 - timeout: 2m - rules: - - if: '$CI_PIPELINE_SOURCE == "schedule"' - when: always - interruptible: false - -docs: - extends: .base - stage: docs - needs: ["package"] - script: - - nox -t docs - # Remove Sphinx build cache before saving, as it is large and isn't needed anymore. - - rm -r public/.doctrees - artifacts: - paths: - - public/ - expose_as: "Documentation" - timeout: 1h - rules: - - if: '$CI_PIPELINE_SOURCE == "schedule"' - when: never - - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - - if: "$CI_COMMIT_TAG" - - if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH" - - when: manual - allow_failure: true - -test_release_linux_x86: - extends: .base - stage: test-release - needs: ["package"] - parallel: - matrix: - - PYTHON_VERSION: ["3.9", "3.10", "3.11", "3.12"] - image: registry.gitlab.com/tumult-labs/ops/ci/linux:python${PYTHON_VERSION} - script: - - nox -s release_smoketest release_test - coverage: '/^TOTAL.+?(\d+\%)$/' - artifacts: - reports: - coverage_report: - coverage_format: cobertura - path: "coverage.xml" - junit: "junit*.xml" - timeout: 1h - rules: - - if: '$CI_PIPELINE_SOURCE == "schedule"' - - if: "$CI_COMMIT_TAG" - - when: manual - allow_failure: true - tags: [aws-c6a.xlarge] - -test_release_macos_arm: - stage: test-release - needs: [get_mac_wheels] - parallel: - matrix: - - IMAGE: ["macos-14-xcode-15"] - image: ${IMAGE} - before_script: - - python --version - # Setup Java 11 - - brew install openjdk@11 - - export PATH="/opt/homebrew/opt/openjdk@11/bin:$PATH" - - java -version - script: - # Set up SSH config so that the runner can `pip install` out of GitLab - # repositories. - - mkdir -p ~/.ssh/ - - cp $GITLAB_SSH_KNOWN_HOSTS ~/.ssh/known_hosts - - chmod 600 "$CI_SSH_KEY" - - cp -pv "$CI_SSH_KEY" ~/.ssh/id_ed25519 - - pip install poetry - - export PATH="/Users/gitlab/.local/bin:$PATH" - - poetry self add "poetry-dynamic-versioning[plugin]" - - poetry install --no-root --only scripting - - source .venv/bin/activate - - nox -s release_smoketest release_test - coverage: '/^TOTAL.+?(\d+\%)$/' - artifacts: - paths: ["coverage/"] - reports: - coverage_report: - coverage_format: cobertura - path: "coverage.xml" - junit: "junit*.xml" - expose_as: "Coverage" - timeout: 1h - rules: - - if: '$CI_PIPELINE_SOURCE == "schedule"' - - if: "$CI_COMMIT_TAG" - tags: [saas-macos-medium-m1] - -test_release_macos_x86: - stage: test-release - needs: [get_mac_wheels] - parallel: - matrix: - - IMAGE: ["macos-14-xcode-15"] - image: ${IMAGE} - before_script: - - softwareupdate --install-rosetta --agree-to-license - # Install Homebrew for x86 - - arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - - which -a brew - # Ensure Homebrew is set up correctly - - export PATH="/usr/local/bin:$PATH" - - arch -x86_64 brew update - # Setup non-ARM Python - - arch -x86_64 brew install python@3.9 - - export PATH="/usr/local/opt/python@3.9/libexec/bin:$PATH" - - python --version - # Setup Java 11 - - arch -x86_64 brew install openjdk@11 - - export PATH="/usr/local/opt/openjdk@11/bin:$PATH" - - java -version - script: - # Set up SSH config so that the runner can `pip install` out of GitLab - # repositories. - - mkdir -p ~/.ssh/ - - cp $GITLAB_SSH_KNOWN_HOSTS ~/.ssh/known_hosts - - chmod 600 "$CI_SSH_KEY" - - cp -pv "$CI_SSH_KEY" ~/.ssh/id_ed25519 - - curl -sSL https://install.python-poetry.org | python3.9 - - - export PATH="/Users/gitlab/.local/bin:$PATH" - - poetry self add "poetry-dynamic-versioning[plugin]" - - poetry install --no-root --only scripting - - source .venv/bin/activate - - nox -s release_smoketest release_test - coverage: '/^TOTAL.+?(\d+\%)$/' - artifacts: - paths: ["coverage/"] - reports: - coverage_report: - coverage_format: cobertura - path: "coverage.xml" - junit: "junit*.xml" - expose_as: "Coverage" - timeout: 1h - rules: - - if: '$CI_PIPELINE_SOURCE == "schedule"' - - if: "$CI_COMMIT_TAG" - tags: [saas-macos-medium-m1] - -audit: - extends: .base - stage: test-release - needs: ["package"] - parallel: - matrix: - - PYTHON_VERSION: ["3.9", "3.10", "3.11", "3.12"] - image: registry.gitlab.com/tumult-labs/ops/ci/linux:python${PYTHON_VERSION} - script: - - nox -s "audit(python=\"${PYTHON_VERSION}\")" - timeout: 15m - rules: - - if: '$CI_PIPELINE_SOURCE == "schedule"' - - if: "$CI_COMMIT_TAG" - - when: manual - allow_failure: true - -publish: - stage: release - dependencies: [get_mac_wheels, package] - image: registry.gitlab.com/tumult-labs/ops/ci/linux:python3.9 - script: - - poetry publish -u __token__ -p "${RELEASE_PYPI_TOKEN}" - timeout: 3m - rules: - - if: "$CI_COMMIT_TAG" - interruptible: false - -# This job requires the DOCS_TOKEN_USER and DOCS_TOKEN variables to be set. They -# should be the name and token of a project access token from the -# tumult-labs/ops/docs.tmlt.dev project with the read_repository and -# write_repository permissions. The bot user for this token must have permission -# to push the protected `prod` branch. -publish_docs: - stage: release - dependencies: [docs] - image: registry.gitlab.com/tumult-labs/ops/ci/linux:python3.9 - variables: - GIT_STRATEGY: none - before_script: - - docs_credentials="_:${DOCS_TOKEN:?Token for publishing to docs repo is not set}" - - | - if [[ -z "$CI_COMMIT_TAG" ]]; then - version="$CI_COMMIT_BRANCH" - docs_version="$version" - else - version="$CI_COMMIT_TAG" - # Check if this tag is a pre-release. - if [[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+-(alpha|beta|rc)\.[0-9]+$ ]]; then - echo "Version $version is a pre-release, skipping docs publication." - exit 0 - fi - # Convert X.Y.Z semantic version to vX.Y for docs. - docs_version="v$(echo $version | sed -E 's/^([[:digit:]]+\.[[:digit:]]+).*/\1/')" - fi - - echo "Publishing version $version as $docs_version..." - script: - - git clone https://$docs_credentials@gitlab.com/tumult-labs/ops/docs.tmlt.dev.git - # Remove old docs published as this version, if any - - rm -rf docs.tmlt.dev/public/core/$docs_version - - mv public/ docs.tmlt.dev/public/core/$docs_version - - cd docs.tmlt.dev - - git config user.name "gitlab" - - git config user.email "gitlab@tmlt.io" - - git add public - - git diff --staged --stat - - git commit -m "[auto] Publish docs for $version ($CI_COMMIT_SHORT_SHA)" --author "$CI_COMMIT_AUTHOR" - - git push - timeout: 3m - interruptible: false - rules: - - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' - - if: "$CI_COMMIT_TAG" - -benchmark_nightly: - extends: .base - stage: benchmark - needs: ["package"] - script: - - nox -s benchmark - artifacts: - paths: - - benchmark_output/ - expose_as: "Benchmarks" - timeout: 3h - rules: - - if: '$CI_PIPELINE_SOURCE == "schedule"' - - if: "$CI_COMMIT_TAG" - when: never - - when: manual - allow_failure: true - tags: [aws-c6a.xlarge] - -benchmark_dependency_matrix: - extends: .base - stage: benchmark - needs: ["package"] - parallel: - matrix: - - PYTHON_VERSION: ["3.9", "3.10", "3.11", "3.12"] - TEST_TYPE: ["oldest", "newest"] - - PYTHON_VERSION: ["3.9"] - TEST_TYPE: ["pyspark3.4"] - image: registry.gitlab.com/tumult-labs/ops/ci/linux:python${PYTHON_VERSION} - script: - - nox -s "benchmark_multi_deps(${PYTHON_VERSION}-${TEST_TYPE})" - artifacts: - paths: - - benchmark_output/ - expose_as: "Benchmarks" - timeout: 3h - rules: # Can only be triggered manually - - if: "$CI_COMMIT_TAG" - when: never - - when: manual - allow_failure: true - tags: [aws-c6a.xlarge] - -# Requires the following CI variables to be set: -# * NIGHTLY_HANDLER_TOKEN, a GitLab project access token with the read_api permission -# * NIGHTLY_SLACK_WEBHOOK_URL, a Slack incoming webhook for posting to the appropriate -# channel -nightly_handler: - stage: handler - image: registry.gitlab.com/tumult-labs/ops/ci/linux:python3.9 - script: - - poetry install --no-root --only ci-tools - - source .venv/bin/activate - - python .ci/pipeline-handler.py nightly - --allow-failure test_analytics - --allow-failure test_analytics_docs - --allow-failure test_analytics_pro - --allow-failure test_analytics_pro_docs - variables: - GIT_DEPTH: 1 - timeout: 2m - rules: - - if: '$CI_PIPELINE_SOURCE == "schedule"' - when: always - interruptible: false - -# Requires the following CI variables to be set: -# * VERSION, the semantic version number to be given to the release. This would -# typically be specified when launching the manual job. -# * RELEASER_TOKEN_USERNAME and RELEASER_TOKEN, a GitLab project access token -# (and an associated username) with the api permission and the ability to push -# tags. -trigger_release: - extends: .base - stage: handler - before_script: - - !reference [.base, before_script] - - releaser_credentials="_:${RELEASER_TOKEN?Token for releasing is not set}" - - git config user.name "gitlab" - - git config user.email "gitlab@tmlt.io" - script: - - nox -s prepare_release - - git checkout -B "release/$VERSION" - - git add -u - - git diff --staged --stat - - git commit -m "[auto] Prepare release $VERSION" --author "$CI_COMMIT_AUTHOR" --allow-empty - - git tag "$VERSION" - - nox -s post_release - - git add -u - - git diff --staged --stat - - git commit -m "[auto] Post-release $VERSION" --author "$CI_COMMIT_AUTHOR" --allow-empty - - git remote add origin-https "https://$releaser_credentials@gitlab.com/$CI_PROJECT_PATH.git" - - git push origin-https "release/$VERSION" --push-option ci.skip - - git push origin-https "$VERSION" - - | - cat > body.json <. diff --git a/README.md b/README.md index cbc3804..2d0837d 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,6 @@ Tumult Core is a programming framework for implementing [differentially private] The design of Tumult Core is based on the design proposed in the [OpenDP White Paper](https://projects.iq.harvard.edu/files/opendifferentialprivacy/files/opendp_white_paper_11may2020.pdf), and can automatically verify the privacy properties of algorithms constructed from Tumult Core components. Tumult Core is scalable, includes a wide variety of components, and supports multiple privacy definitions. - -## 🚨 Important Update: the Tumult Labs Team is Joining LinkedIn 🚨 -The [Tumult Labs team has joined LinkedIn](https://www.linkedin.com/pulse/whats-next-us-tumult-labs-gerome-miklau-zmpye)! 🎉 As part of this transition, we are exploring options for the future of Tumult Core, including finding a new home for the project. 🏡 -We greatly appreciate the community’s support and contributions. If your organization is interested in maintaining or adopting Tumult Core, please reach out! 📩 -For now, the repository remains available, and we encourage users to continue engaging with the project. We’ll provide updates as soon as we have more to share. -— The Tumult Labs Team 💙 - ## Installation See the [installation instructions in the documentation](https://docs.tmlt.dev/core/latest/installation.html#installation-instructions) for information about setting up prerequisites such as Spark and Java. @@ -27,7 +20,7 @@ The full documentation is located at https://docs.tmlt.dev/core/latest. ## Support -If you have any questions/concerns, please [create an issue](https://gitlab.com/tumult-labs/core/-/issues) or reach out to us on [Slack](https://tmltdev.slack.com/join/shared_invite/zt-1bky0mh9v-vOB8azKAVoxmzJDUdWd5Wg#). +If you have any questions/concerns, please [create an issue](https://github.com/opendp/tumult-core/issues) or reach out to us on [Slack](https://opendp.slack.com/join/shared_invite/zt-1aca9bm7k-hG7olKz6CiGm8htI2lxE8w#/shared-invite/email). ## Contributing diff --git a/benchmark/benchmarking_utils.py b/benchmark/benchmarking_utils.py index ddc6d92..c1e0d37 100644 --- a/benchmark/benchmarking_utils.py +++ b/benchmark/benchmarking_utils.py @@ -1,7 +1,7 @@ """Common utility functions for benchmarking scripts.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + # pylint: disable=attribute-defined-outside-init diff --git a/benchmark/bounds.py b/benchmark/bounds.py index 8d45c02..2a1d1e3 100644 --- a/benchmark/bounds.py +++ b/benchmark/bounds.py @@ -1,7 +1,7 @@ """Benchmarking script for bounds aggregation.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from math import log from random import randint diff --git a/benchmark/count_sum.py b/benchmark/count_sum.py index 1fe632d..bc9cf69 100644 --- a/benchmark/count_sum.py +++ b/benchmark/count_sum.py @@ -1,7 +1,7 @@ """Benchmarking script for spark-based count and sum aggregations.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from math import log from random import randint diff --git a/benchmark/noise_mechanism.py b/benchmark/noise_mechanism.py index d75b4b5..3871f62 100644 --- a/benchmark/noise_mechanism.py +++ b/benchmark/noise_mechanism.py @@ -1,7 +1,7 @@ """Benchmarking script for adding noise to dataframes.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import time diff --git a/benchmark/private_join.py b/benchmark/private_join.py index ef74151..591cb3d 100644 --- a/benchmark/private_join.py +++ b/benchmark/private_join.py @@ -1,7 +1,7 @@ """Benchmarking module for PrivateJoin and Truncation transformations.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import itertools from random import randint diff --git a/benchmark/public_join.py b/benchmark/public_join.py index fc4813a..45aca03 100644 --- a/benchmark/public_join.py +++ b/benchmark/public_join.py @@ -1,7 +1,7 @@ """Benchmarking module for PublicJoin.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import time from random import randint diff --git a/benchmark/quantile.py b/benchmark/quantile.py index d2bc092..59f7c9e 100644 --- a/benchmark/quantile.py +++ b/benchmark/quantile.py @@ -1,6 +1,6 @@ """Benchmarking quantile script for the OpenDP-based privacy framework.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import time from random import randint diff --git a/benchmark/sparkflatmap.py b/benchmark/sparkflatmap.py index 873f114..054bb07 100644 --- a/benchmark/sparkflatmap.py +++ b/benchmark/sparkflatmap.py @@ -1,7 +1,7 @@ """Benchmarking script for Map.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import time from random import choice, randint diff --git a/benchmark/sparkmap.py b/benchmark/sparkmap.py index 0ef2b0c..20a6d3e 100644 --- a/benchmark/sparkmap.py +++ b/benchmark/sparkmap.py @@ -1,7 +1,7 @@ """Benchmarking script for Map.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import time from random import randint diff --git a/doc/_static/css/custom.css b/doc/_static/css/custom.css index ba40892..6ccf4cc 100644 --- a/doc/_static/css/custom.css +++ b/doc/_static/css/custom.css @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Tumult Labs 2025 */ +/* */ /* Override the color of hovered links, as the default is kind of out of place and distracting. This makes it so the links don't change color when hovered, diff --git a/doc/_static/js/version-banner.js b/doc/_static/js/version-banner.js index b5e10e7..b51324c 100644 --- a/doc/_static/js/version-banner.js +++ b/doc/_static/js/version-banner.js @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Tumult Labs 2025 */ +/* */ function injectBanner(content) { var body = document.getElementsByClassName('bd-article')[0]; diff --git a/doc/_templates/build-info.html b/doc/_templates/build-info.html index af5f762..8cd670d 100644 --- a/doc/_templates/build-info.html +++ b/doc/_templates/build-info.html @@ -1,3 +1,3 @@ - + Built from {{ commit_hash }} at {{ build_time }}. diff --git a/doc/_templates/layout.html b/doc/_templates/layout.html index 5804f16..59bf100 100644 --- a/doc/_templates/layout.html +++ b/doc/_templates/layout.html @@ -1,5 +1,5 @@ - + {% extends "!layout.html" %} {# pydata-sphinx-theme currently only supports Google Analytics. This is a workaround until pydata-sphinx-theme v0.10.0 is released, which adds diff --git a/doc/_templates/package-name.html b/doc/_templates/package-name.html index b5cff0b..1a5be08 100644 --- a/doc/_templates/package-name.html +++ b/doc/_templates/package-name.html @@ -1,3 +1,3 @@ - +

{{ project }}

diff --git a/doc/_templates/sidebar-nav-bs.html b/doc/_templates/sidebar-nav-bs.html index 1e28efd..bde68f5 100644 --- a/doc/_templates/sidebar-nav-bs.html +++ b/doc/_templates/sidebar-nav-bs.html @@ -1,5 +1,5 @@ - + {# Sidebar navigation component, based on [1] but with the "Section Navigation" header removed. [1] https://github.com/pydata/pydata-sphinx-theme/blob/29a0d375f49cc7ee9411797349ae14951692eb63/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/sidebar-nav-bs.html diff --git a/doc/additional-resources/index.rst b/doc/additional-resources/index.rst index cc58959..ef66d20 100644 --- a/doc/additional-resources/index.rst +++ b/doc/additional-resources/index.rst @@ -3,7 +3,7 @@ Additional Resources .. SPDX-License-Identifier: CC-BY-SA-4.0 - Copyright Tumult Labs 2025 + .. toctree:: :maxdepth: 1 diff --git a/doc/additional-resources/license.rst b/doc/additional-resources/license.rst index 18eaf1d..0df1822 100644 --- a/doc/additional-resources/license.rst +++ b/doc/additional-resources/license.rst @@ -5,11 +5,11 @@ License .. SPDX-License-Identifier: CC-BY-SA-4.0 - Copyright Tumult Labs 2025 + -Copyright Tumult Labs 2025 -The Tumult Core source code is licensed under the Apache License, version 2.0 (`Apache-2.0 `_). -The Tumult Core documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (`CC-BY-SA-4.0 `_). +The Tumult Core source code is licensed under the Apache License, version 2.0 (`Apache-2.0 `_). + +The Tumult Core documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (`CC-BY-SA-4.0 `_). To view a copy of this license, visit this `webpage `_ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. diff --git a/doc/additional-resources/privacy_policy.rst b/doc/additional-resources/privacy_policy.rst deleted file mode 100644 index 13f2cc5..0000000 --- a/doc/additional-resources/privacy_policy.rst +++ /dev/null @@ -1,73 +0,0 @@ -.. _privacy_policy: - -Privacy Policy -============== - -.. - SPDX-License-Identifier: CC-BY-SA-4.0 - Copyright Tumult Labs 2025 - -Effective Date: Aug 26th, 2022 - -Welcome -------- - -Tumult Labs provides Differential Privacy software and services to companies, -agencies and institutions. We only use your personal information for the purpose -of managing our business and our relationship with you. This Privacy Notice -describes the ways that Tumult Labs protects the privacy of visitors to our website -and users of our hosted demonstration environment. We protect the personal -information of our customers, partners and employees in accordance with our -agreements and applicable law. - -Privacy and transparency are core to who we are as a company, and we have done -our best to make our Privacy Notice easy to read and to allow you to find what -you are looking for. If you would like any more information, just reach out to us -at `info@tmlt.io `_. - - -How does Tumult Labs use my personal information? -------------------------------------------------- - -To respond to your requests, questions and feedback -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If you contact us with questions or feedback, we will use your business contact -information to respond to you. - -To keep you updated (with your consent) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -We keep our network up to date on platform updates via e-mail. If you wish to be -added to our mailing list, we ask that you provide your business contact -information (including your name, company info, and business e-mail address) -either through our website, contact one of our team members or send us an e-mail. - -We respect your wishes when it comes to communication. If you wish to unsubscribe, -just click the unsubscribe link at the bottom of every email or send us an email at -`info@tmlt.io `_ and we will stop sending you marketing and promotional emails within 10 days. - -A note about tracking and analytics -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Unlike most companies, Tumult Labs does not collect any personal information about -you for the purpose of tracking and analytics. Our website utilizes `Plausible.io `_, -a privacy friendly and open source alternative that does not use cookies or other -tracking technology. - -Does Tumult Labs sell or share my personal information? -------------------------------------------------------- -No. We do not sell your personal information, and we do not share it with third parties. - -Tumult Labs uses some tools, apps and services to communicate with users. If these tools -are provided by third parties, we make sure the third parties are not allowed to access -your personal information, copy it, or use it for any purpose other than to deliver the -service to us. A list of third-party service providers is available upon request. - -How do I get in touch? ----------------------- -If you have questions or comments about this privacy notice or our privacy practices, -please contact us. - -The best way to reach us is via email at `info@tmlt.io `_. - -You can also send us a letter: Tumult Labs Inc, 201 W Main Street, Suite B26, Durham, NC -27701 USA. - diff --git a/doc/conf.py b/doc/conf.py index 62abb84..b7a098a 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -1,7 +1,7 @@ # pylint: skip-file # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import datetime import logging @@ -15,7 +15,6 @@ project = "Tumult Core" author = "Tumult Labs" -copyright = f"{datetime.date.today().year} Tumult Labs" # Note that this is the name of the module provided by the package, not # necessarily the name of the package as pip understands it. package_name = "tmlt.core" @@ -142,13 +141,13 @@ def autoapi_prepare_jinja_env(jinja_env): "collapse_navigation": True, "navigation_depth": 4, "navbar_end": ["navbar-icon-links"], - "footer_start": ["copyright", "build-info"], + "footer_start": ["build-info"], "footer_end": ["sphinx-version", "theme-version"], "switcher": { "json_url": "https://docs.tmlt.dev/core/versions.json", "version_match": version, }, - "gitlab_url": "https://gitlab.com/tumult-labs/core", + "github_url": "https://github.com/opendp/tumult-core", } html_context = { "default_mode": "light", diff --git a/doc/index.rst b/doc/index.rst index 005b3cc..93542f7 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -3,7 +3,7 @@ Tumult Core documentation .. SPDX-License-Identifier: CC-BY-SA-4.0 - Copyright Tumult Labs 2025 + .. toctree:: :hidden: diff --git a/doc/installation.rst b/doc/installation.rst index 8f9978e..8bdf926 100644 --- a/doc/installation.rst +++ b/doc/installation.rst @@ -5,7 +5,7 @@ Installation instructions .. SPDX-License-Identifier: CC-BY-SA-4.0 - Copyright Tumult Labs 2025 + This guide will help you set up Tumult Core on your local machine. @@ -20,7 +20,7 @@ Tumult Core supports the ``x86_64`` processor architecture, as well as Apple sil Below are instructions for installing these prerequisites on several common platforms. If none of these apply to you, install Python 3 and Java from your OS package manager. -If you encounter any issues during the installation process, please `let us know `__! +If you encounter any issues during the installation process, please `let us know `__! .. tab-set:: diff --git a/doc/ref.bib b/doc/ref.bib index 9401403..4de9b40 100644 --- a/doc/ref.bib +++ b/doc/ref.bib @@ -1,5 +1,5 @@ % SPDX-License-Identifier: CC-BY-SA-4.0 -% Copyright Tumult Labs 2025 +% @inproceedings{Cesar021, author = {Mark Cesar and diff --git a/doc/topic-guides/architecture.rst b/doc/topic-guides/architecture.rst index 10300eb..5a1de0c 100644 --- a/doc/topic-guides/architecture.rst +++ b/doc/topic-guides/architecture.rst @@ -5,7 +5,7 @@ Tumult Core Architecture .. SPDX-License-Identifier: CC-BY-SA-4.0 - Copyright Tumult Labs 2025 + .. testsetup:: diff --git a/doc/topic-guides/index.rst b/doc/topic-guides/index.rst index f9f256d..5bf9422 100644 --- a/doc/topic-guides/index.rst +++ b/doc/topic-guides/index.rst @@ -5,7 +5,7 @@ Topic Guides .. SPDX-License-Identifier: CC-BY-SA-4.0 - Copyright Tumult Labs 2025 + The following pages explain concepts and advanced topics that come up in Tumult Core. diff --git a/doc/topic-guides/known-vulnerabilities.rst b/doc/topic-guides/known-vulnerabilities.rst index f83ebef..5ce3b35 100644 --- a/doc/topic-guides/known-vulnerabilities.rst +++ b/doc/topic-guides/known-vulnerabilities.rst @@ -5,7 +5,7 @@ Known Vulnerabilities .. SPDX-License-Identifier: CC-BY-SA-4.0 - Copyright Tumult Labs 2025 + This page describes known vulnerabilities in Tumult Core that we intend to fix. diff --git a/doc/topic-guides/privacy-guarantee.rst b/doc/topic-guides/privacy-guarantee.rst index 9d4bae0..1eb8b78 100644 --- a/doc/topic-guides/privacy-guarantee.rst +++ b/doc/topic-guides/privacy-guarantee.rst @@ -5,7 +5,7 @@ Tumult Core Privacy Guarantee .. SPDX-License-Identifier: CC-BY-SA-4.0 - Copyright Tumult Labs 2025 + The privacy guarantee of a Core :class:`~.Measurement`, :math:`\mathcal{M}` is the following. Let :math:`r` denote the privacy relation of :math:`\mathcal{M}`, diff --git a/doc/topic-guides/real-numbers.rst b/doc/topic-guides/real-numbers.rst index 845af61..383a875 100644 --- a/doc/topic-guides/real-numbers.rst +++ b/doc/topic-guides/real-numbers.rst @@ -5,7 +5,7 @@ Handling Real Numbers .. SPDX-License-Identifier: CC-BY-SA-4.0 - Copyright Tumult Labs 2025 + A DP algorithm (a single :class:`~.Measurement`) may be constructed using the Tumult Core library by composing arbitrarily many transformations and measurements; and calling the diff --git a/doc/topic-guides/spark.rst b/doc/topic-guides/spark.rst index 657c3dd..7060588 100644 --- a/doc/topic-guides/spark.rst +++ b/doc/topic-guides/spark.rst @@ -5,7 +5,7 @@ Spark .. SPDX-License-Identifier: CC-BY-SA-4.0 - Copyright Tumult Labs 2025 + Tumult Core uses Spark as its underlying data processing framework. This topic guide covers relevant information about Spark diff --git a/doc/topic-guides/special-values.rst b/doc/topic-guides/special-values.rst index 4e3a33a..b441557 100644 --- a/doc/topic-guides/special-values.rst +++ b/doc/topic-guides/special-values.rst @@ -5,7 +5,7 @@ NaNs, nulls, and infs .. SPDX-License-Identifier: CC-BY-SA-4.0 - Copyright Tumult Labs 2025 + This page describes how Tumult Core handles NaNs, nulls, and infs. diff --git a/doc/tutorials/first-tutorial.rst b/doc/tutorials/first-tutorial.rst index 05fc695..1cac116 100644 --- a/doc/tutorials/first-tutorial.rst +++ b/doc/tutorials/first-tutorial.rst @@ -3,7 +3,7 @@ Simple Data Analysis with Tumult Core .. SPDX-License-Identifier: CC-BY-SA-4.0 - Copyright Tumult Labs 2025 + In this tutorial you will learn how to: diff --git a/doc/tutorials/index.rst b/doc/tutorials/index.rst index 391c55f..c846c23 100644 --- a/doc/tutorials/index.rst +++ b/doc/tutorials/index.rst @@ -5,7 +5,7 @@ Tutorials .. SPDX-License-Identifier: CC-BY-SA-4.0 - Copyright Tumult Labs 2025 + The following tutorials introduce the functionality of Tumult Core. diff --git a/doc/zcitations.rst b/doc/zcitations.rst index 45a113f..78ec1e2 100644 --- a/doc/zcitations.rst +++ b/doc/zcitations.rst @@ -5,6 +5,6 @@ Supporting materials .. SPDX-License-Identifier: CC-BY-SA-4.0 - Copyright Tumult Labs 2025 + .. bibliography:: ref.bib diff --git a/src/tmlt/core/__init__.py b/src/tmlt/core/__init__.py index f4bdc18..2dba7de 100644 --- a/src/tmlt/core/__init__.py +++ b/src/tmlt/core/__init__.py @@ -1,7 +1,7 @@ """Tumult Core Module.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import warnings diff --git a/src/tmlt/core/domains/__init__.py b/src/tmlt/core/domains/__init__.py index f858456..0246357 100644 --- a/src/tmlt/core/domains/__init__.py +++ b/src/tmlt/core/domains/__init__.py @@ -1,4 +1,4 @@ """Domains.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + diff --git a/src/tmlt/core/domains/base.py b/src/tmlt/core/domains/base.py index 58a8b7c..fc7b0c8 100644 --- a/src/tmlt/core/domains/base.py +++ b/src/tmlt/core/domains/base.py @@ -1,7 +1,7 @@ """Base class for input/output domains.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from __future__ import annotations from abc import ABC, abstractmethod diff --git a/src/tmlt/core/domains/collections.py b/src/tmlt/core/domains/collections.py index dadaccb..4573865 100644 --- a/src/tmlt/core/domains/collections.py +++ b/src/tmlt/core/domains/collections.py @@ -1,7 +1,7 @@ """Domains for common python collections such as lists and dictionaries.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from dataclasses import dataclass from typing import Any, Dict, Mapping, Optional diff --git a/src/tmlt/core/domains/numpy_domains.py b/src/tmlt/core/domains/numpy_domains.py index d5e0143..0cca036 100644 --- a/src/tmlt/core/domains/numpy_domains.py +++ b/src/tmlt/core/domains/numpy_domains.py @@ -1,7 +1,7 @@ """Domains for NumPy datatypes.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from dataclasses import dataclass from typing import Any diff --git a/src/tmlt/core/domains/pandas_domains.py b/src/tmlt/core/domains/pandas_domains.py index 5cce4af..c1cbd69 100644 --- a/src/tmlt/core/domains/pandas_domains.py +++ b/src/tmlt/core/domains/pandas_domains.py @@ -1,7 +1,7 @@ """Domains for Pandas datatypes.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from collections import OrderedDict from dataclasses import dataclass diff --git a/src/tmlt/core/domains/spark_domains.py b/src/tmlt/core/domains/spark_domains.py index 47c36ca..9ab81bd 100644 --- a/src/tmlt/core/domains/spark_domains.py +++ b/src/tmlt/core/domains/spark_domains.py @@ -1,7 +1,7 @@ """Domains for Spark datatypes.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import datetime import warnings diff --git a/src/tmlt/core/exceptions.py b/src/tmlt/core/exceptions.py index 3703c1b..abd2705 100644 --- a/src/tmlt/core/exceptions.py +++ b/src/tmlt/core/exceptions.py @@ -6,7 +6,7 @@ import sympy as sp # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + # TYPE_CHECKING is True when MyPy analyzes this file, but False at runtime # (see: https://docs.python.org/3/library/typing.html) diff --git a/src/tmlt/core/measurements/__init__.py b/src/tmlt/core/measurements/__init__.py index 13b7cdd..448979a 100644 --- a/src/tmlt/core/measurements/__init__.py +++ b/src/tmlt/core/measurements/__init__.py @@ -1,4 +1,4 @@ """Measurements.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + diff --git a/src/tmlt/core/measurements/aggregations.py b/src/tmlt/core/measurements/aggregations.py index 53348ce..b4a8c77 100644 --- a/src/tmlt/core/measurements/aggregations.py +++ b/src/tmlt/core/measurements/aggregations.py @@ -1,7 +1,7 @@ """Derived measurements for computing noisy aggregates on spark DataFrames.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from enum import Enum from math import ceil, log2 diff --git a/src/tmlt/core/measurements/base.py b/src/tmlt/core/measurements/base.py index 325f324..74d48ca 100644 --- a/src/tmlt/core/measurements/base.py +++ b/src/tmlt/core/measurements/base.py @@ -1,7 +1,7 @@ """Base class for measurements.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from abc import ABC, abstractmethod from typing import Any diff --git a/src/tmlt/core/measurements/chaining.py b/src/tmlt/core/measurements/chaining.py index a5a8e46..bb40c76 100644 --- a/src/tmlt/core/measurements/chaining.py +++ b/src/tmlt/core/measurements/chaining.py @@ -1,7 +1,7 @@ """Measurements constructed by chaining other measurements and transformations.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Any, Callable, Optional diff --git a/src/tmlt/core/measurements/composition.py b/src/tmlt/core/measurements/composition.py index 4f06ad0..6bf2225 100644 --- a/src/tmlt/core/measurements/composition.py +++ b/src/tmlt/core/measurements/composition.py @@ -1,7 +1,7 @@ """Measurement for combining multiple measurements into a single measurement.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Any, Callable, List, Optional, Sequence, Tuple diff --git a/src/tmlt/core/measurements/converters.py b/src/tmlt/core/measurements/converters.py index 8d94bdc..d572601 100644 --- a/src/tmlt/core/measurements/converters.py +++ b/src/tmlt/core/measurements/converters.py @@ -1,7 +1,7 @@ """Wrappers for changing a measurements's output measure.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Any, Tuple diff --git a/src/tmlt/core/measurements/interactive_measurements.py b/src/tmlt/core/measurements/interactive_measurements.py index 4ac4abc..a536a54 100644 --- a/src/tmlt/core/measurements/interactive_measurements.py +++ b/src/tmlt/core/measurements/interactive_measurements.py @@ -1,7 +1,7 @@ """Measurements that allow interactively submitting queries to a private dataset.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from abc import ABC, abstractmethod from dataclasses import dataclass diff --git a/src/tmlt/core/measurements/noise_mechanisms.py b/src/tmlt/core/measurements/noise_mechanisms.py index 2b77db8..4497a45 100644 --- a/src/tmlt/core/measurements/noise_mechanisms.py +++ b/src/tmlt/core/measurements/noise_mechanisms.py @@ -1,7 +1,7 @@ """Measurements for adding noise to individual numbers.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import random from fractions import Fraction diff --git a/src/tmlt/core/measurements/pandas_measurements/__init__.py b/src/tmlt/core/measurements/pandas_measurements/__init__.py index 0311698..18f1e92 100644 --- a/src/tmlt/core/measurements/pandas_measurements/__init__.py +++ b/src/tmlt/core/measurements/pandas_measurements/__init__.py @@ -1,4 +1,4 @@ """Measurements on Pandas DataFrames and Series.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + diff --git a/src/tmlt/core/measurements/pandas_measurements/dataframe.py b/src/tmlt/core/measurements/pandas_measurements/dataframe.py index 3273b2e..d67f567 100644 --- a/src/tmlt/core/measurements/pandas_measurements/dataframe.py +++ b/src/tmlt/core/measurements/pandas_measurements/dataframe.py @@ -1,7 +1,7 @@ """Measurements on Pandas DataFrames.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from abc import abstractmethod from typing import Callable, Dict, Mapping, Optional, Union, cast diff --git a/src/tmlt/core/measurements/pandas_measurements/series.py b/src/tmlt/core/measurements/pandas_measurements/series.py index d578bff..91dd8ce 100644 --- a/src/tmlt/core/measurements/pandas_measurements/series.py +++ b/src/tmlt/core/measurements/pandas_measurements/series.py @@ -5,7 +5,7 @@ # TODO(#1023): Handle clamping bounds approximation. # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import math from abc import abstractmethod diff --git a/src/tmlt/core/measurements/postprocess.py b/src/tmlt/core/measurements/postprocess.py index 2fcf1ff..a4f11f3 100644 --- a/src/tmlt/core/measurements/postprocess.py +++ b/src/tmlt/core/measurements/postprocess.py @@ -2,7 +2,7 @@ # TODO(#1176): Retire the queryable after calling self._f. # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Any, Callable diff --git a/src/tmlt/core/measurements/spark_measurements.py b/src/tmlt/core/measurements/spark_measurements.py index 42a0eff..62d0a61 100644 --- a/src/tmlt/core/measurements/spark_measurements.py +++ b/src/tmlt/core/measurements/spark_measurements.py @@ -7,7 +7,7 @@ # pylint: enable=line-too-long # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import uuid from abc import abstractmethod diff --git a/src/tmlt/core/measures.py b/src/tmlt/core/measures.py index 21f8bba..3a9ebe8 100644 --- a/src/tmlt/core/measures.py +++ b/src/tmlt/core/measures.py @@ -1,7 +1,7 @@ """Module containing supported variants for differential privacy.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from __future__ import annotations diff --git a/src/tmlt/core/metrics.py b/src/tmlt/core/metrics.py index 9001c9d..02ce6ff 100644 --- a/src/tmlt/core/metrics.py +++ b/src/tmlt/core/metrics.py @@ -1,7 +1,7 @@ """Module containing metrics used for constructing measurements and transformations.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from __future__ import annotations diff --git a/src/tmlt/core/random/__init__.py b/src/tmlt/core/random/__init__.py index f7b48ba..0004f4b 100644 --- a/src/tmlt/core/random/__init__.py +++ b/src/tmlt/core/random/__init__.py @@ -1,4 +1,4 @@ """Modules related to random number generation.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + diff --git a/src/tmlt/core/random/continuous_gaussian.py b/src/tmlt/core/random/continuous_gaussian.py index 6418265..9d2c613 100644 --- a/src/tmlt/core/random/continuous_gaussian.py +++ b/src/tmlt/core/random/continuous_gaussian.py @@ -1,7 +1,7 @@ """Module for sampling from a continuous Gaussian distribution.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import math from typing import Union diff --git a/src/tmlt/core/random/discrete_gaussian.py b/src/tmlt/core/random/discrete_gaussian.py index 0aa41d9..59a1938 100644 --- a/src/tmlt/core/random/discrete_gaussian.py +++ b/src/tmlt/core/random/discrete_gaussian.py @@ -1,7 +1,7 @@ """Module for discrete Gaussian sampling.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + # This file is derived from a work authored by Thomas Steinke dgauss@thomas-steinke.net, # copyrighted by IBM Corp. 2020, licensed under Apache 2.0, and available at diff --git a/src/tmlt/core/random/inverse_cdf.py b/src/tmlt/core/random/inverse_cdf.py index 5f058c4..8d7001c 100644 --- a/src/tmlt/core/random/inverse_cdf.py +++ b/src/tmlt/core/random/inverse_cdf.py @@ -1,7 +1,7 @@ """Module for inverse transform sampling.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Callable diff --git a/src/tmlt/core/random/laplace.py b/src/tmlt/core/random/laplace.py index f7d56d6..23cb933 100644 --- a/src/tmlt/core/random/laplace.py +++ b/src/tmlt/core/random/laplace.py @@ -1,7 +1,7 @@ """Module for sampling from a Laplace distribution.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import math diff --git a/src/tmlt/core/random/rng.py b/src/tmlt/core/random/rng.py index 1d07264..f772cb3 100644 --- a/src/tmlt/core/random/rng.py +++ b/src/tmlt/core/random/rng.py @@ -1,7 +1,7 @@ """Tumult Core's random number generator.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import os from typing import Any diff --git a/src/tmlt/core/random/uniform.py b/src/tmlt/core/random/uniform.py index ee876bc..e31c02b 100644 --- a/src/tmlt/core/random/uniform.py +++ b/src/tmlt/core/random/uniform.py @@ -1,7 +1,7 @@ """Module for sampling uniformly from an interval.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from tmlt.core.random.inverse_cdf import construct_inverse_sampler from tmlt.core.utils import arb diff --git a/src/tmlt/core/transformations/__init__.py b/src/tmlt/core/transformations/__init__.py index c6c1ebe..13bf2e9 100644 --- a/src/tmlt/core/transformations/__init__.py +++ b/src/tmlt/core/transformations/__init__.py @@ -1,4 +1,4 @@ """Transformations.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + diff --git a/src/tmlt/core/transformations/base.py b/src/tmlt/core/transformations/base.py index d4ea0a5..fd2d88e 100644 --- a/src/tmlt/core/transformations/base.py +++ b/src/tmlt/core/transformations/base.py @@ -1,7 +1,7 @@ """Base class for transformations.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from __future__ import annotations diff --git a/src/tmlt/core/transformations/chaining.py b/src/tmlt/core/transformations/chaining.py index be7004d..c8c0fd7 100644 --- a/src/tmlt/core/transformations/chaining.py +++ b/src/tmlt/core/transformations/chaining.py @@ -1,7 +1,7 @@ """Transformations constructed by chaining other transformations.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Any, Callable, Optional diff --git a/src/tmlt/core/transformations/converters.py b/src/tmlt/core/transformations/converters.py index 97cb8d8..9d094ef 100644 --- a/src/tmlt/core/transformations/converters.py +++ b/src/tmlt/core/transformations/converters.py @@ -1,7 +1,7 @@ """Wrappers for changing a transformation's output metric.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Any diff --git a/src/tmlt/core/transformations/dictionary.py b/src/tmlt/core/transformations/dictionary.py index 94e817a..b459319 100644 --- a/src/tmlt/core/transformations/dictionary.py +++ b/src/tmlt/core/transformations/dictionary.py @@ -8,7 +8,7 @@ """ # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Any, Callable, Dict, List, Mapping, Union, cast diff --git a/src/tmlt/core/transformations/identity.py b/src/tmlt/core/transformations/identity.py index 8de6385..923a4dd 100644 --- a/src/tmlt/core/transformations/identity.py +++ b/src/tmlt/core/transformations/identity.py @@ -1,7 +1,7 @@ """Identity transformation.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Any diff --git a/src/tmlt/core/transformations/spark_transformations/__init__.py b/src/tmlt/core/transformations/spark_transformations/__init__.py index 118df11..aa31276 100644 --- a/src/tmlt/core/transformations/spark_transformations/__init__.py +++ b/src/tmlt/core/transformations/spark_transformations/__init__.py @@ -1,4 +1,4 @@ """Transformations for manipulating Spark DataFrames.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + diff --git a/src/tmlt/core/transformations/spark_transformations/add_remove_keys.py b/src/tmlt/core/transformations/spark_transformations/add_remove_keys.py index 1e27fc0..cf0098e 100644 --- a/src/tmlt/core/transformations/spark_transformations/add_remove_keys.py +++ b/src/tmlt/core/transformations/spark_transformations/add_remove_keys.py @@ -107,7 +107,7 @@ """ # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Any, Dict, List, Optional, Tuple, cast diff --git a/src/tmlt/core/transformations/spark_transformations/agg.py b/src/tmlt/core/transformations/spark_transformations/agg.py index 4e89026..971fc8f 100644 --- a/src/tmlt/core/transformations/spark_transformations/agg.py +++ b/src/tmlt/core/transformations/spark_transformations/agg.py @@ -7,7 +7,7 @@ # pylint: enable=line-too-long # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Optional, Union, cast, overload diff --git a/src/tmlt/core/transformations/spark_transformations/filter.py b/src/tmlt/core/transformations/spark_transformations/filter.py index 44ce126..6814d6e 100644 --- a/src/tmlt/core/transformations/spark_transformations/filter.py +++ b/src/tmlt/core/transformations/spark_transformations/filter.py @@ -7,7 +7,7 @@ # pylint: enable=line-too-long # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Union diff --git a/src/tmlt/core/transformations/spark_transformations/groupby.py b/src/tmlt/core/transformations/spark_transformations/groupby.py index f173e28..df2f409 100644 --- a/src/tmlt/core/transformations/spark_transformations/groupby.py +++ b/src/tmlt/core/transformations/spark_transformations/groupby.py @@ -1,6 +1,6 @@ """Transformations for performing groupby on Spark DataFrames.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from __future__ import annotations diff --git a/src/tmlt/core/transformations/spark_transformations/id.py b/src/tmlt/core/transformations/spark_transformations/id.py index 3bc5b67..959c0dd 100644 --- a/src/tmlt/core/transformations/spark_transformations/id.py +++ b/src/tmlt/core/transformations/spark_transformations/id.py @@ -8,7 +8,7 @@ # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from pyspark.sql import DataFrame from pyspark.sql import functions as sf diff --git a/src/tmlt/core/transformations/spark_transformations/join.py b/src/tmlt/core/transformations/spark_transformations/join.py index 1a6a14a..d06deb0 100644 --- a/src/tmlt/core/transformations/spark_transformations/join.py +++ b/src/tmlt/core/transformations/spark_transformations/join.py @@ -7,7 +7,7 @@ # pylint: enable=line-too-long # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from enum import Enum from typing import Any, Dict, List, Optional, Union diff --git a/src/tmlt/core/transformations/spark_transformations/map.py b/src/tmlt/core/transformations/spark_transformations/map.py index 4700982..e321f4b 100644 --- a/src/tmlt/core/transformations/spark_transformations/map.py +++ b/src/tmlt/core/transformations/spark_transformations/map.py @@ -7,7 +7,7 @@ # pylint: enable=line-too-long # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from collections import OrderedDict from typing import Any, Callable, Dict, List, Optional, Set, Union, cast diff --git a/src/tmlt/core/transformations/spark_transformations/nan.py b/src/tmlt/core/transformations/spark_transformations/nan.py index 7ae2b66..a71c5ca 100644 --- a/src/tmlt/core/transformations/spark_transformations/nan.py +++ b/src/tmlt/core/transformations/spark_transformations/nan.py @@ -7,7 +7,7 @@ # pylint: enable=line-too-long # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import warnings from dataclasses import replace diff --git a/src/tmlt/core/transformations/spark_transformations/partition.py b/src/tmlt/core/transformations/spark_transformations/partition.py index c8806b3..5d5b830 100644 --- a/src/tmlt/core/transformations/spark_transformations/partition.py +++ b/src/tmlt/core/transformations/spark_transformations/partition.py @@ -7,7 +7,7 @@ # pylint: enable=line-too-long # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import List, Optional, Sequence, Tuple, Union diff --git a/src/tmlt/core/transformations/spark_transformations/persist.py b/src/tmlt/core/transformations/spark_transformations/persist.py index 3c80adc..4ae04d2 100644 --- a/src/tmlt/core/transformations/spark_transformations/persist.py +++ b/src/tmlt/core/transformations/spark_transformations/persist.py @@ -7,7 +7,7 @@ # pylint: enable=line-too-long # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Any diff --git a/src/tmlt/core/transformations/spark_transformations/rename.py b/src/tmlt/core/transformations/spark_transformations/rename.py index 7856b25..86329f6 100644 --- a/src/tmlt/core/transformations/spark_transformations/rename.py +++ b/src/tmlt/core/transformations/spark_transformations/rename.py @@ -8,7 +8,7 @@ # TODO: Open question regarding "switching" column names. # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Dict, Union diff --git a/src/tmlt/core/transformations/spark_transformations/select.py b/src/tmlt/core/transformations/spark_transformations/select.py index 744375e..3697ba9 100644 --- a/src/tmlt/core/transformations/spark_transformations/select.py +++ b/src/tmlt/core/transformations/spark_transformations/select.py @@ -7,7 +7,7 @@ # pylint: enable=line-too-long # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import List, Union diff --git a/src/tmlt/core/transformations/spark_transformations/truncation.py b/src/tmlt/core/transformations/spark_transformations/truncation.py index 591e2fb..4133947 100644 --- a/src/tmlt/core/transformations/spark_transformations/truncation.py +++ b/src/tmlt/core/transformations/spark_transformations/truncation.py @@ -1,7 +1,7 @@ """Transformations for truncating Spark DataFrames.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Union from pyspark.sql import DataFrame diff --git a/src/tmlt/core/utils/__init__.py b/src/tmlt/core/utils/__init__.py index 45cbf38..787d006 100644 --- a/src/tmlt/core/utils/__init__.py +++ b/src/tmlt/core/utils/__init__.py @@ -1,4 +1,4 @@ """Utilities.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + diff --git a/src/tmlt/core/utils/arb.py b/src/tmlt/core/utils/arb.py index 3f06dea..00faf05 100644 --- a/src/tmlt/core/utils/arb.py +++ b/src/tmlt/core/utils/arb.py @@ -1,7 +1,7 @@ """Arblib wrapper using ctypes.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import ctypes import importlib.resources diff --git a/src/tmlt/core/utils/cleanup.py b/src/tmlt/core/utils/cleanup.py index 9daa168..f410cd5 100644 --- a/src/tmlt/core/utils/cleanup.py +++ b/src/tmlt/core/utils/cleanup.py @@ -1,7 +1,7 @@ """Cleanup functions for Tumult Core.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import atexit import re diff --git a/src/tmlt/core/utils/configuration.py b/src/tmlt/core/utils/configuration.py index d5c5175..f34cc6b 100644 --- a/src/tmlt/core/utils/configuration.py +++ b/src/tmlt/core/utils/configuration.py @@ -1,7 +1,7 @@ """Configuration properties for Tumult Core.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import time from typing import Dict diff --git a/src/tmlt/core/utils/distributions.py b/src/tmlt/core/utils/distributions.py index 58323d4..5b43ee1 100644 --- a/src/tmlt/core/utils/distributions.py +++ b/src/tmlt/core/utils/distributions.py @@ -1,7 +1,7 @@ """Probability functions for distributions commonly used in differential privacy.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from functools import lru_cache from typing import Union, overload @@ -474,8 +474,6 @@ def discrete_gaussian_pmf( # this is based on experiments for how many terms are needed. Technically you can # get a way with fewer for larger values of sigma (like 7 standard # deviations instead of 10 for sigma=10^4, but this works for all values of sigma). - # see https://gitlab.com/tumult-labs/tumult/-/issues/2358#note_1418996578 for more - # information. n_terms = int(np.sqrt(sigma_squared) * 10) + 1 sigma_squared_arb = Arb.from_float(sigma_squared) prec = 100 @@ -522,8 +520,6 @@ def discrete_gaussian_cmf( # this is based on experiments for how many terms are needed. Technically you can # get a way with fewer for larger values of sigma (like 7 standard # deviations instead of 10 for sigma=10^4, but this works for all values of sigma). - # see https://gitlab.com/tumult-labs/tumult/-/issues/2358#note_1418996578 for more - # information. n_terms = int(np.sqrt(sigma_squared) * 10) + 1 prec = 100 while True: diff --git a/src/tmlt/core/utils/exact_number.py b/src/tmlt/core/utils/exact_number.py index c5ad35b..f8e4af6 100644 --- a/src/tmlt/core/utils/exact_number.py +++ b/src/tmlt/core/utils/exact_number.py @@ -133,7 +133,7 @@ """ # pylint: disable=line-too-long,useless-suppression # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from fractions import Fraction from typing import Any, Union @@ -297,7 +297,6 @@ def float_to_rational(x: float) -> Union[float, sp.Expr]: # Sympy seems to have an easier time determining whether an expression is # larger or smaller than a rational number than a float, so we convert to a # rational number before comparing. - # See https://gitlab.com/tumult-labs/tumult/-/issues/1697#note_1428848301 if float("-inf") < x < float("inf"): return sp.Rational(x) return x diff --git a/src/tmlt/core/utils/grouped_dataframe.py b/src/tmlt/core/utils/grouped_dataframe.py index 9834429..4ffc241 100644 --- a/src/tmlt/core/utils/grouped_dataframe.py +++ b/src/tmlt/core/utils/grouped_dataframe.py @@ -1,7 +1,7 @@ """Grouped DataFrame aware of group keys when performing aggregations.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import functools from functools import reduce diff --git a/src/tmlt/core/utils/join.py b/src/tmlt/core/utils/join.py index 7820e8d..803b03d 100644 --- a/src/tmlt/core/utils/join.py +++ b/src/tmlt/core/utils/join.py @@ -1,7 +1,7 @@ """Utilities related to joining dataframes.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import dataclasses from typing import Dict, List, Optional, Tuple, Union diff --git a/src/tmlt/core/utils/misc.py b/src/tmlt/core/utils/misc.py index 0eb2486..83f1393 100644 --- a/src/tmlt/core/utils/misc.py +++ b/src/tmlt/core/utils/misc.py @@ -1,7 +1,7 @@ """Miscellaneous helper functions and classes.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import copy import re diff --git a/src/tmlt/core/utils/parameters.py b/src/tmlt/core/utils/parameters.py index b0cc8af..035d4e4 100644 --- a/src/tmlt/core/utils/parameters.py +++ b/src/tmlt/core/utils/parameters.py @@ -1,7 +1,7 @@ """Helper functions for selecting component parameters.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Union diff --git a/src/tmlt/core/utils/prdp.py b/src/tmlt/core/utils/prdp.py index f69d1a7..43026e6 100644 --- a/src/tmlt/core/utils/prdp.py +++ b/src/tmlt/core/utils/prdp.py @@ -1,7 +1,7 @@ """Floating-point safe utility functions for per-record diffential privacy.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from tmlt.core.random.continuous_gaussian import gaussian_inverse_cdf from tmlt.core.random.inverse_cdf import construct_inverse_sampler diff --git a/src/tmlt/core/utils/testing.py b/src/tmlt/core/utils/testing.py index 98b6419..3ae5864 100644 --- a/src/tmlt/core/utils/testing.py +++ b/src/tmlt/core/utils/testing.py @@ -1,7 +1,7 @@ """Utilities for testing.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + # TODO(#1218): Move dummy aggregate class back to the test. diff --git a/src/tmlt/core/utils/truncation.py b/src/tmlt/core/utils/truncation.py index 8ad695a..9a87be1 100644 --- a/src/tmlt/core/utils/truncation.py +++ b/src/tmlt/core/utils/truncation.py @@ -1,7 +1,7 @@ """Functions for truncating Spark DataFrames.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import List, Tuple diff --git a/src/tmlt/core/utils/type_utils.py b/src/tmlt/core/utils/type_utils.py index 7df1399..024da2d 100644 --- a/src/tmlt/core/utils/type_utils.py +++ b/src/tmlt/core/utils/type_utils.py @@ -1,7 +1,7 @@ """Helpers for type introspection and type-checking.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from enum import Enum from types import FunctionType diff --git a/src/tmlt/core/utils/validation.py b/src/tmlt/core/utils/validation.py index ba93483..e750298 100644 --- a/src/tmlt/core/utils/validation.py +++ b/src/tmlt/core/utils/validation.py @@ -1,7 +1,7 @@ """Utilities for checking the inputs to components.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from __future__ import annotations diff --git a/test/__init__.py b/test/__init__.py index 17409c1..9b042b0 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -1,4 +1,4 @@ """Tests for :mod:`~tmlt.core`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + diff --git a/test/conftest.py b/test/conftest.py index 4474df7..9b135fc 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -1,7 +1,7 @@ """Creates a Spark Context to use for each testing session.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import logging from typing import Any, Optional, Sequence, Union diff --git a/test/system/__init__.py b/test/system/__init__.py index bce0848..5747083 100644 --- a/test/system/__init__.py +++ b/test/system/__init__.py @@ -1,4 +1,4 @@ """System tests for :mod:`~tmlt.core`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + diff --git a/test/system/measurements/test_interactive_measurements.py b/test/system/measurements/test_interactive_measurements.py index f1c20e2..1063179 100644 --- a/test/system/measurements/test_interactive_measurements.py +++ b/test/system/measurements/test_interactive_measurements.py @@ -1,7 +1,7 @@ """System tests for :mod:`~tmlt.core.measurements.interactive_measurements`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from tmlt.core.domains.spark_domains import ( SparkDataFrameDomain, diff --git a/test/system/noise_distribution_tests/__init__.py b/test/system/noise_distribution_tests/__init__.py index 553938d..b9c28ef 100644 --- a/test/system/noise_distribution_tests/__init__.py +++ b/test/system/noise_distribution_tests/__init__.py @@ -1,7 +1,7 @@ """Tests that measurements that add noise sample from the correct distributions.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + P_THRESHOLD = 1e-20 """The alpha threshold to use for the statistical tests.""" diff --git a/test/system/noise_distribution_tests/test_average.py b/test/system/noise_distribution_tests/test_average.py index 9d85546..8a74784 100644 --- a/test/system/noise_distribution_tests/test_average.py +++ b/test/system/noise_distribution_tests/test_average.py @@ -1,7 +1,7 @@ """Tests `create_average_measurement` noise distributions are as expected.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Dict, List, Union diff --git a/test/system/noise_distribution_tests/test_base_mechanisms.py b/test/system/noise_distribution_tests/test_base_mechanisms.py index fff9bb5..89f8a39 100644 --- a/test/system/noise_distribution_tests/test_base_mechanisms.py +++ b/test/system/noise_distribution_tests/test_base_mechanisms.py @@ -1,7 +1,7 @@ """Tests that base mechanisms add noise sampled from the correct distributions.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import math diff --git a/test/system/noise_distribution_tests/test_count.py b/test/system/noise_distribution_tests/test_count.py index 454cc30..456e3b0 100644 --- a/test/system/noise_distribution_tests/test_count.py +++ b/test/system/noise_distribution_tests/test_count.py @@ -1,7 +1,7 @@ """Tests that count measurement adds noise from the correct distribution.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Dict, List, Union diff --git a/test/system/noise_distribution_tests/test_count_distinct.py b/test/system/noise_distribution_tests/test_count_distinct.py index d84f16f..3817faa 100644 --- a/test/system/noise_distribution_tests/test_count_distinct.py +++ b/test/system/noise_distribution_tests/test_count_distinct.py @@ -1,7 +1,7 @@ """Tests `create_count_distinct_measurement` noise distributions are as expected.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Dict, List, Union diff --git a/test/system/noise_distribution_tests/test_quantile.py b/test/system/noise_distribution_tests/test_quantile.py index c37a573..f55df1c 100644 --- a/test/system/noise_distribution_tests/test_quantile.py +++ b/test/system/noise_distribution_tests/test_quantile.py @@ -1,7 +1,7 @@ """Tests that Quantile measurement adds noise sample from the correct distributions.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import math diff --git a/test/system/noise_distribution_tests/test_samplers.py b/test/system/noise_distribution_tests/test_samplers.py index 0a3f754..83b2a0e 100644 --- a/test/system/noise_distribution_tests/test_samplers.py +++ b/test/system/noise_distribution_tests/test_samplers.py @@ -1,7 +1,7 @@ """Statistical tests for samplers in :mod:`tmlt.core.random`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from test.system.noise_distribution_tests import P_THRESHOLD, SAMPLE_SIZE diff --git a/test/system/noise_distribution_tests/test_standard_deviation.py b/test/system/noise_distribution_tests/test_standard_deviation.py index 0ab48eb..c79bccf 100644 --- a/test/system/noise_distribution_tests/test_standard_deviation.py +++ b/test/system/noise_distribution_tests/test_standard_deviation.py @@ -1,7 +1,7 @@ """Tests `create_standard_deviation_measurement` noise distributions are as expected.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Dict, List, Union diff --git a/test/system/noise_distribution_tests/test_sum.py b/test/system/noise_distribution_tests/test_sum.py index 76f0604..4b033e8 100644 --- a/test/system/noise_distribution_tests/test_sum.py +++ b/test/system/noise_distribution_tests/test_sum.py @@ -1,7 +1,7 @@ """Tests that Sum measurement adds noise sampled from the correct distributions.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Dict, Union diff --git a/test/system/noise_distribution_tests/test_variance.py b/test/system/noise_distribution_tests/test_variance.py index acaea18..c443a51 100644 --- a/test/system/noise_distribution_tests/test_variance.py +++ b/test/system/noise_distribution_tests/test_variance.py @@ -1,7 +1,7 @@ """Tests `create_variance_measurement` noise distributions are as expected.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Dict, List, Union diff --git a/test/unit/__init__.py b/test/unit/__init__.py index 7f9b0bd..0f0df45 100644 --- a/test/unit/__init__.py +++ b/test/unit/__init__.py @@ -1,4 +1,4 @@ """Unit tests for :mod:`~tmlt.core`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + diff --git a/test/unit/budget_abstract.py b/test/unit/budget_abstract.py index 24a6c80..6a58f00 100644 --- a/test/unit/budget_abstract.py +++ b/test/unit/budget_abstract.py @@ -1,7 +1,7 @@ """Abstract class for testing budgets.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import copy diff --git a/test/unit/domains/__init__.py b/test/unit/domains/__init__.py index ff21141..f1ceef6 100644 --- a/test/unit/domains/__init__.py +++ b/test/unit/domains/__init__.py @@ -1,4 +1,4 @@ """Unit tests for :mod:`~tmlt.core.domains`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + diff --git a/test/unit/domains/abstract.py b/test/unit/domains/abstract.py index 566649a..ba41481 100644 --- a/test/unit/domains/abstract.py +++ b/test/unit/domains/abstract.py @@ -1,7 +1,7 @@ """Abstract class for testing input/output domains.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import copy diff --git a/test/unit/domains/test_base.py b/test/unit/domains/test_base.py index 61c2ee9..285265c 100644 --- a/test/unit/domains/test_base.py +++ b/test/unit/domains/test_base.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.domains.base`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from unittest.case import TestCase from unittest.mock import Mock, patch diff --git a/test/unit/domains/test_collections.py b/test/unit/domains/test_collections.py index c07cd16..5237cd7 100644 --- a/test/unit/domains/test_collections.py +++ b/test/unit/domains/test_collections.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.domains.collections`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import re from contextlib import nullcontext as does_not_raise diff --git a/test/unit/domains/test_numpy_domains.py b/test/unit/domains/test_numpy_domains.py index 85d454f..0f8e2bd 100644 --- a/test/unit/domains/test_numpy_domains.py +++ b/test/unit/domains/test_numpy_domains.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.domains.numpy`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from contextlib import nullcontext as does_not_raise from itertools import combinations_with_replacement diff --git a/test/unit/domains/test_pandas_domains.py b/test/unit/domains/test_pandas_domains.py index 851b91f..7d825f3 100644 --- a/test/unit/domains/test_pandas_domains.py +++ b/test/unit/domains/test_pandas_domains.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.domains.pandas_domains`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from contextlib import nullcontext as does_not_raise from itertools import combinations_with_replacement diff --git a/test/unit/domains/test_spark_domains.py b/test/unit/domains/test_spark_domains.py index a5df249..bf501e4 100644 --- a/test/unit/domains/test_spark_domains.py +++ b/test/unit/domains/test_spark_domains.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.domains.spark_domains`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import copy import datetime diff --git a/test/unit/measurements/__init__.py b/test/unit/measurements/__init__.py index a793041..4373b65 100644 --- a/test/unit/measurements/__init__.py +++ b/test/unit/measurements/__init__.py @@ -1,4 +1,4 @@ """Unit tests for :mod:`~tmlt.core.measurements`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + diff --git a/test/unit/measurements/abstract.py b/test/unit/measurements/abstract.py index 437edc5..bf9aae8 100644 --- a/test/unit/measurements/abstract.py +++ b/test/unit/measurements/abstract.py @@ -1,7 +1,7 @@ """Abstract class for testing input/output measurements.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import copy diff --git a/test/unit/measurements/pandas_measurements/__init__.py b/test/unit/measurements/pandas_measurements/__init__.py index 79b19f0..3a42b3a 100644 --- a/test/unit/measurements/pandas_measurements/__init__.py +++ b/test/unit/measurements/pandas_measurements/__init__.py @@ -1,4 +1,4 @@ """Unit tests for :mod:`~tmlt.core.measurements.pandas_measurements`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + diff --git a/test/unit/measurements/pandas_measurements/test_dataframe.py b/test/unit/measurements/pandas_measurements/test_dataframe.py index c02c468..a14467c 100644 --- a/test/unit/measurements/pandas_measurements/test_dataframe.py +++ b/test/unit/measurements/pandas_measurements/test_dataframe.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.measurements.pandas_measurements.dataframe`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import itertools diff --git a/test/unit/measurements/pandas_measurements/test_series.py b/test/unit/measurements/pandas_measurements/test_series.py index f82e7bf..2a526bb 100644 --- a/test/unit/measurements/pandas_measurements/test_series.py +++ b/test/unit/measurements/pandas_measurements/test_series.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.measurements.pandas_measurements.series`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import re diff --git a/test/unit/measurements/test_aggregations.py b/test/unit/measurements/test_aggregations.py index f563194..0cec995 100644 --- a/test/unit/measurements/test_aggregations.py +++ b/test/unit/measurements/test_aggregations.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.measurements.aggregations`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import functools import random import unittest diff --git a/test/unit/measurements/test_chaining.py b/test/unit/measurements/test_chaining.py index f71d213..95d6940 100644 --- a/test/unit/measurements/test_chaining.py +++ b/test/unit/measurements/test_chaining.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.measurements.chaining`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import itertools diff --git a/test/unit/measurements/test_composition.py b/test/unit/measurements/test_composition.py index 7797de0..8a58900 100644 --- a/test/unit/measurements/test_composition.py +++ b/test/unit/measurements/test_composition.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.measurements.composition`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import itertools diff --git a/test/unit/measurements/test_converters.py b/test/unit/measurements/test_converters.py index 17c40bb..54dc82b 100644 --- a/test/unit/measurements/test_converters.py +++ b/test/unit/measurements/test_converters.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.measurements.converters`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Tuple from unittest.case import TestCase from unittest.mock import call diff --git a/test/unit/measurements/test_interactive_measurements.py b/test/unit/measurements/test_interactive_measurements.py index f23d4cd..9f11eab 100644 --- a/test/unit/measurements/test_interactive_measurements.py +++ b/test/unit/measurements/test_interactive_measurements.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.measurements.interactive_measurements`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import re diff --git a/test/unit/measurements/test_noise_mechanisms.py b/test/unit/measurements/test_noise_mechanisms.py index 2cd6884..3e46913 100644 --- a/test/unit/measurements/test_noise_mechanisms.py +++ b/test/unit/measurements/test_noise_mechanisms.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.measurements.noise_mechanisms`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import re from contextlib import nullcontext as does_not_raise diff --git a/test/unit/measurements/test_postprocess.py b/test/unit/measurements/test_postprocess.py index c23d6a2..b020e20 100644 --- a/test/unit/measurements/test_postprocess.py +++ b/test/unit/measurements/test_postprocess.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.measurements.postprocess`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from unittest.mock import MagicMock, call diff --git a/test/unit/measurements/test_spark_measurements.py b/test/unit/measurements/test_spark_measurements.py index 1d83371..3320840 100644 --- a/test/unit/measurements/test_spark_measurements.py +++ b/test/unit/measurements/test_spark_measurements.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.measurements.spark_measurements`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from fractions import Fraction from typing import Dict, List diff --git a/test/unit/measures_abstract.py b/test/unit/measures_abstract.py index 0f9b017..78a2594 100644 --- a/test/unit/measures_abstract.py +++ b/test/unit/measures_abstract.py @@ -1,7 +1,7 @@ """Abstract class for testing measures.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import copy diff --git a/test/unit/metric_abstract.py b/test/unit/metric_abstract.py index 2347443..a67de13 100644 --- a/test/unit/metric_abstract.py +++ b/test/unit/metric_abstract.py @@ -1,7 +1,7 @@ """Abstract class for testing metrics.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import copy diff --git a/test/unit/random/__init__.py b/test/unit/random/__init__.py index 54f65ec..8174a4d 100644 --- a/test/unit/random/__init__.py +++ b/test/unit/random/__init__.py @@ -1,4 +1,4 @@ """Unit tests for :mod:`~tmlt.core.random`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + diff --git a/test/unit/random/test_continuous_gaussian.py b/test/unit/random/test_continuous_gaussian.py index 7bfb6b5..beec5d7 100644 --- a/test/unit/random/test_continuous_gaussian.py +++ b/test/unit/random/test_continuous_gaussian.py @@ -1,7 +1,7 @@ """Tests for :mod:`~tmlt.core.random.continuous_gaussian`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import math from unittest import TestCase diff --git a/test/unit/random/test_discrete_gaussian.py b/test/unit/random/test_discrete_gaussian.py index d416621..38e1ac5 100644 --- a/test/unit/random/test_discrete_gaussian.py +++ b/test/unit/random/test_discrete_gaussian.py @@ -1,7 +1,7 @@ """Tests for :mod:`~tmlt.core.random.discrete_gaussian`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from fractions import Fraction from typing import Union diff --git a/test/unit/random/test_inverse_cdf.py b/test/unit/random/test_inverse_cdf.py index 73a0048..637b506 100644 --- a/test/unit/random/test_inverse_cdf.py +++ b/test/unit/random/test_inverse_cdf.py @@ -1,7 +1,7 @@ """Tests for :mod:`~tmlt.core.random.inverse_cdf`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from unittest import TestCase diff --git a/test/unit/random/test_laplace.py b/test/unit/random/test_laplace.py index 0e64702..d1d6e2c 100644 --- a/test/unit/random/test_laplace.py +++ b/test/unit/random/test_laplace.py @@ -1,7 +1,7 @@ """Tests for :mod:`~tmlt.core.random.laplace`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from unittest import TestCase diff --git a/test/unit/random/test_rng.py b/test/unit/random/test_rng.py index c48fb65..f47ef93 100644 --- a/test/unit/random/test_rng.py +++ b/test/unit/random/test_rng.py @@ -1,7 +1,7 @@ """Tests for :mod:`~tmlt.core.random.rng`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from importlib import reload from unittest import TestCase diff --git a/test/unit/random/test_uniform.py b/test/unit/random/test_uniform.py index 432d1f6..ffbd117 100644 --- a/test/unit/random/test_uniform.py +++ b/test/unit/random/test_uniform.py @@ -1,7 +1,7 @@ """Tests for :mod:`~tmlt.core.random.uniform`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from tmlt.core.random.uniform import uniform_inverse_cdf from tmlt.core.utils.arb import Arb diff --git a/test/unit/test_measures.py b/test/unit/test_measures.py index e777fa4..79dcb0f 100644 --- a/test/unit/test_measures.py +++ b/test/unit/test_measures.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`tmlt.core.measures`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import itertools import re from typing import Any, Tuple, Union diff --git a/test/unit/test_metrics.py b/test/unit/test_metrics.py index 6d93179..345417f 100644 --- a/test/unit/test_metrics.py +++ b/test/unit/test_metrics.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`tmlt.core.metrics`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import datetime diff --git a/test/unit/transformations/__init__.py b/test/unit/transformations/__init__.py index 7bb6a21..603c4d0 100644 --- a/test/unit/transformations/__init__.py +++ b/test/unit/transformations/__init__.py @@ -1,4 +1,4 @@ """Unit tests for :mod:`~tmlt.core.transformations`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + diff --git a/test/unit/transformations/abstract.py b/test/unit/transformations/abstract.py index a7f2fea..0c50484 100644 --- a/test/unit/transformations/abstract.py +++ b/test/unit/transformations/abstract.py @@ -1,7 +1,7 @@ """Abstract class for testing transformations.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import copy diff --git a/test/unit/transformations/spark_transformations/__init__.py b/test/unit/transformations/spark_transformations/__init__.py index d7eaf05..3015fbc 100644 --- a/test/unit/transformations/spark_transformations/__init__.py +++ b/test/unit/transformations/spark_transformations/__init__.py @@ -1,4 +1,4 @@ """Unit tests for :mod:`~tmlt.core.transformations.spark_transformations`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + diff --git a/test/unit/transformations/spark_transformations/map/__init__.py b/test/unit/transformations/spark_transformations/map/__init__.py index 21a7601..c0ab5fd 100644 --- a/test/unit/transformations/spark_transformations/map/__init__.py +++ b/test/unit/transformations/spark_transformations/map/__init__.py @@ -1,4 +1,4 @@ """Tests for transformations.spark_transformations.map.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + diff --git a/test/unit/transformations/spark_transformations/map/test_flat_map.py b/test/unit/transformations/spark_transformations/map/test_flat_map.py index 8b04053..1360cf9 100644 --- a/test/unit/transformations/spark_transformations/map/test_flat_map.py +++ b/test/unit/transformations/spark_transformations/map/test_flat_map.py @@ -1,7 +1,7 @@ """Tests for transformations.spark_transformations.map.FlatMap.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import math from typing import Any, Dict, Optional, cast diff --git a/test/unit/transformations/spark_transformations/map/test_flat_map_by_key.py b/test/unit/transformations/spark_transformations/map/test_flat_map_by_key.py index a6a3ae4..a128492 100644 --- a/test/unit/transformations/spark_transformations/map/test_flat_map_by_key.py +++ b/test/unit/transformations/spark_transformations/map/test_flat_map_by_key.py @@ -1,7 +1,7 @@ """Tests for transformations.spark_transformations.map.FlatMapByKey.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import math from typing import Any, Dict, List, Optional, cast diff --git a/test/unit/transformations/spark_transformations/map/test_grouping_flat_map.py b/test/unit/transformations/spark_transformations/map/test_grouping_flat_map.py index 4406672..b40adf1 100644 --- a/test/unit/transformations/spark_transformations/map/test_grouping_flat_map.py +++ b/test/unit/transformations/spark_transformations/map/test_grouping_flat_map.py @@ -1,7 +1,7 @@ """Tests for transformations.spark_transformations.map.GroupingFlatMap.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import math diff --git a/test/unit/transformations/spark_transformations/map/test_map.py b/test/unit/transformations/spark_transformations/map/test_map.py index e22c21d..2af3833 100644 --- a/test/unit/transformations/spark_transformations/map/test_map.py +++ b/test/unit/transformations/spark_transformations/map/test_map.py @@ -1,7 +1,7 @@ """Tests for transformations.spark_transformations.map.Map.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import math from typing import Union diff --git a/test/unit/transformations/spark_transformations/map/test_row_to_row_transformation.py b/test/unit/transformations/spark_transformations/map/test_row_to_row_transformation.py index a860f87..0e251dd 100644 --- a/test/unit/transformations/spark_transformations/map/test_row_to_row_transformation.py +++ b/test/unit/transformations/spark_transformations/map/test_row_to_row_transformation.py @@ -1,7 +1,7 @@ """Tests for transformations.spark_transformations.map.RowToRowTransformation.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Any, Callable diff --git a/test/unit/transformations/spark_transformations/map/test_row_to_rows_transformation.py b/test/unit/transformations/spark_transformations/map/test_row_to_rows_transformation.py index ab47da0..0c182dd 100644 --- a/test/unit/transformations/spark_transformations/map/test_row_to_rows_transformation.py +++ b/test/unit/transformations/spark_transformations/map/test_row_to_rows_transformation.py @@ -1,7 +1,7 @@ """Tests for transformations.spark_transformations.map.RowToRowsTransformation.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import datetime from typing import Any, Callable, List diff --git a/test/unit/transformations/spark_transformations/map/test_rows_to_rows_transformation.py b/test/unit/transformations/spark_transformations/map/test_rows_to_rows_transformation.py index 2a02fe0..f2bc5a5 100644 --- a/test/unit/transformations/spark_transformations/map/test_rows_to_rows_transformation.py +++ b/test/unit/transformations/spark_transformations/map/test_rows_to_rows_transformation.py @@ -1,7 +1,7 @@ """Tests for transformations.spark_transformations.map.RowsToRowsTransformation.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import datetime from typing import Any, Callable, List diff --git a/test/unit/transformations/spark_transformations/test_add_remove_keys.py b/test/unit/transformations/spark_transformations/test_add_remove_keys.py index 3c08d29..55825dd 100644 --- a/test/unit/transformations/spark_transformations/test_add_remove_keys.py +++ b/test/unit/transformations/spark_transformations/test_add_remove_keys.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.transformations.add_remove_keys`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import re from typing import Dict, Type diff --git a/test/unit/transformations/spark_transformations/test_agg.py b/test/unit/transformations/spark_transformations/test_agg.py index 09eb233..78bf4e5 100644 --- a/test/unit/transformations/spark_transformations/test_agg.py +++ b/test/unit/transformations/spark_transformations/test_agg.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.transformations.spark_transformations.agg`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import List, Optional, Tuple, Union diff --git a/test/unit/transformations/spark_transformations/test_filter.py b/test/unit/transformations/spark_transformations/test_filter.py index 7340677..8c4a20e 100644 --- a/test/unit/transformations/spark_transformations/test_filter.py +++ b/test/unit/transformations/spark_transformations/test_filter.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.transformations.spark_transformations.filter`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from datetime import datetime from typing import Union diff --git a/test/unit/transformations/spark_transformations/test_groupby.py b/test/unit/transformations/spark_transformations/test_groupby.py index 2a72bb3..a815d26 100644 --- a/test/unit/transformations/spark_transformations/test_groupby.py +++ b/test/unit/transformations/spark_transformations/test_groupby.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.transformations.spark_transformations.groupby`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from datetime import date, datetime from typing import Any, Dict, List, Optional, Tuple, Union diff --git a/test/unit/transformations/spark_transformations/test_id.py b/test/unit/transformations/spark_transformations/test_id.py index 3306874..a6e5571 100644 --- a/test/unit/transformations/spark_transformations/test_id.py +++ b/test/unit/transformations/spark_transformations/test_id.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.transformations.spark_transformations.id`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import List, Optional, Tuple diff --git a/test/unit/transformations/spark_transformations/test_join.py b/test/unit/transformations/spark_transformations/test_join.py index 59de38b..df3889a 100644 --- a/test/unit/transformations/spark_transformations/test_join.py +++ b/test/unit/transformations/spark_transformations/test_join.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.transformations.spark_transformations.join`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import re from typing import List, Optional, Union, cast diff --git a/test/unit/transformations/spark_transformations/test_nan.py b/test/unit/transformations/spark_transformations/test_nan.py index 66456d8..23083b5 100644 --- a/test/unit/transformations/spark_transformations/test_nan.py +++ b/test/unit/transformations/spark_transformations/test_nan.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.transformations.spark_transformations.nan`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import re diff --git a/test/unit/transformations/spark_transformations/test_partition.py b/test/unit/transformations/spark_transformations/test_partition.py index 2f61a8b..4734934 100644 --- a/test/unit/transformations/spark_transformations/test_partition.py +++ b/test/unit/transformations/spark_transformations/test_partition.py @@ -4,7 +4,7 @@ """ # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import itertools import math diff --git a/test/unit/transformations/spark_transformations/test_persist.py b/test/unit/transformations/spark_transformations/test_persist.py index efa4523..c1a0339 100644 --- a/test/unit/transformations/spark_transformations/test_persist.py +++ b/test/unit/transformations/spark_transformations/test_persist.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.transformations.spark_transformations.persist`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from parameterized import parameterized diff --git a/test/unit/transformations/spark_transformations/test_rename.py b/test/unit/transformations/spark_transformations/test_rename.py index 23d5daa..5d891bb 100644 --- a/test/unit/transformations/spark_transformations/test_rename.py +++ b/test/unit/transformations/spark_transformations/test_rename.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.transformations.spark_transformations.rename`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Dict, Union diff --git a/test/unit/transformations/spark_transformations/test_select.py b/test/unit/transformations/spark_transformations/test_select.py index 001339f..6358c4c 100644 --- a/test/unit/transformations/spark_transformations/test_select.py +++ b/test/unit/transformations/spark_transformations/test_select.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.transformations.spark_transformations.select`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import List, Union diff --git a/test/unit/transformations/spark_transformations/test_truncation.py b/test/unit/transformations/spark_transformations/test_truncation.py index 4cb67c6..bd26dcc 100644 --- a/test/unit/transformations/spark_transformations/test_truncation.py +++ b/test/unit/transformations/spark_transformations/test_truncation.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.transformations.spark_transformations.truncation`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Dict, Type, Union from parameterized import parameterized diff --git a/test/unit/transformations/test_chaining.py b/test/unit/transformations/test_chaining.py index 23d655f..996b288 100644 --- a/test/unit/transformations/test_chaining.py +++ b/test/unit/transformations/test_chaining.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.transformations.chaining`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import itertools diff --git a/test/unit/transformations/test_converters.py b/test/unit/transformations/test_converters.py index 42513e3..bd14d97 100644 --- a/test/unit/transformations/test_converters.py +++ b/test/unit/transformations/test_converters.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.transformations.converters`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import re diff --git a/test/unit/transformations/test_dictionary.py b/test/unit/transformations/test_dictionary.py index 591e401..2c78119 100644 --- a/test/unit/transformations/test_dictionary.py +++ b/test/unit/transformations/test_dictionary.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.transformations.dictionary`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import re diff --git a/test/unit/transformations/test_identity.py b/test/unit/transformations/test_identity.py index d4e65c3..703b7c5 100644 --- a/test/unit/transformations/test_identity.py +++ b/test/unit/transformations/test_identity.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`~tmlt.core.transformations.identity`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from tmlt.core.domains.numpy_domains import NumpyIntegerDomain from tmlt.core.domains.spark_domains import SparkDataFrameDomain diff --git a/test/unit/utils/__init__.py b/test/unit/utils/__init__.py index df78c44..93a0fe6 100644 --- a/test/unit/utils/__init__.py +++ b/test/unit/utils/__init__.py @@ -1,4 +1,4 @@ """Unit tests for :mod:`~tmlt.core.utils`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + diff --git a/test/unit/utils/test_arb.py b/test/unit/utils/test_arb.py index 1c2965e..d15f2da 100644 --- a/test/unit/utils/test_arb.py +++ b/test/unit/utils/test_arb.py @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import math from unittest import TestCase diff --git a/test/unit/utils/test_cleanup.py b/test/unit/utils/test_cleanup.py index 579f7f2..df9aafb 100644 --- a/test/unit/utils/test_cleanup.py +++ b/test/unit/utils/test_cleanup.py @@ -10,7 +10,7 @@ from tmlt.core.utils.testing import PySparkTest # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + class TestCleanup(PySparkTest): diff --git a/test/unit/utils/test_configuration.py b/test/unit/utils/test_configuration.py index ddad975..ddad829 100644 --- a/test/unit/utils/test_configuration.py +++ b/test/unit/utils/test_configuration.py @@ -6,7 +6,7 @@ from tmlt.core.utils.configuration import Config, _java11_config_opts, get_java11_config # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + class TestConfiguration(TestCase): diff --git a/test/unit/utils/test_distributions.py b/test/unit/utils/test_distributions.py index 47cc15b..72f2c61 100644 --- a/test/unit/utils/test_distributions.py +++ b/test/unit/utils/test_distributions.py @@ -1,7 +1,7 @@ """Tests for :module:`tmlt.core.utils.distributions`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import unittest diff --git a/test/unit/utils/test_exact_number.py b/test/unit/utils/test_exact_number.py index 41f0f0a..33a9e5a 100644 --- a/test/unit/utils/test_exact_number.py +++ b/test/unit/utils/test_exact_number.py @@ -9,7 +9,7 @@ from tmlt.core.utils.exact_number import ExactNumber, ExactNumberInput # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + class TestExactNumber(TestCase): diff --git a/test/unit/utils/test_grouped_dataframe.py b/test/unit/utils/test_grouped_dataframe.py index 5fe3d59..31fd597 100644 --- a/test/unit/utils/test_grouped_dataframe.py +++ b/test/unit/utils/test_grouped_dataframe.py @@ -1,7 +1,7 @@ """Tests for :mod:`~tmlt.core.util.grouped_dataframe`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import pandas as pd import pytest diff --git a/test/unit/utils/test_join.py b/test/unit/utils/test_join.py index 5eef249..7a367eb 100644 --- a/test/unit/utils/test_join.py +++ b/test/unit/utils/test_join.py @@ -1,7 +1,7 @@ """Unit tests for :mod:`tmlt.core.utils.join`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import re from contextlib import nullcontext as does_not_raise diff --git a/test/unit/utils/test_misc.py b/test/unit/utils/test_misc.py index 2d39fea..06b19f0 100644 --- a/test/unit/utils/test_misc.py +++ b/test/unit/utils/test_misc.py @@ -1,7 +1,7 @@ """Test for :mod:`tmlt.core.utils.misc`""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Any, Callable, Dict, List diff --git a/test/unit/utils/test_prdp.py b/test/unit/utils/test_prdp.py index 383410d..471f901 100644 --- a/test/unit/utils/test_prdp.py +++ b/test/unit/utils/test_prdp.py @@ -1,7 +1,7 @@ """Test for :mod:`tmlt.core.utils.prdp`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import numpy as np diff --git a/test/unit/utils/test_testing.py b/test/unit/utils/test_testing.py index f558f34..b4d7b3b 100644 --- a/test/unit/utils/test_testing.py +++ b/test/unit/utils/test_testing.py @@ -1,7 +1,7 @@ """Test for :mod:`tmlt.core.utils.testing`""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from operator import add diff --git a/test/unit/utils/test_truncation.py b/test/unit/utils/test_truncation.py index 9f65488..ef86b47 100644 --- a/test/unit/utils/test_truncation.py +++ b/test/unit/utils/test_truncation.py @@ -1,7 +1,7 @@ """Tests for :mod:`~tmlt.core.utils.truncation`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + import datetime import itertools @@ -142,8 +142,7 @@ def test_hash_collisions(self): """Test :func:`~.limit_keys_per_group` works when there are hash collisions. This test fails for a previous, incorrect version of - :func:`~.limit_keys_per_group`. See - https://gitlab.com/tumult-labs/tumult/-/issues/2455 for more details. + :func:`~.limit_keys_per_group`. """ df = self.spark.createDataFrame( diff --git a/test/unit/utils/test_type_utils.py b/test/unit/utils/test_type_utils.py index a0434ee..169ab42 100644 --- a/test/unit/utils/test_type_utils.py +++ b/test/unit/utils/test_type_utils.py @@ -1,7 +1,7 @@ """Tests for :mod:`~tmlt.core.util.type_utils`.""" # SPDX-License-Identifier: Apache-2.0 -# Copyright Tumult Labs 2025 + from typing import Any, Sequence, Type from unittest import TestCase diff --git a/tutorials/FirstSteps.ipynb b/tutorials/FirstSteps.ipynb index bffe252..d1633a7 100644 --- a/tutorials/FirstSteps.ipynb +++ b/tutorials/FirstSteps.ipynb @@ -1,12 +1,5 @@ { "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "
copyright 2022 Tumult Labs
" - ] - }, { "cell_type": "markdown", "metadata": {}, diff --git a/tutorials/index.rst b/tutorials/index.rst index b38cd20..035b614 100644 --- a/tutorials/index.rst +++ b/tutorials/index.rst @@ -5,7 +5,7 @@ Tutorials .. SPDX-License-Identifier: CC-BY-SA-4.0 - Copyright Tumult Labs 2025 + Tumult Core library tutorials are typically in the form of Jupyter Notebooks that demonstrate the capabilities of the product with minimal code. Extended demos are also available