From 9dee783ee3f28dc71514c2d2be18ee54db4c167f Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Fri, 26 Jul 2019 07:36:55 -0500 Subject: [PATCH 01/27] Removed variable group that doesn't exist yet --- azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 18e427d..1f6744e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -18,9 +18,9 @@ pr: include: - '*' -variables: - # Read deployment variables from our secret group - - group: deploy-vars +#variables: +# # Read deployment variables from our secret group +# - group: deploy-vars jobs: - template: build_tools/azure/jobs.yml From 4f028d5a466dcbb6f19f2683b8dbf67aba121d00 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Fri, 26 Jul 2019 07:37:17 -0500 Subject: [PATCH 02/27] Removed sdist --- build_tools/azure/build_and_deploy.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build_tools/azure/build_and_deploy.yml b/build_tools/azure/build_and_deploy.yml index b6c24ea..26d3b58 100644 --- a/build_tools/azure/build_and_deploy.yml +++ b/build_tools/azure/build_and_deploy.yml @@ -16,10 +16,6 @@ steps: - script: pytest --showlocals --durations=20 --pyargs skoot displayName: 'Running unit tests' - # Build source archive here so we don't have to in Circle -- script: python setup.py sdist - displayName: 'Building source archive' - - bash: | if python -c "from twine.commands.check import check; check(['dist/*'])" | grep "warning"; then echo "README will not render properly on PyPI" From c8ebae0c7c716ddebf45e99ed232b3f04ceb6843 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Fri, 26 Jul 2019 07:37:41 -0500 Subject: [PATCH 03/27] Commented out distribution step for now --- build_tools/azure/build_and_deploy.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/build_tools/azure/build_and_deploy.yml b/build_tools/azure/build_and_deploy.yml index 26d3b58..ed8997d 100644 --- a/build_tools/azure/build_and_deploy.yml +++ b/build_tools/azure/build_and_deploy.yml @@ -26,10 +26,10 @@ steps: displayName: 'Checking README compatibility' # Use this one for testing: python -m twine upload --repository-url https://test.pypi.org/legacy/ --skip-existing dist/skoot-* -- script: python -m twine upload --skip-existing dist/skoot-* - displayName: 'Deploying to PyPI' - # Only deploy if this is a tagged commit - condition: contains(variables['Build.SourceBranch'], 'tags') - env: - TWINE_USERNAME: $(twineUsername) - TWINE_PASSWORD: $(twinePassword) +#- script: python -m twine upload --skip-existing dist/skoot-* +# displayName: 'Deploying to PyPI' +# # Only deploy if this is a tagged commit +# condition: contains(variables['Build.SourceBranch'], 'tags') +# env: +# TWINE_USERNAME: $(twineUsername) +# TWINE_PASSWORD: $(twinePassword) From c1e0ae718a15ac8f126663c8ce7ea0ab6c762033 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Fri, 26 Jul 2019 11:54:28 -0500 Subject: [PATCH 04/27] Start with just windows Python 3.6. Add explicit gfortra install --- build_tools/azure/jobs.yml | 81 ++++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 38 deletions(-) diff --git a/build_tools/azure/jobs.yml b/build_tools/azure/jobs.yml index 670699a..b8fb337 100644 --- a/build_tools/azure/jobs.yml +++ b/build_tools/azure/jobs.yml @@ -7,13 +7,13 @@ jobs: strategy: maxParallel: 6 matrix: - Python35-x86: - python.version: '3.5' - architecture: 'x86' - - Python35-x64: - python.version: '3.5' - architecture: 'x64' +# Python35-x86: +# python.version: '3.5' +# architecture: 'x86' +# +# Python35-x64: +# python.version: '3.5' +# architecture: 'x64' Python36-x86: python.version: '3.6' @@ -23,13 +23,13 @@ jobs: python.version: '3.6' architecture: 'x64' - Python37-x86: - python.version: '3.7' - architecture: 'x86' - - Python37-x64: - python.version: '3.7' - architecture: 'x64' +# Python37-x86: +# python.version: '3.7' +# architecture: 'x86' +# +# Python37-x64: +# python.version: '3.7' +# architecture: 'x64' steps: - task: UsePythonVersion@0 @@ -38,29 +38,34 @@ jobs: architecture: '$(architecture)' displayName: 'Setting Python version and system architecture' - - template: build_and_deploy.yml - -- job: macOS - - pool: - vmImage: 'macOS-10.13' # Also have the option of 10.14, if we want that - - strategy: - maxParallel: 3 - matrix: - Python35: - python.version: '3.5' - - Python36: - python.version: '3.6' - - Python37: - python.version: '3.7' - - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version)' - displayName: 'Setting Python version' + - bash: | + apt-get update + apt-get install -yq gfortran + displayName: 'Installing Fortran' - template: build_and_deploy.yml + +#- job: macOS +# +# pool: +# vmImage: 'macOS-10.13' # Also have the option of 10.14, if we want that +# +# strategy: +# maxParallel: 3 +# matrix: +# Python35: +# python.version: '3.5' +# +# Python36: +# python.version: '3.6' +# +# Python37: +# python.version: '3.7' +# +# steps: +# - task: UsePythonVersion@0 +# inputs: +# versionSpec: '$(python.version)' +# displayName: 'Setting Python version' +# +# - template: build_and_deploy.yml From 59cec0c8f0b035cd6b81ba563a2b139127688f3a Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Fri, 26 Jul 2019 11:59:44 -0500 Subject: [PATCH 05/27] Try chocolatey --- build_tools/azure/jobs.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build_tools/azure/jobs.yml b/build_tools/azure/jobs.yml index b8fb337..b2c68ff 100644 --- a/build_tools/azure/jobs.yml +++ b/build_tools/azure/jobs.yml @@ -38,9 +38,7 @@ jobs: architecture: '$(architecture)' displayName: 'Setting Python version and system architecture' - - bash: | - apt-get update - apt-get install -yq gfortran + - script: choco install mingw displayName: 'Installing Fortran' - template: build_and_deploy.yml From 7fe4fd8f1f61c58b4b308de661ff00a3f2f0252b Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Fri, 26 Jul 2019 12:15:25 -0500 Subject: [PATCH 06/27] Try adding new packages --- build_tools/azure/requirements.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build_tools/azure/requirements.txt b/build_tools/azure/requirements.txt index b2bbcf5..3bfe83a 100644 --- a/build_tools/azure/requirements.txt +++ b/build_tools/azure/requirements.txt @@ -9,4 +9,7 @@ patsy pytest wheel twine>=1.13.0 -readme_renderer[md] \ No newline at end of file +readme_renderer[md] +mkl +mkl-fft +intel-openmp \ No newline at end of file From c5483f1bb33cf453da3a2060dda11f733e78b98a Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Fri, 26 Jul 2019 12:15:41 -0500 Subject: [PATCH 07/27] Remove explicit fortran install --- build_tools/azure/jobs.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/build_tools/azure/jobs.yml b/build_tools/azure/jobs.yml index b2c68ff..e6d44ff 100644 --- a/build_tools/azure/jobs.yml +++ b/build_tools/azure/jobs.yml @@ -38,9 +38,6 @@ jobs: architecture: '$(architecture)' displayName: 'Setting Python version and system architecture' - - script: choco install mingw - displayName: 'Installing Fortran' - - template: build_and_deploy.yml #- job: macOS From 7b0eefe6d5d28ef2825da61532f1139b842f9a7d Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Fri, 26 Jul 2019 12:21:12 -0500 Subject: [PATCH 08/27] Remove new requirements --- build_tools/azure/requirements.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/build_tools/azure/requirements.txt b/build_tools/azure/requirements.txt index 3bfe83a..b2bbcf5 100644 --- a/build_tools/azure/requirements.txt +++ b/build_tools/azure/requirements.txt @@ -9,7 +9,4 @@ patsy pytest wheel twine>=1.13.0 -readme_renderer[md] -mkl -mkl-fft -intel-openmp \ No newline at end of file +readme_renderer[md] \ No newline at end of file From 8b769f07fae3ec3dbb31e786bbd3cd545d86b5bf Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Fri, 26 Jul 2019 12:26:43 -0500 Subject: [PATCH 09/27] Add mac builds back --- build_tools/azure/jobs.yml | 51 ++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/build_tools/azure/jobs.yml b/build_tools/azure/jobs.yml index e6d44ff..3bbe0db 100644 --- a/build_tools/azure/jobs.yml +++ b/build_tools/azure/jobs.yml @@ -40,27 +40,30 @@ jobs: - template: build_and_deploy.yml -#- job: macOS -# -# pool: -# vmImage: 'macOS-10.13' # Also have the option of 10.14, if we want that -# -# strategy: -# maxParallel: 3 -# matrix: -# Python35: -# python.version: '3.5' -# -# Python36: -# python.version: '3.6' -# -# Python37: -# python.version: '3.7' -# -# steps: -# - task: UsePythonVersion@0 -# inputs: -# versionSpec: '$(python.version)' -# displayName: 'Setting Python version' -# -# - template: build_and_deploy.yml +- job: macOS + + pool: + vmImage: 'macOS-10.13' # Also have the option of 10.14, if we want that + + strategy: + maxParallel: 3 + matrix: + Python35: + python.version: '3.5' + + Python36: + python.version: '3.6' + + Python37: + python.version: '3.7' + + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version)' + displayName: 'Setting Python version' + + - script: brew install gfortran + displayName: 'Installing Fortran' + + - template: build_and_deploy.yml From 290cccdec1e7049e52b84639eb188bcbc39afbce Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Fri, 26 Jul 2019 12:26:57 -0500 Subject: [PATCH 10/27] Removed windows --- build_tools/azure/jobs.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/build_tools/azure/jobs.yml b/build_tools/azure/jobs.yml index 3bbe0db..91e29b7 100644 --- a/build_tools/azure/jobs.yml +++ b/build_tools/azure/jobs.yml @@ -15,13 +15,13 @@ jobs: # python.version: '3.5' # architecture: 'x64' - Python36-x86: - python.version: '3.6' - architecture: 'x86' - - Python36-x64: - python.version: '3.6' - architecture: 'x64' +# Python36-x86: +# python.version: '3.6' +# architecture: 'x86' +# +# Python36-x64: +# python.version: '3.6' +# architecture: 'x64' # Python37-x86: # python.version: '3.7' From dedb36e101e78257b0d3630d5878e1bc63375a02 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Fri, 26 Jul 2019 12:28:06 -0500 Subject: [PATCH 11/27] Commented out all of windows --- build_tools/azure/jobs.yml | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/build_tools/azure/jobs.yml b/build_tools/azure/jobs.yml index 91e29b7..d62ab9b 100644 --- a/build_tools/azure/jobs.yml +++ b/build_tools/azure/jobs.yml @@ -1,12 +1,12 @@ jobs: -- job: Windows - - pool: - vmImage: 'vs2017-win2016' - - strategy: - maxParallel: 6 - matrix: +#- job: Windows +# +# pool: +# vmImage: 'vs2017-win2016' +# +# strategy: +# maxParallel: 6 +# matrix: # Python35-x86: # python.version: '3.5' # architecture: 'x86' @@ -14,7 +14,7 @@ jobs: # Python35-x64: # python.version: '3.5' # architecture: 'x64' - +# # Python36-x86: # python.version: '3.6' # architecture: 'x86' @@ -22,7 +22,7 @@ jobs: # Python36-x64: # python.version: '3.6' # architecture: 'x64' - +# # Python37-x86: # python.version: '3.7' # architecture: 'x86' @@ -30,15 +30,15 @@ jobs: # Python37-x64: # python.version: '3.7' # architecture: 'x64' - - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version)' - architecture: '$(architecture)' - displayName: 'Setting Python version and system architecture' - - - template: build_and_deploy.yml +# +# steps: +# - task: UsePythonVersion@0 +# inputs: +# versionSpec: '$(python.version)' +# architecture: '$(architecture)' +# displayName: 'Setting Python version and system architecture' +# +# - template: build_and_deploy.yml - job: macOS From 60b0f3918488fe1f57436f9651591b54fa4d1168 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Fri, 26 Jul 2019 12:29:21 -0500 Subject: [PATCH 12/27] brew install -> brew cask install --- build_tools/azure/jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/azure/jobs.yml b/build_tools/azure/jobs.yml index d62ab9b..67e18f8 100644 --- a/build_tools/azure/jobs.yml +++ b/build_tools/azure/jobs.yml @@ -63,7 +63,7 @@ jobs: versionSpec: '$(python.version)' displayName: 'Setting Python version' - - script: brew install gfortran + - script: brew cask install gfortran displayName: 'Installing Fortran' - template: build_and_deploy.yml From 3cf6421a365ef4662ef9fc1792f14d9ac8c63fd6 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Fri, 26 Jul 2019 12:34:51 -0500 Subject: [PATCH 13/27] Added long description to setup.py --- setup.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setup.py b/setup.py index 45dfba6..5ce6417 100644 --- a/setup.py +++ b/setup.py @@ -40,6 +40,10 @@ PYPIDIST = DISTNAME DESCRIPTION = DOCLINES[0] +# Get the long desc +with open("README.md", "r") as fh: + LONG_DESCRIPTION = fh.read() + MAINTAINER = 'Taylor G. Smith' MAINTAINER_GIT = 'tgsmith61591' MAINTAINER_EMAIL = 'taylor.smith@alkaline-ml.com' @@ -188,6 +192,8 @@ def do_setup(): maintainer=MAINTAINER, maintainer_email=MAINTAINER_EMAIL, description=DESCRIPTION, + long_description=LONG_DESCRIPTION, + long_description_content_type='text/markdown', license=LICENSE, version=VERSION, classifiers=[ From 0b77aaad32ed0435bfd3a7148baf70bf92a8ec1c Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Fri, 26 Jul 2019 12:42:20 -0500 Subject: [PATCH 14/27] Added setuptools dependency --- build_tools/azure/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/build_tools/azure/requirements.txt b/build_tools/azure/requirements.txt index b2bbcf5..8b9df74 100644 --- a/build_tools/azure/requirements.txt +++ b/build_tools/azure/requirements.txt @@ -7,6 +7,7 @@ six joblib patsy pytest +setuptools>=38.6.0 wheel twine>=1.13.0 readme_renderer[md] \ No newline at end of file From f6831a6aca35bf14cc0787f34662fc12d5f75134 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Fri, 9 Aug 2019 14:28:02 -0500 Subject: [PATCH 15/27] Use latest image --- build_tools/azure/jobs.yml | 43 +------------------------------------- 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/build_tools/azure/jobs.yml b/build_tools/azure/jobs.yml index 67e18f8..b140c50 100644 --- a/build_tools/azure/jobs.yml +++ b/build_tools/azure/jobs.yml @@ -1,49 +1,8 @@ jobs: -#- job: Windows -# -# pool: -# vmImage: 'vs2017-win2016' -# -# strategy: -# maxParallel: 6 -# matrix: -# Python35-x86: -# python.version: '3.5' -# architecture: 'x86' -# -# Python35-x64: -# python.version: '3.5' -# architecture: 'x64' -# -# Python36-x86: -# python.version: '3.6' -# architecture: 'x86' -# -# Python36-x64: -# python.version: '3.6' -# architecture: 'x64' -# -# Python37-x86: -# python.version: '3.7' -# architecture: 'x86' -# -# Python37-x64: -# python.version: '3.7' -# architecture: 'x64' -# -# steps: -# - task: UsePythonVersion@0 -# inputs: -# versionSpec: '$(python.version)' -# architecture: '$(architecture)' -# displayName: 'Setting Python version and system architecture' -# -# - template: build_and_deploy.yml - - job: macOS pool: - vmImage: 'macOS-10.13' # Also have the option of 10.14, if we want that + vmImage: 'macOS-latest' strategy: maxParallel: 3 From 5b9d2714deae30a07b9b1cf616a2ebdd3b10b17e Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Fri, 9 Aug 2019 14:28:23 -0500 Subject: [PATCH 16/27] Uncomment deploy step --- build_tools/azure/build_and_deploy.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/build_tools/azure/build_and_deploy.yml b/build_tools/azure/build_and_deploy.yml index ed8997d..26d3b58 100644 --- a/build_tools/azure/build_and_deploy.yml +++ b/build_tools/azure/build_and_deploy.yml @@ -26,10 +26,10 @@ steps: displayName: 'Checking README compatibility' # Use this one for testing: python -m twine upload --repository-url https://test.pypi.org/legacy/ --skip-existing dist/skoot-* -#- script: python -m twine upload --skip-existing dist/skoot-* -# displayName: 'Deploying to PyPI' -# # Only deploy if this is a tagged commit -# condition: contains(variables['Build.SourceBranch'], 'tags') -# env: -# TWINE_USERNAME: $(twineUsername) -# TWINE_PASSWORD: $(twinePassword) +- script: python -m twine upload --skip-existing dist/skoot-* + displayName: 'Deploying to PyPI' + # Only deploy if this is a tagged commit + condition: contains(variables['Build.SourceBranch'], 'tags') + env: + TWINE_USERNAME: $(twineUsername) + TWINE_PASSWORD: $(twinePassword) From dda2bc6f52fa91c042644c1f1ff363c81442078a Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 20 Jul 2020 12:01:24 -0500 Subject: [PATCH 17/27] Update for pandas deprecations --- examples/preprocessing/ex_one_hot.py | 2 +- skoot/decomposition/tests/test_decompose.py | 8 ++++---- skoot/feature_extraction/tests/test_interact.py | 2 +- skoot/feature_selection/combos.py | 2 +- skoot/preprocessing/tests/test_encode.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/preprocessing/ex_one_hot.py b/examples/preprocessing/ex_one_hot.py index 704e025..17621bc 100644 --- a/examples/preprocessing/ex_one_hot.py +++ b/examples/preprocessing/ex_one_hot.py @@ -46,7 +46,7 @@ # ############################################################################# # Show we can work with levels we've never seen before test_row = X_test.iloc[0] -test_row.set_value("native-country", "Atlantis") +test_row.at("native-country", "Atlantis") trans = encoder.transform(pd.DataFrame([test_row])) print("\nApplied on a row with a new native-country:") print(trans) diff --git a/skoot/decomposition/tests/test_decompose.py b/skoot/decomposition/tests/test_decompose.py index 8deb490..95f3404 100644 --- a/skoot/decomposition/tests/test_decompose.py +++ b/skoot/decomposition/tests/test_decompose.py @@ -24,7 +24,7 @@ def test_selective_pca(): # the "other" names, and their corresponding matrix comp_column_names = names[1:] - compare_cols = original[comp_column_names].as_matrix() + compare_cols = original[comp_column_names].to_numpy() # now fit PCA on the first column only transformer = SelectivePCA(cols=cols, n_components=0.85, @@ -32,7 +32,7 @@ def test_selective_pca(): transformed = transformer.transform(original) # get the untouched columns to compare. These should be equal!! - untouched_cols = transformed[comp_column_names].as_matrix() + untouched_cols = transformed[comp_column_names].to_numpy() assert_array_almost_equal(compare_cols, untouched_cols) # make sure the component is present in the columns @@ -60,13 +60,13 @@ def test_selective_tsvd(): cols = names[:2] comp_column_names = names[2:] - compare_cols = original[comp_column_names].as_matrix() + compare_cols = original[comp_column_names].to_numpy() transformer = SelectiveTruncatedSVD(cols=cols, n_components=1, trans_col_name="Concept").fit(original) transformed = transformer.transform(original) - untouched_cols = transformed[comp_column_names].as_matrix() + untouched_cols = transformed[comp_column_names].to_numpy() assert_array_almost_equal(compare_cols, untouched_cols) assert 'Concept1' in transformed.columns diff --git a/skoot/feature_extraction/tests/test_interact.py b/skoot/feature_extraction/tests/test_interact.py index d5b72c3..52501fd 100644 --- a/skoot/feature_extraction/tests/test_interact.py +++ b/skoot/feature_extraction/tests/test_interact.py @@ -78,7 +78,7 @@ def test_interaction_corners(): for i, j in zip(X_trans.columns.tolist(), expected_names)]) # assert col names equal - assert_array_equal(X_trans.as_matrix(), np.array([ + assert_array_equal(X_trans.to_numpy(), np.array([ [0, 1, 0, 1, 0], [0, 0, 1, 1, 0], [0, 0, 0, 1, 0], diff --git a/skoot/feature_selection/combos.py b/skoot/feature_selection/combos.py index e39bf7c..3f702e4 100644 --- a/skoot/feature_selection/combos.py +++ b/skoot/feature_selection/combos.py @@ -96,7 +96,7 @@ def fit(self, X, y=None): drops = [] # Generate sub matrix for qr decomposition - x = X[cols].as_matrix() + x = X[cols].to_numpy() cols = np.array(cols) # so we can use boolean masking # do subroutines diff --git a/skoot/preprocessing/tests/test_encode.py b/skoot/preprocessing/tests/test_encode.py index 71fcdf0..7c062c6 100644 --- a/skoot/preprocessing/tests/test_encode.py +++ b/skoot/preprocessing/tests/test_encode.py @@ -72,7 +72,7 @@ def test_dummy_encoder_ignore(): # get a test sample, make it different test_sample = iris.iloc[0].copy() - test_sample.set_value("species", 99) + test_sample.at["species"] = 99 # show this does not break df = pd.DataFrame([test_sample]) From f0f2dfde302d8519750de99df61fca1b29c08585 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 20 Jul 2020 13:24:30 -0500 Subject: [PATCH 18/27] Try uninstalling scipy --- build_tools/azure/build_and_deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build_tools/azure/build_and_deploy.yml b/build_tools/azure/build_and_deploy.yml index 26d3b58..ac3162d 100644 --- a/build_tools/azure/build_and_deploy.yml +++ b/build_tools/azure/build_and_deploy.yml @@ -2,7 +2,9 @@ steps: - script: python -m pip install --upgrade pip displayName: 'Updating pip' +# Have to reinstall scipy on Azure, as the install is screwed up - script: | + pip uninstall scipy -y pip install -r requirements.txt pip install -r build_tools/azure/requirements.txt displayName: 'Installing requirements' From 5a6d96f006085059529b3f39168620f639b81c00 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 20 Jul 2020 13:31:27 -0500 Subject: [PATCH 19/27] Use newer API --- build_tools/azure/build_and_deploy.yml | 2 -- skoot/_build_utils/system_info.py | 14 ++++++-------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/build_tools/azure/build_and_deploy.yml b/build_tools/azure/build_and_deploy.yml index ac3162d..26d3b58 100644 --- a/build_tools/azure/build_and_deploy.yml +++ b/build_tools/azure/build_and_deploy.yml @@ -2,9 +2,7 @@ steps: - script: python -m pip install --upgrade pip displayName: 'Updating pip' -# Have to reinstall scipy on Azure, as the install is screwed up - script: | - pip uninstall scipy -y pip install -r requirements.txt pip install -r build_tools/azure/requirements.txt displayName: 'Installing requirements' diff --git a/skoot/_build_utils/system_info.py b/skoot/_build_utils/system_info.py index 7502fcf..87141a6 100644 --- a/skoot/_build_utils/system_info.py +++ b/skoot/_build_utils/system_info.py @@ -3,11 +3,8 @@ import warnings import numpy as np -import numpy.distutils.system_info from numpy.distutils.system_info import (system_info, - numpy_info, - NotFoundError, BlasNotFoundError, LapackNotFoundError, AtlasNotFoundError, @@ -16,10 +13,9 @@ dict_append, get_info as old_get_info) -from scipy._lib._version import NumpyVersion +from scipy._lib._pep440 import parse - -if NumpyVersion(np.__version__) >= "1.15.0.dev": +if parse(np.__version__) >= "1.15.0.dev": # For new enough numpy.distutils, the ACCELERATE=None environment # variable in the top-level setup.py is enough, so no need to # customize BLAS detection. @@ -35,6 +31,7 @@ def get_info(name, notfound_action=0): return old_get_info(name, notfound_action) return cls().get_info(notfound_action) + # # The following is copypaste from numpy.distutils.system_info, with # OSX Accelerate-related parts removed. @@ -75,7 +72,7 @@ def calc_info(self): if atlas_info: l = atlas_info.get('define_macros', []) if ('ATLAS_WITH_LAPACK_ATLAS', None) in l \ - or ('ATLAS_WITHOUT_LAPACK', None) in l: + or ('ATLAS_WITHOUT_LAPACK', None) in l: need_lapack = 1 info = atlas_info @@ -87,7 +84,7 @@ def calc_info(self): if need_lapack: lapack_info = get_info('lapack') - #lapack_info = {} ## uncomment for testing + # lapack_info = {} ## uncomment for testing if lapack_info: dict_append(info, **lapack_info) else: @@ -113,6 +110,7 @@ def calc_info(self): self.set_info(**info) return + class blas_opt_info(system_info): notfounderror = BlasNotFoundError From dc2bcaf29d3e4d8663312beadb096bffd0b77e7f Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 20 Jul 2020 13:34:01 -0500 Subject: [PATCH 20/27] Use "parse" on both sides --- skoot/_build_utils/system_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skoot/_build_utils/system_info.py b/skoot/_build_utils/system_info.py index 87141a6..6c334dd 100644 --- a/skoot/_build_utils/system_info.py +++ b/skoot/_build_utils/system_info.py @@ -15,7 +15,7 @@ from scipy._lib._pep440 import parse -if parse(np.__version__) >= "1.15.0.dev": +if parse(np.__version__) >= parse("1.15.0.dev"): # For new enough numpy.distutils, the ACCELERATE=None environment # variable in the top-level setup.py is enough, so no need to # customize BLAS detection. From 646d6d39e9d5e1ee0d5539726d594d4338cc52a4 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 20 Jul 2020 13:36:41 -0500 Subject: [PATCH 21/27] Add 3.8 builds --- build_tools/azure/jobs.yml | 3 +++ setup.py | 1 + 2 files changed, 4 insertions(+) diff --git a/build_tools/azure/jobs.yml b/build_tools/azure/jobs.yml index b140c50..7d1d68a 100644 --- a/build_tools/azure/jobs.yml +++ b/build_tools/azure/jobs.yml @@ -16,6 +16,9 @@ jobs: Python37: python.version: '3.7' + Python38: + python.version: '3.8' + steps: - task: UsePythonVersion@0 inputs: diff --git a/setup.py b/setup.py index 5ce6417..4f5186f 100644 --- a/setup.py +++ b/setup.py @@ -202,6 +202,7 @@ def do_setup(): 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'Topic :: Software Development', 'Topic :: Scientific/Engineering', 'Operating System :: POSIX', From ef2ee099beb5f74d29c79a16b8295e1c783ceb2f Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 20 Jul 2020 13:38:25 -0500 Subject: [PATCH 22/27] Increase parallelism --- build_tools/azure/jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/azure/jobs.yml b/build_tools/azure/jobs.yml index 7d1d68a..43cd1f8 100644 --- a/build_tools/azure/jobs.yml +++ b/build_tools/azure/jobs.yml @@ -5,7 +5,7 @@ jobs: vmImage: 'macOS-latest' strategy: - maxParallel: 3 + maxParallel: 4 matrix: Python35: python.version: '3.5' From 67b28e88dfb292372d7bd93937843fe9beb2fe0c Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 20 Jul 2020 13:42:35 -0500 Subject: [PATCH 23/27] Add 3.8 to circle CI too --- .circleci/config.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 96e3235..53b0df5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -92,6 +92,14 @@ jobs: - install-gfortran - make-unit-test + cpython38-linux: + docker: + - image: python:3.8 + working_directory: ~/skoot + steps: + - install-gfortran + - make-unit-test + # For testing lint test-linting: docker: @@ -151,6 +159,17 @@ jobs: pythonversion: "3.7" - deploy-to-pypi + deploy-cpython38-whl: + machine: + image: circleci/classic:latest + working_directory: ~/skoot + steps: + - checkout + - sudo-install-gfortran + - build-whl-file: + pythonversion: "3.8" + - deploy-to-pypi + # For documentation deployment. You'll need the following environment vars # in your Circle CI settings, otherwise this will not work. # @@ -179,6 +198,8 @@ workflows: filters: *test-filters - cpython37-linux: filters: *test-filters + - cpython38-linux: + filters: *test-filters - test-linting: filters: *test-filters @@ -210,3 +231,8 @@ workflows: filters: *deploy-filters requires: - deploy-doc + + - deploy-cpython38-whl: + filters: *deploy-filters + requires: + - deploy-doc From a577b3f0314414f22a13b54bdf97fa111761c382 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 20 Jul 2020 13:50:42 -0500 Subject: [PATCH 24/27] One more set -> at --- examples/preprocessing/ex_one_hot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/preprocessing/ex_one_hot.py b/examples/preprocessing/ex_one_hot.py index 17621bc..fbe0e5c 100644 --- a/examples/preprocessing/ex_one_hot.py +++ b/examples/preprocessing/ex_one_hot.py @@ -46,7 +46,7 @@ # ############################################################################# # Show we can work with levels we've never seen before test_row = X_test.iloc[0] -test_row.at("native-country", "Atlantis") +test_row.at["native-country"] = "Atlantis" trans = encoder.transform(pd.DataFrame([test_row])) print("\nApplied on a row with a new native-country:") print(trans) From 30fead321475a8a6dd8aa8ad1bb2fe379d647b74 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 20 Jul 2020 13:56:39 -0500 Subject: [PATCH 25/27] Use six instead of sklearn.externals.six --- build_tools/doc/doc_requirements.txt | 3 ++- doc/conf.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build_tools/doc/doc_requirements.txt b/build_tools/doc/doc_requirements.txt index b3b5109..07b62a6 100644 --- a/build_tools/doc/doc_requirements.txt +++ b/build_tools/doc/doc_requirements.txt @@ -10,4 +10,5 @@ sphinx_rtd_theme matplotlib==2.2.0rc1 numpydoc==0.7.0 Django==1.11 -image==1.5.19 \ No newline at end of file +image==1.5.19 +six \ No newline at end of file diff --git a/doc/conf.py b/doc/conf.py index b606a84..7c3e2fc 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -16,7 +16,7 @@ import sys import skoot from pkg_resources import parse_version -from sklearn.externals.six import u +from six import u # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the From f4f49c98d3fc47aa233c9ab394c34cc959eb82d6 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 20 Jul 2020 14:13:55 -0500 Subject: [PATCH 26/27] Add windows? :eyes: --- README.md | 4 +--- build_tools/azure/jobs.yml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8f81b77..41ba55d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ [![codecov](https://codecov.io/gh/tgsmith61591/skoot/branch/master/graph/badge.svg)](https://codecov.io/gh/tgsmith61591/skoot) -![Supported versions](https://img.shields.io/badge/python-3.5-blue.svg) -![Supported versions](https://img.shields.io/badge/python-3.6-blue.svg) -![Supported versions](https://img.shields.io/badge/python-3.7-blue.svg) +![Supported versions](https://img.shields.io/badge/python-3.5+-blue.svg) [![CircleCI](https://circleci.com/gh/tgsmith61591/skoot.svg?style=svg)](https://circleci.com/gh/tgsmith61591/skoot) [![Build Status](https://dev.azure.com/tgsmith61591gh/skoot/_apis/build/status/tgsmith61591.skoot?branchName=master)](https://dev.azure.com/tgsmith61591gh/skoot/_build/latest?definitionId=1&branchName=master) diff --git a/build_tools/azure/jobs.yml b/build_tools/azure/jobs.yml index 43cd1f8..9b35a3d 100644 --- a/build_tools/azure/jobs.yml +++ b/build_tools/azure/jobs.yml @@ -29,3 +29,34 @@ jobs: displayName: 'Installing Fortran' - template: build_and_deploy.yml + +- job: Windows + + pool: + vmImage: 'windows-latest' + + strategy: + maxParallel: 4 + matrix: + Python35: + python.version: '3.5' + + Python36: + python.version: '3.6' + + Python37: + python.version: '3.7' + + Python38: + python.version: '3.8' + + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version)' + displayName: 'Setting Python version' + + - script: choco install mingw + displayName: 'Installing Fortran' + + - template: build_and_deploy.yml From 8917c1bc436b3344145a8dbbaea8215233d2cc80 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 20 Jul 2020 14:21:40 -0500 Subject: [PATCH 27/27] Revert "Add windows? :eyes:" This reverts commit f4f49c98d3fc47aa233c9ab394c34cc959eb82d6. --- README.md | 4 +++- build_tools/azure/jobs.yml | 31 ------------------------------- 2 files changed, 3 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 41ba55d..8f81b77 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ [![codecov](https://codecov.io/gh/tgsmith61591/skoot/branch/master/graph/badge.svg)](https://codecov.io/gh/tgsmith61591/skoot) -![Supported versions](https://img.shields.io/badge/python-3.5+-blue.svg) +![Supported versions](https://img.shields.io/badge/python-3.5-blue.svg) +![Supported versions](https://img.shields.io/badge/python-3.6-blue.svg) +![Supported versions](https://img.shields.io/badge/python-3.7-blue.svg) [![CircleCI](https://circleci.com/gh/tgsmith61591/skoot.svg?style=svg)](https://circleci.com/gh/tgsmith61591/skoot) [![Build Status](https://dev.azure.com/tgsmith61591gh/skoot/_apis/build/status/tgsmith61591.skoot?branchName=master)](https://dev.azure.com/tgsmith61591gh/skoot/_build/latest?definitionId=1&branchName=master) diff --git a/build_tools/azure/jobs.yml b/build_tools/azure/jobs.yml index 9b35a3d..43cd1f8 100644 --- a/build_tools/azure/jobs.yml +++ b/build_tools/azure/jobs.yml @@ -29,34 +29,3 @@ jobs: displayName: 'Installing Fortran' - template: build_and_deploy.yml - -- job: Windows - - pool: - vmImage: 'windows-latest' - - strategy: - maxParallel: 4 - matrix: - Python35: - python.version: '3.5' - - Python36: - python.version: '3.6' - - Python37: - python.version: '3.7' - - Python38: - python.version: '3.8' - - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version)' - displayName: 'Setting Python version' - - - script: choco install mingw - displayName: 'Installing Fortran' - - - template: build_and_deploy.yml