Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
Drops `pytz`, adds `tzdata`, to `pyproject.toml`.

Pins latest deps on requirements files.
  • Loading branch information
maread99 committed Sep 7, 2023
1 parent 4ca2677 commit dbe6bd0
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run: |
i=0
while [ $i -lt 12 ] && [ "${{ github.ref_name }}" != $(pip index versions -i https://test.pypi.org/simple --pre exchange_calendars | cut -d'(' -f2 | cut -d')' -f1 | sed 1q) ];\
do echo "waiting for package to appear in test index, i is $i, sleeping 5s"; sleep 5s; ((i++)); echo "next i is $i"; done
do echo "waiting for package to appear in test index, i is $i"; echo "sleeping 5s"; sleep 5s; echo "woken up", ((i++)); echo "next i is $i"; done
pip install --index-url https://test.pypi.org/simple exchange_calendars==${{ github.ref_name }} --no-deps
pip install -r etc/requirements.txt
python -c 'import exchange_calendars;print(exchange_calendars.__version__)'
Expand All @@ -54,6 +54,6 @@ jobs:
run: |
i=0
while [ $i -lt 12 ] && [ "${{ github.ref_name }}" != $(pip index versions -i https://pypi.org/simple --pre exchange_calendars | cut -d'(' -f2 | cut -d')' -f1 | sed 1q) ];\
do echo "waiting for package to appear in index, i is $i, sleeping 5s"; sleep 5s; ((i++)); echo "next i is $i"; done
do echo "waiting for package to appear in index, i is $i"; echo "sleeping 5s"; sleep 5s; echo "woken up", ((i++)); echo "next i is $i"; done
pip install --index-url https://pypi.org/simple exchange_calendars==${{ github.ref_name }}
python -c 'import exchange_calendars;print(exchange_calendars.__version__)'
10 changes: 5 additions & 5 deletions etc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ python-dateutil==2.8.2
# via
# exchange-calendars (pyproject.toml)
# pandas
pytz==2023.3
# via
# exchange-calendars (pyproject.toml)
# pandas
pytz==2023.3.post1
# via pandas
six==1.16.0
# via python-dateutil
toolz==0.12.0
# via exchange-calendars (pyproject.toml)
tzdata==2023.3
# via pandas
# via
# exchange-calendars (pyproject.toml)
# pandas
14 changes: 7 additions & 7 deletions etc/requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
attrs==23.1.0
# via hypothesis
build==1.0.0
build==1.0.3
# via pip-tools
click==8.1.7
# via pip-tools
Expand All @@ -23,7 +23,7 @@ execnet==2.0.2
# via pytest-xdist
flake8==6.1.0
# via exchange-calendars (pyproject.toml)
hypothesis==6.84.0
hypothesis==6.84.2
# via exchange-calendars (pyproject.toml)
importlib-metadata==6.8.0
# via build
Expand Down Expand Up @@ -70,10 +70,8 @@ python-dateutil==2.8.2
# via
# exchange-calendars (pyproject.toml)
# pandas
pytz==2023.3
# via
# exchange-calendars (pyproject.toml)
# pandas
pytz==2023.3.post1
# via pandas
six==1.16.0
# via python-dateutil
sortedcontainers==2.4.0
Expand All @@ -87,7 +85,9 @@ tomli==2.0.1
toolz==0.12.0
# via exchange-calendars (pyproject.toml)
tzdata==2023.3
# via pandas
# via
# exchange-calendars (pyproject.toml)
# pandas
wheel==0.41.2
# via pip-tools
zipp==3.16.2
Expand Down
12 changes: 6 additions & 6 deletions etc/requirements_minpandas.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
attrs==23.1.0
# via hypothesis
build==1.0.0
build==1.0.3
# via pip-tools
click==8.1.7
# via pip-tools
Expand All @@ -27,7 +27,7 @@ execnet==2.0.2
# via pytest-xdist
flake8==6.1.0
# via exchange-calendars (pyproject.toml)
hypothesis==6.84.0
hypothesis==6.84.2
# via exchange-calendars (pyproject.toml)
importlib-metadata==6.8.0
# via build
Expand Down Expand Up @@ -74,10 +74,8 @@ python-dateutil==2.8.2
# via
# exchange-calendars (pyproject.toml)
# pandas
pytz==2023.3
# via
# exchange-calendars (pyproject.toml)
# pandas
pytz==2023.3.post1
# via pandas
six==1.16.0
# via python-dateutil
sortedcontainers==2.4.0
Expand All @@ -90,6 +88,8 @@ tomli==2.0.1
# pytest
toolz==0.12.0
# via exchange-calendars (pyproject.toml)
tzdata==2023.3
# via exchange-calendars (pyproject.toml)
wheel==0.41.2
# via pip-tools
zipp==3.16.2
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ dependencies = [
"pandas>=1.5",
"pyluach",
"python-dateutil",
"pytz",
"toolz",
"tzdata",
"korean_lunar_calendar",
]
dynamic = ["version"]
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool:pytest]
addopts = -v --doctest-modules --durations=15
addopts = -v --doctest-modules --durations=15 --capture=no

testpaths =
tests
Expand Down
23 changes: 23 additions & 0 deletions tests/test_exchange_calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -3914,6 +3914,29 @@ def tst_intervals_index(closed: str, overlaps: bool):
expected = pd.IntervalIndex.from_arrays(
left_index, right_index, closed
)
# TODO DELETE DEBUG LINES, START...
if rtrn.left.tz is not expected.left.tz:
filename = cal.name.replace("/", "-").lower() + ".csv"
path = pathlib.Path(__file__).parent.joinpath(
"resources", filename
)
df_csv = pd.read_csv(
path,
index_col=0,
parse_dates=[0, 1, 2, 3, 4],
)
raise ValueError(
f"\n{df_csv.index.tz=}\n{type(df_csv.index.tz)=}"
f"\n{df_csv.open.dt.tz=}\n{type(df_csv.open.dt.tz)=}"
f"\n{closed=}"
f"\n{indexes[0].tz=}\n{type(indexes[0].tz)=}"
f"\n{ends.dt.tz=}\n{type(ends.dt.tz)=}"
f"\n{left_index.tz=}\n{type(left_index.tz)=}"
f"\n{right_index.tz=}\n{type(right_index.tz)=}"
f"\n{rtrn.left.tz=}\n{type(rtrn.left.tz)=}"
f"\n{expected.left.tz=}\n{type(expected.left.tz)=}"
)
# TODO DELETE DEBUG LINES, ...END
pd.testing.assert_index_equal(expected, rtrn)
else:
with pytest.raises(errors.IntervalsOverlapError):
Expand Down

0 comments on commit dbe6bd0

Please sign in to comment.