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

v4 #201

Merged
merged 19 commits into from
Jun 22, 2022
Merged

v4 #201

merged 19 commits into from
Jun 22, 2022

Commits on Jun 3, 2022

  1. Change sessions to tz-naive, times to UTC

    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`.
    maread99 committed Jun 3, 2022
    Configuration menu
    Copy the full SHA
    c4a04c6 View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2022

  1. Fix warnings

    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.
    maread99 committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    ac00772 View commit details
    Browse the repository at this point in the history
  2. Update ExchangeCalendar.trading_index

    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`
    maread99 committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    76ea41c View commit details
    Browse the repository at this point in the history
  3. Revise ExchangeCalendar.*_window methods

    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`.
    maread99 committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    bfc0955 View commit details
    Browse the repository at this point in the history
  4. Revise prev next minute session methods

    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.
    maread99 committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    68c012b View commit details
    Browse the repository at this point in the history
  5. Make props bound* and default* class methods

    Changes `ExchangeCalendar` bound* and default* properties to class
    methods.
    
    To support change also makes
    `PrecomputedExchangeCalendar.precomputed_holidays` a class method.
    maread99 committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    fa7f7f6 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2bb512c View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2022

  1. Rename method parameters and schedule columns

    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`
    maread99 committed Jun 7, 2022
    Configuration menu
    Copy the full SHA
    33f505e View commit details
    Browse the repository at this point in the history
  2. Remove deprecated methods and add new deprecations

    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`
    maread99 committed Jun 7, 2022
    Configuration menu
    Copy the full SHA
    aa5dca9 View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2022

  1. Advance min python version to 3.8

    - 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`
    maread99 committed Jun 8, 2022
    Configuration menu
    Copy the full SHA
    c3f8583 View commit details
    Browse the repository at this point in the history
  2. Bump actions/cache from 3.0.3 to 3.0.4

    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>
    dependabot[bot] authored and maread99 committed Jun 8, 2022
    Configuration menu
    Copy the full SHA
    f09d0eb View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2022

  1. Lint exchange_calendar.py

    Selective linting of exchange_calendar.py (using mypy and pylint).
    
    Also, adds a mypy config section to setup.cfg.
    maread99 committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    fbb651c View commit details
    Browse the repository at this point in the history
  2. Change default side to "left"

    Changes default calendar side to "left" for all calendars (from "right"
    for 24h calendars and "both" for all others).
    maread99 committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    19358b2 View commit details
    Browse the repository at this point in the history
  3. Bump actions/setup-python from 3 to 4

    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>
    dependabot[bot] authored and maread99 committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    a937777 View commit details
    Browse the repository at this point in the history

Commits on Jun 10, 2022

  1. Update doc for 4.0

    Updates README and tutorials for v4.0.
    
    Also:
    - adds `changes_renamed.md`.
    - renames parameters of `minutes_in_range`.
    maread99 committed Jun 10, 2022
    Configuration menu
    Copy the full SHA
    0b39ce3 View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2022

  1. Configuration menu
    Copy the full SHA
    8a0dc61 View commit details
    Browse the repository at this point in the history
  2. Update requirements and workflows

    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`
    maread99 committed Jun 20, 2022
    Configuration menu
    Copy the full SHA
    6a4ca37 View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2022

  1. Add ExchangeCalendar.is_open_at_time

    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.
    maread99 committed Jun 22, 2022
    Configuration menu
    Copy the full SHA
    27de122 View commit details
    Browse the repository at this point in the history
  2. Remove v4 branch from workflow

    Also updates README link to anticipated 4.0 disucssion address.
    maread99 committed Jun 22, 2022
    Configuration menu
    Copy the full SHA
    d222fb2 View commit details
    Browse the repository at this point in the history