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

fix mid autumn & national day #413 #289

Closed
wants to merge 394 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
394 commits
Select commit Hold shift + click to select a range
5e01a88
Bump actions/setup-python from 2.2.2 to 2.3.0
dependabot[bot] Nov 18, 2021
42d4de1
Bump actions/cache from 2.1.6 to 2.1.7
dependabot[bot] Nov 23, 2021
5cceaad
Merge pull request #115 from gerrymanoim/dependabot/github_actions/ac…
gerrymanoim Nov 30, 2021
f019553
Merge pull request #114 from gerrymanoim/dependabot/github_actions/ac…
gerrymanoim Nov 30, 2021
25b6a38
Bump actions/setup-python from 2.3.0 to 2.3.1
dependabot[bot] Nov 30, 2021
98c7590
Merge pull request #117 from gerrymanoim/dependabot/github_actions/ac…
dependabot[bot] Nov 30, 2021
f822948
XMAD Christmas Eve regular holiday from 2021 (#116)
philiptromans Dec 1, 2021
a0de968
Added XHKG typhoon on 2021-10-13
philtromans Dec 3, 2021
562bbaf
Merge pull request #118 from philiptromans/xhkg-typhoon-2021-10-13
gerrymanoim Dec 3, 2021
0ca53ab
XSHG: Added extra day of Spring holiday on 2020-01-31
philtromans Dec 3, 2021
71e39aa
Merge pull request #119 from philiptromans/xshg-extra-spring-holiday-…
gerrymanoim Dec 3, 2021
bf2cc3a
Updated XMAD calendar for New Years Eve 2021 holiday
philtromans Dec 6, 2021
6f7e482
Merge pull request #120 from philiptromans/xmad-new-years-eve-holiday…
gerrymanoim Dec 6, 2021
b163c64
Made Good Friday always a holiday in XCBF
philtromans Dec 6, 2021
31c0842
Add `ExchangeCalendar.minutes_distance`
maread99 Dec 7, 2021
d1f4271
Merge pull request #121 from philiptromans/xcbf-good-friday-always-a-…
gerrymanoim Dec 9, 2021
b4a1e85
Merge pull request #122 from gerrymanoim/post-3.4
gerrymanoim Dec 9, 2021
d960ac7
Updated XSES for 2022.
philtromans Dec 10, 2021
ff6a062
Fixed test
philtromans Dec 10, 2021
ec5fb8f
Merge pull request #123 from philiptromans/xses-2022
gerrymanoim Dec 10, 2021
b3d4927
chore: add xkrx holidays in 2022 and 2021 temporary holidays
Dec 23, 2021
e390bad
test: add some of holidays in 2022
Dec 23, 2021
7401ef1
Merge pull request #125 from chado13/master
gerrymanoim Dec 29, 2021
5d45223
Added 2022-01-31 as a public holiday in XSHG.
philtromans Jan 1, 2022
a728ee5
Missing comma
philtromans Jan 1, 2022
83ff303
flake8
philtromans Jan 1, 2022
db39b37
Also update XBOM to make tests pass.
philtromans Jan 1, 2022
fe2ac0f
Fix XBOM test.
philtromans Jan 1, 2022
45e20c3
Merge pull request #127 from philiptromans/xshg-2022-01-31
gerrymanoim Jan 4, 2022
76406fb
Update AIXK calendar accoriding to 2022 trading calendar
Jan 5, 2022
8ea61de
Merge pull request #131 from pbabics/feature/aixk-calendar-update
gerrymanoim Jan 5, 2022
732a751
Update README.md
maread99 Jan 10, 2022
467f434
Merge pull request #132 from gerrymanoim/readme
gerrymanoim Jan 10, 2022
973c77f
Add US Juneteenth holiday to XNYS calendar starting in 2022
prerak-proof Jan 14, 2022
bc313f7
Merge pull request #133 from prerak-proof/master
gerrymanoim Jan 14, 2022
f732acc
Fix XTKS 2022 holidays
beppe712 Jan 17, 2022
4e60ce2
Merge pull request #135 from AlpacaDB/exchange-calendars-head
gerrymanoim Jan 20, 2022
e8c1789
Add "2022-01-27" as a holiday in XTAI
wec7 Jan 27, 2022
099aecf
remove "2022-01-27" from the schedules
wec7 Jan 27, 2022
c146a98
Move regular Spring bank holiday from 2022-05-30 to 2022-06-02 and ad…
jenskeiner Feb 1, 2022
834a203
Bump actions/setup-python from 2.3.1 to 2.3.2
dependabot[bot] Feb 7, 2022
f7a798e
Merge pull request #144 from gerrymanoim/dependabot/github_actions/ac…
gerrymanoim Feb 7, 2022
1f4cf8a
Merge pull request #141 from jenskeiner/xlon-updates
gerrymanoim Feb 7, 2022
c53cf3a
Merge pull request #140 from wec7/patch-1
gerrymanoim Feb 7, 2022
8cef16d
Added public holidays before 1999 in XSHG.
qiuwei Feb 15, 2022
e5b2874
Merge pull request #147 from qiuwei/add_holidays_before_1999_XSHG
gerrymanoim Feb 16, 2022
c09cc2c
bump pandas and fix resulting test failures
gerrymanoim Feb 15, 2022
6b1c79c
add py10 to the testing ci
gerrymanoim Feb 16, 2022
595c254
Added missing XKRX holidays (2022-03-09 and 2022-06-01)
philtromans Feb 21, 2022
b901ad6
Bump actions/checkout from 2.4.0 to 3
dependabot[bot] Mar 2, 2022
07fd503
Add missing Qingming and Labor Day holidays in XSHG.
philtromans Mar 7, 2022
22c84ba
Bump actions/setup-python from 2.3.2 to 3
dependabot[bot] Mar 2, 2022
6d29471
Add special open for BVMF on Ash Wednesday
pbabics Mar 2, 2022
f4a40ee
Attempt to fix Korean lunar calendar bug.
philtromans Mar 1, 2022
77436b9
Add functionality to `trading_index`
maread99 Feb 3, 2022
194d4c4
Update expected 4.0 release date in README
maread99 Mar 21, 2022
6a6eb98
Bump actions/cache from 2.1.7 to 3.0.1
dependabot[bot] Mar 31, 2022
79e1051
Fix calendar BVMF for 2022-01-25
Apr 7, 2022
3cd22d0
Added 2022 exceptions for Whit Monday and Day of German Unity.
philtromans May 9, 2022
a1eefeb
Bump actions/cache from 3.0.1 to 3.0.2
dependabot[bot] Apr 12, 2022
5974594
Update BVMF - removing state and municipal holidays
May 17, 2022
156dc8a
add lunch break for XSHG
codeterm May 18, 2022
0b22c8b
Add lunch break for XTKS
wec7 May 20, 2022
6f3e15b
Fixed typo
philtromans May 23, 2022
712e310
Added Juneteenth as a public holiday in XCBF.
philtromans May 23, 2022
0951033
Update readme (#176)
maread99 May 26, 2022
2576be2
Add doc and types + move 'special offsets' imp to XKRX
maread99 Jun 1, 2022
7f14065
Bump actions/cache from 3.0.2 to 3.0.3
dependabot[bot] Jun 1, 2022
0ff619b
Change sessions to tz-naive, times to UTC
maread99 Jun 1, 2022
d78242f
Fix warnings
maread99 Jun 1, 2022
c08f0af
Update `ExchangeCalendar.trading_index`
maread99 Jun 3, 2022
1bbf329
Revise `ExchangeCalendar.*_window` methods
maread99 Jun 3, 2022
7063463
Revise prev next minute session methods
maread99 Jun 3, 2022
55cec97
Make props `bound*` and `default*` class methods
maread99 Jun 6, 2022
c6f9dea
Removed Whit Monday and Day of German Unity holidays in 2022.
philtromans Jun 6, 2022
5dfce66
Rename method parameters and schedule columns
maread99 Jun 6, 2022
5abdd7e
Remove deprecated methods and add new deprecations
maread99 Jun 6, 2022
bcd9424
Advance min python version to 3.8
maread99 Jun 7, 2022
50c0977
Bump actions/cache from 3.0.3 to 3.0.4
dependabot[bot] Jun 8, 2022
e50313a
Lint exchange_calendar.py
maread99 Jun 7, 2022
ac5c852
Change default side to "left"
maread99 Jun 7, 2022
d95268d
Bump actions/setup-python from 3 to 4
dependabot[bot] Jun 9, 2022
65edf37
Update doc for 4.0
maread99 Jun 9, 2022
5f85ab4
Move from setup.py to setup.cfg
maread99 Jun 10, 2022
fd5334d
Update requirements and workflows
maread99 Jun 10, 2022
4e6e5dd
Add `ExchangeCalendar.is_open_at_time`
maread99 Jun 21, 2022
965bac8
Remove v4 branch from workflow
maread99 Jun 22, 2022
687f065
Add subpackages to build
maread99 Jun 22, 2022
635f97b
Update README with 4.0.1 advices
maread99 Jun 22, 2022
0d1770b
Add package data to setup.cfg
maread99 Jun 23, 2022
2dcbb9f
Change from versioneer to setuptools-scm
maread99 Jun 23, 2022
7e59179
Update dependencies
maread99 Jun 24, 2022
d32e7d4
Rename bounds class methods
maread99 Jun 27, 2022
00a4098
Update release.yml
maread99 Jun 27, 2022
74e5fae
Update resolving of __init__.__version__
maread99 Jul 1, 2022
bf7fb6a
Add New Zealand new pub. hol. Matariki Day
ValueRaider Jul 4, 2022
81dbb3f
Add New Zealand new pub. hol. Matariki Day - FIX YEARS
ValueRaider Jul 4, 2022
0fe7fab
Add New Zealand new pub. hol. Matariki Day - test
ValueRaider Jul 4, 2022
93d7fcc
Update release workflow
maread99 Jul 5, 2022
bf6573c
Bump actions/cache from 3.0.4 to 3.0.5
dependabot[bot] Jul 13, 2022
8741bb9
Use timezone naive date
knoguchi Jul 30, 2022
3f811f2
Bump actions/cache from 3.0.5 to 3.0.6
dependabot[bot] Aug 8, 2022
0542526
Bump actions/cache from 3.0.6 to 3.0.7
dependabot[bot] Aug 12, 2022
4a18cd5
Made 2022-09-12 a holiday in XHKG.
philtromans Aug 15, 2022
99f9f80
XSHG: Added 2022-09-12 as a market holiday (mid-autumn festival).
philtromans Aug 15, 2022
0de0483
Remove timezone if reading start/end dates from existing file.
philtromans Aug 15, 2022
bede85b
Bump actions/cache from 3.0.7 to 3.0.8
dependabot[bot] Aug 23, 2022
17b66b1
XSHG: Add 2022-10-06 and 2022-10-07 as market holidays (#228)
philiptromans Sep 13, 2022
d632895
Update dependencies
maread99 Sep 5, 2022
37f6fec
add Queen Elizabeth II funeral day
monkeyusage Sep 12, 2022
6243f7e
XASX: Added National Day of Mourning for Her Majesty the Queen (2022-…
philtromans Sep 14, 2022
fa95ab8
Update release workflow
maread99 Sep 18, 2022
612d64e
Revert (partially) release workflow
maread99 Sep 19, 2022
5339070
Disable install check from release workflow
maread99 Sep 19, 2022
d43d83b
XNZE: Added National Day of Mourning for Her Majesty the Queen (2022-…
ValueRaider Sep 29, 2022
e311511
XNZE: Added National Day of Mourning for Her Majesty the Queen (2022-…
ValueRaider Sep 29, 2022
e9cd5c2
Fix flake8 lint problems
ValueRaider Sep 29, 2022
ce6021e
XNE: Correcting QEII holiday, 22nd->26th
ValueRaider Sep 29, 2022
568cbeb
XNZE: QEII holiday - updating tests csv
ValueRaider Sep 29, 2022
baa1adb
Update release workflow (#237)
maread99 Oct 4, 2022
0a91f31
Bump actions/cache from 3.0.8 to 3.0.10
dependabot[bot] Oct 4, 2022
e1f9237
Update dependencies
maread99 Oct 2, 2022
fa555bb
Bump actions/cache from 3.0.10 to 3.0.11
dependabot[bot] Oct 14, 2022
e888120
Add support for Sunday closing earlier
ValueRaider Oct 4, 2022
bbe79a7
Add resiliency
ValueRaider Oct 4, 2022
f44c93a
Fix XTAE Sunday close time
ValueRaider Oct 4, 2022
d86d2e7
Fix flake8 lint problems
ValueRaider Oct 4, 2022
707fbe9
Fix XTAE tests
ValueRaider Oct 4, 2022
ad65452
XTAE: Fix 'Memorial Day' when shifted by Sabbat
ValueRaider Oct 18, 2022
f495ba2
XTAE: Updates test csv
ValueRaider Oct 18, 2022
7f7415b
XTAE: Fix flake8 lint problems
ValueRaider Oct 18, 2022
11a4168
Update AIXK (#255)
romanzdk Oct 25, 2022
0c46b5f
Complete implementation of weekdays early close
maread99 Oct 21, 2022
77c487b
XTAE: Add election day 2022-11-01
ValueRaider Nov 2, 2022
4d2fe11
Add alignment options to `ExchangeCalendar.trading_index` (#256)
ValueRaider Nov 15, 2022
88d859d
Update `trading_index` tutorial
maread99 Nov 15, 2022
3f20687
Update dependencies
maread99 Nov 15, 2022
52314c0
Revise `_TradingIndex` tests
maread99 Nov 15, 2022
e284988
Update README
maread99 Nov 15, 2022
e976713
XSES: Add dates for 2023 (#264)
philiptromans Dec 1, 2022
dd6b462
Remove First president day from AIXK (#265)
romanzdk Dec 6, 2022
878233e
XTAE: Add Sukkot interim days (#268)
ValueRaider Dec 15, 2022
9e8549a
Bump actions/cache from 3.0.11 to 3.2.1
dependabot[bot] Dec 26, 2022
6c9153a
Update dependencies
maread99 Dec 27, 2022
74711c9
Bump actions/cache from 3.2.1 to 3.2.2
dependabot[bot] Dec 28, 2022
3c0bef1
Updated with 2023 Calendar dates for XBOM
srinivasakumar-a Jan 1, 2023
5fbed74
Updated end_bound(self): with 2023-12-31
srinivasakumar-a Jan 11, 2023
3af1d95
Updated Documentation with "forward through 2023"
srinivasakumar-a Jan 11, 2023
10293d6
Fix XTKS 2023 holidays
beppe712 Dec 26, 2022
61bf292
Bump actions/cache from 3.2.2 to 3.2.3
dependabot[bot] Jan 9, 2023
d36b10b
XASX: 'last trading days' @ xmas 2022 are full-days not half
ValueRaider Jan 16, 2023
6db6a52
Add 2023 adjusted holidays for XTAI
jxwng Jan 25, 2023
c134d4f
Modify the test resources for XTAI
jxwng Jan 25, 2023
386cf29
Add missing Sukkoth interim days to fix #286.
jenskeiner Feb 10, 2023
4a9de7b
#283: Add ad-hoc holidays for trading suspension in the aftermath of …
Feb 10, 2023
7717700
Bump actions/cache from 3.2.3 to 3.2.5
dependabot[bot] Feb 10, 2023
6edd4f6
Bump actions/cache from 3.2.5 to 3.3.1
dependabot[bot] Mar 13, 2023
6bd6e8f
add King Charles III coronation day
mixilchenko Mar 21, 2023
a9d8c52
Added extra days for Labor day 2023
philtromans Apr 3, 2023
5a611c9
Revise for pandas 2.0
maread99 Apr 8, 2023
1768d2b
Update dependencies
maread99 Apr 8, 2023
47d9fbb
Update ecal.py - pandas 2.0.0 data_range closed was removed
paologibertini Apr 21, 2023
cc336d5
Correct XKLS Holidays for 2023 (#306)
tan-yong-sheng Apr 22, 2023
6a094f2
XWBO: Made Whitmonday a trading day in 2023.
philtromans May 2, 2023
1a4c2b1
Add calendar for Saudi Arabia XASU exchange (#310)
oldfishdk May 19, 2023
285029b
XKRX: Holiday in lieu for Buddha's birthday
philtromans May 22, 2023
b4bd1f4
XSHG: Add 2023-06-23 as part of Dragon Boat Festival.
philtromans May 24, 2023
7e9e5d6
Update release workflow
maread99 May 25, 2023
670d524
Update dependencies
maread99 May 25, 2023
912d92c
Update `orthodox_easter`
maread99 May 25, 2023
0059640
Add XNAS calendar alias
mzjp2 Jul 24, 2023
6056f60
XBOM: Bakri Eid changed to 2023-06-29
ericngqrt Jun 29, 2023
0205404
XSES: Add 2023-09-01 (Polling Day) as a public holiday
philtromans Aug 24, 2023
6d29fe9
Advance min and max Python versions
maread99 Aug 26, 2023
b7baf77
Remove `setup.py`
maread99 Aug 26, 2023
7db915e
Remove deprecated methods
maread99 Aug 26, 2023
c166724
Update dependencies
maread99 Aug 26, 2023
be17c0c
Remove min pandas version
maread99 Aug 26, 2023
aea3725
Fix `TestTradingIndex.test_indices_fuzz`
maread99 Aug 26, 2023
a5b3158
Reinstate minimum pandas version
maread99 Aug 29, 2023
79c5253
Fix holiday observance
maread99 Sep 4, 2023
ee41859
Update dependencies
maread99 Sep 4, 2023
85f7ed7
Accommodate dependency updates
maread99 Sep 4, 2023
543227c
Bump actions/checkout from 3 to 4
dependabot[bot] Sep 5, 2023
47532ca
Migrate from `pytz` to `zoneinfo`
maread99 Sep 7, 2023
7c93949
Update dependencies
maread99 Sep 7, 2023
97716a0
Update `test.exchange_calendar.get_csv`
maread99 Sep 7, 2023
08f332f
XSHG: Add 2023-10-06 as a holiday (it's the last working day of the "…
philtromans Sep 7, 2023
498539a
Bump actions/cache from 3.3.1 to 3.3.2
dependabot[bot] Sep 8, 2023
0a091e1
Fix typo in gh release workflow
maread99 Sep 9, 2023
d42ace5
Update tutorials
maread99 Sep 9, 2023
5f9ad30
XKRX: Add extra holiday on 2023-10-02
philtromans Sep 25, 2023
a900da8
Exclude exchange_calendars/_version.py from flake8.
philtromans Sep 25, 2023
7442f2a
Rename Asia/Calcutta to Asia/Kolkata
EdwardBetts Oct 3, 2023
74b3181
Update dependencies
maread99 Oct 15, 2023
0af746f
Add Singapore public holidays as initial draft of 2024 XSES trading c…
philtromans Dec 4, 2023
b7df4c0
Fix bound
philtromans Dec 4, 2023
be46b1e
XTKS: Add 2024 Vernal and Autumnal equinoxes
Quashqwart Nov 28, 2023
4546248
Bump actions/setup-python from 4 to 5
dependabot[bot] Dec 7, 2023
5ebd155
HKEx stop trading on 20230717 because TYPHOON SIGNAL NO.8
vincentwyshan Dec 25, 2023
f1f1135
Add 2024 holidays to XBOM
shenyingge Dec 26, 2023
73b3780
Update XBOM tests
shenyingge Dec 27, 2023
bfbfb2a
Update release workflow
maread99 Jan 2, 2024
af448ed
Update dependencies
maread99 Jan 2, 2024
714c8c5
Additional tests for XTKS 2024
beppe712 Dec 15, 2023
e624acc
Bump actions/cache from 3.3.2 to 3.3.3
dependabot[bot] Jan 12, 2024
9f0f500
XSHG update 2024 holidays (#351)
vincentwyshan Jan 13, 2024
8aaa9df
Updates dependencies
maread99 Jan 31, 2024
597c9fb
Fix pandas deprecation warnings
maread99 Jan 31, 2024
ec5bea7
Fix ecal
maread99 Jan 31, 2024
a33afb5
Bump release-drafter/release-drafter from 5 to 6
dependabot[bot] Feb 2, 2024
33403bb
Add 2024-02-09 Chinese New Year to XSHG
herebebeasties Feb 12, 2024
8ad1fe5
Update README.md
da4089 Feb 11, 2024
3ce6817
XCSE Prayers day has been abolished in Denmark
herebebeasties Feb 12, 2024
270ca1e
Fix missing assertion
herebebeasties Feb 12, 2024
8d06f54
Fix end-date-only TZ logic in holidays.py
herebebeasties Feb 12, 2024
da62a20
XMOS: updated holidays from 2020 (#352)
iMikeBug Feb 13, 2024
50f34e5
Update release workflow
maread99 Feb 13, 2024
4677bc5
XASX early closes fix for Dec 2022
herebebeasties Feb 15, 2024
9f0f724
Update dependencies
maread99 Feb 15, 2024
114a0f9
Added exception in test for XMOS calendar
Feb 27, 2024
310d06e
Update XMOS calendar
Feb 28, 2024
604024b
Update xmos csv file
Feb 28, 2024
f7940e3
Fixed error
Feb 28, 2024
5a53d8a
Fixed code for flake8
Feb 28, 2024
7651212
Bump actions/cache from 4.0.0 to 4.0.1
dependabot[bot] Mar 1, 2024
5071226
Bump actions/cache from 4.0.1 to 4.0.2
dependabot[bot] Mar 20, 2024
59e5412
feat: added new national holiday to BVMF calendar
rafaelbo Apr 1, 2024
5606450
Fixes #366 - add parliamentary election day 2024 to XKRX
herebebeasties Feb 12, 2024
8f93a3c
XDUB: Add May bank holiday post-2021
mzjp2 May 6, 2024
00fe9f6
Add EEX
romanzdk May 21, 2024
588ae13
Fix mic to match ISO + market schedule
romanzdk May 22, 2024
9febf92
XSAU: add 2024 holidays + small refactor
ValueRaider Jun 9, 2024
75d7868
XBOM add missing 2024 holiday
Mr-MayankThakur Jun 13, 2024
7d6a48d
BUG: Replace standard time CET (a fixed offset versus UTC) with the c…
jenskeiner Jun 14, 2024
664b902
BUG: Replace dubious time zone name NZ with the correct time zone ide…
jenskeiner Jun 14, 2024
c962c93
MAINT: Typo police.
jenskeiner Jun 14, 2024
7fb0169
Add exchanges Dusseldorf & Hamburg; shift Frankfurt early close
ValueRaider Jun 1, 2024
72851b3
Ensure ad-hoc holidays are proper Pandas timestamps.
jenskeiner Jun 20, 2024
fc01bc9
Doc update / tidy
maread99 Jun 24, 2024
70c299a
Support numpy 2.0
maread99 Jun 24, 2024
d3cac74
Update deps
maread99 Jun 24, 2024
7ffce89
Support pandas 3.0 dev
maread99 Jun 24, 2024
5874d31
Update minpandas requirements
maread99 Jun 24, 2024
3683b0d
Bump supported python upper limit to 3.12
maread99 Jun 24, 2024
091117b
Avoid using legacy time zone names in tests
EdwardBetts Jul 23, 2024
12ca349
typhoon_day_update
kakko-jia Jul 24, 2024
f2acf09
Add HKEx Typhoon no.8 no trading day
vincentwyshan Sep 6, 2024
2249939
test case cover 2024 typhoon day
vincentwyshan Sep 7, 2024
0251046
fix mid autumn & national day
ruralscenery Sep 18, 2024
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 .devcontainer/base.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ENV PIPX_HOME=/usr/local/py-utils \
PIPX_BIN_DIR=/usr/local/py-utils/bin
ENV PATH=${PATH}:${PIPX_BIN_DIR}
COPY .devcontainer/library-scripts/python-debian.sh /tmp/library-scripts/
RUN bash /tmp/library-scripts/python-debian.sh "none" "/usr/local" "${PIPX_HOME}" "${USERNAME}" "false" \
RUN bash /tmp/library-scripts/python-debian.sh "none" "/usr/local" "${PIPX_HOME}" "${USERNAME}" "false" \
&& apt-get clean -y && rm -rf /tmp/library-scripts

# [Option] Install Node.js
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"context": "..",
"args": {
// Update 'VARIANT' to pick a Python version: 3, 3.6, 3.7, 3.8
"VARIANT": "3.8",
"VARIANT": "3.9",
// Options
"INSTALL_NODE": "false",
"NODE_VERSION": "lts/*"
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/library-scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

The contents of this folder will be automatically replaced with a file of the same name in the [vscode-dev-containers](https://github.com/microsoft/vscode-dev-containers) repository's [script-library folder](https://github.com/microsoft/vscode-dev-containers/tree/master/script-library) whenever the repository is packaged.

To retain your edits, move the file to a different location. You may also delete the files if they are not needed.
To retain your edits, move the file to a different location. You may also delete the files if they are not needed.
18 changes: 9 additions & 9 deletions .devcontainer/library-scripts/common-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ if [ "${PACKAGES_ALREADY_INSTALLED}" != "true" ]; then
if [[ ! -z $(apt-cache --names-only search ^libssl1.1$) ]]; then
PACKAGE_LIST="${PACKAGE_LIST} libssl1.1"
fi

# Install appropriate version of libssl1.0.x if available
LIBSSL=$(dpkg-query -f '${db:Status-Abbrev}\t${binary:Package}\n' -W 'libssl1\.0\.?' 2>&1 || echo '')
if [ "$(echo "$LIBSSL" | grep -o 'libssl1\.0\.[0-9]:' | uniq | sort | wc -l)" -eq 0 ]; then
Expand All @@ -121,7 +121,7 @@ if [ "${PACKAGES_ALREADY_INSTALLED}" != "true" ]; then

echo "Packages to verify are installed: ${PACKAGE_LIST}"
apt-get -y install --no-install-recommends ${PACKAGE_LIST} 2> >( grep -v 'debconf: delaying package configuration, since apt-utils is not installed' >&2 )

PACKAGES_ALREADY_INSTALLED="true"
fi

Expand All @@ -135,19 +135,19 @@ fi
# Ensure at least the en_US.UTF-8 UTF-8 locale is available.
# Common need for both applications and things like the agnoster ZSH theme.
if [ "${LOCALE_ALREADY_SET}" != "true" ] && ! grep -o -E '^\s*en_US.UTF-8\s+UTF-8' /etc/locale.gen > /dev/null; then
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen
LOCALE_ALREADY_SET="true"
fi

# Create or update a non-root user to match UID/GID.
if id -u ${USERNAME} > /dev/null 2>&1; then
# User exists, update if needed
if [ "${USER_GID}" != "automatic" ] && [ "$USER_GID" != "$(id -G $USERNAME)" ]; then
groupmod --gid $USER_GID $USERNAME
if [ "${USER_GID}" != "automatic" ] && [ "$USER_GID" != "$(id -G $USERNAME)" ]; then
groupmod --gid $USER_GID $USERNAME
usermod --gid $USER_GID $USERNAME
fi
if [ "${USER_UID}" != "automatic" ] && [ "$USER_UID" != "$(id -u $USERNAME)" ]; then
if [ "${USER_UID}" != "automatic" ] && [ "$USER_UID" != "$(id -u $USERNAME)" ]; then
usermod --uid $USER_UID $USERNAME
fi
else
Expand All @@ -157,7 +157,7 @@ else
else
groupadd --gid $USER_GID $USERNAME
fi
if [ "${USER_UID}" = "automatic" ]; then
if [ "${USER_UID}" = "automatic" ]; then
useradd -s /bin/bash --gid $USERNAME -m $USERNAME
else
useradd -s /bin/bash --uid $USER_UID --gid $USERNAME -m $USERNAME
Expand All @@ -172,7 +172,7 @@ if [ "${USERNAME}" != "root" ] && [ "${EXISTING_NON_ROOT_USER}" != "${USERNAME}"
fi

# ** Shell customization section **
if [ "${USERNAME}" = "root" ]; then
if [ "${USERNAME}" = "root" ]; then
USER_RC_PATH="/root"
else
USER_RC_PATH="/home/${USERNAME}"
Expand Down Expand Up @@ -286,7 +286,7 @@ install-oh-my()
echo "${CODESPACES_ZSH}" > ${OH_MY_INSTALL_DIR}/custom/themes/codespaces.zsh-theme
fi
# Shrink git while still enabling updates
cd ${OH_MY_INSTALL_DIR}
cd ${OH_MY_INSTALL_DIR}
git repack -a -d -f --depth=1 --window=1

if [ "${USERNAME}" != "root" ]; then
Expand Down
10 changes: 5 additions & 5 deletions .devcontainer/library-scripts/node-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ su ${USERNAME} -c "$(cat << EOF
# Do not update profile - we'll do this manually
export PROFILE=/dev/null

curl -so- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
curl -so- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
source ${NVM_DIR}/nvm.sh
if [ "${NODE_VERSION}" != "" ]; then
nvm alias default ${NODE_VERSION}
fi
nvm clear-cache
nvm clear-cache
EOF
)" 2>&1

Expand All @@ -113,7 +113,7 @@ fi
[ -s "\$NVM_DIR/nvm.sh" ] && . "\$NVM_DIR/nvm.sh"
[ -s "\$NVM_DIR/bash_completion" ] && . "\$NVM_DIR/bash_completion"
EOF
) | tee -a /etc/bash.bashrc >> /etc/zsh/zshrc
fi
) | tee -a /etc/bash.bashrc >> /etc/zsh/zshrc
fi

echo "Done!"
echo "Done!"
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
calendars/_version.py export-subst
exchange_calendars/_version.py export-subst
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "daily"
# reverted because dependabot can't ignore files
# - package-ecosystem: "pip" # See documentation for possible values
# directory: "/etc" # Location of package manifests
# schedule:
# interval: "daily"
22 changes: 22 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
**Workflow to add a new Exchange Calendar**

It's recommended that whilst working through the process reference be made to existing calendar and test classes.

- [ ] Add calendar module `exchange_calendars/exchange_calendar_{Exchange MIC}.py`. Module should contain a subclass of the abstract base class `ExchangeCalendar` (in `exchange_calendars/exchange_calendar.py`).
- [ ] Name subclass `{Exchange MIC}ExchangeCalendar`.
- [ ] Override methods and properties as required, being guided by ExchangeCalendar documentation and in-code comments. All abstract properties must be overriden.
- [ ] Include references / links for holidays and timings (either to class documentation or as comments).
- [ ] Import calendar class to `exchange_calendars/calendar_utils.py` and add class to `_default_calendar_factories`.
- [ ] Add calendar test module `tests/test_{Exchange MIC}_calendar.py` Module should contain a subclass of the test base class `ExchangeCalendarTestBase` (in `tests/test_exchange_calendars.py`).
- [ ] Name subclass `Test{Exchange MIC}Calendar`.
- [ ] Override fixtures as required, being guided by ExchangeCalendarTestBase documentation and in-code comments. The `calendar_cls` and `max_session_hours` fixtures must be overriden.
- [ ] Add a .csv file containing expected timings to `tests/resources/{Exchange MIC}.csv`. This file be generated by executing `python etc/make_exchange_calendar_test_csv.py {Exchange MIC}`. See script's documentation.
- [ ] Add new exchange to Calendars table of README.md.
- [ ] PR it!

**Workflow to modify an existing Exchange Calendar**

- [ ] Modify calendar class as required.
- [ ] Modify the test resources file (e.g `tests/resources/{Exchange MIC}.csv`), either manually or by executing `python etc/make_exchange_calendar_test_csv.py {Exchange MIC}`.
- [ ] Check if any of the fixtures in `tests/test_{Exchange MIC}_calendar.py` need updating to reflect your changes.
- [ ] Add references to any new/modified holidays in `exchange_calendars/exchange_calendar_{Exchange MIC}.py`.
3 changes: 3 additions & 0 deletions .github/release-drafter-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ categories:
- title: 'Bug Fixes'
labels:
- 'bug'
- title: 'Calendar Updates'
labels:
- 'calendar update'
- title: 'Deprecation'
labels:
- 'deprecation'
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ jobs:
name: Performance regression check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/setup-python@v2.2.1
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: "3.11"
- name: Install dependencies
run: |
pip install -e .[dev] -c etc/requirements_locked.txt
pip install -e .[dev] -c etc/requirements_dev.txt
- name: Run benchmark
run: |
pytest etc/bench.py --benchmark-json output.json
- name: Download previous benchmark data
uses: actions/cache@v2.1.3
uses: actions/cache@v4.0.2
with:
path: ./cache
key: ${{ runner.os }}-benchmark
Expand All @@ -38,4 +38,4 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
# Enable alert commit comment
comment-on-alert: true
alert-threshold: "110%"
alert-threshold: "150%"
40 changes: 12 additions & 28 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,42 +15,26 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [2.7, 3.5, 3.8, 3.9]
python-version: ["3.9", "3.12"]
include:
- python-version: 2.7
requirements_file: requirements_locked_old.txt
- python-version: 3.5
requirements_file: requirements_locked_old.txt
- python-version: 3.8
requirements_file: requirements_locked.txt
- python-version: 3.9
requirements_file: requirements_locked.txt
- python-version: "3.9"
requirements_file: requirements_dev.txt
- python-version: "3.12"
requirements_file: requirements_minpandas.txt

steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2.2.1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set Lockfile
run: |
echo "PIP_CONSTRAINT=etc/${{matrix.requirements_file}}" >> $GITHUB_ENV
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
uses: actions/[email protected]
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-py${{matrix.python-version}}-${{ hashFiles(env.PIP_CONSTRAINT) }}
restore-keys: |
${{ runner.os }}-pip-py${{matrix.python-version}}-
cache: 'pip'
cache-dependency-path: 'etc/${{matrix.requirements_file}}'
- name: Install dependencies
env:
PYTHONWARNINGS: ignore:DEPRECATION::pip._internal.cli.base_command
run: |
pip install -e .[dev]
python -m pip install --upgrade pip
pip install -r etc/${{matrix.requirements_file}}
pip install -e .
- name: Lint with flake8
run: |
flake8
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/master-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter-config.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57 changes: 38 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,56 @@ on:
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to TestPyPI
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- name: Set up Python 3.7
uses: actions/setup-python@v2.2.1
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: "3.11"

- name: Build sdist
run: python setup.py sdist
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build

- name: Build package
run: python -m build

- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
repository-url: https://test.pypi.org/legacy/
skip-existing: true

- name: Install from test and test running
- name: Install from testpypi and import
shell: bash
run: |
python -m pip install --upgrade pip
pip install --extra-index-url https://test.pypi.org/simple trading-calendars
python -c 'import trading_calendars;print(trading_calendars.__version__)'
pip uninstall -y trading-calendars
sleep 5
while [ "${{ 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, sleeping 5s"; sleep 5s; echo "woken up"; 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__)'

- name: Clean pip
run: |
pip uninstall -y exchange_calendars
pip cache purge

- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}

- name: Install and test running
- name: Install and import
shell: bash
run: |
pip install trading-calendars
python -c 'import trading_calendars;print(trading_calendars.__version__)'
sleep 5
while [ "${{ 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, sleeping 5s"; sleep 5s; echo "woken up"; done
pip install --index-url https://pypi.org/simple exchange_calendars==${{ github.ref_name }}
python -c 'import exchange_calendars;print(exchange_calendars.__version__)'
Loading
Loading