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

#574 Avoid Recomputing Schedules #616

Merged
merged 39 commits into from Apr 14, 2023
Merged

Commits on Mar 27, 2023

  1. Issue #575

    This commit includes the definition of the decorator @redis_cache, which allows to cache job creation whe a function is called with the same arguments.
    
    Signed-off-by: victor <victor@seita.nl>
    victorgarcia98 committed Mar 27, 2023
    Copy the full SHA
    21d7b3b View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2023

  1. Fixing typos and changing hashing function.

    Signed-off-by: victor <victor@seita.nl>
    victorgarcia98 committed Mar 28, 2023
    Copy the full SHA
    c715030 View commit details
    Browse the repository at this point in the history
  2. Updating hash function: now classes with the method make_hashable can…

    … provide a tuple with the paramterers to be considered for the hash. Added some extra info to the docstrings.
    
    Signed-off-by: victor <victor@seita.nl>
    victorgarcia98 committed Mar 28, 2023
    Copy the full SHA
    d1d2f5d View commit details
    Browse the repository at this point in the history
  3. The decorator allows creating new jobs in case that the previous call…

    … has failed.
    
    Signed-off-by: victor <victor@seita.nl>
    victorgarcia98 committed Mar 28, 2023
    Copy the full SHA
    fcc3345 View commit details
    Browse the repository at this point in the history
  4. Importing annotations from __future__ for typing of functions arguments.

    Signed-off-by: victor <victor@seita.nl>
    victorgarcia98 committed Mar 28, 2023
    Copy the full SHA
    d24ef38 View commit details
    Browse the repository at this point in the history
  5. Add more tests to handle ordering in dictionaries and in arrays.

    Signed-off-by: victor <victor@seita.nl>
    victorgarcia98 committed Mar 28, 2023
    Copy the full SHA
    c39d96e View commit details
    Browse the repository at this point in the history
  6. Add test to check if serialized dictionaries (json strings) order yie…

    …lds different hashes.
    
    Signed-off-by: victor <victor@seita.nl>
    victorgarcia98 committed Mar 28, 2023
    Copy the full SHA
    61b8d40 View commit details
    Browse the repository at this point in the history
  7. Adding PR to changelog.rst

    Signed-off-by: victor <victor@seita.nl>
    victorgarcia98 committed Mar 28, 2023
    Copy the full SHA
    8c28fe0 View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2023

  1. Adding force_new_job_creation into @redis_cache decorator to force th…

    …e creation of a new job.
    
    Signed-off-by: victor <victor@seita.nl>
    victorgarcia98 committed Mar 30, 2023
    Copy the full SHA
    f80bb9d View commit details
    Browse the repository at this point in the history
  2. Simplyfying access to optional keyword argument.

    Signed-off-by: victor <victor@seita.nl>
    victorgarcia98 committed Mar 30, 2023
    Copy the full SHA
    fbc350d View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    495a03b View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2023

  1. Main changes:

    Fixed some typos.
    Simplified a test.
    Renamed @redis_cache -> @job_cache.
    Updated docstrings.
    
    Signed-off-by: victor <victor@seita.nl>
    victorgarcia98 committed Mar 31, 2023
    Copy the full SHA
    7c1271e View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    688b53e View commit details
    Browse the repository at this point in the history
  3. Fixing some typos.

    Signed-off-by: victor <victor@seita.nl>
    victorgarcia98 committed Mar 31, 2023
    Copy the full SHA
    d5c6340 View commit details
    Browse the repository at this point in the history
  4. Merge remote-tracking branch 'origin/574-avoid-recomputing-schedules'…

    … into 574-avoid-recomputing-schedules
    victorgarcia98 committed Mar 31, 2023
    Copy the full SHA
    8429438 View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    d4c59a0 View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2023

  1. Getting generic_asset attributes right

    Signed-off-by: victor <victor@seita.nl>
    victorgarcia98 committed Apr 4, 2023
    Copy the full SHA
    eddfa59 View commit details
    Browse the repository at this point in the history
  2. Fixing comments grammar and adding type to the @job_cache decorator.

    Signed-off-by: victor <victor@seita.nl>
    victorgarcia98 committed Apr 4, 2023
    Copy the full SHA
    9a75316 View commit details
    Browse the repository at this point in the history
  3. Adding a better changelog entry for this PR.

    Signed-off-by: victor <victor@seita.nl>
    victorgarcia98 committed Apr 4, 2023
    Copy the full SHA
    7dd0df3 View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2023

  1. Implementation + Tests of the requeueing feature.

    Signed-off-by: victor <victor@seita.nl>
    victorgarcia98 committed Apr 5, 2023
    Copy the full SHA
    31f6228 View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2023

  1. Adding clarifications and argument description in docstrings.

    Signed-off-by: victor <victor@seita.nl>
    victorgarcia98 committed Apr 6, 2023
    Copy the full SHA
    371df95 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    33800a1 View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2023

  1. Clarify arguments in docstring

    Signed-off-by: F.N. Claessen <felix@seita.nl>
    Flix6x authored and Felix committed Apr 8, 2023
    Copy the full SHA
    7f471f0 View commit details
    Browse the repository at this point in the history
  2. Decorator docstring should list decorator arguments, rather than argu…

    …ments of the function being decorated
    
    Signed-off-by: F.N. Claessen <felix@seita.nl>
    Flix6x authored and Felix committed Apr 8, 2023
    Copy the full SHA
    cce93db View commit details
    Browse the repository at this point in the history
  3. Refactor: simpler lines of code

    Signed-off-by: F.N. Claessen <felix@seita.nl>
    Flix6x authored and Felix committed Apr 8, 2023
    Copy the full SHA
    b78c9f9 View commit details
    Browse the repository at this point in the history
  4. Remove redundant lines

    Signed-off-by: F.N. Claessen <felix@seita.nl>
    Flix6x authored and Felix committed Apr 8, 2023
    Copy the full SHA
    7d41613 View commit details
    Browse the repository at this point in the history
  5. Make the @job_cache decorator agnostic to whichever queue is passed

    Signed-off-by: F.N. Claessen <felix@seita.nl>
    Flix6x authored and Felix committed Apr 8, 2023
    Copy the full SHA
    e1e1e88 View commit details
    Browse the repository at this point in the history
  6. Clarification: "requeue" instead of "re-enqueue", because "enqueuing"…

    … assigns a queue, and in case of "requeuing", a queue doesn't need to be reassigned; the job already knows which queue it should go in when it is requeued.
    
    Signed-off-by: F.N. Claessen <felix@seita.nl>
    Flix6x authored and Felix committed Apr 8, 2023
    Copy the full SHA
    1f4b624 View commit details
    Browse the repository at this point in the history
  7. Add missing argument and explain how function arguments are used

    Signed-off-by: F.N. Claessen <felix@seita.nl>
    Flix6x authored and Felix committed Apr 8, 2023
    Copy the full SHA
    aee155b View commit details
    Browse the repository at this point in the history
  8. Hashes are not stored under queues

    Signed-off-by: F.N. Claessen <felix@seita.nl>
    Flix6x authored and Felix committed Apr 8, 2023
    Copy the full SHA
    6acd9cf View commit details
    Browse the repository at this point in the history
  9. Remove redundant queue (name) argument from @job_cache

    Signed-off-by: F.N. Claessen <felix@seita.nl>
    Flix6x authored and Felix committed Apr 8, 2023
    Copy the full SHA
    b6c60a6 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2023

  1. Adding TTL to job caching keys configured through the config variable…

    … FLEXMEASURES_JOB_CACHE_TTL.
    
    Signed-off-by: victor <victor@seita.nl>
    victorgarcia98 committed Apr 10, 2023
    Copy the full SHA
    478fe5c View commit details
    Browse the repository at this point in the history
  2. Adding function and queue names to the hash of the Job creation call.

    Signed-off-by: victor <victor@seita.nl>
    victorgarcia98 committed Apr 10, 2023
    Copy the full SHA
    86a865c View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2023

  1. Copy the full SHA
    e07b302 View commit details
    Browse the repository at this point in the history
  2. Adding FLEXMEASURES_JOB_CACHE_TTL into the config settings docs.

    Signed-off-by: victor <victor@seita.nl>
    victorgarcia98 committed Apr 11, 2023
    Copy the full SHA
    5a6fe4d View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2023

  1. Merge remote-tracking branch 'origin/main' into 574-avoid-recomputing…

    …-schedules
    
    Signed-off-by: victor <victor@seita.nl>
    victorgarcia98 committed Apr 12, 2023
    Copy the full SHA
    0a316ba View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2023

  1. Copy the full SHA
    570fabf View commit details
    Browse the repository at this point in the history
  2. PR: Avoid redundantly recomputing jobs that are triggered without a r…

    …elevant state change.
    
    Squashed commit of the following:
    
    commit 79ef71a
    Author: victor <victor@seita.nl>
    Date:   Thu Mar 30 15:38:55 2023 +0200
    
        Fixing typos on @deprecated decorator and trigger warnings through loggere.
    
        Signed-off-by: victor <victor@seita.nl>
    
    commit 7faa6e6
    Author: victor <victor@seita.nl>
    Date:   Wed Mar 29 23:28:00 2023 +0200
    
        Adding version of sunset of a function/method to the @deprecated decorator
    
        Signed-off-by: victor <victor@seita.nl>
    
    commit fe228d2
    Author: victor <victor@seita.nl>
    Date:   Mon Mar 27 11:57:32 2023 +0200
    
        Getting location of the new funciton directly from the importable object.
    
        Signed-off-by: victor <victor@seita.nl>
    
    commit c1be8db
    Author: victor <victor@seita.nl>
    Date:   Sun Mar 26 23:26:28 2023 +0200
    
        Adding deprecated messages for the functions that were moved.
    
        Signed-off-by: victor <victor@seita.nl>
    
    commit ac4a232
    Author: victor <victor@seita.nl>
    Date:   Thu Mar 23 22:29:48 2023 +0100
    
        Issue #599
    
        Forgot to add `from __future__ import annotations`. Local testing worked as I'm uing Python v3.10.
    
        Signed-off-by: victor <victor@seita.nl>
    
    commit 3ff0571
    Author: victor <victor@seita.nl>
    Date:   Thu Mar 23 22:02:11 2023 +0100
    
        Issue #599
        Moving get_asset_group_queries from data/services to data/queries
    
        Signed-off-by: victor <victor@seita.nl>
    
    commit 53fc214
    Author: victor <victor@seita.nl>
    Date:   Thu Mar 23 20:30:31 2023 +0100
    
        Issue #599
        Moving DataSources fetching from query to services.
    
        Signed-off-by: victor <victor@seita.nl>
    
    Signed-off-by: victor <victor@seita.nl>
    victorgarcia98 committed Apr 13, 2023
    Copy the full SHA
    a694443 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2023

  1. Revert "PR: Avoid redundantly recomputing jobs that are triggered wit…

    …hout a relevant state change."
    
    This reverts commit a694443.
    victorgarcia98 committed Apr 14, 2023
    Copy the full SHA
    bec16e2 View commit details
    Browse the repository at this point in the history