Skip to content

Commit

Permalink
make release-tag: Merge branch 'master' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
JDTheRipperPC committed Jan 17, 2020
2 parents 0bce7ac + 8beed6e commit 2875f3e
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 33 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,6 @@ or in command line::
pip install 'rdt>=X.Y.Z.dev'


.. _GitHub issues page: https://github.com/HDI-Project/RDT/issues
.. _Travis Build Status page: https://travis-ci.org/HDI-Project/RDT/pull_requests
.. _GitHub issues page: https://github.com/sdv-dev/RDT/issues
.. _Travis Build Status page: https://travis-ci.org/sdv-dev/RDT/pull_requests
.. _Google docstrings style: https://google.github.io/styleguide/pyguide.html?showone=Comments#Comments
24 changes: 15 additions & 9 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# History

## 0.2.1 - 2020-01-17

### Bugs Fixed

* Boolean Transformer fails to revert when there are NO nulls - Issue [#103](https://github.com/sdv-dev/RDT/issues/103) by @JDTheRipperPC

## 0.2.0 - 2019-10-15

This version comes with a brand new API and internal implementation, removing the old
Expand All @@ -16,23 +22,23 @@ release possible.

### Issues

* Drop the usage of meta - Issue [#72](https://github.com/HDI-Project/RDT/issues/72) by @JDTheRipperPC
* Make CatTransformer.probability_map deterministic - Issue [#25](https://github.com/HDI-Project/RDT/issues/25) by @csala
* Drop the usage of meta - Issue [#72](https://github.com/sdv-dev/RDT/issues/72) by @JDTheRipperPC
* Make CatTransformer.probability_map deterministic - Issue [#25](https://github.com/sdv-dev/RDT/issues/25) by @csala

## 0.1.3 - 2019-09-24

### New Features

* Add attributes NullTransformer and col_meta - Issue [#30](https://github.com/HDI-Project/RDT/issues/30) by @ManuelAlvarezC
* Add attributes NullTransformer and col_meta - Issue [#30](https://github.com/sdv-dev/RDT/issues/30) by @ManuelAlvarezC

### General Improvements

* Integrate with CodeCov - Issue [#89](https://github.com/HDI-Project/RDT/issues/89) by @csala
* Remake Sphinx Documentation - Issue [#96](https://github.com/HDI-Project/RDT/issues/96) by @JDTheRipperPC
* Improve README - Issue [#92](https://github.com/HDI-Project/RDT/issues/92) by @JDTheRipperPC
* Document RELEASE workflow - Issue [#93](https://github.com/HDI-Project/RDT/issues/93) by @JDTheRipperPC
* Add support to Python 3.7 - Issue [#38](https://github.com/HDI-Project/RDT/issues/38) by @ManuelAlvarezC
* Create way to pass HyperTransformer table dict - Issue [#45](https://github.com/HDI-Project/RDT/issues/45) by @ManuelAlvarezC
* Integrate with CodeCov - Issue [#89](https://github.com/sdv-dev/RDT/issues/89) by @csala
* Remake Sphinx Documentation - Issue [#96](https://github.com/sdv-dev/RDT/issues/96) by @JDTheRipperPC
* Improve README - Issue [#92](https://github.com/sdv-dev/RDT/issues/92) by @JDTheRipperPC
* Document RELEASE workflow - Issue [#93](https://github.com/sdv-dev/RDT/issues/93) by @JDTheRipperPC
* Add support to Python 3.7 - Issue [#38](https://github.com/sdv-dev/RDT/issues/38) by @ManuelAlvarezC
* Create way to pass HyperTransformer table dict - Issue [#45](https://github.com/sdv-dev/RDT/issues/45) by @ManuelAlvarezC

## 0.1.2

Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<p align="left">
<img width=15% src="https://dai.lids.mit.edu/wp-content/uploads/2018/06/Logo_DAI_highres.png" alt=“Copulas” />
<img width=15% src="https://dai.lids.mit.edu/wp-content/uploads/2018/06/Logo_DAI_highres.png" alt="DAI-Lab" />
<i>An open source project from Data to AI Lab at MIT.</i>
</p>

[![PyPi Shield](https://img.shields.io/pypi/v/RDT.svg)](https://pypi.python.org/pypi/RDT)
[![Travis CI Shield](https://travis-ci.org/HDI-Project/RDT.svg?branch=master)](https://travis-ci.org/HDI-Project/RDT)
[![Coverage Status](https://codecov.io/gh/HDI-Project/RDT/branch/master/graph/badge.svg)](https://codecov.io/gh/HDI-Project/RDT)
[![Travis CI Shield](https://travis-ci.org/sdv-dev/RDT.svg?branch=master)](https://travis-ci.org/sdv-dev/RDT)
[![Coverage Status](https://codecov.io/gh/sdv-dev/RDT/branch/master/graph/badge.svg)](https://codecov.io/gh/sdv-dev/RDT)
[![Downloads](https://pepy.tech/badge/rdt)](https://pepy.tech/project/rdt)

<h1>RDT: Reversible Data Transforms</h1>
# RDT: Reversible Data Transforms

- License: MIT
- Documentation: https://HDI-Project.github.io/RDT
- Homepage: https://github.com/HDI-Project/RDT
* License: [MIT](https://github.com/sdv-dev/RDT/blob/master/LICENSE)
* Documentation: https://sdv-dev.github.io/RDT
* Homepage: https://github.com/sdv-dev/RDT

# Overview
## Overview

**RDT** is a Python library used to transform data for data science libraries and preserve
the transformations in order to revert them as needed.
Expand Down Expand Up @@ -61,7 +61,7 @@ With your virtualenv activated, you can clone the repository and install it from
source by running `make install` on the `stable` branch:

```bash
git clone [email protected]:HDI-Project/RDT.git
git clone [email protected]:sdv-dev/RDT.git
cd RDT
git checkout stable
make install
Expand All @@ -72,7 +72,7 @@ make install
If you want to contribute to the project, a few more steps are required to make the project ready
for development.

Please head to the [Contributing Guide](https://HDI-Project.github.io/RDT/contributing.html#get-started)
Please head to the [Contributing Guide](https://sdv-dev.github.io/RDT/contributing.html#get-started)
for more details about this process.

# Quickstart
Expand Down Expand Up @@ -267,4 +267,4 @@ Which should output, again, a table that looks exactly like the original one.

For more details about **Reversible Data Transforms**, how to contribute to the project, and
its complete API reference, please visit the [documentation site](
https://HDI-Project.github.io/RDT/).
https://sdv-dev.github.io/RDT/).
12 changes: 6 additions & 6 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The process of releasing a new version involves several steps:
Clone the project and install the development requirements before start the release process. Alternatively, with your virtualenv activated.

```bash
git clone https://github.com/HDI-Project/RDT
git clone https://github.com/sdv-dev/RDT
cd RDT
git checkout master
make install-develop
Expand Down Expand Up @@ -120,20 +120,20 @@ Make sure HISTORY.md is updated with the issues of the milestone:
### New Features
* <ISSUE TITLE> - [Issue #<issue>](https://github.com/HDI-Project/RDT/issues/<issue>) by @resolver
* <ISSUE TITLE> - [Issue #<issue>](https://github.com/sdv-dev/RDT/issues/<issue>) by @resolver
### General Improvements
* <ISSUE TITLE> - [Issue #<issue>](https://github.com/HDI-Project/RDT/issues/<issue>) by @resolver
* <ISSUE TITLE> - [Issue #<issue>](https://github.com/sdv-dev/RDT/issues/<issue>) by @resolver
### Bug Fixed
* <ISSUE TITLE> - [Issue #<issue>](https://github.com/HDI-Project/RDT/issues/<issue>) by @resolver
* <ISSUE TITLE> - [Issue #<issue>](https://github.com/sdv-dev/RDT/issues/<issue>) by @resolver
```

The issue list per milestone can be found [here][milestones].

[milestones]: https://github.com/HDI-Project/RDT/milestones
[milestones]: https://github.com/sdv-dev/RDT/milestones

## Distribution

Expand Down Expand Up @@ -182,7 +182,7 @@ pip install /path/to/rdt/dist/<rdt-distribution-version-any>.whl
Clone the project and install the development requirements. Alternatively, with your virtualenv activated.

```bash
git clone https://github.com/HDI-Project/SDV
git clone https://github.com/sdv-dev/SDV
cd SDV
git checkout master
make install-develop
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
copyright = '2019, MIT Data To AI Lab'
author = 'MIT Data To AI Lab'
description = 'Reversable data transforms.'
user = 'HDI-Project'
user = 'sdv-dev'

# The version info for the project you're documenting, acts as replacement
# for |version| and |release|, also used in various other places throughout
Expand Down
2 changes: 1 addition & 1 deletion rdt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

__author__ = """MIT Data To AI Lab"""
__email__ = '[email protected]'
__version__ = '0.2.0'
__version__ = '0.2.1.dev0'

import numpy as np
import pandas as pd
Expand Down
3 changes: 3 additions & 0 deletions rdt/transformers/boolean.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,8 @@ def reverse_transform(self, data):
if self.nan is not None:
data = self.null_transformer.reverse_transform(data)

if isinstance(data, np.ndarray):
data = pd.Series(data)

data[pd.notnull(data)] = np.round(data[pd.notnull(data)]).astype(bool)
return data
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.2.0
current_version = 0.2.1.dev0
commit = True
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<candidate>\d+))?
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
setup_requires=setup_requires,
test_suite='tests',
tests_require=tests_require,
url='https://github.com/HDI-Project/RDT',
version='0.2.0',
url='https://github.com/sdv-dev/RDT',
version='0.2.1.dev0',
zip_safe=False,
)
17 changes: 17 additions & 0 deletions tests/transformers/test_boolean.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,20 @@ def test_reverse_transform_nan_not_ignore(self):
expect_call_count,
"NullTransformer.reverse_transform should not be called when nan is ignore"
)

def test_reverse_transform_not_null_values(self):
"""Test reverse_transform not null values correctly"""
# Setup
data = np.array([1., 0., 1.])

# Run
transformer = Mock()
transformer.nan = None

result = BooleanTransformer.reverse_transform(transformer, data)

# Asserts
expected = np.array([True, False, True])

assert type(result) == pd.Series
np.testing.assert_equal(result.to_numpy(), expected)

0 comments on commit 2875f3e

Please sign in to comment.