From ab8a2938b8cf3cc7b13ae192a8246aa0d7a26cc3 Mon Sep 17 00:00:00 2001 From: Marcel Bargull Date: Wed, 27 Mar 2024 19:53:47 +0100 Subject: [PATCH] Update dependencies to latest versions Signed-off-by: Marcel Bargull --- .../bioconda_utils-requirements.txt | 109 +++++++++--------- bioconda_utils/cli.py | 8 +- bioconda_utils/utils.py | 10 +- 3 files changed, 63 insertions(+), 64 deletions(-) diff --git a/bioconda_utils/bioconda_utils-requirements.txt b/bioconda_utils/bioconda_utils-requirements.txt index 8070b6a0e7..f1147f441b 100644 --- a/bioconda_utils/bioconda_utils-requirements.txt +++ b/bioconda_utils/bioconda_utils-requirements.txt @@ -2,60 +2,70 @@ # in ../docs/source/user/versions.rst # so please keep that documentation up to date as they change -# basics -python>=3.7 -conda=23.3.* -boa=0.15.* -conda-build=3.24.* -conda-verify=3.1.* -argh=0.26.* # CLI -colorlog=4.8.* # Logging -tqdm>=4.26 # Progress monitor -yaspin =2 -ruamel_yaml=0.15.* # Recipe YAML parsing -pyaml=17.12.* # Faster YAML parser (deprecate?) -networkx=2.* -pandas=1.4.* -numpy=1.19.* # Avoid breaking pandas on OSX -libblas=*=*openblas # Avoid large mkl package (pulled in by pandas) -boltons=23.* -jsonschema=3.2.* # JSON schema verification -pyopenssl>=22.1 # Stay compatible with cryptography - # pinnings conda-forge-pinning=2023.05.06.13.08.41 -# tools -anaconda-client=1.12.* # anaconda_upload -involucro=1.1.* # mulled test and container build -skopeo=1.11.* # docker upload -git=2.* # well - git +# basics +python=3.11.* # +conda=24.3.* # +conda-libmamba-solver=24.1.* # +conda-build=24.3.* # +boa=0.17.* # + +argh=0.31.* # CLI +colorlog=6.* # Logging +tqdm=4.66.* # Progress monitor +yaspin=2.* # +ruamel.yaml=0.18.* # Recipe YAML parsing +pyaml=23.12.* # Faster YAML parser (deprecate?) +networkx=3.2.* # +pandas=2.2.* # +libblas=*=*openblas # Avoid large mkl package (pulled in by pandas) +boltons=23.* # +jsonschema=4.21.* # JSON schema verification +jinja2=3.1.* # + +anaconda-client=1.12.* # anaconda_upload +galaxy-tool-util=23.* # mulled test and container build +involucro=1.1.* # mulled test and container build +skopeo=1.15.* # docker upload +git=2.* # well - git # hosters - special regex not supported by RE -regex=2022.7.9 +regex=2023.* # # asyncio -aiohttp=3.8.* # HTTP lib -aiohttp-jinja2 # jinja2 renderer for aiohttp.web -aiohttp-session -aiohttp-security -aiofiles=0.8.* # async open -aioftp=0.12.* # FTP lib -backoff=2.2.* # retrying of failed API calls -cachetools=3.0.* # request caching (NEEDED?) +aiohttp=3.9.* # HTTP lib +aiohttp-jinja2 # jinja2 renderer for aiohttp.web +aiohttp-session # +aiohttp-security # +aiofiles=23.* # async open +aioftp=0.22.* # FTP lib +backoff=2.2.* # retrying of failed API calls +cachetools=5.3.* # request caching (NEEDED?) # client API wrappers -gitpython>=3.0.8,3.0.* # githandler - # needs >=3.0.8 due to https://github.com/conda-forge/staged-recipes/issues/10874 -gidgethub=3.0.* # githubhandler -pyjwt>=2.4.0 # githubhandler (JWT signing), needs >=2.4.0, CVE-2022-29217 +gitpython=3.1.* # githandler +gidgethub=5.* # githubhandler +pyjwt>=2.4.0 # githubhandler (JWT signing), needs >=2.4.0, CVE-2022-29217 + +# bioconductor-skeleton +beautifulsoup4=4.* # -# unknown -beautifulsoup4=4.12.* -galaxy-lib>=18.9.1 -jinja2>=2.10.1,<3 -markupsafe<2.1 # markupsafe 2.1 breaks jinja2 +# The bioconductor skeleton needs this +requests=2.31.* # + +# merge handling +pygithub # + +# caching +diskcache=5.* # +platformdirs=4.* # +# build failure output +tabulate=0.9.* # + +# TODO: Remove these from general requirements into a doc-only-requirements file. # docs sphinx>=4.1 celery @@ -64,16 +74,3 @@ alabaster=0.7.* docutils markdown graphviz - -# The bioconductor skeleton needs this -requests=2.29.* - -# merge handling -pygithub - -# caching -diskcache =5.* -appdirs =1.* - -# build failure output -tabulate =0.9 \ No newline at end of file diff --git a/bioconda_utils/cli.py b/bioconda_utils/cli.py index 5abcf1f159..f1712d5b4d 100644 --- a/bioconda_utils/cli.py +++ b/bioconda_utils/cli.py @@ -56,7 +56,7 @@ def decorator(func): @arg('--logfile', help="Write log to file") @arg('--logfile-level', help="Log level for log file") @arg('--log-command-max-lines', help="Limit lines emitted for commands executed") - @utils.wraps(func) + @utils.wraps(func, hide_wrapped=True) def wrapper(*args, loglevel=default_loglevel, logfile=None, logfile_level=default_file_loglevel, log_command_max_lines=None, **kwargs): @@ -125,7 +125,7 @@ def decorator(func): for field in allow_missing_for or []] except ValueError: sys.exit(f"Function {func} must have 'recipe_folder' and 'config' args") - @arg('recipe_folder', nargs='?', + @arg('recipe-folder', nargs='?', help='Path to folder containing recipes (default: recipes/)') @arg('config', nargs='?', help='Path to Bioconda config (default: config.yml)') @@ -760,7 +760,7 @@ def dependent(recipe_folder, config, restrict=False, is specified, then all packages in a given bioconductor release will be created/updated (--force is then implied).''') @recipe_folder_and_config() -@arg('bioc_data_packages', nargs='?', +@arg('bioc-data-packages', nargs='?', help='''Path to folder containing the recipe for the bioconductor-data-packages (default: recipes/bioconductor-data-packages)''') @arg('--versioned', action='store_true', help='''If specified, recipe will be @@ -851,8 +851,6 @@ def clean_cran_skeleton(recipe, no_windows=False): cran_skeleton.clean_skeleton_files(recipe, no_windows=no_windows) -@arg('recipe_folder', help='Path to recipes directory') -@arg('config', help='Path to yaml file specifying the configuration') @recipe_folder_and_config() @arg('--packages', nargs="+", help='Glob(s) for package[s] to scan. Can be specified more than once') diff --git a/bioconda_utils/utils.py b/bioconda_utils/utils.py index cc6be6ec09..73fbb23947 100644 --- a/bioconda_utils/utils.py +++ b/bioconda_utils/utils.py @@ -34,7 +34,7 @@ from yaspin import yaspin, Spinner from yaspin.spinners import Spinners from urllib3 import Retry -import appdirs +import platformdirs import diskcache from github import Github @@ -66,7 +66,7 @@ logger = logging.getLogger(__name__) -disk_cache = diskcache.Cache(appdirs.user_cache_dir("bioconda-utils")) +disk_cache = diskcache.Cache(platformdirs.user_cache_dir("bioconda-utils")) class TqdmHandler(logging.StreamHandler): @@ -120,7 +120,7 @@ def ensure_list(obj): return [obj] -def wraps(func): +def wraps(func, hide_wrapped=False): """Custom wraps() function for decorators This one differs from functiools.wraps and boltons.funcutils.wraps in @@ -151,6 +151,10 @@ def wrapper_wrapper(wrapper_func): fully_wrapped.__wrapped__ = func return fully_wrapped + if hide_wrapped and hasattr(fully_wrapped, '__wrapped__'): + del fully_wrapped.__dict__['__wrapped__'] + elif not hide_wrapped: + fully_wrapped.__wrapped__ = func return wrapper_wrapper