Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dtypes is deprecated/removed in polars 0.20.31 #41

Merged
merged 7 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
metasyn-version: [ "git+https://github.com/sodascience/metasyn.git@main"]
include:
- python-version: "3.11"
metasyn-version: "metasyn==1.0.0"
metasyn-version: "metasyn==1.0.1"

steps:
- uses: actions/checkout@v4
Expand Down
144 changes: 73 additions & 71 deletions examples/tutorial.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion metasyncontrib/disclosure/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class DisclosureConstantMixin(BaseDistribution):
"""Mixin class to overload fit method for constant distributions."""

@classmethod
def fit(cls, series, *args, partition_size: int = 11, **kwargs) -> BaseDistribution:
def fit(cls, series, *args, partition_size: int = 11, **kwargs) -> BaseDistribution: #pylint: disable=unused-argument
"""Fit constant distributions with disclosure control rules in place."""
# NB: dominance rule ensures that constant distribution is essentially never
# allowed under formal disclosure control. Always return default distribution.
Expand Down
4 changes: 4 additions & 0 deletions metasyncontrib/disclosure/na.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@
@metadist_disclosure()
class DisclosureNA(NADistribution):
"""Disclosure version of NA distribution."""

@classmethod
def _fit(cls, values, partition_size: int = 11):
return cls.default_distribution()
6 changes: 5 additions & 1 deletion metasyncontrib/disclosure/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@

import numpy as np
import polars as pl
from numpy.core._exceptions import UFuncTypeError

try:
from numpy.core._exceptions import UFuncTypeError # type: ignore
except ImportError:
from numpy._core._exceptions import UFuncTypeError # type: ignore


def _compute_dominance(block_values, reverse=False):
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ classifiers = [
"License :: OSI Approved :: MIT License",
]
dependencies = [
"metasyn>=0.8.0",
"metasyn>=1.0.1",
"polars",
"numpy>=1.20",
"numpy>=1.20,<2.0",
]
dynamic = ["version"]

Expand Down