Skip to content

Commit cd7f5d8

Browse files
committed
make release-tag: Merge branch 'master' into stable
2 parents ce5bebb + 817a4a7 commit cd7f5d8

File tree

24 files changed

+273
-69
lines changed

24 files changed

+273
-69
lines changed

.github/workflows/integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ${{ matrix.os }}
1111
strategy:
1212
matrix:
13-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
13+
python-version: ['3.8', '3.9', '3.10', '3.11']
1414
os: [ubuntu-latest, macos-latest, windows-latest]
1515
steps:
1616
- uses: actions/checkout@v1

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v1
13-
- name: Set up Python 3.8
13+
- name: Set up Python 3.9
1414
uses: actions/setup-python@v2
1515
with:
16-
python-version: 3.8
16+
python-version: 3.9
1717
- name: Install dependencies
1818
run: |
1919
python -m pip install --upgrade pip

.github/workflows/minimum.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ${{ matrix.os }}
1111
strategy:
1212
matrix:
13-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
13+
python-version: ['3.8', '3.9', '3.10', '3.11']
1414
os: [ubuntu-latest, macos-latest, windows-latest]
1515
steps:
1616
- uses: actions/checkout@v1

.github/workflows/performance.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v1
13-
- name: Set up Python 3.8
13+
- name: Set up Python 3.9
1414
uses: actions/setup-python@v2
1515
with:
16-
python-version: 3.8
16+
python-version: 3.9
1717
- name: Install dependencies
1818
run: |
1919
python -m pip install --upgrade pip

.github/workflows/readme.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ${{ matrix.os }}
1111
strategy:
1212
matrix:
13-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
13+
python-version: ['3.8', '3.9', '3.10', '3.11']
1414
os: [ubuntu-latest, macos-latest] # skip windows bc rundoc fails
1515
steps:
1616
- uses: actions/checkout@v1

.github/workflows/unit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ${{ matrix.os }}
1111
strategy:
1212
matrix:
13-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
13+
python-version: ['3.8', '3.9', '3.10', '3.11']
1414
os: [ubuntu-latest, macos-latest, windows-latest]
1515
steps:
1616
- uses: actions/checkout@v1

HISTORY.md

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

3+
## 1.6.0 -2023-07-12
4+
5+
This release adds the ability to generate missing values to the `AnonymizedFaker`. Users can now provide the `missing_value_generation` parameter during initialization. They can set it to `None` to not generate any missing values, or `'random'` to generate random missing values in the same proportion as the fitted data.
6+
7+
Additionally, this release improves the `NullTransformer` by allowing nulls to be replaced on the forward transform even if `missing_value_generation` is set to None. It also fixes a bug that was causing the `UnixTimestampEncoder` to return a different dtype than the input on `reverse_transform`. This was particularly problematic when datetime columns are represented as ints.
8+
9+
### New Features
10+
11+
* AnonymizedFaker should be able to model and generate missing values - Issue [#660](https://github.com/sdv-dev/RDT/issues/660) by @R-Palazzo
12+
13+
### Bugs
14+
15+
* The datetime transformers don't give me back the same dtype sometimes - Issue [#657](https://github.com/sdv-dev/RDT/issues/657) by @frances-h
16+
* RDT NullTransformer doesn't replace nulls if missing_value_generation is None - Issue [#658](https://github.com/sdv-dev/RDT/issues/658) by @amontanez24
17+
18+
### Maintenance
19+
20+
* Remove python 3.7 builds - Issue [#663](https://github.com/sdv-dev/RDT/issues/663) by @amontanez24
21+
* Drop support for Python 3.7 - Issue [#666](https://github.com/sdv-dev/RDT/issues/666) by @amontanez24
22+
23+
### Internal
24+
25+
* Add add-on modules to sys.modules - Issue [#653](https://github.com/sdv-dev/RDT/issues/653) by @amontanez24
26+
327
## 1.5.0 - 2023-06-01
428

529
This release adds a new parameter called `missing_value_generation` to the initialization of certain transformers to specify how missing values should be created. The parameter can be used in the `FloatFormatter`, `BinaryEncoder`, `UnixTimestampEncoder`, `OptimizedTimestampEncoder`, `GaussianNormalizer` and `ClusterBasedNormalizer`. Additionally, it fixes a bug that was causing every column that had nulls to generate them in the same place.

INSTALL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Requirements
44

55
**RDT** has been developed and tested on
6-
[Python 3.7, 3.8, 3.9, 3.10 and 3.11](https://www.python.org/downloads/)
6+
[Python 3.8, 3.9, 3.10 and 3.11](https://www.python.org/downloads/)
77

88
Also, although it is not strictly required, the usage of a [virtualenv](
99
https://virtualenv.pypa.io/en/latest/) is highly recommended in order to avoid

rdt/__init__.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@
55

66
__author__ = 'DataCebo, Inc.'
77
__email__ = '[email protected]'
8-
__version__ = '1.5.0'
8+
__version__ = '1.6.0.dev1'
99

1010

1111
import sys
1212
import warnings
1313
from operator import attrgetter
14+
from types import ModuleType
1415

1516
import numpy as np
1617
import pandas as pd
@@ -140,7 +141,13 @@ def _get_addon_target(addon_path_name):
140141

141142

142143
def _find_addons():
143-
"""Find and load all RDT add-ons."""
144+
"""Find and load all RDT add-ons.
145+
146+
If the add-on is a module, we add it both to the target module and to
147+
``system.modules`` so that they can be imported from the top of a file as follows:
148+
149+
from top_module.addon_module import x
150+
"""
144151
group = 'rdt_modules'
145152
for entry_point in iter_entry_points(group=group):
146153
try:
@@ -157,6 +164,11 @@ def _find_addons():
157164
warnings.warn(msg)
158165
continue
159166

167+
if isinstance(addon, ModuleType):
168+
addon_module_name = f'{addon_target.__name__}.{addon_name}'
169+
if addon_module_name not in sys.modules:
170+
sys.modules[addon_module_name] = addon
171+
160172
setattr(addon_target, addon_name, addon)
161173

162174

rdt/transformers/addons/addons_setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ def _build_setup(addon_json):
4343
'License :: Free for non-commercial use',
4444
'Natural Language :: English',
4545
'Programming Language :: Python :: 3',
46-
'Programming Language :: Python :: 3.7',
4746
'Programming Language :: Python :: 3.8',
4847
'Programming Language :: Python :: 3.9',
4948
'Programming Language :: Python :: 3.10',
@@ -59,7 +58,7 @@ def _build_setup(addon_json):
5958
long_description_content_type='text/markdown',
6059
name=addon_name,
6160
packages=find_namespace_packages(include=[addon_module]),
62-
python_requires='>=3.7,<3.12',
61+
python_requires='>=3.8,<3.12',
6362
url='https://github.com/sdv-dev/RDT',
6463
version=RDT_VERSION,
6564
zip_safe=False,

0 commit comments

Comments
 (0)