Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update release.yaml to use trusted publisher approach #269

Merged
merged 6 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/entry_point_with_latest_deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python_version: ["3.8", "3.9", "3.10"]
python_version: ["3.9", "3.10", "3.11"]
featuretools_version: ["Release", "Main"]
steps:
- name: Set up python ${{ matrix.python_version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/install_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python_version: ["3.8", "3.9", "3.10"]
python_version: ["3.9", "3.10", "3.11"]
exclude:
- python_version: "3.10"
os: macos-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/latest_dependency_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: '3.8.x'
python-version: '3.11.x'
- name: Install pip and virtualenv
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/optional_primitive_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python_version: ["3.8", "3.9", "3.10"]
python_version: ["3.9", "3.10", "3.11"]
featuretools_version: ["Release", "Main"]
steps:
- name: Set up python ${{ matrix.python_version }}
Expand Down
26 changes: 16 additions & 10 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,23 @@ jobs:
pypi:
name: PyPI Release
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Remove docs before release
run: rm -rf docs/
- name: PyPI Upload
uses: FeatureLabs/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
- name: Run workflow to create feedstock pull request
run: |
gh workflow run create_feedstock_pr.yaml --repo "alteryx/nlp_primitives" -f version=${{ github.event.release.tag_name }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/unit_tests_with_latest_deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python_version: ["3.8", "3.9", "3.10"]
python_version: ["3.9", "3.10", "3.11"]
featuretools_version: ["release", "main"]
steps:
- name: Set up python ${{ matrix.python_version }}
Expand All @@ -40,15 +40,15 @@ jobs:
run: |
make installdeps-complete
make installdeps-test
- if: ${{ matrix.python_version != 3.8 || matrix.featuretools_version != 'main' }}
- if: ${{ matrix.python_version != 3.9 || matrix.featuretools_version != 'main' }}
name: Run unit tests with no code coverage
run: |
make test
- if: ${{ matrix.python_version == 3.8 && matrix.featuretools_version == 'main' }}
- if: ${{ matrix.python_version == 3.9 && matrix.featuretools_version == 'main' }}
name: Run unit tests with code coverage
run: |
pytest nlp_primitives/ --cov=nlp_primitives/ --cov-config=pyproject.toml --cov-report=xml:coverage.xml
- if: ${{ matrix.python_version == 3.8 && matrix.featuretools_version == 'main' }}
- if: ${{ matrix.python_version == 3.9 && matrix.featuretools_version == 'main' }}
name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
Expand Down
15 changes: 2 additions & 13 deletions nlp_primitives/tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
# -*- coding: utf-8 -*-
try:
# python 3
from inspect import signature
except ImportError:
# python 2
from funcsigs import signature
from inspect import signature

import featuretools as ft
import pytest
Expand Down Expand Up @@ -51,12 +45,7 @@
assert PRIMITIVES.name.eq(self.primitive.name).any()

def test_arg_init(self):
try:
primitive_ = self.primitive()
except TypeError:
# primitive requires an argument
# ex. CountString needs an input string to search
return
primitive_ = self.primitive()

Check warning on line 48 in nlp_primitives/tests/test_utils.py

View check run for this annotation

Codecov / codecov/patch

nlp_primitives/tests/test_utils.py#L48

Added line #L48 was not covered by tests
# determine the optional arguments in the __init__
init_params = signature(self.primitive.__init__)
for name, parameter in init_params.parameters.items():
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ 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",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
Expand All @@ -34,7 +34,7 @@ maintainers = [
]
keywords = ["feature engineering", "data science", "machine learning", "natural language processing"]
license = {text = "BSD 3-clause"}
requires-python = ">=3.8,<4"
requires-python = ">=3.9,<4"
dependencies = [
"numpy >= 1.17.5",
"pandas >= 1.3.0",
Expand Down Expand Up @@ -67,7 +67,7 @@ complete = [
"tensorflow >= 1.14.0; sys_platform!='darwin' or platform_machine!='arm64'",
"tensorflow-metal >= 0.4.0; sys_platform=='darwin' and platform_machine=='arm64'",
"tensorflow-macos >= 2.8.0; sys_platform=='darwin' and platform_machine=='arm64'",
"tensorflow_hub >= 0.4.0",
"tensorflow_hub >= 0.4.0, < 0.16.0",
]

[project.entry-points."featuretools_plugin"]
Expand Down
14 changes: 14 additions & 0 deletions release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@
Changelog
=========

Future Release
==============
.. warning::
This release of nlp-primitives will not support Python 3.8

* Fixes
* Changes
* Remove support for Python 3.8 and add support for 3.11 (:pr:`269`)
* Testing Changes
* Update ``release.yaml`` to use trusted publisher for PyPI releases (:pr:`269`)

Thanks to the following people for contributing to this release:
:user:`thehomebrewnerd`

v2.11.0 Apr 13, 2023
====================
* Fixes
Expand Down
Loading