From a866f2f0025188297849fa8df37b3f85176a2a0c Mon Sep 17 00:00:00 2001 From: Nate Parsons <4307001+thehomebrewnerd@users.noreply.github.com> Date: Fri, 23 Feb 2024 12:16:56 -0600 Subject: [PATCH] Drop python 3.8 support and use trusted publisher release process (#22) * drop python 3.8 support * update release notes * update release.yaml * use ft main for code cov * fix coverage --- .github/workflows/install_test.yaml | 2 +- .github/workflows/release.yaml | 29 +++++++++++-------- .../unit_tests_with_latest_deps.yaml | 6 ++-- pyproject.toml | 5 ++-- release_notes.rst | 5 ++-- 5 files changed, 26 insertions(+), 21 deletions(-) diff --git a/.github/workflows/install_test.yaml b/.github/workflows/install_test.yaml index 6195fb5..4d8a4a8 100644 --- a/.github/workflows/install_test.yaml +++ b/.github/workflows/install_test.yaml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - python_version: ["3.8", "3.9", "3.10", "3.11"] + python_version: ["3.9", "3.10", "3.11"] os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index aa6717c..3b224c7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,19 +1,24 @@ -name: Release on: release: types: [published] + +name: Release jobs: - pypi: + pypi-publish: name: PyPI Release runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Remove docs before release - run: rm -rf docs/ - - name: PyPI Upload - uses: alteryx/gh-action-pypi-upload@v2 - env: - PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} - PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - TEST_PYPI_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }} - TEST_PYPI_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }} + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - name: Install deps + run: | + python -m pip install --quiet --upgrade pip + python -m pip install --quiet --upgrade build + python -m pip install --quiet --upgrade setuptools + - name: Remove build artifacts and docs + run: | + rm -rf .eggs/ dist/ build/ docs/ + - name: Build distribution + run: python -m build + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file diff --git a/.github/workflows/unit_tests_with_latest_deps.yaml b/.github/workflows/unit_tests_with_latest_deps.yaml index 8b1f1c7..b7011bc 100644 --- a/.github/workflows/unit_tests_with_latest_deps.yaml +++ b/.github/workflows/unit_tests_with_latest_deps.yaml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python_version: ["3.8", "3.9", "3.10", "3.11"] + python_version: ["3.9", "3.10", "3.11"] featuretools_version: ["main", "release"] steps: - name: Checkout repository @@ -40,14 +40,14 @@ jobs: name: Install latest release of Featuretools run: | python -m pip install --force-reinstall featuretools - - if: ${{ matrix.python_version == 3.8 && matrix.featuretools_version == 'release'}} + - if: ${{ matrix.python_version == 3.9 && matrix.featuretools_version == 'main'}} name: Generate coverage args run: echo "coverage_args=--cov=premium_primitives --cov-config=../pyproject.toml --cov-report=xml:../coverage.xml" >> $GITHUB_ENV - name: Run unit tests run: | cd unpacked_sdist python -m pytest -n auto -s -vv premium_primitives/ ${{ env.coverage_args }} - - if: ${{ matrix.python_version == 3.8 && matrix.featuretools_version == 'release'}} + - if: ${{ matrix.python_version == 3.9 && matrix.featuretools_version == 'main'}} name: Upload coverage to Codecov uses: codecov/codecov-action@v3 with: diff --git a/pyproject.toml b/pyproject.toml index 2a33f75..1a9065b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,6 @@ classifiers = [ "Topic :: Scientific/Engineering", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -27,11 +26,11 @@ maintainers = [ ] keywords = ["feature engineering", "data science", "machine learning"] license = {text = "BSD 3-clause"} -requires-python = ">=3.8,<4" +requires-python = ">=3.9,<4" dependencies = [ "numpy >= 1.21.0", "pandas >= 1.5.0", - "featuretools >= 1.5.0, <2.0.0", + "featuretools >= 1.5.0", "woodwork >= 0.8.1", "nltk >= 3.4.5", "scikit-learn >= 0.20.0", diff --git a/release_notes.rst b/release_notes.rst index 0a4b764..212fb61 100644 --- a/release_notes.rst +++ b/release_notes.rst @@ -3,9 +3,10 @@ Release Notes ------------- -v0.0.3 Feb 7, 2024 -================== +Future Release +============== * Remove pandas version upper bound restriction and add Python 3.11 tests (:pr:`16`) + * Remove support for Python 3.8 (:pr:`22`) v0.0.2 May 9, 2023 ==================