Skip to content

Commit 9484bf5

Browse files
committed
make release-tag: Merge branch 'main' into stable
2 parents b09921e + dc50ce9 commit 9484bf5

File tree

174 files changed

+3498
-2067
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+3498
-2067
lines changed

.github/workflows/integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
types: [opened, reopened]
77

88
jobs:
9-
unit:
9+
integration:
1010
runs-on: ${{ matrix.os }}
1111
strategy:
1212
matrix:

HISTORY.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,43 @@
11
# History
22

3+
## v0.15.1 - 2024-08-13
4+
5+
### Bugs Fixed
6+
7+
* X-axis for the bar plot should be labeled `Value` instead of `Category` - Issue [#620](https://github.com/sdv-dev/SDMetrics/issues/620) by @R-Palazzo
8+
* LinAlgError when plotting data that is constant - Issue [#616](https://github.com/sdv-dev/SDMetrics/issues/616) by @R-Palazzo
9+
* Wrong chart title when generating a box plot for just the real data using `get_column_pair_plot()` - Issue [#615](https://github.com/sdv-dev/SDMetrics/issues/615) by @R-Palazzo
10+
11+
### New Features
12+
13+
* Better error message when passing an SDV Metadata object - Issue [#610](https://github.com/sdv-dev/SDMetrics/issues/610) by @R-Palazzo
14+
* Check that every property score are index-free - Issue [#583](https://github.com/sdv-dev/SDMetrics/issues/583) by @R-Palazzo
15+
16+
## v0.15.0 - 2024-07-15
17+
18+
This release adds support for NumPy 2.0! Additionally, the visualization utilities no longer require both real and synthetic data to be provided, and they can now be used to visualize only real or only synthetic data.
19+
20+
### Maintenance
21+
22+
* Switch to using ruff for Python linting and code formatting - Issue [#536](https://github.com/sdv-dev/SDMetrics/issues/536) by @gsheni
23+
* Change job names in integration workflow to "integration" - Issue [#577](https://github.com/sdv-dev/SDMetrics/issues/577) by @rwedge
24+
* Cap numpy to less than 2.0.0 until SDMetrics supports - Issue [#591](https://github.com/sdv-dev/SDMetrics/issues/591) by @gsheni
25+
26+
### Internal
27+
28+
* Switch to using ruff for Python linting and code formatting - Issue [#536](https://github.com/sdv-dev/SDMetrics/issues/536) by @gsheni
29+
30+
### New Features
31+
32+
* Allow me to visualize just the real or synthetic data - Issue [#581](https://github.com/sdv-dev/SDMetrics/issues/581) by @lajohn4747
33+
* Update Referential Integrity metric to support NaNs in child column - Issue [#587](https://github.com/sdv-dev/SDMetrics/issues/587) by @R-Palazzo
34+
* Add support for numpy 2.0.0 - Issue [#593](https://github.com/sdv-dev/SDMetrics/issues/593) by @R-Palazzo
35+
36+
### Bugs Fixed
37+
38+
* ColumnPairTrends score depends on the data index - Issue [#582](https://github.com/sdv-dev/SDMetrics/issues/582) by @R-Palazzo
39+
* Datetime columns set to Object pandas dtype breaks LSTMDetection - Issue [#584](https://github.com/sdv-dev/SDMetrics/issues/584) by @fealho
40+
341
## v0.14.1 - 2024-05-13
442

543
This release patches a bug on the `LSTMDetection` metric.

Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,12 @@ install-develop: clean-build clean-pyc ## install the package in editable mode a
8080
# LINT TARGETS
8181

8282
.PHONY: lint
83-
lint: ## check style with flake8 and isort
83+
lint:
8484
invoke lint
8585

8686
.PHONY: fix-lint
87-
fix-lint: ## fix lint issues using autoflake, autopep8, and isort
88-
find sdmetrics tests -name '*.py' | xargs autoflake --in-place --remove-all-unused-imports --remove-unused-variables
89-
autopep8 --in-place --recursive --aggressive sdmetrics tests
90-
isort --apply --atomic sdmetrics tests
87+
fix-lint:
88+
invoke fix-lint
9189

9290

9391
# TEST TARGETS

conda/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% set version = '0.14.1' %}
1+
{% set version = '0.15.1.dev1' %}
22

33
package:
44
name: "{{ name|lower }}"

latest_requirements.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
copulas==0.11.0
2-
numpy==1.26.4
2+
numpy==2.0.1
33
pandas==2.2.2
4-
plotly==5.22.0
5-
scikit-learn==1.4.2
6-
scipy==1.13.0
7-
tqdm==4.66.4
4+
plotly==5.23.0
5+
scikit-learn==1.5.1
6+
scipy==1.13.1
7+
tqdm==4.66.5

pyproject.toml

Lines changed: 64 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -76,32 +76,7 @@ dev = [
7676
'watchdog>=1.0.1,<5',
7777

7878
# style check
79-
'flake8>=3.7.7,<8',
80-
'flake8-absolute-import>=1.0,<2',
81-
'flake8-builtins>=1.5.3,<3',
82-
'flake8-comprehensions>=3.6.1,<4',
83-
'flake8-debugger>=4.0.0,<5',
84-
'flake8-docstrings>=1.5.0,<2',
85-
'flake8-eradicate>=1.1.0,<2',
86-
'flake8-fixme>=1.1.1,<1.2',
87-
'flake8-mock>=0.3,<1',
88-
'flake8-multiline-containers>=0.0.18,<0.1',
89-
'flake8-mutable>=1.2.0,<1.3',
90-
'flake8-expression-complexity>=0.0.9,<0.1',
91-
'flake8-print>=4.0.0,<4.1',
92-
'flake8-pytest-style>=2.0.0,<3',
93-
'flake8-quotes>=3.3.0,<4',
94-
'flake8-sfs>=0.0.3,<2',
95-
'flake8-variables-names>=0.0.4,<0.1',
96-
'dlint>=0.11.0,<1',
97-
'isort>=5.13.2,<6',
98-
'pandas-vet>=0.2.3,<2024',
99-
'pep8-naming>=0.12.1,<1',
100-
'pydocstyle>=6.1.1,<7',
101-
102-
# fix style issues
103-
'autoflake>=1.1,<3',
104-
'autopep8>=1.4.3,<3',
79+
'ruff>=0.3.2,<1',
10580

10681
# distribute on PyPI
10782
'twine>=1.10.0,<6',
@@ -159,7 +134,7 @@ convention = 'google'
159134
add-ignore = ['D107', 'D407', 'D417']
160135

161136
[tool.bumpversion]
162-
current_version = "0.14.1"
137+
current_version = "0.15.1.dev1"
163138
parse = '(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<candidate>\d+))?'
164139
serialize = [
165140
'{major}.{minor}.{patch}.{release}{candidate}',
@@ -199,3 +174,65 @@ replace = "version = '{new_version}'"
199174
[build-system]
200175
requires = ['setuptools', 'wheel']
201176
build-backend = "setuptools.build_meta"
177+
178+
[tool.ruff]
179+
preview = true
180+
line-length = 100
181+
indent-width = 4
182+
src = ["sdmetrics"]
183+
exclude = [
184+
"docs",
185+
".tox",
186+
".git",
187+
"__pycache__",
188+
".ipynb_checkpoints",
189+
"tasks.py",
190+
]
191+
192+
[tool.ruff.lint]
193+
select = [
194+
# Pyflakes
195+
"F",
196+
# Pycodestyle
197+
"E",
198+
"W",
199+
# pydocstyle
200+
"D",
201+
# isort
202+
"I001",
203+
# print statements
204+
"T201",
205+
# pandas-vet
206+
"PD"
207+
]
208+
ignore = [
209+
"E501",
210+
# pydocstyle
211+
"D107", # Missing docstring in __init__
212+
"D417", # Missing argument descriptions in the docstring, this is a bug from pydocstyle: https://github.com/PyCQA/pydocstyle/issues/449
213+
"PD901",
214+
"PD101",
215+
]
216+
217+
[tool.ruff.format]
218+
quote-style = "single"
219+
indent-style = "space"
220+
preview = true
221+
docstring-code-format = true
222+
docstring-code-line-length = "dynamic"
223+
224+
[tool.ruff.lint.isort]
225+
known-first-party = ["sdmetrics"]
226+
lines-between-types = 0
227+
228+
[tool.ruff.lint.per-file-ignores]
229+
"__init__.py" = ["F401", "E402", "F403", "F405", "E501", "I001"]
230+
"errors.py" = ["D105"]
231+
"tests/**.py" = ["D", "W505"]
232+
233+
[tool.ruff.lint.pydocstyle]
234+
convention = "google"
235+
236+
[tool.ruff.lint.pycodestyle]
237+
max-doc-length = 100
238+
max-line-length = 100

sdmetrics/__init__.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
__author__ = 'MIT Data To AI Lab'
66
__email__ = '[email protected]'
7-
__version__ = '0.14.1'
7+
__version__ = '0.15.1.dev1'
88

99
import sys
1010
import warnings as python_warnings
@@ -15,7 +15,15 @@
1515
import pandas as pd
1616

1717
from sdmetrics import (
18-
column_pairs, demos, goal, multi_table, reports, single_column, single_table, timeseries)
18+
column_pairs,
19+
demos,
20+
goal,
21+
multi_table,
22+
reports,
23+
single_column,
24+
single_table,
25+
timeseries,
26+
)
1927
from sdmetrics.demos import load_demo
2028

2129
__all__ = [

sdmetrics/base.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""BaseMetric class."""
2+
23
import numpy as np
34

45
from sdmetrics.goal import Goal
@@ -97,8 +98,10 @@ def normalize(cls, raw_score):
9798
score = 1 / (1 + np.exp(-raw_score))
9899

99100
if score is None or score < 0 or score > 1:
100-
raise AssertionError(f'This should be unreachable. The score {score} should be'
101-
f'a value between 0 and 1.')
101+
raise AssertionError(
102+
f'This should be unreachable. The score {score} should be'
103+
f'a value between 0 and 1.'
104+
)
102105

103106
if cls.goal == Goal.MINIMIZE:
104107
return 1.0 - score

sdmetrics/column_pairs/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22

33
from sdmetrics.column_pairs.base import ColumnPairsMetric
44
from sdmetrics.column_pairs.statistical.cardinality_boundary_adherence import (
5-
CardinalityBoundaryAdherence)
5+
CardinalityBoundaryAdherence,
6+
)
67
from sdmetrics.column_pairs.statistical.contingency_similarity import ContingencySimilarity
78
from sdmetrics.column_pairs.statistical.correlation_similarity import CorrelationSimilarity
89
from sdmetrics.column_pairs.statistical.kl_divergence import (
9-
ContinuousKLDivergence, DiscreteKLDivergence)
10+
ContinuousKLDivergence,
11+
DiscreteKLDivergence,
12+
)
1013
from sdmetrics.column_pairs.statistical.referential_integrity import ReferentialIntegrity
1114

1215
__all__ = [

sdmetrics/column_pairs/statistical/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
"""Statistical Metrics to compare column pairs."""
22

33
from sdmetrics.column_pairs.statistical.cardinality_boundary_adherence import (
4-
CardinalityBoundaryAdherence)
4+
CardinalityBoundaryAdherence,
5+
)
56
from sdmetrics.column_pairs.statistical.contingency_similarity import ContingencySimilarity
67
from sdmetrics.column_pairs.statistical.correlation_similarity import CorrelationSimilarity
78
from sdmetrics.column_pairs.statistical.kl_divergence import (
8-
ContinuousKLDivergence, DiscreteKLDivergence)
9+
ContinuousKLDivergence,
10+
DiscreteKLDivergence,
11+
)
912
from sdmetrics.column_pairs.statistical.referential_integrity import ReferentialIntegrity
1013

1114
__all__ = [

0 commit comments

Comments
 (0)