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

Add averages with time dimension removed #236

Merged
merged 25 commits into from
May 23, 2022
Merged

Commits on May 10, 2022

  1. Add mean() to TemporalAccessor class

    - Update docstrings of methods in `TemporalAccessor` class
    - Add `DEFAULT_SEASON_CONFIG` to reduce code duplication
    - Add comments for sections of code that is opaque
    - Rename `_averager()` to `_grouped_average()`
    tomvothecoder committed May 10, 2022
    Configuration menu
    Copy the full SHA
    56fa075 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1ed1906 View commit details
    Browse the repository at this point in the history

Commits on May 11, 2022

  1. Update docstrings

    tomvothecoder committed May 11, 2022
    Configuration menu
    Copy the full SHA
    6f8ad3e View commit details
    Browse the repository at this point in the history

Commits on May 12, 2022

  1. Refactor _validate_weights() to optimize performance

    - Remove `data_var` arg from `_get_weights()`
    - Update `_convert_df_to_dt()` to use regular dt objects for mean mode and non-monthly frequencies
    Add `TemporalAccessor` attribute `_dim_name`
    - Update docstrings
    tomvothecoder committed May 12, 2022
    Configuration menu
    Copy the full SHA
    360e370 View commit details
    Browse the repository at this point in the history
  2. Rename TemporalAccessor methods for consistency

    - Rename `.mean()` to `.average()`
    - Rename existing `.average()` to `.group_average()`
    - Update "mean" to "average" and "average" to "group_average in `Mode` type alias
    tomvothecoder committed May 12, 2022
    Configuration menu
    Copy the full SHA
    4a55ae8 View commit details
    Browse the repository at this point in the history
  3. Rename methods, attributes, and variables

    - Rename `_grouped_average()` to `_group_average()`
    - Rename `_time_grouped` to `_grouped_time`
    - Update docstring for `_convert_df_to_dt()`
    - Update conditional in `_convert_df_to_dt()`
    - Update `_validate_weights()` to get `num_groups` from `_get_weights()`instead of `self._time_grouped`
    - Rename classes in `test_temporal.py` to reflect private methods
    - Add placeholder tests in `test_temporal.py`
    tomvothecoder committed May 12, 2022
    Configuration menu
    Copy the full SHA
    f5c4883 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    79efc1c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    360ef93 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    cd309f9 View commit details
    Browse the repository at this point in the history
  7. Update comment

    tomvothecoder committed May 12, 2022
    Configuration menu
    Copy the full SHA
    eeb249a View commit details
    Browse the repository at this point in the history
  8. Update names of methods, comments, and docstrings

    - Update `_group_time_coords()` to `_label_time_coords()`
    - Update `_groupby_freq()` to `_group_data()`
    - Extract `_get_dt_components()` from `_group_time_coords()`
    - Rename `_process_season_dataframe()` to `_process_season_df()`
    - Move `_convert_df_to_dt()` further down the class
    - Rename `DATETIME_COMPONENTS` to `TIME_GROUPS`
    - Update season frequency in `TIME_GROUPS`
    - Add logic to `_get_dt_components()` to handle seasonal frequency
    tomvothecoder committed May 12, 2022
    Configuration menu
    Copy the full SHA
    8f59e0c View commit details
    Browse the repository at this point in the history

Commits on May 13, 2022

  1. Configuration menu
    Copy the full SHA
    ff55341 View commit details
    Browse the repository at this point in the history

Commits on May 16, 2022

  1. Update docstrings

    tomvothecoder committed May 16, 2022
    Configuration menu
    Copy the full SHA
    d3714be View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cb8479b View commit details
    Browse the repository at this point in the history
  3. Remove redundant tests for private methods

    - Testing private methods introduces coupling to implementation details. We should be testing public methods, which tests behaviors and outputs
    tomvothecoder committed May 16, 2022
    Configuration menu
    Copy the full SHA
    e6d7b1a View commit details
    Browse the repository at this point in the history
  4. Update TestAverage and TestGroupAverage fixtures

    - Use dataset custom dataset fixtures with less coordinate points and values other than 1 for easier and more robust testing
    tomvothecoder committed May 16, 2022
    Configuration menu
    Copy the full SHA
    5e8f7ab View commit details
    Browse the repository at this point in the history

Commits on May 17, 2022

  1. Configuration menu
    Copy the full SHA
    13d34d9 View commit details
    Browse the repository at this point in the history
  2. Add season_config to average()

    - Add tests for `season_config` arg
    - Update names of tests
    tomvothecoder committed May 17, 2022
    Configuration menu
    Copy the full SHA
    c957760 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    131ff69 View commit details
    Browse the repository at this point in the history
  4. Fix failing test

    tomvothecoder committed May 17, 2022
    Configuration menu
    Copy the full SHA
    d8b60ac View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1cffe6d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    da2cf9e View commit details
    Browse the repository at this point in the history

Commits on May 19, 2022

  1. Add _infer_freq() for inferring time freq

    - Update `TestAverage` unit tests to test different time frequencies
    tomvothecoder committed May 19, 2022
    Configuration menu
    Copy the full SHA
    f69df41 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8447736 View commit details
    Browse the repository at this point in the history

Commits on May 23, 2022

  1. Final review comments

    tomvothecoder committed May 23, 2022
    Configuration menu
    Copy the full SHA
    2d94c2c View commit details
    Browse the repository at this point in the history