Skip to content

Commit

Permalink
Updates dependencies
Browse files Browse the repository at this point in the history
Preemptively constrains numpy dependency to <2 in anticipation of
breaking changes with the upcoming major release 2.0.  (make changes
to accommodate numpy 2.0 post its release, keep `exchange_calendars`
working in the meantme).

Removes `python-dateutil` from pyproject.toml dependencies (library
is a dependency of `pandas`, not a direct dependency of
`exchange_calendars`).

Also, fixes #355 by removing superfluous kwarg from call in `ecal` to
`pd.date_range`.
  • Loading branch information
maread99 committed Jan 31, 2024
1 parent 9f0f500 commit 8aaa9df
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: |
pytest etc/bench.py --benchmark-json output.json
- name: Download previous benchmark data
uses: actions/cache@v3.3.3
uses: actions/cache@v4.0.0
with:
path: ./cache
key: ${{ runner.os }}-benchmark
Expand Down
17 changes: 6 additions & 11 deletions etc/ecal
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#!/usr/bin/env python
from __future__ import print_function

import io
import sys

import pandas as pd


months = [
"January",
"February",
Expand All @@ -25,24 +29,15 @@ def error(msg):


def _render_month(calendar, year, month, print_year):
import pandas as pd

if sys.version_info[0] == 2:
import StringIO

out = StringIO.StringIO()
else:
import io

out = io.StringIO()
out = io.StringIO()

start = "{year}-{month}".format(year=year, month=month)
if month == 12:
end = "{year}-{month}".format(year=year + 1, month=1)
else:
end = "{year}-{month}".format(year=year, month=month + 1)

days = pd.date_range(start, end, closed="left", tz='utc')
days = pd.date_range(start, end, tz="utc")

title = months[month - 1]
if print_year:
Expand Down
12 changes: 5 additions & 7 deletions etc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,21 @@
#
korean-lunar-calendar==0.3.1
# via exchange_calendars (pyproject.toml)
numpy==1.26.2
numpy==1.26.3
# via
# exchange_calendars (pyproject.toml)
# pandas
pandas==2.1.4
pandas==2.2.0
# via exchange_calendars (pyproject.toml)
pyluach==2.2.0
# via exchange_calendars (pyproject.toml)
python-dateutil==2.8.2
# via
# exchange_calendars (pyproject.toml)
# pandas
pytz==2023.3.post1
# via pandas
pytz==2023.4
# via pandas
six==1.16.0
# via python-dateutil
toolz==0.12.0
toolz==0.12.1
# via exchange_calendars (pyproject.toml)
tzdata==2023.4
# via
Expand Down
22 changes: 10 additions & 12 deletions etc/requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ exceptiongroup==1.2.0
# pytest
execnet==2.0.2
# via pytest-xdist
flake8==6.1.0
flake8==7.0.0
# via exchange_calendars (pyproject.toml)
hypothesis==6.92.2
hypothesis==6.97.3
# via exchange_calendars (pyproject.toml)
importlib-metadata==7.0.1
# via build
Expand All @@ -33,31 +33,31 @@ korean-lunar-calendar==0.3.1
# via exchange_calendars (pyproject.toml)
mccabe==0.7.0
# via flake8
numpy==1.26.2
numpy==1.26.3
# via
# exchange_calendars (pyproject.toml)
# pandas
packaging==23.2
# via
# build
# pytest
pandas==2.1.4
pandas==2.2.0
# via exchange_calendars (pyproject.toml)
pip-tools==7.3.0
# via exchange_calendars (pyproject.toml)
pluggy==1.3.0
pluggy==1.4.0
# via pytest
py-cpuinfo==9.0.0
# via pytest-benchmark
pycodestyle==2.11.1
# via flake8
pyflakes==3.1.0
pyflakes==3.2.0
# via flake8
pyluach==2.2.0
# via exchange_calendars (pyproject.toml)
pyproject-hooks==1.0.0
# via build
pytest==7.4.4
pytest==8.0.0
# via
# exchange_calendars (pyproject.toml)
# pytest-benchmark
Expand All @@ -67,10 +67,8 @@ pytest-benchmark==4.0.0
pytest-xdist==3.5.0
# via exchange_calendars (pyproject.toml)
python-dateutil==2.8.2
# via
# exchange_calendars (pyproject.toml)
# pandas
pytz==2023.3.post1
# via pandas
pytz==2023.4
# via pandas
six==1.16.0
# via python-dateutil
Expand All @@ -82,7 +80,7 @@ tomli==2.0.1
# pip-tools
# pyproject-hooks
# pytest
toolz==0.12.0
toolz==0.12.1
# via exchange_calendars (pyproject.toml)
tzdata==2023.4
# via
Expand Down
21 changes: 10 additions & 11 deletions etc/requirements_minpandas.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# To upgrade with pandas==1.5 fixed run:
#
# pip-compile --upgrade --upgrade-package pandas==1.5 --extra=dev --output-file=etc/requirements_minpandas.txt pyproject.toml

#
attrs==23.2.0
# via hypothesis
Expand All @@ -25,9 +26,9 @@ exceptiongroup==1.2.0
# pytest
execnet==2.0.2
# via pytest-xdist
flake8==6.1.0
flake8==7.0.0
# via exchange_calendars (pyproject.toml)
hypothesis==6.92.2
hypothesis==6.97.3
# via exchange_calendars (pyproject.toml)
importlib-metadata==7.0.1
# via build
Expand All @@ -37,7 +38,7 @@ korean-lunar-calendar==0.3.1
# via exchange_calendars (pyproject.toml)
mccabe==0.7.0
# via flake8
numpy==1.26.2
numpy==1.26.3
# via
# exchange_calendars (pyproject.toml)
# pandas
Expand All @@ -49,19 +50,19 @@ pandas==1.5.0
# via exchange_calendars (pyproject.toml)
pip-tools==7.3.0
# via exchange_calendars (pyproject.toml)
pluggy==1.3.0
pluggy==1.4.0
# via pytest
py-cpuinfo==9.0.0
# via pytest-benchmark
pycodestyle==2.11.1
# via flake8
pyflakes==3.1.0
pyflakes==3.2.0
# via flake8
pyluach==2.2.0
# via exchange_calendars (pyproject.toml)
pyproject-hooks==1.0.0
# via build
pytest==7.4.4
pytest==8.0.0
# via
# exchange_calendars (pyproject.toml)
# pytest-benchmark
Expand All @@ -71,10 +72,8 @@ pytest-benchmark==4.0.0
pytest-xdist==3.5.0
# via exchange_calendars (pyproject.toml)
python-dateutil==2.8.2
# via
# exchange_calendars (pyproject.toml)
# pandas
pytz==2023.3.post1
# via pandas
pytz==2023.4
# via pandas
six==1.16.0
# via python-dateutil
Expand All @@ -86,7 +85,7 @@ tomli==2.0.1
# pip-tools
# pyproject-hooks
# pytest
toolz==0.12.0
toolz==0.12.1
# via exchange_calendars (pyproject.toml)
tzdata==2023.4
# via exchange_calendars (pyproject.toml)
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ classifiers = [
"Operating System :: OS Independent",
]
dependencies = [
"numpy",
"numpy<2",
"pandas>=1.5",
"pyluach",
"python-dateutil",
"toolz",
"tzdata",
"korean_lunar_calendar",
Expand Down

0 comments on commit 8aaa9df

Please sign in to comment.