Skip to content

Commit

Permalink
Fix for latest deps for woodwork 0.28.0 (#2644)
Browse files Browse the repository at this point in the history
* Fix changed spelling in date to holiday primitive

* Fix serialization tests by updating moto import

* update trans primitive test to work - still unsure how it ever worked before?

* Revert "update trans primitive test to work - still unsure how it ever worked before?"

This reverts commit 57845f3.

* bump min moto to avoid min dep failure

* pin pandas below 2.2.0 to avoid failures

* numpy upgrade fix

* Update miniconda hash to fix windows test

* remove support for python 3.8

* Change date to holiday check to avoid labour spelling change

* Update min deps files

* Match deps to woodwork 0.28.0 and raise min woodwork

* fix spark numpy dep

* Add release notes

* go back to ww 0.23.0

* remove docs from dev pip install

* install premium primitives from its main branch

* stop supporting woodwork 0.28.0 for spark

* Attempt to fix release notes formatting

* Revert "remove support for python 3.8"

This reverts commit 8618d61.

* update release notes after adding py 3.8 back in

* fix minimum test reqs

* revert some unnecessary req changes

* update min reqs to match

* Reupgrade boto3 bc conflict with moto
  • Loading branch information
tamargrey authored Feb 8, 2024
1 parent 3681bbb commit 3ff4732
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests_with_latest_deps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
$ProgressPreference = "silentlyContinue"
Invoke-WebRequest -Uri $Uri -Outfile "$env:USERPROFILE/$File"
$hashFromFile = Get-FileHash "$env:USERPROFILE/$File" -Algorithm SHA256
$hashFromUrl = "e841557c27d438b96e09126a2b0656154a3a34bdb9d87d59ceaea67515713515"
$hashFromUrl = "c9b32faa9262828702334b16bcb5b53556e630d54e5127f5c36c7ba7ed43179a"
if ($hashFromFile.Hash -ne "$hashFromUrl") {
Throw "$File hashes do not match"
}
Expand Down
3 changes: 2 additions & 1 deletion docs/source/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ Future Release
==============
* Enhancements
* Fixes
* Fix dependency issues (:pr:`2644`)
* Changes
* Documentation Changes
* Testing Changes
* Update tests for compatibility with new versions of ``holidays`` (:pr:`2636`)
* Update ruff to 0.1.6 and use ruff linter/formatter (:pr:`2639`)

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


v1.28.0 Oct 26, 2023
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def time_since_previous_false(datetime_col, bool_col):
df.loc[not_false_indices, "last_false_datetime"] = np.nan
df["last_false_datetime"] = df["last_false_datetime"].fillna(method="ffill")
total_seconds = (
df["datetime"] - df["last_false_datetime"]
pd.to_datetime(df["datetime"]).subtract(df["last_false_datetime"])
).dt.total_seconds()
return pd.Series(total_seconds)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def time_since_previous_true(datetime_col, bool_col):
df.loc[~not_false_indices, "last_true_datetime"] = np.nan
df["last_true_datetime"] = df["last_true_datetime"].fillna(method="ffill")
total_seconds = (
df["datetime"] - df["last_true_datetime"]
pd.to_datetime(df["datetime"]).subtract(df["last_true_datetime"])
).dt.total_seconds()
return pd.Series(total_seconds)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ class DateToHoliday(TransformPrimitive):
>>> date_to_holiday_canada = DateToHoliday(country='Canada')
>>> dates = pd.Series([datetime(2016, 7, 1),
... datetime(2016, 11, 15),
... datetime(2018, 9, 3)])
... datetime(2018, 12, 25)])
>>> date_to_holiday_canada(dates).tolist()
['Canada Day', nan, 'Labour Day']
['Canada Day', nan, 'Christmas Day']
"""

name = "date_to_holiday"
Expand Down
4 changes: 2 additions & 2 deletions featuretools/tests/entityset_tests/test_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@ def test_to_pickle_id_none(tmp_path):
@pytest.fixture
def s3_client():
_environ = os.environ.copy()
from moto import mock_s3
from moto import mock_aws

with mock_s3():
with mock_aws():
s3 = boto3.resource("s3")
yield s3
os.environ.clear()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,9 @@ def serialize_name_unchanged(original):
@pytest.fixture
def s3_client():
_environ = os.environ.copy()
from moto import mock_s3
from moto import mock_aws

with mock_s3():
with mock_aws():
s3 = boto3.resource("s3")
yield s3
os.environ.clear()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ def test_valid_country():
[
"2016-07-01",
"2016-11-11",
"2018-09-03",
"2018-12-25",
],
).astype("datetime64[ns]")
answer = ["Canada Day", np.nan, "Labour Day"]
answer = ["Canada Day", np.nan, "Christmas Day"]
given_answer = date_to_holiday(case).astype("str")
np.testing.assert_array_equal(given_answer, answer)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
boto3==1.17.46
boto3==1.34.32
cloudpickle==1.5.0
composeml==0.8.0
graphviz==0.8.4
holidays==0.13
moto[all]==3.0.7
moto[all]==5.0.0
numpy==1.21.0
packaging==20.0
pandas==1.5.0
Expand Down
15 changes: 7 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ requires-python = ">=3.8,<4"
dependencies = [
"cloudpickle >= 1.5.0",
"holidays >= 0.17",
"numpy >= 1.21.0",
"numpy >= 1.21.0, <2.0.0",
"packaging >= 20.0",
"pandas >= 1.5.0",
"pandas >= 1.5.0,<2.2.0",
"psutil >= 5.6.6",
"scipy >= 1.10.0",
"tqdm >= 4.32.0",
Expand All @@ -51,10 +51,10 @@ dependencies = [

[project.optional-dependencies]
test = [
"boto3 >= 1.17.46",
"boto3 >= 1.34.32",
"composeml >= 0.8.0",
"graphviz >= 0.8.4",
"moto[all] >= 3.0.7",
"moto[all] >= 5.0.0",
"pip >= 21.3.1",
"pyarrow >= 3.0.0,<13.0.0",
"pympler >= 0.8",
Expand All @@ -71,7 +71,7 @@ dask = [
"woodwork[dask] >= 0.23.0",
]
spark = [
"woodwork[spark] >= 0.23.0",
"woodwork[spark] >= 0.23.0, <0.28.0",
"pyspark >= 3.2.2",
"numpy < 1.24.0",
"pandas < 2.0.0",
Expand All @@ -84,7 +84,7 @@ tsfresh = [
"featuretools-tsfresh-primitives >= 1.0.0",
]
premium = [
"premium_primitives >= 0.0.2",
"premium_primitives @ git+https://github.com/alteryx/premium_primitives.git@main",
]
autonormalize = [
"autonormalize >= 2.0.1",
Expand All @@ -107,10 +107,9 @@ docs = [
"sphinx-inline-tabs == 2022.1.2b11",
"sphinx-copybutton == 0.5.0",
"myst-parser == 0.18.0",
"premium_primitives >= 0.0.2",
"autonormalize >= 2.0.1",
"click >= 7.0.0",
"featuretools[sklearn,dask,spark,test]",
"featuretools[sklearn,dask,spark,test,premium]",
]
dev = [
"ruff >= 0.1.6",
Expand Down

0 comments on commit 3ff4732

Please sign in to comment.