Skip to content

Commit 29c1be3

Browse files
authored
Deprecate Transformer and Add Conda Package (#240)
* Added Deprecationg warning for NumericalTransformer * Added workflow to upload package conda
1 parent 017e80c commit 29c1be3

File tree

7 files changed

+68
-5
lines changed

7 files changed

+68
-5
lines changed

.circleci/config.yml

-1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,4 @@ workflows:
2727
build_and_test:
2828
jobs:
2929
- test37
30-
- test38
3130
- test39

.github/workflows/python-publish.yml

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ jobs:
3030
deploy:
3131
needs: test
3232
runs-on: ubuntu-latest
33-
3433
steps:
3534
- uses: actions/checkout@v2
3635
- name: Set up Python

.github/workflows/upload_conda.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Upload Python Package
2+
3+
on:
4+
workflow_dispatch:
5+
branches:
6+
- main
7+
8+
jobs:
9+
10+
conda_deploy:
11+
runs-on: ubuntu-latest
12+
# needs: test
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: publish-to-conda
17+
uses: fcakyon/[email protected]
18+
with:
19+
subdir: 'conda'
20+
anacondatoken: ${{ secrets.ANACONDA_TOKEN }}
21+
platforms: 'win osx linux'

conda/conda_build_config.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
python:
2+
- 3.7
3+
- 3.8
4+
- 3.9

conda/meta.yaml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{% set data = load_setup_py_data() %}
2+
3+
package:
4+
name: sklearn-pandas
5+
version: {{ data['version'] }}
6+
7+
source:
8+
path: ..
9+
10+
build:
11+
number: 0
12+
script: python setup.py install --single-version-externally-managed --record=record.txt
13+
14+
requirements:
15+
build:
16+
- python
17+
- scikit-learn>=0.23.0
18+
- scipy>=1.5.1
19+
- pandas>=1.1.4
20+
- numpy>=1.18.1
21+
22+
run:
23+
- python
24+
- scikit-learn>=0.23.0
25+
- scipy>=1.5.1
26+
- pandas>=1.1.4
27+
- numpy>=1.18.1
28+
29+
test:
30+
imports:
31+
- sklearn_pandas
32+
33+
about:
34+
home: {{ data['url'] }}
35+
license: {{ data['license'] }}
36+
37+
summary: {{ data['description'] }}

setup.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,5 @@ def run(self):
4545
],
4646
tests_require=['pytest', 'mock'],
4747
cmdclass={'test': PyTest},
48-
)
48+
license='MIT License'
49+
)

sklearn_pandas/transformers.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ def __init__(self, func):
3333
"""
3434

3535
warnings.warn("""
36-
NumericalTransformer is deprecated. Please write your own
37-
transformer using Sklearn.base.TransformerMixin class
36+
NumericalTransformer will be deprecated in 2.1 version.
37+
Please use Sklearn.base.TransformerMixin to write
38+
customer transformers
3839
""", DeprecationWarning)
40+
3941
assert func in self.SUPPORTED_FUNCTIONS, \
4042
f"Only following func are supported: {self.SUPPORTED_FUNCTIONS}"
4143
super(NumericalTransformer, self).__init__()

0 commit comments

Comments
 (0)