Skip to content

Commit

Permalink
Add minimum_version to .util.__all__
Browse files Browse the repository at this point in the history
  • Loading branch information
khaeru committed Nov 22, 2023
1 parent 4e20e9d commit 494baa7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions message_ix_models/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"make_source_tech",
"maybe_query",
"merge_data",
"minimum_version",
"package_data_path",
"private_data_path",
"replace_par_data",
Expand Down Expand Up @@ -494,15 +495,13 @@ def merge_data(
def minimum_version(expr: str) -> Callable:
"""Decorator for functions that require a minimum version of some upstream package.
See :func:`.prepare_reporter` for a usage example.
See :func:`.prepare_reporter` / :func:`.test_prepare_reporter` for a usage example.
Parameters
----------
expr :
Like "example 1.2.3.post0". The condition for the decorated function is that
the installed version
message :
Message about the decorated function.
the installed version must be equal to or greater than this version.
"""

from packaging.version import parse
Expand Down

0 comments on commit 494baa7

Please sign in to comment.