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 dependencies / update test dates #442

Merged
merged 1 commit into from
Jan 14, 2025
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
4 changes: 2 additions & 2 deletions etc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
korean-lunar-calendar==0.3.1
# via exchange_calendars (pyproject.toml)
numpy==2.1.2
numpy==2.2.1
# via
# exchange_calendars (pyproject.toml)
# pandas
Expand All @@ -18,7 +18,7 @@ python-dateutil==2.9.0.post0
# via pandas
pytz==2024.2
# via pandas
six==1.16.0
six==1.17.0
# via python-dateutil
toolz==1.0.0
# via exchange_calendars (pyproject.toml)
Expand Down
20 changes: 10 additions & 10 deletions etc/requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
#
# pip-compile --extra=dev --output-file=etc/requirements_dev.txt pyproject.toml
#
attrs==24.2.0
attrs==24.3.0
# via hypothesis
build==1.2.2.post1
# via pip-tools
click==8.1.7
click==8.1.8
# via pip-tools
colorama==0.4.6
# via
Expand All @@ -23,19 +23,19 @@ execnet==2.1.1
# via pytest-xdist
flake8==7.1.1
# via exchange_calendars (pyproject.toml)
hypothesis==6.115.3
hypothesis==6.123.17
# via exchange_calendars (pyproject.toml)
iniconfig==2.0.0
# via pytest
korean-lunar-calendar==0.3.1
# via exchange_calendars (pyproject.toml)
mccabe==0.7.0
# via flake8
numpy==2.1.2
numpy==2.2.1
# via
# exchange_calendars (pyproject.toml)
# pandas
packaging==24.1
packaging==24.2
# via
# build
# pytest
Expand All @@ -57,24 +57,24 @@ pyproject-hooks==1.2.0
# via
# build
# pip-tools
pytest==8.3.3
pytest==8.3.4
# via
# exchange_calendars (pyproject.toml)
# pytest-benchmark
# pytest-xdist
pytest-benchmark==4.0.0
pytest-benchmark==5.1.0
# via exchange_calendars (pyproject.toml)
pytest-xdist==3.6.1
# via exchange_calendars (pyproject.toml)
python-dateutil==2.9.0.post0
# via pandas
pytz==2024.2
# via pandas
six==1.16.0
six==1.17.0
# via python-dateutil
sortedcontainers==2.4.0
# via hypothesis
tomli==2.0.2
tomli==2.2.1
# via
# build
# pip-tools
Expand All @@ -85,7 +85,7 @@ tzdata==2024.2
# via
# exchange_calendars (pyproject.toml)
# pandas
wheel==0.44.0
wheel==0.45.1
# via pip-tools

# The following packages are considered to be unsafe in a requirements file:
Expand Down
18 changes: 9 additions & 9 deletions etc/requirements_minpandas.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
#
# pip-compile --upgrade --upgrade-package pandas==1.5 --upgrade-package numpy==1.26.4 --extra=dev --output-file=etc/requirements_minpandas.txt pyproject.toml

attrs==24.2.0
attrs==24.3.0
# via hypothesis
build==1.2.2.post1
# via pip-tools
click==8.1.7
click==8.1.8
# via pip-tools
colorama==0.4.6
# via
Expand All @@ -27,7 +27,7 @@ execnet==2.1.1
# via pytest-xdist
flake8==7.1.1
# via exchange_calendars (pyproject.toml)
hypothesis==6.115.3
hypothesis==6.123.17
# via exchange_calendars (pyproject.toml)
iniconfig==2.0.0
# via pytest
Expand All @@ -39,7 +39,7 @@ numpy==1.26.4
# via
# exchange_calendars (pyproject.toml)
# pandas
packaging==24.1
packaging==24.2
# via
# build
# pytest
Expand All @@ -61,24 +61,24 @@ pyproject-hooks==1.2.0
# via
# build
# pip-tools
pytest==8.3.3
pytest==8.3.4
# via
# exchange_calendars (pyproject.toml)
# pytest-benchmark
# pytest-xdist
pytest-benchmark==4.0.0
pytest-benchmark==5.1.0
# via exchange_calendars (pyproject.toml)
pytest-xdist==3.6.1
# via exchange_calendars (pyproject.toml)
python-dateutil==2.9.0.post0
# via pandas
pytz==2024.2
# via pandas
six==1.16.0
six==1.17.0
# via python-dateutil
sortedcontainers==2.4.0
# via hypothesis
tomli==2.0.2
tomli==2.2.1
# via
# build
# pip-tools
Expand All @@ -87,7 +87,7 @@ toolz==1.0.0
# via exchange_calendars (pyproject.toml)
tzdata==2024.2
# via exchange_calendars (pyproject.toml)
wheel==0.44.0
wheel==0.45.1
# via pip-tools

