forked from quantopian/trading_calendars
-
Notifications
You must be signed in to change notification settings - Fork 135
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
v4 #201
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also - Adds typing to, adds doc to and renames parameters of: - some private `ExchangeCalendar` initialization methods. - some private `XKRXExchangeCalendar` initialization methods. - `pandas_utils.days_at_time`.
Fixes warnings: - pandas `union_many` deprecated. - `pd.Series.append` deprecated. - writting to a copy of an array (pandas). Also: - adds `indexes_union` function to `pandas_utils`. - adds doctests in `pandas_utils` to test suite.
Fixes bug that included close (wrongly) when `force` was True, `intervals` was False and closed was `left` or `neither`. Revises test. Revises so that `start` and `end` can be passed as either date or minute. Adds `TestTradingIndex.test_start_end_times`. Updates tutorial `trading_index.ipynb`. Also: - adds following functions to `calendar_helpers` and associated test(s) to `test_calendar_helpers`: - `is_date` - `to_utc` - `parse_date_or_minute`
Revises following `ExchangeCalendar` methods, and associated tests, so that `count` parameter reflects window length (previously window length was `count` + 1): - `sessions_window`. - `minutes_window`. Also changes methods' parameter names: - `start_dt` renamed `minute`. - `session_label` renamed `session`.
Changes error raised when prev or next minute or session is out-of-bounds. Changed from `ValueError` to `Requested*OutOfBounds`. Simplifies minute_to_*_session methods.
Changes `ExchangeCalendar` bound* and default* properties to class methods. To support change also makes `PrecomputedExchangeCalendar.precomputed_holidays` a class method.
Renames following `ExchangeCalendar.schedule` columns: - 'market_open' renamed 'open' - 'market_close' renamed 'close' Renames parameters of following `ExchangeCalendar` methods (as #61): - `session_open` - `session_close` - `session_break_start` - `session_break_end` - `sessions_in_range` - `is_session` - `is_open_on_minute` - `previous_open` - `pervious_close` - `next_open` - `next_close` - `previous_minute` - `next_minute`
Deprecates following `ExchangeCalendar` methods: - `sessions_opens` (use .opens[start, end] instead). - `sessions_closes` (use .closes[start, end] instead). Removes following `ExchangeCalendar` methods deprecated in v3.4: - `execution_minutes_for_session` - `execution_minutes_for_sessions_in_range` - `execution_time_from_open` - `execution_time_from_close` - `previous_session_label` - `next_session_label` - `date_to_session_label` - `minute_to_session_label` - `open_and_close_for_session` - `break_start_and_end_for_session` - `minutes_for_session` - `session_opens_in_range` - `session_closes_in_range` - `minutes_for_sessions_in_range` - `minutes_count_for_sessions_in_range` - `session_distance` - `minute_index_to_session_labels` - `all_sessions` - `all_minutes` - `all_minutes_nanos` - `first_trading_minute` - `last_trading_minute` - `first_trading_session` - `last_trading_session` - `has_breaks` - `market_opens_nanos` - `market_closes_nanos` - `market_break_starts_nanos` - `market_break_ends_nanos`
- Replaces`@lazyval` with `@functools.cached_property` - Replaces `@functools.lru_cache` with `@functools.cached_property` where lru_cache was decorating a 'would-be' property. - Introduces Literal type annotation. - Removes 3.7 from test and build workflow. - Sets test and build workflow to run on 3.8 and 3.10 (min and max python versions supported). Also: - changes tests with pytest.skip() to pass silently rather than skip loudly if test not relevant to calendar. - Removes following redundant errors: - `ScheduleFunctionWithoutCalendar` - `ScheduleFunctionInvalidCalendar`
Bumps [actions/cache](https://github.com/actions/cache) from 3.0.3 to 3.0.4. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](actions/cache@v3.0.3...v3.0.4) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Selective linting of exchange_calendar.py (using mypy and pylint). Also, adds a mypy config section to setup.cfg.
Changes default calendar side to "left" for all calendars (from "right" for 24h calendars and "both" for all others).
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3 to 4. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@v3...v4) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Updates README and tutorials for v4.0. Also: - adds `changes_renamed.md`. - renames parameters of `minutes_in_range`.
Updates workflows: - to accommodate changes to requirements files. - on main workflow moves caching of dependencies to setup-python action. Removes from etc: - `requirements.in` - `requirements_dev.in` - `requirements_locked.txt` - `requirements_locked_old.txt` Adds following files generated from pip-compile looking at setup.cfg: - `requirements.txt` - `requirements_dev.txt`
Adds new `is_open_at_time` calendar method, adds tests and adds example to calendar_methods.ipynb Also - corrects `minutes.ipynb` text that identifies which session break bounds are considered as trading minutes for a given side.
Also updates README link to anticipated 4.0 disucssion address.
This was referenced Jun 23, 2022
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Merges v4 branch into master.
See commits for details (also, PRs to v4 branch are between #179 and #199 inclusive).