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

eval_results decorator replacement #755

Open
wants to merge 31 commits into
base: main
Choose a base branch
from
Open

eval_results decorator replacement #755

wants to merge 31 commits into from

Commits on Sep 23, 2024

  1. rf: adjust patch to import and patch eval_results directly

    Previously the entrypoint for the patch was `_execute_command_()`. But
    now we aim to refactor the whole thing.
    mih committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    83b7e4e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a0c2826 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    87197f6 View commit details
    Browse the repository at this point in the history
  4. rf: remove needless separation of kwargs for command

    Previously, kwargs for the actual command were handled semi-separately
    from kwargs for result handling. However, I see no benefits, only added
    complexity.
    mih committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    1879453 View commit details
    Browse the repository at this point in the history
  5. rf: introduce ResultHandler

    `eval_func()` and its dependencies are a spaghetti monster. This commit
    introduces a `ResultHandler`, a class that provides functionality to
    handle results produced by a command execution.
    
    This idea is to factor out all result processing from result generation
    code. Moreover, a caller should eventually be able to provision an
    alternative result handler with different implementations for
    filtering, and rendering results.
    mih committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    9d74654 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    829c179 View commit details
    Browse the repository at this point in the history
  7. chore: import the remainder of eval_results dependencies

    The aim is to jointly refactor them.
    mih committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    6e52ccb View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    2436eba View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    fe78fba View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    2c521ba View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    2dabd52 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    46e30a9 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    02694ab View commit details
    Browse the repository at this point in the history
  14. rf: establish abstract base class ResultHandler

    And `LegacyResultHandler` as its only implementation for now.
    mih committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    0a00832 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    f180efe View commit details
    Browse the repository at this point in the history
  16. rf: separate result generation from handling of generated results

    This is now done by a configurabled, dedicated handler class.
    mih committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    3635941 View commit details
    Browse the repository at this point in the history
  17. test: add missing type annotation

    mih committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    29d7e4a View commit details
    Browse the repository at this point in the history
  18. feat: dedicated getter/setter the global result handler

    This replaces the initial implementation that would add yet another
    kwarg to each command.
    
    There is no real usecase for switching the result handler on a
    call-by-call basis.
    
    This new implementation follows the pattern found in libraries (like
    matplotlib) to set handlers or backends using top-level helper
    functions.
    mih committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    392da52 View commit details
    Browse the repository at this point in the history
  19. ci: add setup for type/code checker

    This anticipates a future move to `hatch` for project and environment
    management.
    mih committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    0144f73 View commit details
    Browse the repository at this point in the history
  20. fix: stop removing a logger attribute from the results

    The helper `_execute_command_()` is not the place to decide on the
    fate of a results, or to impose any constraints on how it can be
    used.
    
    If a logger "does not serialize, or pollutes the output", this is only
    relevant, when a result needs to be serialized, or printed.
    
    Any sensible implementation of such functionality will need to have
    means to deal with this problem (a logger is not the only source
    of complications). Removing it here is therefore premature.
    mih committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    a2bf643 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    4358cde View commit details
    Browse the repository at this point in the history
  22. fix: move eval_results patching to an earlier position

    Otherwise it does not affect the remaining patches, like it should.
    One example is the `configuration` patch, which essentially replaces
    an entire command implementation.
    mih committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    ba9d2a4 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    d8368a0 View commit details
    Browse the repository at this point in the history
  24. feat: sketch of a new configuration manager

    This will eventually fix
    datalad#397
    mih committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    154ca4d View commit details
    Browse the repository at this point in the history
  25. feat: add legacy compatibility layer to new configuration manager

    This will eventually yield a near drop-in replacement for the legacy
    `ConfigManager`.
    mih committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    badbc4f View commit details
    Browse the repository at this point in the history
  26. TMP LAZY

    mih committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    bdad32b View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    c76a7da View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    61a60d3 View commit details
    Browse the repository at this point in the history
  29. TMP

    mih committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    21b70ea View commit details
    Browse the repository at this point in the history
  30. TMP

    mih committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    14bae3f View commit details
    Browse the repository at this point in the history
  31. TMP

    mih committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    55f2e20 View commit details
    Browse the repository at this point in the history