# The following packages are considered to be unsafe in a requirements file:
Expand Down
10 changes: 3 additions & 7 deletions tests/test_calendar_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,19 +454,15 @@ def calendars_with_answers(

@staticmethod
@st.composite
def _st_times_different(
draw, ans
) -> st.SearchStrategy[tuple[pd.Timestamp, pd.Timestamp]]:
def _st_times_different(draw, ans) -> tuple[pd.Timestamp, pd.Timestamp]:
"""SearchStrategy for two consecutive sessions with different times."""
session = draw(st.sampled_from(ans.sessions_next_time_different.to_list()))
next_session = ans.get_next_session(session)
return (session, next_session)

@staticmethod
@st.composite
def _st_start_end(
draw, ans
) -> st.SearchStrategy[tuple[pd.Timestamp, pd.Timestamp]]:
def _st_start_end(draw, ans) -> tuple[pd.Timestamp, pd.Timestamp]:
"""SearchStrategy for start and end dates in calendar range and
a calendar specific maximum distance."""
first = ans.first_session
Expand Down Expand Up @@ -502,7 +498,7 @@ def st_periods(
draw,
minimum: pd.Timedelta = pd.Timedelta(1, "min"),
maximum: pd.Timedelta = pd.Timedelta(1, "D") - pd.Timedelta(1, "min"),
) -> st.SearchStrategy[pd.Timedelta]:
) -> pd.Timedelta:
"""SearchStrategy for a period between a `minimum` and `maximum`."""
period = draw(st.integers(minimum.seconds // 60, maximum.seconds // 60))
return pd.Timedelta(period, "min")
Expand Down
1 change: 1 addition & 0 deletions tests/test_xbom_calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ def regular_holidays_sample(self):
"2017-10-02",
"2017-10-20",
"2017-12-25",
"2025-05-01",
]
9 changes: 7 additions & 2 deletions tests/test_xkrx_calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ def regular_holidays_sample(self):
# Buddha's birthday was on 27th May (Saturday),
# so the next monday becomes alternative holiday
"2023-05-29",
# Temporary Public Holiday (Added to create a 6-day long holiday period)
"2025-01-27",
]

@pytest.fixture
Expand All @@ -103,6 +101,13 @@ def non_holidays_sample(self):
"2012-10-09", # Hangeul_day, last year before observance commenced.
]

@pytest.fixture
def adhoc_holidays_sample(self):
yield [
# Temporary Public Holiday (Added to create a 6-day long holiday period)
"2025-01-27",
]

# TODO Issue #94
def test_late_opens(self, default_calendar, late_opens):
# overrides base to mark as xfail
Expand Down
9 changes: 0 additions & 9 deletions tests/test_xses_calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,5 @@ def regular_holidays_sample(self):
"2017-12-25",
"2023-12-25",
"2025-01-01",
"2025-01-29",
"2025-01-30",
"2025-03-31",
"2025-04-18",
"2025-05-01",
"2025-05-12",
"2025-06-07",
"2025-08-09",
"2025-10-20",
"2025-12-25",
]
Loading